Table of Contents
Fetching ...

Interpreting Multilingual and Document-Length Sensitive Relevance Computations in Neural Retrieval Models through Axiomatic Causal Interventions

Oliver Savolainen, Dur e Najaf Amjad, Roxana Petcu

TL;DR

This reproducibility study investigates how neural retrieval models encode task-relevant signals, focusing on term frequency and document length, using axiomatic causal interventions via activation patching. It reproduces key findings from the original work on TAS-B, showing that term-frequency information is distributed across occurrences in early layers and moves to the CLS token in later layers, and that specific attention-heads contribute to these signals. The authors extend the analysis to Spanish and Chinese data (mMARCO) and to document-length encoding via the LNC1 axiom, demonstrating partial cross-language generalization and CLS-centered length encoding. The results underscore the utility of activation patching for mechanistic interpretability in information retrieval, while also highlighting reproducibility challenges and the need for more robust, cross-language interpretability methods.

Abstract

This reproducibility study analyzes and extends the paper "Axiomatic Causal Interventions for Reverse Engineering Relevance Computation in Neural Retrieval Models," which investigates how neural retrieval models encode task-relevant properties such as term frequency. We reproduce key experiments from the original paper, confirming that information on query terms is captured in the model encoding. We extend this work by applying activation patching to Spanish and Chinese datasets and by exploring whether document-length information is encoded in the model as well. Our results confirm that the designed activation patching method can isolate the behavior to specific components and tokens in neural retrieval models. Moreover, our findings indicate that the location of term frequency generalizes across languages and that in later layers, the information for sequence-level tasks is represented in the CLS token. The results highlight the need for further research into interpretability in information retrieval and reproducibility in machine learning research. Our code is available at https://github.com/OliverSavolainen/axiomatic-ir-reproduce.

Interpreting Multilingual and Document-Length Sensitive Relevance Computations in Neural Retrieval Models through Axiomatic Causal Interventions

TL;DR

This reproducibility study investigates how neural retrieval models encode task-relevant signals, focusing on term frequency and document length, using axiomatic causal interventions via activation patching. It reproduces key findings from the original work on TAS-B, showing that term-frequency information is distributed across occurrences in early layers and moves to the CLS token in later layers, and that specific attention-heads contribute to these signals. The authors extend the analysis to Spanish and Chinese data (mMARCO) and to document-length encoding via the LNC1 axiom, demonstrating partial cross-language generalization and CLS-centered length encoding. The results underscore the utility of activation patching for mechanistic interpretability in information retrieval, while also highlighting reproducibility challenges and the need for more robust, cross-language interpretability methods.

Abstract

This reproducibility study analyzes and extends the paper "Axiomatic Causal Interventions for Reverse Engineering Relevance Computation in Neural Retrieval Models," which investigates how neural retrieval models encode task-relevant properties such as term frequency. We reproduce key experiments from the original paper, confirming that information on query terms is captured in the model encoding. We extend this work by applying activation patching to Spanish and Chinese datasets and by exploring whether document-length information is encoded in the model as well. Our results confirm that the designed activation patching method can isolate the behavior to specific components and tokens in neural retrieval models. Moreover, our findings indicate that the location of term frequency generalizes across languages and that in later layers, the information for sequence-level tasks is represented in the CLS token. The results highlight the need for further research into interpretability in information retrieval and reproducibility in machine learning research. Our code is available at https://github.com/OliverSavolainen/axiomatic-ir-reproduce.
Paper Structure (18 sections, 1 equation, 19 figures, 1 table)

This paper contains 18 sections, 1 equation, 19 figures, 1 table.

Figures (19)

  • Figure 1: Diagnostic dataset creation setup for TFC1-I and TFC1-R.
  • Figure 2: Activation patching setup for retrieval from the original paper. In this example, a $(q, d_b, d_p)$ triple is created to measure term frequency effects in the model. A perturbed document (left) is created by injecting the sampled query term (“Wellesley”) at the end, and a baseline document (right) is made by adding filler tokens. When running the model with the perturbed input, the activations are saved. For the patched run, the model runs on the baseline document, and the cached activations are patched in. This should lead to an increase in the ranking score. orig
  • Figure 3: The average relevance score comparison shows the baseline score with and without padding. The perturbed conditions include appending a query term, 'guantanamo' tokens, and 'a' tokens.
  • Figure 4: The original block experiment with append and prepend from patching into the residual stream.
  • Figure 5: The reproduced block experiment results for append from patching into the residual stream and attention output.
  • ...and 14 more figures