Skip to main content
QUICK REVIEW

[Paper Review] Interpreting Neural Ranking Models using Grad-CAM

Jaekeol Choi, Jung-In Choi|arXiv (Cornell University)|May 12, 2020
Explainable Artificial Intelligence (XAI)Computer Science9 references10 citations
TL;DR

This paper proposes using Grad-CAM to interpret neural ranking models (NRMs), specifically MatchPyramid, by visualizing the contribution of each query-document term pair to the matching score. By applying gradient-based attribution to the final convolutional layer, the method identifies effective and filtered terms, improves snippet relevance (78.37% preference in user study), and statistically distinguishes ground-truth from negative documents via higher kurtosis and sum of contributions.

ABSTRACT

Recently, applying deep neural networks in IR has become an important and timely topic. For instance, Neural Ranking Models(NRMs) have shown promising performance compared to the traditional ranking models. However, explaining the ranking results has become even more difficult with NRM due to the complex structure of neural networks. On the other hand, a great deal of research is under progress on Interpretable Machine Learning(IML), including Grad-CAM. Grad-CAM is an attribution method and it can visualize the input regions that contribute to the network's output. In this paper, we adopt Grad-CAM for interpreting the ranking results of NRM. By adopting Grad-CAM, we analyze how each query-document term pair contributes to the matching score for a given pair of query and document. The visualization results provide insights on why a certain document is relevant to the given query. Also, the results show that neural ranking model captures the subtle notion of relevance. Our interpretation method and visualization results can be used for snippet generation and user-query intent analysis.

Motivation & Objective

  • To address the lack of interpretability in neural ranking models (NRMs), which are complex and often treated as black boxes.
  • To enable direct, model-introspective interpretation of NRM decisions by adapting Grad-CAM, a proven attribution method from computer vision.
  • To provide actionable insights into why certain documents are ranked highly, supporting applications like snippet generation and query intent analysis.
  • To statistically validate that ground-truth documents exhibit distinct Grad-CAM activation patterns compared to negative documents.

Proposed method

  • Adapt Grad-CAM, a gradient-based attribution method, to neural ranking models by using the final ranking score as the target activation.
  • Compute importance weights αₖ via global average pooling of gradients from the final ranking score to the feature maps of the last convolutional layer.
  • Generate a localization map L ∈ ℝ^{u×v} that quantifies the contribution of each (query term i, document term j) pair to the matching score.
  • Use the localization map L to extract effective terms (high contribution) and filtered terms (low contribution) per document for interpretability.
  • Apply the localization map to generate query-relevant snippets by selecting high-activation spans from documents.
  • Perform statistical analysis using kurtosis (Kurt(L)) and total contribution (∑∑Lᵢⱼ) to compare ground-truth and negative documents.

Experimental results

Research questions

  • RQ1Which components of a document contribute most to the ranking score for a given query?
  • RQ2How do the activation patterns of ground-truth documents differ from those of negative documents in neural ranking models?
  • RQ3Can Grad-CAM-based attribution improve the relevance of automatically generated snippets?
  • RQ4To what extent can Grad-CAM reveal subtle query intent, such as focusing on 'infection' over 'prevention'?

Key findings

  • 78.37% of assessors preferred snippets generated using Grad-CAM over vanilla methods, indicating higher relevance.
  • Ground-truth documents showed significantly higher kurtosis (Kurt(L)) and sum of contributions (∑∑Lᵢⱼ) than negative documents (p < 0.0001).
  • The method successfully identified effective terms like 'infection' and 'transmitted', and filtered terms like 'prevention', reflecting nuanced query intent.
  • For the query 'what kind of oil is good for dry hair', the model correctly prioritized 'scalp' and 'sandalwood' over 'fragrance' and 'aromatherapy'.
  • The localization map enabled qualitative analysis of term-level contributions, revealing that the model captures semantic relevance beyond lexical overlap.
  • Statistical differences in activation patterns confirm that ground-truth documents have more focused, high-impact term interactions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.