abliteration.org
Get the app

Two ways to read this site

Technical mode is the default: exact terms and codes, for engineers, researchers, journalists and companies. Simple mode gives the same facts in plain words, for anyone who wants a model that runs on their own computer. You can switch at any time at the top of the page.

technical
MLX weights for Apple silicon (M1 or later), usually quantized to 4 or 8 bits.
simple
Made for Macs with Apple silicon (M1 or newer), usually compressed to 4 or 8 bits.

m-zest/trojanspec-bench

published by @m-zest

Safety benchmarks, over-refusal tests, and guard-model data.Safety tests and tests for refusing harmless requests.

task_categories:text-classificationlanguage:enlicense:cc-by-4.0size_categories:1K<n<10Kformat:parquetmodality:textlibrary:datasetslibrary:pandas +12 more
Lifetime downloads
430
Last 30 days
65
Likes
-
Size
91.2 KB

Description

TrojanSpec-Bench v4

1024 verifier-admitted adversarial formal specifications across Dafny,

Lean 4, and Verus - a benchmark for evaluating defenders against

specification-level Trojan attacks, where an AI specification

elicitor produces a spec that (1) the verifier accepts, (2) reads as

faithful English, but (3) does not actually entail the natural-language

requirement.

Source repository: https://github.com/m-zest/TrojanSpec-Bench-v1.0

(release v0.4.1). Interactive demo:… See the full description on the dataset page: https://huggingface.co/datasets/m-zest/trojanspec-bench.

Structure 1 config · from the README front matter1 subset, from the author's description

default default
Data files
test data/test-*.parquet

Used by uncensored models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.No model in our catalog lists this dataset yet. It may be used without being listed, used for other work, or simply be new. The list fills in by itself as models are added.

MetadataDetails

License
cc-by-4.0
Language
en
Created on HFCreated
2026-05-20 · 6 months ago
Size category
1K<n<10K
ModalitiesData types
text
Formats
parquet
LibrariesTools
datasetspandaspolarsmlcroissant

Related datasets same stage · Evaluatesame step · Testing

Read further

Total size
91.2 KB
Files
3
Formats
parquet
Head
ea58cc0
Last updated on HFLast updated
2026-05-24

Download the dataset

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.Each of these lines of code downloads the dataset straight from Hugging Face, with your own Hugging Face login.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("m-zest/trojanspec-bench")
Raw snapshot (Python)All files (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="m-zest/trojanspec-bench", repo_type="dataset")
git clone (requires git-lfs)With git (needs git-lfs)
git clone https://huggingface.co/datasets/m-zest/trojanspec-bench

Files by folder from our last crawlfrom our last check

top level 2 files 11.2 KB
.gitattributes 2.5 KB file download
README.md 8.7 KB md download
data/ 1 file 80.0 KB
test-00000-of-00001.parquet 80.0 KB parquet download

READMEAuthor's description current version from Hugging Faceas it is now on Hugging Face

TrojanSpec-Bench v4

1024 verifier-admitted adversarial formal specifications across Dafny,
Lean 4, and Verus
- a benchmark for evaluating defenders against
specification-level Trojan attacks, where an AI specification
elicitor produces a spec that (1) the verifier accepts, (2) reads as
faithful English, but (3) does not actually entail the natural-language
requirement.

Source repository: https://github.com/m-zest/TrojanSpec-Bench-v1.0
(release v0.4.1). Interactive demo:
https://huggingface.co/spaces/m-zest/specguard-demo.

Threat model

A developer asks an AI assistant to (a) write a formal spec S for an
English requirement R, and (b) write an implementation I plus a
machine proof that I ⊨ S. The verifier checks the proof. The
adversary is the spec elicitor; the bug lives in R \ S, which no
verifier can see. Full threat model: docs/threat_model.md in the
GitHub repo.

Schema

