arXiv:2610.41425cs.IROct 2026

Manuscript Offprint

arXiv:2610.41425

How BERT-based Cross-Encoders Model Relevance in Information Retrieval?

Mathias Vast, Basile Van Cooten, Laure Soulier, Benjamin Piwowarski

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

MATHIAS VAST, Sinequa by ChapsVision, France and Sorbonne Université, CNRS, ISIR, France

BASILE VAN COOTEN, Sinequa by ChapsVision, France

LAURE SOULIER, Sorbonne Université, CNRS, ISIR, France

BENJAMIN PIWOWARSKI, Sorbonne Université, CNRS, ISIR, France

Cross-encoders are the most effective but also the least efficient models in Information Retrieval. Despite their success, the mechanisms underlying their relevance predictions remain poorly understood, particularly how they process to match queries and documents. This lack of interpretability limits their optimization, can lead to suboptimal retrieval, especially out-of-domain, and raises efficiency concerns for over-parameterized models. To address these challenges, this paper investigates two under-explored aspects of cross-encoder behavior. First, to understand the relevance prediction process, we trace the flow of information at the different stages of the process and between different input segments. We study the nature of the signals that compose this flow and that allow cross-encoders to predict the relevance of a passage to a query. Our work particularly focuses on the matching performed by the cross-encoders between queries and documents. Second, we explore how cross-encoders behave with out-of-domain documents and/or queries. Through a series of interpretability experiments, we evaluate three BERT-based cross-encoder models, varying in size and pre-training strategies, across both in-domain and out-of-domain datasets. Overall, this study both consolidates what is known about how cross-encoders model relevance and extends it by exploring the role of matching signals.

Additional Key Words and Phrases: Interpretability, Cross-Encoders, Relevance, Matching

ACM Reference Format:

Mathias Vast, Basile Van Cooten, Laure Soulier, and Benjamin Piwowarski. 2026. How BERT-based Cross-Encoders Model Relevance in Information Retrieval?. 1, 1 (November 2026), 68 pages. https://doi.org/XXXXXXX.XXXXXXX

1 Introduction

With the rise of transformer-based models [94], currently culminating in Large Language Models (LLMs), information retrieval (IR) has changed drastically since the BM25 era [1]. Current transformer-based IR models can be categorized according to how they model the interaction between queries and documents: implicitly (cross-encoders [67, 68]), explicitly (dense [46] or sparse encoders [33]) or a mix of both (late interactions [47]). With their ability to model semantics and produce contextualized representations, these models have overcome the query-document exact match limitation of traditional lexical methods. This advancement, however, has come with an important trade-off: interpretability. Unlike lexical approaches such as BM25 – where relevance can be directly traced to term-statistics – neural models are mostly black-boxes. For end users, this opacity may be acceptable, provided that the retrieved results or the LLM-generated outputs are relevant [50]. For researchers and practitioners, however, this opacity hinders both systematic improvement

Authors' Contact Information: Mathias Vast, mathias.vast@isir.upmc.fr, Sinequa by ChapsVision, Paris, France and Sorbonne Université, CNRS, ISIR, F-75005 Paris, France; Basile Van Cooten, Sinequa by ChapsVision, Paris, France, bvancooten@chapsvision.com; Laure Soulier, Sorbonne Université, CNRS, ISIR, F-75005 Paris, France, laure.soulier@isir.upmc.fr; Benjamin Piwowarski, Sorbonne Université, CNRS, ISIR, F-75005 Paris, France, benjamin.piwowarski@cnrs.fr.

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org.

© 2026 Copyright held by the owner/author(s). Publication rights licensed to ACM.

and the diagnosis of failure cases. In particular, cross-encoders are widely used in the re-ranking stage of retrieval pipelines – whether in search engines or RAG frameworks [51] – despite limited understanding of their internal mechanisms and failure modes. While we know that these models are over-parameterized [108] and could be made more efficient by removing unnecessary layers or attention heads [40, 97], our limited comprehension prevents us from designing more efficient and/or effective alternatives.

