Machine learningDeep learningDeep learning / NLP / CVAlgorithm

Explainable Question Answering

Also known as: XQA, interpretable QA, transparent question answering, rationale-based QA

OriginatorCommunity (DeYoung et al.; Rajpurkar et al.)Year2016–2020Sources2Related methods5

Explainable Question Answering (XQA) combines neural reading-comprehension models — typically BERT-family transformers — with interpretability methods such as rationale extraction, attention visualization, LIME, or SHAP to reveal why the model selected a particular answer span. The goal is not just accuracy but trustworthy, auditable reasoning that users and domain experts can inspect and verify.

Key highlights

  • Provides auditable evidence for each answer, increasing user trust in high-stakes domains.
  • Rationale extraction can surface dataset biases and spurious correlations invisible in accuracy-only evaluations.
  • Joint rationale-and-answer training often regularizes the model and improves generalization.
  • Compatible with off-the-shelf BERT-family models through post-hoc attribution methods such as SHAP or Integrated Gradients.
  • ERASER and similar benchmarks provide standardized faithfulness metrics beyond accuracy.
  • Supports human-in-the-loop review: experts can override or flag predictions whose rationales are implausible.

Intuition

This section is available to Pro members. Upgrade to Pro

How it works

This section is available to Pro members. Upgrade to Pro

When to use it

Use explainable QA when the answer alone is insufficient and stakeholders need to audit or trust the model's reasoning — for example in clinical decision support, legal document search, or educational feedback systems. It is appropriate when labeled rationale annotations or faithfulness benchmarks are available for evaluation. Prefer standard QA (without explicit explanations) when speed and throughput are paramount and the domain is low-stakes. Avoid XQA when the context passages are too short to yield meaningful rationales, or when the question type is purely factual retrieval with no ambiguity.

Strengths & limitations

Strengths
  • Provides auditable evidence for each answer, increasing user trust in high-stakes domains.
  • Rationale extraction can surface dataset biases and spurious correlations invisible in accuracy-only evaluations.
  • Joint rationale-and-answer training often regularizes the model and improves generalization.
  • Compatible with off-the-shelf BERT-family models through post-hoc attribution methods such as SHAP or Integrated Gradients.
  • ERASER and similar benchmarks provide standardized faithfulness metrics beyond accuracy.
  • Supports human-in-the-loop review: experts can override or flag predictions whose rationales are implausible.
Limitations
  • Post-hoc attribution methods (attention, SHAP) may not be faithful — highlighted tokens need not causally determine the answer.
  • Joint rationale-extraction models require rationale-level annotations, which are expensive to obtain.
  • Explanations can be plausible-looking yet wrong, creating false confidence in flawed predictions.
  • Added complexity increases inference latency compared to a plain span-prediction model.

Common pitfalls

This section is available to Pro members. Upgrade to Pro

Applications

This section is available to Pro members. Upgrade to Pro

Frequently asked

Is attention a reliable explanation for QA models?

Not always. Jain & Wallace (2019) showed that attention distributions can be permuted without changing predictions, undermining their faithfulness. Comprehensiveness and sufficiency metrics from ERASER are more reliable than raw attention weights.

What is the difference between post-hoc and joint explainability?

Post-hoc methods (SHAP, LIME, Integrated Gradients) explain a trained model after the fact without changing it. Joint models are trained to simultaneously select a rationale and predict the answer, making the explanation part of the forward pass and generally more faithful.

Do I need annotated rationales to use XQA?

No — post-hoc methods require no rationale annotations. Annotated rationales are needed only if you want to train a joint model or evaluate plausibility against human highlights.

How do I report explanation quality in a paper?

Report at minimum comprehensiveness and sufficiency scores alongside standard QA metrics (Exact Match, F1). If human annotations exist, add plausibility overlap. Cite the ERASER paper for the metric definitions.

Can XQA help detect dataset shortcuts?

Yes. If the model consistently highlights tokens that correlate with the answer for superficial reasons (e.g., question words mirrored in the passage), the rationale-inspection step reveals this artifact before deployment.

Sources

  1. 1.
    DeYoung, J., Jain, S., Rajani, N. F., Lehman, E., Xiong, C., Socher, R., & Wallace, B. C. (2020). ERASER: A Benchmark to Evaluate Rationalized NLP Models. In Proceedings of ACL 2020, pp. 4443–4458.
  2. 2.
    Rajpurkar, P., Zhang, J., Lopyrev, K., & Liang, P. (2016). SQuAD: 100,000+ Questions for Machine Comprehension of Text. In Proceedings of EMNLP 2016, pp. 2383–2392.

You have read it. What now?

Cite this page

ScholarGate. (2026, June 3). Explainable Question Answering. ScholarGate. https://scholargate.app/deep-learning/explainable-question-answering

Explainable Question Answering | ScholarGate