field type meaning
triple_id string UUID for the triple
language string one of dafny, lean, verus
attack_pattern string one of vacuity, implementation_leak, domain_restriction, predicate_swap
difficulty string seed-difficulty tag (easy/medium/hard)
model_origin string which elicitor produced the trojan (sonnet/haiku/llama)
elicitor_model string full Bedrock model id
elicitor_temperature float sampling temperature used
nl_requirement string the natural-language requirement R
preamble string shared helper definitions / imports / axioms visible to both specs
original_spec string the honest spec (paired control)
trojan_spec string the adversarial spec
trojan_witness string a witness implementation + proof that the verifier accepts under trojan_spec
source_benchmark string seed source (e.g. vericoding, cryspec-anchor)
crypto_primitive string crypto-anchor tag if applicable (e.g. ed25519, ml-kem)
source_problem_hash string SHA-256 of the seed problem (dedupe key)
validation_timestamp string ISO-8601 UTC timestamp of verifier admission
verifier_accepts_witness_under_trojan bool always true for admitted triples (admission gate)
verifier_rejects_witness_under_original bool always true for admitted triples (the witness is genuinely incorrect under the honest spec)

Splits

Single test split - this is a benchmark, not training data. Use
the model_origin field if you need a held-out set (Sonnet-generated
triples are the primary corpus; Haiku and Llama are cross-family controls).

from datasets import load_dataset
ds = load_dataset("m-zest/trojanspec-bench", split="test")
print(len(ds), "triples")
print(ds[0]["nl_requirement"])
print(ds[0]["trojan_spec"])

Generation methodology

The dataset evolved across four contract designs (v1 → v4); only v4 is
released here. Full iteration history:
STATUS.md
in the source repo.

  • Elicitor: Bedrock Claude Sonnet 4.6 (primary, 906 triples) +
    Claude Haiku 4.5 (59) + Meta Llama-3.3 70B (59) for
    cross-family diversity.
  • v4 contract: shared preamble (helper definitions, imports,
    axioms) + single target spec/witness. Eliminates schema mismatch and
    enables real preamble-mediated implementation leaks.
  • Verifier-proven few-shot: all 8 Lean worked examples (A+B × 4
    attacks) are confirmed acc_troj=True / rej_orig=True through a
    fixed verify_lean that runs lake env lean Main.lean instead of
    lake build (the original bug spuriously accepted every Lean
    triple). Same correctness gate for Dafny and Verus.
  • Phase 7 admission gate: a triple is admitted only if the verifier
    accepts the witness under trojan_spec AND rejects the same
    witness under original_spec. This is the strongest possible
    ground-truth signal: the witness is genuinely incorrect under the
    honest spec but provably accepted under the trojan.

Statistics

Per-language admission (Phase 7)

language admitted / total rate
Dafny 319 / 600 53.2 %
Lean 417 / 600 69.5 %
Verus 288 / 598 48.2 %
all 1024 / 1798 57.0 %

Per-attack distribution (Phase 7 admitted)

attack pattern admitted / generated rate
implementation_leak 377 / 450 83.8 %
vacuity 348 / 450 77.3 %
domain_restriction 187 / 450 41.6 %
predicate_swap 112 / 448 25.0 %

Elicitor model distribution (this release)

| haiku | 59 |
| llama | 59 |
| sonnet | 906 |