This inability to diagnose failure cases (as well as the scientific challenge that understanding these models represents) has motivated a surge in interpretability and explainability studies, not limited to IR. From attribution methods [74, 79, 81, 84] to probing [5, 90, 101], many techniques have been developed to interpret and explain the behavior of neural networks. In IR, efforts have largely concentrated on elucidating the nature of the signals involved when computing document relevance, though with mixed outcomes [2]. Some works study the agreement of neural IR models with established IR axioms [15, 56] or use probing [5] to search for specific encoded features [60, 101], while other studies have highlighted the roles of specific attention heads in detecting matching signals [56].

However, we still lack a mechanistic understanding of how these signals are detected or processed, let alone incorporated to form the relevance prediction. In addition, few works have attempted to provide a holistic view of the entire relevance prediction process, as most of them generally focus on a specific aspect. This also raises the question of whether any single interpretability technique (probing, ablations, attention) can bridge this gap. Notable exceptions in IR are studies of the processing stages within MonoBERT [45, 73, 111], but even these lack supporting evidence for the hypotheses they formulate. More recently, Lu et al. [56] identified a mechanism similar to a semantic variant of BM25 within a MiniLM-based cross-encoder, while Chen et al. [12] used mechanistic interpretability to interpret the roles of some attention heads for duplicate tokens inside TAS-B [43]. These works provide an end-to-end picture of a specific mechanism inside neural IR models, yet they also highlight another overlooked aspect of interpretability studies: their generalization to other models and datasets.

Cross-encoders stand as the most effective models for relevance estimation, while their internal mechanisms remain poorly understood. This paradox makes them a high-potential target for interpretability research. Better understanding how they work could help overcome their two main limitations in search pipelines: computational inefficiency and dependence on a first-stage retriever. To address these limitations, our experimental plan combines 1) multiple interpretability techniques, since signals in transformer-based models are entangled [27, 28]; 2) multiple BERT-based cross-encoders of different sizes and pre-training strategies; and 3) multiple datasets, both from the training domain and from domains unknown to the models. This last point is motivated by the release of the BEIR benchmark [87] which highlighted disparities between the in-domain and out-of-domain performance of neural IR models. Although smaller for cross-encoders than for bi-encoders, this gap, together with their reliance on semantic knowledge inherited from pre-training, raises the question of whether cross-encoders behave consistently In-Domain (ID) and Out-of-Domain (OOD).

Thanks to the points 1) and 3) of this experimental plan, i.e., multiple techniques applied across multiple datasets, we further gain the ability to draw stronger conclusions, as we can cross observations.

Our objective is to consolidate and extend previous findings on the role of attention heads and the nature of signals processed by cross-encoders. Beyond unifying these findings, we seek to shed light on the full process through which these models arrive at a relevance prediction. Specifically, we address the following research questions:

  • RQ1: What is the contribution of the different models' components in predicting relevance?

  • RQ2: How does information flow within the model, particularly through its most important components?

  • RQ3: Which signals flow through the model and contribute to predicting relevance or non-relevance?

  • RQ4: How is the relevance signal constructed within the [CLS] representation of cross-encoders?

These main research questions structure our work. We study each one for different models and across different domains to answer a series of orthogonal research questions that strengthen our findings:

  • RQ5: To what extent are these mechanisms consistent across different sizes of cross-encoders?
  • RQ6: How robust are these findings to domain shifts?

In Section 2, we present an overview of the current state of understanding of how transformer-based models [94] work in general (Subsection 2.2) and more precisely in IR (Subsection 2.3). Then, we detail our experimental protocol in Section 3, including the different models and datasets we used to answer RQ5 and RQ6. Once the setup is explained, we detail in sections 4 to 7 the results of our experiments and how they help us shape answers to our research questions. We summarize below the main highlights of these different sections.

To identify the most crucial components involved in the relevance prediction (RQ1), we follow our previous work in [93], leveraging the Neuron Integrated Gradients (NIG) method [82] (see section 4).

