Did the Model Understand the Question?

Pramod Kaushik Mudrakarta, Ankur Taly, Mukund Sundararajan, Kedar Dhamdhere

TL;DR

Deep learning models for question answering (QA) often achieve high accuracy by exploiting dataset biases rather than truly "understanding" the question. By using Integrated Gradients to attribute predictions to specific words, the authors demonstrate that these models are "overstable"—they ignore crucial question terms and can be easily fooled by simple adversarial prefixes that drop accuracy from over 60% to under 20%.

What Problem Does This Paper Address?

In the world of NLP and Computer Vision, we often celebrate high accuracy on leaderboards. However, a model can be "right for the wrong reasons." For example, a Visual QA model might correctly answer "What color is the ball?" simply because it sees a ball and knows the most common ball color in the dataset is "red," regardless of the actual question text.

This paper tackles the challenge of model interpretability and robustness. The authors investigate whether state-of-the-art models for images, tables, and text are actually paying attention to the words that matter. They define a phenomenon called overstability: a state where a model’s prediction remains unchanged even when semantically critical parts of the question are altered or deleted.

Methods

The researchers employ a two-step analysis workflow:

  1. Attribution via Integrated Gradients (IG): IG is an axiomatic technique used to assign an "importance score" to each input feature (in this case, words in a question). It works by interpolating between a "baseline" (an empty question) and the actual input, aggregating the gradients of the model's output along that path.
  2. Adversarial Perturbation: Once they identify which words the model ignores (low attribution) and which it fixates on (high attribution), they craft attacks:
  3. Subject Ablation: Replacing the subject of a question with a random noun that the model typically ignores.
  4. Prefix/Suffix Attacks: Adding content-free phrases (e.g., "in not many words...") that contain words the model mistakenly thinks are important.
  5. Overstability Tests: Systematically dropping words to see how few are needed to maintain accuracy.

Datasets

The study evaluates three distinct tasks using standard benchmarks:

  • Visual QA: The VQA 1.0 dataset (questions about COCO images).
  • Tabular QA: The WikiTableQuestions benchmark, where models must answer questions by querying Wikipedia tables.
  • Reading Comprehension: The SQuAD dataset (identifying answer spans in text passages).
  • Perturbed Tables: A modified version of WikiTableQuestions (Pasupat and Liang, 2016) used to test if models rely on row ordering rather than logic.

Key Insights and Ideas

  • The "Color" Shortcut: In Visual QA, the model is incredibly reliant on the image. The authors found that the model retains over 50% of its relative accuracy even if every word in the question except "color" is deleted.
  • Default Programs in Tables: For tabular data, the "Neural Programmer" model often ignores the question entirely and falls back on "table-specific default programs." For instance, in tables about Olympic medals, the model is predisposed to exclude the last row (often a "Total" row) regardless of what the user asks. Alignment matrix showing how specific words like "gold" trigger specific operators like "first".

  • Attributions as an Attack Multiplier: Previous work by Jia and Liang (2017) showed that adding distracting sentences to text could fool models. This paper proves those attacks are significantly more effective (50% more likely to succeed) if the distracting sentence specifically includes the high-attribution nouns the model is fixated on.

  • Vocabulary Efficiency: Models are surprisingly "lazy." In Tabular QA, just 5 specific words (like "many" and "total") are enough for the model to reach 50% of its final accuracy. Graph showing relative accuracy vs. vocabulary size for VQA.
Figure 3: Visualization of attributions. Question words, preprocessing tokens and column selection priors on the Y- axis. Along the X-axis are operator and column selections with their baseline counterparts in parentheses. Operators and columns not affecting the final answer, and those which are same as their baseline counterparts, are given zero attribution.
Figure 2: VQA network (Kazemi and Elqursh, 2017): Ac- curacy as a function of vocabulary size, relative to its original accuracy. Words are chosen in the descending order of how frequently they appear as top attributions. The X-axis is on logscale, except near zero where it is linear.

Key Results

The quantitative drops in performance under adversarial conditions are staggering:

  • Visual QA: A simple prefix attack ("in not many words...") dropped accuracy from 61.1% to 19%. Table showing accuracy drops for various VQA prefix attacks.

  • Tabular QA: Concatenating content-free phrases containing "trigger" words crashed accuracy from 33.5% to a measly 3.3%. Table showing accuracy drops for Tabular QA concatenation attacks.

  • Robustness: In VQA, 75.6% of correctly answered questions remained "correct" even after the subject noun was replaced with a random, low-attribution word, proving the model wasn't really looking at the subject.

Table showing accuracy drops for various VQA prefix attacks.
Table showing accuracy drops for Tabular QA concatenation attacks.

Limitations and Future Work

The authors acknowledge that their adversarial attacks are manually crafted and might seem "unrealistic" to a human reader. However, they argue these attacks expose fundamental logical flaws.

Future work suggests two paths:

  1. Improving Data: Using these attribution insights to create better, less biased training sets (e.g., training on perturbed tables to break the row-order bias).
  2. User Interface: Exposing attribution visualizations to end-users so they can see which words a model is ignoring, helping them decide when to trust (or distrust) an AI's answer.

Summary updated

BibTeX
@inproceedings{mudrakarta2018did,
  author = {Pramod Kaushik Mudrakarta and Ankur Taly and Mukund Sundararajan and Kedar Dhamdhere},
  title = {{Did the Model Understand the Question?}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2018},
  url = {https://openreview.net/forum?id=BkWrQhgOWH},
}
Figure