(model_origin = sonnet is the primary set; haiku and llama are
cross-family ablation controls. See Phase 10a - Haiku trojans are
markedly easier to detect than Sonnet's.)

Detector evaluation summary

Numbers from the companion SpecGuard evaluation (Phase 9 + Phase 10):

detector precision recall F1 FPR LLM calls / side
static_only (4 detectors) 0.793 0.490 0.606 0.128 0
axiom_audit only 0.742 0.368 0.492 0.128 0
SSC baseline 0.771 1.000 0.871 0.297 2
monitor_consensus (3 monitors) 0.771 1.000 0.871 0.297 3
atomic K = 2 of 4 (Phase 10i) 0.936 1.000 0.967 0.068 4
atomic C3 alone (logical fidelity) 0.953 0.998 0.975 0.049 2

The Phase 10i atomic-criteria detector breaks the 0.871 SSC ceiling by
decomposing the coarse FAITHFUL/UNFAITHFUL question into four
independent atomic Yes/No criteria (completeness, independence,
logical-fidelity, internal-consistency) and flagging when ≥ 2 fail.
Validates FormalJudge (arXiv:2602.11136) and Epistemic Ensemble
(arXiv:2506.10903) in the spec-Trojan setting.

5-fold CV on Phase 10i: F1 = 0.967 ± 0.005, K* = 2 on every fold.

Intended use

  • Evaluating LLM-as-judge / programmatic / hybrid detectors on
    verifier-admitted adversarial specs.
  • Studying the gap between syntactic spec validity and semantic
    alignment with NL intent
    .
  • Calibrating false-positive rates against the companion
    100-Mathlib-theorem honest sample (Phase 11 in the source repo).

Not intended use

  • Training a spec elicitor or auto-completer - this is a benchmark, not
    a corpus; the trojan_spec field is adversarial by construction.
  • Direct use as a verifier test suite - admission already proves the
    verifier accepts; what's interesting is the defender.

License

CC BY 4.0 - free to use
with attribution. Companion code at
https://github.com/m-zest/TrojanSpec-Bench-v1.0 is Apache 2.0.

Citation

@misc{zeeshan2026trojanspec,
  author = {Zeeshan, Mohammad},
  title  = {{TrojanSpec-Bench}: Verified Adversarial Specifications for Detector Evaluation},
  year   = {2026},
  url    = {https://github.com/m-zest/TrojanSpec-Bench-v1.0}
}

Changelog

  • v0.4.1 (2026-05-20)

    • Phase 11 Mathlib calibration extended to atomic_monitor (K=2 of 4): 3/100 FPR on 100 honest Lean lemmas, a 7.7× reduction vs monitor_consensus (23/100). All 3 atomic-flagged lemmas are a strict subset of monitor_consensus flags - atomic decomposition tightens precision without introducing new false positives.
    • Per-criterion flag rate on Mathlib: C1 completeness 0.06, C2 independence 0.06, C3 logical_fidelity 0.05, C4 consistency 0.01.
    • Phase 14 MutDafny head-to-head on 319 admitted Dafny trojans: atomic K=2 reaches F1 0.992 versus the published ICSE 2026 MutDafny baseline at 0.530 (McNemar p < 10^-45, strict superset). Static mutation testing detects vacuity (98%) but is structurally blind to implementation_leak, domain_restriction, and predicate_swap (combined recall ~0.5%).
    • atomic_monitor promoted to library module at src/trojanspec/specguard/atomic_monitor.py with unit tests.
    • boto3/botocore declared as hard runtime dependencies in pyproject.toml.
  • v0.3.0 (2026-05-20): initial public
    release - 1024 admitted triples, paired honest controls, paper-grade
    README. Companion HF Space:
    m-zest/specguard-demo.

README historyEdit history 8 revisions8 edits

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.Every night we save the author's description of every dataset in the catalog. When it changes, we keep the new text and compare it with the one before. This shows what each author chose to say about their dataset, and how that changed over time.

  1. 2026-05-24 v0.4.1 corrections: recall ~0.5% (was ~0.3%), version reference v0.4.1 ea58cc0 8.5 KB
    Loading...
  2. 2026-05-24 v0.4.1: add Phase 14 MutDafny head-to-head to changelog ee479bc 8.5 KB
    Loading...
  3. 2026-05-24 v0.4.1: add Phase 14 MutDafny head-to-head to changelog, remove em dashes 255d053 8.5 KB
    Loading...
  4. 2026-05-20 minor 48f757b 8.2 KB
    Loading...
  5. 2026-05-20 minor 2e4a88a 8.2 KB
    Loading...
  6. 2026-05-20 v0.4.1: Phase 11 atomic_monitor Mathlib calibration d9c1676 8.2 KB
    Loading...
  7. 2026-05-20 phase13: TrojanSpec-Bench v4 dataset release (1024 triples) 7e4be2d 7.5 KB
    Loading...
  8. 2026-05-20 initial commit bfd32b3 27 B
    Loading...

Community discussions 1 thread · 1 open · 1 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, licence clarifications. Click any thread to expand and read the full conversation inline. Newest first.Conversations people started on Hugging Face: bug reports, questions about using the data, suggested changes to the author's description, questions about the licence. Open a thread to read it here. Newest first.

  1. 2026-05-25 [bot] Conversion to Parquet open 1 💬 #1
    Loading...
Download from Hugging Face

m-zest/trojanspec-bench

Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every GGUF model page has an "Open in Abliteration" button that lets you pick a file, then opens it in the desktop app. No API keys, no subscription, no prompt leakage.Each model page in the format the app uses has an "Open in Abliteration" button to open a file in the desktop app. No API keys, no subscription, your requests stay on your computer.

Open in Abliteration