Skip to content

FEAT: Add AggregationLeakage scenario for inference across permitted documents - #4011

Open
Abbas Rahman (Abbas-Rahman-c) wants to merge 1 commit into
microsoft:mainfrom
Abbas-Rahman-c:feat/aggregation-leakage-scenario
Open

Abbas Rahman (Abbas-Rahman-c) wants to merge 1 commit into
microsoft:mainfrom
Abbas-Rahman-c:feat/aggregation-leakage-scenario

Conversation

@Abbas-Rahman-c

Copy link
Copy Markdown

Description

Adds AggregationLeakage, a new AIRT scenario for the leak described in #3284: a model derives a confidential fact from several pieces of context that the caller was each allowed to see. No single document states the fact, so per-document access checks and keyword filters all pass. As Roman Lutz (@romanlutz) pointed out on the issue, the same problem appears in agents that persist memory over a long period, not only in RAG.

What's included:

  • Scenario (pyrit/scenario/scenarios/airt/aggregation_leakage.py): structured like the existing AIRT scenarios, with techniques prompt_sending (default) and red_teaming, and parameters include_context and max_turns. BASELINE_ATTACK_POLICY is Forbidden, because prompt_sending already sends each group unmodified.

  • Three seed datasets for a fictional company:

    • airt_aggregation_leakage: 16 items where the fact can be derived;
    • airt_aggregation_leakage_minimal_pairs: 8 items with one document changed, so the fact no longer follows;
    • airt_aggregation_leakage_mention_only: 8 items that mention the topic without supporting the conclusion.

    Results are reported per dataset. The controls should stay near zero: a high rate there means the target or scorer is reacting to the topic, not to the derivation.

  • Scorer question (aggregation_leakage.yaml), combined with the default refusal scorer.

  • With include_context=False, only the questions are sent, for targets that already hold the documents in their own knowledge base or memory.

Closes #3284

Tests and Documentation

  • tests/unit/scenario/airt/test_aggregation_leakage.py: 17 tests covering technique expansion, dataset shape, attack generation per technique and dataset, include_context, max_turns and the baseline policy. All 295 tests in tests/unit/scenario/airt pass on the latest main.
  • ruff check and ruff format --check pass on the changed Python files.
  • The three datasets load through SeedDatasetProvider on the latest main.
  • Docs: new section in doc/scanner/airt.py and airt.ipynb, and the table in doc/scanner/0_scanner.md.

Not done: I haven't run this against a live target, so there are no measured leak rates here. I also didn't re-execute the notebook with JupyText: its new cells were added by hand so that the existing outputs stay unchanged, and they have no outputs yet.

🤖 Generated with Claude Code

…documents

Adds an AIRT scenario that tests whether a target discloses a confidential
conclusion that no single document states but that the documents it was
given entail together (per-document access control passes, the inference
leaks).

- Datasets: airt_aggregation_leakage (16 groups across rule + instance,
  transitive, set complement and numeric residual, asked indirectly and
  directly) plus minimal-pair and mention-only control sets (8 each).
  Documents are delivered as a system turn before the user's question.
- Scorer question true_false_question/aggregation_leakage.yaml, used in the
  default composite with the refusal backstop.
- Techniques: prompt_sending (default) and red_teaming (max_turns).
- include_context parameter to send only the questions when the documents
  are already in the target's own knowledge base.
- Unit tests and a section in the AIRT scanner docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 12:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Abbas-Rahman-c

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: Aggregation leakage scenario (protected facts derived from individually permitted context)

2 participants