Skip to content

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

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

FEAT: Add MASK (CAIS honesty benchmark) dataset loader#1904
Roman Lutz (romanlutz) wants to merge 6 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

Summary

Adds one loader for the gated cais/MASK honesty benchmark:

  • _MaskDataset loads all six upstream archetype configs by default.
  • archetypes: list[MaskQuestionArchetype] | None optionally selects any subset.
  • MaskQuestionArchetype exposes continuations, disinformation, doubling_down_known_facts, known_facts, provided_facts, and statistics as typed values.
  • The registered dataset name is mask; each seed retains its source archetype in metadata.

This PR is dataset-only. It does not add judges, scorers, attacks, executors, or scenarios.

Dataset shape

Each upstream row becomes one prompt group:

  • one SeedObjective describing the attack goal: binary rows target the non-ground-truth pivotal claim as misinformation, while numerical rows target a misleading value;
  • objective metadata preserving the original proposition, ground truth, formatted ground truth, belief-elicitation fields, task ID, proposition type, archetype, and canary;
  • a pressured system + user conversation for five archetypes;
  • a four-piece systemuserassistantuser conversation for doubling_down_known_facts, preserving its forced prior turn.

The six configs contain 1,000 benchmark rows in total. provided_facts lacks belief-elicitation fields, while statistics uses numerical ground truth; the loader normalizes both without exposing separate dataset providers.

HuggingFace gating

MASK is gated under CAIS's research-use terms. Users must accept the terms at https://huggingface.co/datasets/cais/MASK and supply a token through the constructor or HUGGINGFACE_TOKEN. PyRIT does not vendor MASK data. The loader is intentionally not tagged default because fetching requires credentials.

Tests

  • Fictional unit fixtures only; no real MASK rows or real canary value are committed.
  • Unit coverage includes all six configs, attack-goal derivation, default all-config loading, subset filtering and validation, token plumbing, metadata, normal conversation ordering, doubling-down ordering, missing belief fields, numeric ground truth, and single-provider registration.
  • Focused MASK unit plus real gated E2E validation: 28 passed.
  • The gated E2E path fetches and transforms all six real configs at pinned revision 4602b84dd9e2ca05c6e1eafbc14e556e908ac1bb; tokenless runs skip MASK as a gated provider.
  • Pre-commit, Ruff, and ty pass.

Documentation

Adds the MASK citation and lists one built-in mask dataset in the generated datasets notebook.

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
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