Learning to Focus when Ranking Answers

Dana Sagi, Tzoof Avny, Kira Radinsky, Eugene AgichteinarXiv 2018

Introduction

In automated Question Answering (QA), the primary challenge is effectively ranking candidate answers so that the most relevant information appears first. Traditional "Learning-to-Rank" (LTR) algorithms relied heavily on manual feature engineering to measure similarity between queries and answers. While deep learning models like CNNs and LSTMs automated this process, they often struggle with long-form, verbose text. In such cases, standard models tend to incorporate irrelevant "noise" into the final representation, degrading ranking performance.

This paper introduces QARAT (Question-Answering Ranking with Attention), a novel deep-learning architecture designed to address the noise problem. By integrating attention mechanisms, the model learns to selectively focus on informative keywords and phrases while ignoring irrelevant fluff, significantly outperforming traditional methods on complex, real-world data.

Methodology: The QARAT Architecture

QARAT is a feed-forward neural network that incorporates an attention layer to dynamically weight the importance of different words. The architecture follows a structured pipeline to process question-answer pairs.

The QARAT architecture overview, showing the flow from input embeddings through attention and non-linear layers to a final softmax ranking score.
  1. Embedding & Overlap: Words are converted into vectors using Word2Vec. To enhance the model's ability to spot direct matches, "overlap features" (boolean flags) are added to mark words appearing in both the question and the answer.
  2. Attention Layer: Utilizing a Bahdanau-style attention mechanism, this layer calculates a context vector. It assigns higher weights to words deemed relevant to the question (e.g., focusing on "company" or dates when a "chairman" is mentioned).
  3. Non-linear Processing: The attended representations are processed through Tanh and Leaky ReLU (Lrelu) layers to capture non-linear semantic patterns.
  4. Pairwise Merging: The final question and answer vectors are concatenated and passed through a softmax layer to produce a probability score for ranking.

Key Insights and Interpretability

A significant advantage of the QARAT model is its interpretability. By visualizing the attention weights, researchers can observe exactly which parts of a sentence the model prioritizes.

Attention weight visualizations (heatmaps) demonstrating how the model focuses on key semantic terms like "Florence" and "born" to answer specific queries.

As shown in the heatmaps above, the attention mechanism acts as a robust filter. This is particularly effective for long-form answers where the signal-to-noise ratio is low. While standard models often see a performance drop as answer length increases, QARAT demonstrates its most significant gains on answers longer than 25 words in clean datasets (TREC-QA) and over 110 words in messy, real-world datasets (LiveQA).

Results and Performance

The model was evaluated on two benchmarks: the standard TREC-QA dataset and the more challenging LiveQA 2015 dataset, which contains verbose and grammatically inconsistent user-generated content.

QARAT consistently outperformed the state-of-the-art baseline (Severyn and Moschitti, 2015):

  • TREC-QA: Achieved a Mean Reciprocal Rank (MRR) of 0.82 (vs. 0.81).
  • LiveQA: Achieved an MRR of 0.48 (vs. 0.46) and an NDCG of 0.8018 (vs. 0.7974).

The improvements were statistically significant, particularly in long-form answers where the attention mechanism's ability to ignore "fluff" provided a clear competitive edge.

Conclusion

QARAT demonstrates that attention is not merely a tool for improving accuracy but a vital filter for managing noise in ranking tasks. While the current feed-forward structure is effective, future work may involve integrating these attention mechanisms into more complex architectures like Transformers or exploring the computational trade-offs of attention in high-speed inference environments.

Summary updated

BibTeX
@misc{sagi2018learning,
  author = {Dana Sagi and Tzoof Avny and Kira Radinsky and Eugene Agichtein},
  title = {{Learning to Focus when Ranking Answers}},
  year = {2018},
  eprint = {1808.02724},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1808.02724},
}
Figure