adversarial-rc-eval
Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension — Bartolo et al. (2020) (arXiv:2002.00293, 2020)
What this evaluates
This evaluation probes a model's ability to answer reading comprehension questions under adversarial conditions, specifically testing generalization across datasets constructed by progressively stronger language models. It measures how well models trained on challenging, model-in-the-loop generated questions can handle both adversarial and standard benchmarks.
Datasets
- SQuAD — total ?; splits: train (-1), test (-1)
- BiDAF-adversarial — total ?; splits: train (-1), test (-1)
- BERT-adversarial — total ?; splits: train (-1), test (-1)
- RoBERTa-adversarial — total ?; splits: train (-1), test (-1)
- DROP — total ?; splits: test (-1)
- Natural Questions — total ?; splits: test (-1)
Metrics
F1 (primary) — range: [0, 100] (percent)
- Token-level F1 score between the predicted answer string and the gold answer string, calculated as the harmonic mean of precision and recall over word tokens.
EM — range: [0, 100] (percent)
- Exact match accuracy; returns 1 if the predicted answer string exactly matches the gold answer string, else 0.
Input / output format
Input: A context passage (paragraph) and a natural language question requiring an answer extracted from or inferred from the passage.
Output: A text span or string representing the predicted answer.
Scoring recipe
def score(predictions, golds):
em = sum(1 for p, g in zip(predictions, golds) if p == g) / len(predictions)
f1s = []
for p, g in zip(predictions, golds):
p_tok, g_tok = set(p.lower().split()), set(g.lower().split())
if not p_tok or not g_tok: f1s.append(0.0)
else:
common = p_tok & g_tok
prec, rec = len(common)/len(p_tok), len(common)/len(g_tok)
f1s.append(2*prec*rec/(prec+rec))
return sum(f1s)/len(f1s), em
Common pitfalls
- Random initialization and mini-batch ordering during training significantly impact adversarial annotation consistency; retrained models often achieve non-zero EM on their own adversarial datasets (Table 5).
- Evaluations are averaged over 10 runs with different random seeds, and results report mean ± standard deviation, not single-run scores.
- Adversarial datasets are model-specific; training on data generated by a weaker model does not guarantee performance on datasets generated by stronger models.
Evidence (verbatim from paper)
First, we observe – as expected given our annotation constraints – that model performance is 0.0EM on datasets created with the same respective model in the annotation loop. We observe however that retrained models do not reliably perform as poorly on those samples. For example, BERT reaches 19.7EM, whereas the original model used during annotation provides no correct answer with 0.0EM.
Citation
@misc{bartolo2020beattheai,
title={Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension},
author={Bartolo et al. (2020)},
year={2020},
note={arXiv:2002.00293}
}
1---2name: adversarial-rc-eval3description: This evaluation probes a model's ability to answer reading comprehension questions under adversarial conditions, specifically testing generalization across datasets constructed by progressively stronger language models. It measures how well models trained on challenging, model-in-the-loop generated questions can handle both adversarial and standard benchmarks. Use when the user wants to benchmark on SQuAD, BiDAF-adversarial, BERT-adversarial, RoBERTa-adversarial, DROP, Natural Questions, or asks about evaluating this task. Reports F1.4metadata:5 source: https://skillmd.com/skills/qhjqhj00/adversarial-rc-eval6 skill_kind: dataset_eval7 source_arxiv: 2002.002938 bibtex_key: bartolo2020beattheai9 confidence: high10---1112# adversarial-rc-eval1314> Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension — Bartolo et al. (2020) (arXiv:2002.00293, 2020)1516## What this evaluates1718This evaluation probes a model's ability to answer reading comprehension questions under adversarial conditions, specifically testing generalization across datasets constructed by progressively stronger language models. It measures how well models trained on challenging, model-in-the-loop generated questions can handle both adversarial and standard benchmarks.1920## Datasets2122- **SQuAD** — total ?; splits: train (-1), test (-1)23- **BiDAF-adversarial** — total ?; splits: train (-1), test (-1)24- **BERT-adversarial** — total ?; splits: train (-1), test (-1)25- **RoBERTa-adversarial** — total ?; splits: train (-1), test (-1)26- **DROP** — total ?; splits: test (-1)27- **Natural Questions** — total ?; splits: test (-1)2829## Metrics3031- `F1` **(primary)** — range: [0, 100] (percent)32 - Token-level F1 score between the predicted answer string and the gold answer string, calculated as the harmonic mean of precision and recall over word tokens.33- `EM` — range: [0, 100] (percent)34 - Exact match accuracy; returns 1 if the predicted answer string exactly matches the gold answer string, else 0.3536## Input / output format3738**Input**: A context passage (paragraph) and a natural language question requiring an answer extracted from or inferred from the passage.3940**Output**: A text span or string representing the predicted answer.4142## Scoring recipe4344```python45def score(predictions, golds):46 em = sum(1 for p, g in zip(predictions, golds) if p == g) / len(predictions)47 f1s = []48 for p, g in zip(predictions, golds):49 p_tok, g_tok = set(p.lower().split()), set(g.lower().split())50 if not p_tok or not g_tok: f1s.append(0.0)51 else:52 common = p_tok & g_tok53 prec, rec = len(common)/len(p_tok), len(common)/len(g_tok)54 f1s.append(2*prec*rec/(prec+rec))55 return sum(f1s)/len(f1s), em56```5758## Common pitfalls5960- Random initialization and mini-batch ordering during training significantly impact adversarial annotation consistency; retrained models often achieve non-zero EM on their own adversarial datasets (Table 5).61- Evaluations are averaged over 10 runs with different random seeds, and results report mean ± standard deviation, not single-run scores.62- Adversarial datasets are model-specific; training on data generated by a weaker model does not guarantee performance on datasets generated by stronger models.6364## Evidence (verbatim from paper)6566> First, we observe – as expected given our annotation constraints – that model performance is 0.0EM on datasets created with the same respective model in the annotation loop. We observe however that retrained models do not reliably perform as poorly on those samples. For example, BERT reaches 19.7EM, whereas the original model used during annotation provides no correct answer with 0.0EM.6768## Citation6970```bibtex71@misc{bartolo2020beattheai,72 title={Beat the AI: Investigating Adversarial Human Annotation for Reading Comprehension},73 author={Bartolo et al. (2020)},74 year={2020},75 note={arXiv:2002.00293}76}77```7879- arXiv: 2002.00293