QADiver: Interactive Framework for Diagnosing QA Models.

Gyeongbok Lee, Sungdong Kim, Seung-won Hwang

Abstract

Question answering (QA), extracting answers from text to a given question in natural language, has been actively studied, and existing models have shown promise in outperforming human performance when trained and evaluated with the SQuAD dataset. However, such performance may not be replicated in actual settings, requiring a diagnosis of the cause—a non-trivial task due to model complexity. We propose QADiver, a web-based UI that provides insights into how models contribute to QA performance by integrating visualization and analysis tools for model explanation. We expect this framework to help QA model researchers refine and improve their models.

Introduction

In recent years, Question Answering (QA) models have reached a significant milestone, frequently outperforming humans on benchmarks like the Stanford Question Answering Dataset (SQuAD). However, high performance on static benchmarks often fails to translate to real-world production settings. The "black box" nature of deep learning makes it difficult to diagnose why a model underperforms: is the training data biased, is the model focusing on the wrong keywords, or is it easily fooled by slight linguistic variations?

Traditionally, researchers have relied on qualitative observations of isolated instances. QADiver addresses this by providing a systematic, data-centric framework to explore model behavior across thousands of examples, allowing developers to move beyond simple accuracy scores to identify systemic vulnerabilities.

The QADiver Framework

QADiver is a web-based diagnostic tool that connects directly to a target QA model to retrieve predictions and internal metadata. It provides a comprehensive dashboard for visual analytics, neural internal inspection, and adversarial testing.

The QADiver interface displaying a context passage, model prediction, and similar question analysis.

Core Diagnostic Tools

  • Visual Analytics: The dashboard color-codes results (blue for correct, red for incorrect) to help users quickly spot patterns in the SQuAD 2.0 development set.
  • Neural Internals Visualization: The system renders context-question attention matrices as heatmaps. It also provides an "interpreted" version of the output, highlighting the top-k words with the highest weights to reveal which tokens drive the answer span prediction.
  • Embedding Analysis: Utilizing the FAISS library for fast similarity searches, users can explore word relationships in the vector space to determine if the model's underlying semantic understanding is flawed.
  • Question Bias Detection: By clustering similar questions based on linguistic features—such as question length, prefixes (e.g., "How many"), or entity presence—the tool identifies if a model is systematically biased against specific inquiry types.
  • Adversarial Testing: Users can manually edit text or use rule-based perturbations (via the SEAR framework) to observe if the model's prediction remains robust under pressure.

Key Insights and Model Debugging

QADiver enables researchers to identify several critical failure modes that standard evaluation metrics might miss:

  1. The "Right Answer, Wrong Reason" Trap: Attention heatmaps reveal if a model is "cheating" by matching keywords rather than understanding logical relationships.
  2. Systemic vs. Random Errors: Grouping questions by linguistic features reveals "blind spots," such as a model that excels at "Who" questions but consistently fails on "Why" questions.
  3. Fragility through Perturbation: Adversarial tests highlight how brittle models can be; a high-accuracy model might fail if a single distracting sentence is added or a synonym is swapped.
  4. Tokenizer Transparency: The tool allows users to toggle between raw and pre-processed text, identifying cases where the NLP pipeline (like the tokenizer) mangles input before it reaches the neural network.

Conclusion and Future Work

QADiver provides an efficient, interactive feedback loop for error localization and model refinement. While currently focused on attention-based models and the SQuAD 2.0 format, the framework demonstrates the power of interactive debugging in identifying OOV issues and unanswerable probability biases. Future work includes adapting the framework for generative LLMs and implementing automated suggestions for data augmentation to fix the biases discovered within the UI.

Summary updated

BibTeX
@inproceedings{lee2019qadiver,
  author = {Gyeongbok Lee and Sungdong Kim and Seung-won Hwang},
  title = {{QADiver: Interactive Framework for Diagnosing QA Models.}},
  booktitle = {AAAI},
  year = {2019},
  url = {https://openreview.net/forum?id=SQKEezGxOaS},
}
Figure