Model Agnostic Answer Reranking System for Adversarial Question Answering

Sagnik Majumder, Chinmoy Samant, Greg Durrett

Abstract

While numerous methods have been proposed as defenses against adversarial examples in question answering (QA), these techniques are often model specific, require retraining of the model, and give only marginal improvements in performance over vanilla models. In this work, we present a simple model-agnostic approach to this problem that can be applied directly to any QA model without any retraining. Our method employs an explicit answer candidate reranking mechanism that scores candidate answers on the basis of their content overlap with the question before making the final prediction. Combined with a strong base QA model, our method outperforms state-of-the-art defense techniques, calling into question how well these techniques are actually doing and how strong these adversarial testbeds are.

Introduction

Deep learning models for Reading Comprehension, such as BERT, are incredibly powerful but notoriously brittle. Adversarial attacks like AddSent can easily deceive these models by appending a distracting sentence to a paragraph. This distractor often contains words similar to the question but provides a false answer. While many researchers have proposed sophisticated defenses—such as adversarial training or complex architectural changes—these solutions are often model-specific, computationally expensive to train, and offer only marginal improvements. This research introduces MAARS (Model Agnostic Answer Reranking System), a simple, model-agnostic heuristic designed to achieve better robustness without requiring any model retraining.

Methods

MAARS is a post-hoc reranking mechanism that can be applied to the output of any existing QA model (like BiDAF or BERT) that predicts answer span probabilities. The process follows three distinct steps:

  1. Candidate Generation: The base QA model generates its top $n$ (usually 10) answer span candidates.
  2. Named Entity Scoring: MAARS identifies the sentences containing these candidates. It then uses an off-the-shelf Named Entity Recognition (NER) tool to extract entities (names, dates, locations, etc.) from both the question and the candidate sentences.
  3. Reranking: Each candidate is scored based on the word-level overlap of named entities between the question and the sentence. The answer from the sentence with the highest overlap is chosen as the final prediction.
The MAARS architecture: Candidates from an arbitrary QA model are reranked based on Named Entity Recognition (NER) overlap between the question and the source sentence.

The intuition is that adversarial distractors often lack the specific named entity "anchors" found in the true evidence sentence, even if they mimic the question's general vocabulary.

Experimental Setup

The study evaluates MAARS on several prominent benchmarks:

  • SQuAD v1.1: The standard "clean" reading comprehension dataset.
  • Adversarial SQuAD (AddSent and AddOneSent): Versions of SQuAD where distracting sentences are human-crafted to fool models.
  • Universal Adversarial Triggers: A dataset where specific "trigger" words (like "Why" or "Who") are prepended to sequences to cause model failure.

Key Results and Discussion

MAARS showed significant gains across the board when facing adversarial attacks. On the AddSent adversarial set, a vanilla BERT model scored an F1 of 40.9. Adding MAARS boosted that score to 61.2 F1—a massive 20-point jump. This outperformed QAInfoMax, a much more complex defense. Similar improvements were seen with BiDAF, where MAARS more than doubled performance on AddSent (from 21.4 to 45.4 F1).

Performance comparison of BERT-S with MAARS against other defense techniques on original and adversarial SQuAD datasets.

Insights

  • Simplicity Beats Complexity: A simple entity-matching heuristic can outperform "principled" adversarial defenses that involve complex loss functions or specialized encoders.
  • Questioning Robustness Benchmarks: The effectiveness of such a straightforward technique suggests that current adversarial datasets may be testing for surface-level confusion rather than deep reasoning.
  • The "Clean Data" Trade-off: There is a performance penalty on original, non-adversarial data. Because MAARS prioritizes entity overlap, it occasionally overrides a correct model prediction in favor of a sentence that shares more names with the question, leading to a drop in accuracy on "clean" SQuAD data (e.g., BERT-S drops from 89.4 to 80.2 F1).

Limitations and Future Work

MAARS can fail if the question type doesn't match the entity type or if a sentence contains multiple similar spans that confuse the base model. Future work could involve more powerful rerankers or "learned" versions of this logic to mitigate the performance drop on clean data while maintaining adversarial robustness. The authors also call for the development of more diverse and challenging adversarial testbeds.

Summary updated

BibTeX
@inproceedings{majumder2021model,
  author = {Sagnik Majumder and Chinmoy Samant and Greg Durrett},
  title = {{Model Agnostic Answer Reranking System for Adversarial Question Answering}},
  booktitle = {Student Research Workshop @ EACL},
  year = {2021},
  url = {https://openreview.net/forum?id=fWlWw1i0-U},
}
Figure