Key highlights. Some components are important across domains, while others are important specifically in OOD, particularly for large models. In particular, our method highlights the key role of a few attention heads and FFN neurons in the relevance prediction process.

As a “naive” usage of NIG cannot provide enough details on the nature of the contributions from the critical components, we investigate the flow of information inside the model (RQ2). In Section 5, we combine insights drawn from improving the granularity of the original NIG technique, extending the ablation analysis from Zhan et al. [111], and using a variant of the Information Bottleneck Attribution [78]. While NIG and ablations allow for the extraction of the most salient informational directions throughout the model, the Information Bottleneck yields a more holistic view of the information flow. Altogether, they map the pathways through which information flows between input segments.

Key highlights. We empirically validate the existence of the multi-stage process described in Zhan et al. [111] across both ID and OOD, but provide more details: Our results confirm that the relevance prediction process begins with the contextualization of the query and document tokens and, in parallel, query-to-document information transfers (i.e., the document tokens receive information from the query tokens through the attention mechanism). Contrary to [111], we observe that document-to-query transfers are equally important at this stage. These transfers last for most of the models' layers, until the later layers. At this point, relevance information shared across document and query tokens is not directly transmitted to the [CLS] but is first accumulated in the query tokens before being sent to the [CLS] in the very last few layers. In addition, we confirm the role of the “no-op” operation [18] for [SEP] and further show that [CLS] might play a similar role through the early to the middle layers.

Finally, our study reveals two new insights: 1) not all cross-encoders share the same process of accumulating relevance information inside the [CLS] and 2) MiniLM, contrary to MonoBERT cross-encoders, does not seem to rely on “relevance” signals to predict relevance, but instead on “non-relevance” signals.

By answering RQ1 and RQ2, we notice the key role of some high-attribution attention heads in query-to-document and document-to-query transfers, a behavior we link to the detection of matching signals across them. To derive the nature of these matching signals (RQ3), we analyze in Section 6 the attention patterns of every attention head by contrasting their attributions when exposed to relevant pairs versus non-relevant ones. Our objective here is twofold: firstly, to uncover the nature of the query-document interactions detected by high-attribution heads, and secondly, to discover heads specialized in detecting relevant matching signals.

Furthermore, we extend this experiment with a mechanistic interpretability study (see subsection F.3) to better understand the mechanism at stake that allows these heads to match together (contextualized) query tokens and (contextualized) document tokens.

Key highlights. Our results confirm that heads specialized in detecting matching signals between queries and documents exist in the model. By analyzing their attention patterns, we further characterize the nature of the matching signals they capture and report two distinct stages. From early to middle layers, these interactions match occurrences of the same token in the query and the document (syntactic matching), while in the last layers, matching occurs between semantically-contextualized tokens (semantic matching) that are close to each other. These heads are also among the most important components of cross-encoders, which confirms the significance of matching signals, and our mechanistic study explains the behavior of most of them: their Query-Key circuit favors cross-attention (query to document or document to query) over self-attention, and associates highly similar source and target tokens.

After discovering the nature of the signals that are leveraged by cross-encoders to predict relevance, we look into the process behind the construction of the “relevance” signal itself (RQ4). We target key stages of the process, i.e., when the information stored inside the query tokens is transferred into the [CLS] representation, and investigate the geometry of the hidden state’s subspaces to understand if a “relevance” subspace exists.

Key highlights. Our analysis reveals differences between MiniLM, MonoBERT-base and MonoBERT-large, in both the construction and the nature of their respective “relevance” subspace. In addition, we report that relevance signals emerge in the [CLS] token only in the final layers, which supports the view that it performs a “no-op” function in earlier layers, akin to the [SEP] tokens [18].

Taken together, our findings both reinforce and refine prior insights into cross-encoder behavior. In particular, we are able, not only to confirm, but also to specify, the flow of information between input parts inside BERT-based cross-encoders. Crucially, we go beyond the existing work by testing the consistency of this finding across multiple architectures and domains (RQ5, RQ6). In doing so, we help move the field toward a more unified and generalizable understanding of how cross-encoders compute relevance.

References (36)