wild Β· adversarial unanswerable traps & sentence heat-map Β· WASM q8 Β· MIT

Adversarial Unanswerable Trap & Distractor Stress-Tester

Test where a compact 26.90 MB QA model holds steady vs where distractor overlap tricks it. Probe subtle negation, entity-swap, and out-of-context unanswerable traps, knock out evidence phrases live, and paint a per-sentence answerability heat-map showing exactly which sentences support a question.

1 Β· Initialise MobileBERT-SQuAD2

2 Β· Choose an Adversarial Scenario & Knock-Out Evidence

Initialise MobileBERT-SQuAD2 above to run live perturbation scoring and adversarial trap checks.

Baseline (Original Passage)

β€”

β€”

Live Perturbed Passage

β€”

β€”

Confidence Shift (Ξ”) & Null P([CLS])

β€”

β€”

3 Β· Adversarial Trap Stress-Test Matrix

Compare MobileBERT-SQuAD2 on answerable controls vs negation, entity-swap, and out-of-context traps against the live passage above β€” every verdict and hallucination is reported honestly as measured.

Ready to run adversarial traps once MobileBERT-SQuAD2 is initialised.

Adversarial negation, entity-swap, and out-of-context trap results
Trap Type Question Expected Model Output Score / Null Outcome at Ο„
Run the adversarial trap suite to inspect live abstention vs distractor traps.

4 Β· Live Sentence-Level Answerability Heat-Map

Evaluate the target question against every individual sentence in the passage above to see which sentences carry genuine answerability vs trigger [CLS] abstention.

Ready to score per-sentence answerability once MobileBERT-SQuAD2 is initialised.

Supporting Sentencesβ€”
Peak Sentence Scoreβ€”
Abstaining Sentencesβ€”
Sweep Time & NaNsβ€”

5 Β· Show the code

Show the code β€” qa-core.mjs per-sentence answerability heat-map scorer
Show the code β€” qa-core.mjs negation, entity-swap & out-of-context trap fixtures