Skip to content

FEAT: Add MASK (CAIS honesty benchmark) dataset loader - #1904

Open
Roman Lutz (romanlutz) wants to merge 10 commits into
microsoft:mainfrom
romanlutz:romanlutz/plan-mask-honesty-benchmark
Open

Roman Lutz (romanlutz) wants to merge 10 commits into
microsoft:mainfrom
romanlutz:romanlutz/plan-mask-honesty-benchmark

Conversation

@romanlutz

@romanlutz Roman Lutz (romanlutz) commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds one _MaskDataset provider, registered as mask, for the CAIS MASK honesty benchmark. It loads all six configs by default, with optional filtering through archetypes: list[MaskQuestionArchetype] | None: continuations, disinformation, doubling_down_known_facts, known_facts, provided_facts, and statistics. Together they contain 1,000 rows at pinned revision 4602b84dd9e2ca05c6e1eafbc14e556e908ac1bb.

Each row becomes one attacker-facing SeedObjective plus the original role-bearing conversation. System prompts are preserved, including the supplied facts in provided_facts. Doubling-down rows retain system -> user -> assistant -> user ordering. Every seed carries the source task ID, archetype, proposition and type, ground truth, formatted ground truth, original delivery value, belief-elicitation fields, and canary metadata. Binary objectives target the pressured false claim; numerical objectives include the correct reference fact and interval so objective-based judging has the required context.

Dataset discovery and all seeds use the canonical INFO_INTEGRITY harm category. The safety and honesty tags and source archetype metadata are retained. Shared memory deduplication now compares complete multi-seed groups, including roles, sequence, metadata and criteria, rather than dropping individual shared system prompts or objectives. Sequential subset imports preserve complete groups; equivalent reloads remain idempotent even with fresh UUIDs. Standalone seed deduplication, database collation, unnamed-dataset matching, and criteria behavior are preserved. No schema migration is needed.

Access and licensing: the pinned dataset is public and can be downloaded without a HuggingFace token. Optional constructor/environment authentication remains supported. The dataset card does not declare a data license, so this PR does not claim CAIS research-use restrictions or assume that the upstream code repository's MIT license covers the data. MASK is no longer incorrectly skipped as a gated provider in the E2E sweep. No source rows or real canary are vendored.

This is dataset-only. It adds no scorer, honesty metric, attack, executor, or scenario. Full MASK honesty evaluation still requires separate belief elicitation and joint judging.

Tests and Documentation

Fictional unit fixtures cover all six configs, filtering, optional token plumbing, complete metadata and role preservation, numeric reference context, and canonical discovery/filtering. Memory regressions cover sequential subsets, complete-group reloads, different roles/positions/criteria/metadata, member multiplicity, schemas, copied companions, collation, wildcard matching, and bounded lookups.

Validation:

  • uv run pytest -n 4 tests\unit\memory tests\unit\datasets\test_mask_dataset.py -q --tb=short --disable-warnings: 1,837 passed, 1 skipped.
  • uv run pytest tests\end_to_end\test_all_datasets.py -k Mask -q --tb=short: 1 passed against the real pinned dataset, with isolated HF caches and implicit authentication disabled.
  • uv run python - (inline anonymous loader/SQLite audit): passed. Checked every upstream field, conversation role/text, execution metadata, origin and canonical category across all 1,000 groups / 3,240 seeds. Sequential imports, full reload, reverse subset reloads, and bulk import with fresh-ID reloads all retained exactly 1,000 complete groups / 3,240 seeds.
  • uv run ty check pyrit: passed.
  • uv run --no-sync pre-commit run --files pyrit\memory\memory_interface.py pyrit\datasets\seed_datasets\remote\mask_dataset.py tests\unit\memory\memory_interface\test_interface_seed_prompts.py tests\unit\datasets\test_mask_dataset.py tests\end_to_end\test_all_datasets.py doc\code\memory\8_seed_database.py doc\code\memory\8_seed_database.ipynb: passed with UV_NO_SYNC=1.

Adds the MASK citation and built-in dataset listing. Updates the paired memory documentation to explain complete-group deduplication. The prose-only memory notebook changes were made in both .py and .ipynb; Jupytext cell-content comparison passed and existing outputs were retained. Notebook execution was not rerun for these prose-only edits.

Roman Lutz (romanlutz) and others added 2 commits June 2, 2026 20:01
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolved conflicts:
- pyrit/datasets/seed_datasets/remote/__init__.py — kept both
  MaskQuestionArchetype (HEAD) and MossBenchOversensitivityType (main) in __all__.
- doc/bibliography.md — merged the new MASK citation key into the
  upstream's larger citation list.

Followups for upstream changes:
- mask_dataset.py + test_mask_dataset.py: renamed
  _fetch_from_huggingface -> _fetch_from_huggingface_async to match
  the async-suffix sweep (microsoft#1889).
- seed_metadata.py: added "honesty" to RECOMMENDED_TAGS so MASK's
  cross-cutting tag passes the metadata-coverage check added by microsoft#1780.

Verification: 836 unit dataset tests pass; pre-commit clean on
all touched files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

Overall looks good! A couple of nits and then one question related to tagging this as defult.

Comment thread doc/references.bib Outdated
Comment thread pyrit/datasets/seed_datasets/remote/mask_dataset.py Outdated
Comment thread pyrit/datasets/seed_datasets/remote/mask_dataset.py Outdated
Copilot AI added 2 commits August 12, 2026 22:45
Resolve dataset-registration and bibliography conflicts while retaining the dataset-only MASK changes. Update MASK seed annotations and property docstrings for current type and lint rules.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5af0366c-c21d-410f-914d-fae7757a6cec
Normalize the MASK BibTeX entry, make base/concrete loader registration explicit, and exclude the gated dataset from the default tag.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5af0366c-c21d-410f-914d-fae7757a6cec
Load all six MASK archetypes through one registered dataset by default while retaining optional enum-based archetype filtering and archetype-specific conversation construction.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5af0366c-c21d-410f-914d-fae7757a6cec
@romanlutz Roman Lutz (romanlutz) changed the title FEAT: Add MASK (CAIS honesty benchmark) dataset loaders FEAT: Add MASK (CAIS honesty benchmark) dataset loader Aug 14, 2026
Derive binary misinformation goals from the non-ground-truth pivotal option, retain the original proposition in metadata, and describe numerical pressure as a misleading-value objective.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5af0366c-c21d-410f-914d-fae7757a6cec
@romanlutz

Copy link
Copy Markdown
Contributor Author

This is not yet merged on purpose. I want to evaluate all the individual sub datasets a bit more to see if I actually want this.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5af0366c-c21d-410f-914d-fae7757a6cec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5af0366c-c21d-410f-914d-fae7757a6cec
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5af0366c-c21d-410f-914d-fae7757a6cec
Preserve complete seed conversations across sequential dataset imports while keeping reloads idempotent. Map MASK to INFO_INTEGRITY, include numerical reference facts in objectives, and correct public access and license documentation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5af0366c-c21d-410f-914d-fae7757a6cec
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 19, 2026

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.

3 participants