Towards Trustworthy Reranking: A Simple yet Effective Abstention Mechanism
- Authors
- Hippolyte Gisserot-Boukhlef
- Manuel Faysse
- Emmanuel Malherbe
- Céline Hudelot
- Pierre Colombo
- Affiliations
- Artefact Research Center
- MICS, CentraleSupélec, Université Paris-Saclay
- Illuin Technology
- Equall.ai
- Accepted at
- TMLR 2024
- Date
- arXiv
- 2402.12997
Abstract
Neural Information Retrieval (NIR) has significantly improved upon heuristic-based Information Retrieval (IR) systems. Yet, failures remain frequent, the models used often being unable to retrieve documents relevant to the user's query. We address this challenge by proposing a lightweight abstention mechanism tailored for real-world constraints, with particular emphasis placed on the reranking phase. We introduce a protocol for evaluating abstention strategies in black-box scenarios (typically encountered when relying on API services), demonstrating their efficacy, and propose a simple yet effective data-driven mechanism. We provide open-source code for experiment replication and abstention implementation, fostering wider adoption and application in diverse contexts.
Cite this paper
@article{gisserotboukhlef2024towards,
title = {Towards Trustworthy Reranking: A Simple yet Effective Abstention Mechanism},
author = {Hippolyte Gisserot-Boukhlef and Manuel Faysse and Emmanuel Malherbe and Céline Hudelot and Pierre Colombo},
journal = {Transactions on Machine Learning Research},
year = {2024}
}Copied
Introduction
In recent years, NIR has emerged as a promising approach to addressing the challenges of IR on various tasks (Guo et al., 2016; Mitra & Craswell, 2017; Zhao et al., 2022). Central to the NIR paradigm are the pivotal stages of retrieval and reranking (Robertson et al., 1995; Ni et al., 2021; Neelakantan et al., 2022), which collectively play a fundamental role in shaping the performance and outcomes of IR systems (Thakur et al., 2021). While the objective of the retrieval stage is to efficiently fetch candidate documents from a vast corpus based on a user’s query (frequentist (Ramos et al., 2003; Robertson et al., 2009) or bi-encoder-based approaches (Karpukhin et al., 2020)), reranking aims at reordering these retrieved documents in a slower albeit more effective way, using more sophisticated techniques (bi-encoder- or cross-encoder-based (Nogueira & Cho, 2019; Khattab & Zaharia, 2020)).
However, despite advancements in NIR techniques, retrieval and reranking processes frequently fail, due for instance to the quality of the models being used, to ambiguous user queries or insufficient relevant documents in the database. These can have unsuitable consequences, particularly in contexts like Retrieval-Augmented Generation (RAG) (Lewis et al., 2020), where retrieved information is directly used in downstream tasks, thus undermining the overall system reliability (Yoran et al., 2023; Wang et al., 2023; Baek et al., 2023).
Recognizing the critical need to address these challenges, the implementation of abstention mechanisms emerges as a significant promise within the IR landscape. This technique offers a pragmatic approach by abstaining from delivering results when the model shows signs of uncertainty, thus ensuring users are not misled by potentially erroneous information. Although the subject of abstention in machine learning has long been of interest (Chow, 1957; El-Yaniv & Wiener, 2010; Geifman & El-Yaniv, 2017; Geifman & El-Yaniv, 2019), most research has focused on the classification setting, leaving lack of significant initiatives in IR. A few related works propose computationally intensive learning strategies (Cheng et al., 2010; Mao et al., 2023) that are difficult to implement in the case of NIR, where models can have up to billions of parameters.
Scope. In this paper, we explore lightweight abstention mechanisms that adhere to realistic industrial constraints, namely (i) black-box access-only to query-documents relevance scores, which is typically the case when relying on API services, (ii) marginal computational and latency overhead, (iii) configurable abstention rates depending on the application. In line with industrial applications of IR systems for RAG or search engines, our method focuses on assessing the reranking quality of the top retrieved documents.
Contributions. Our key contributions are:
We devise a detailed protocol for evaluating abstention strategies in a black-box reranking setting and demonstrate their relevance.
We introduce a simple yet effective reference-based abstention mechanism, outperforming reference-free heuristics at zero incurred cost. We perform ablations and analyses on this method and are confident about its potential in practical settings.
We release a code package (https://github.com/artefactory/abstention-reranker, under MIT license) and artifacts (https://huggingface.co/collections/artefactory/abstention-reranking) to enable full replication of our experiments and the implementation of plug-and-play abstention mechanisms for any use case.

Problem Statement & Related Work
Notations
General notations. Let denote the vocabulary and the set of all possible textual inputs (Kleene closure of ). Let be the set of queries and the document database. In the reranking setting, a query is associated with candidate documents coming from the preceding retrieval phase, some of them being relevant to the query and the others not. When available, we denote by the ground truth vector, such that if is relevant to and otherwise.
Dataset. When specified, we have access to a labeled reference dataset composed of instances, each of them comprising of a query and candidate documents, , and a ground truth . Formally,
Relevance scoring. A crucial step in the reranking task is the calculation of query-document relevance scores. We denote by the encoder-based relevance function that maps a query-document pair to its corresponding relevance score, with standing for the encoder parameters. We also define , the function taking a query and candidate documents as input and returning the corresponding vector of relevance scores. Formally, given ,
Additionally, we define the sort function that takes a vector of scores as input and returns its sorted version in increasing order. For a given , is such that . We denote by the function that takes a query and candidate documents and directly returns the sorted relevance scores, i.e.,
Document ranking. Once the scores are computed, we have a notion of the relevance level of each document with respect to the query. The idea is then to rank the documents by relevance score. For a given vector of scores , let denote the corresponding vector of positions in the ascending sort, , where is the symmetric group of elements comprising of the permutations of . In other terms, if is ranked in the ascending sort of . We then define the full reranking function , taking a query and candidate documents as input and returning the corresponding ranking by relevance score. More formally,
Instance-wise metric. Finally, when a ground truth vector is available, it is possible to evaluate the quality of the ranking generated by on a given query-documents tuple . Therefore, we denote by the evaluation function that takes a vector of scores and a ground truth vector as input and returns the corresponding metric value. Without any lack of generality, we assume that increases with the ranking quality ("higher is better").
Abstention in Reranking
In this work, our goal is to design an abstention mechanism built directly on top of reranker . We therefore aim to find a confidence function and a threshold such that ranking is outputted for a given query-documents tuple if and only if . Formally, we want to come up with a function such that for given and ,
where denotes the abstention decision.
Requirements. In compliance with the set of constraints defined in the introduction (Section 1), must be usable in a fully black-box setting and not incur significant extra computational costs, either during training or at inference time. Formally, we set the two following requirements:
We focus on the case in which the encoder parameters are not learnable.
Furthermore, must only take relevance scores as input, i.e., .
Related Work
Abstention, also known as selective prediction, has been around for a long time, originally for classification purposes (Chow, 1957; El-Yaniv & Wiener, 2010), and has often been associated with topics such as confidence estimation, out-of-domain (OOD) detection (Schölkopf et al., 1999; Liang et al., 2017; Darrin et al., 2022; Darrin et al., 2024) and prediction error detection (Hendrycks & Gimpel, 2016). These fields collectively encompass three main approaches: learning-based methods, which require a dedicated training process; white-box methods, which rely on full access to the model’s internal features; and black-box methods, which focus solely on the model’s output.
Among learning-based methods, the most classic initiatives include algorithms such as SVMs, nearest neighbors, boosting (Hellman, 1970; Fumera & Roli, 2002; Wiener & El-Yaniv, 2015; Cortes et al., 2016) or Bayesian methods (Blundell et al., 2015) such as Markov Chain Monte Carlo (Geyer, 1992) and Variational Inference (Hinton & Van Camp, 1993; Graves, 2011), that include uncertainty estimation as a whole part of the training process. Similarly, aleatoric uncertainty estimation requires the use of a log-likelihood loss function (Loquercio et al., 2020), thus greatly modifying the training process. Some approaches also include specific regularizers in the loss function (Xin et al., 2021; Zeng et al., 2021), while others incorporate abstention as a class during training (Rajpurkar et al., 2018), most of the time with a certain cost associated (Bartlett & Wegkamp, 2008; El-Yaniv & Wiener, 2010; Cortes et al., 2016; Geifman & El-Yaniv, 2019). It comes obvious that none of these methods align with the no-training requirement set in Section 2.2.
Most white-box methods, on the other hand, do not require specific training. When considering selective prediction in neural networks, a straightforward and effective technique is to set a threshold over a confidence score derived from a pre-trained network, which was already optimized to predict all points (Cordella et al., 1995; De Stefano et al., 2000; Wiener & El-Yaniv, 2012). Monte Carlo dropout is another popular approach involving randomly deactivating neurons of a model at inference time to estimate its epistemic uncertainty (Houlsby et al., 2011; Gal et al., 2017; Smith & Gal, 2018). Others rely on a statistical analysis of the model’s features (hidden layers) (Lee et al., 2018; Ren et al., 2021; Podolskiy et al., 2021; Haroush et al., 2021; Gomes et al., 2022) while ensemble-based methods (Gal & Ghahramani, 2016; Lakshminarayanan et al., 2017; Geifman & El-Yaniv, 2019) extend this idea and estimate confidence based on statistics of the ensemble model’s features. The latter approaches might significantly increase inference time, which is not in line with our set of constraints (Section 2.2). Moreover, white-box access to the model cannot always be guaranteed in practical situations (e.g., API services).
Black-box approaches assume only access to the output layer of the classifier, i.e., the soft probabilities or logits. Some works estimate uncertainty by using the probability of the mode (Hendrycks & Gimpel, 2016; Lefebvre-Brossard et al., 2023; Hein et al., 2019; Hsu et al., 2020; Wang et al., 2023) while others utilize the entire logit distribution (Liu et al., 2020), the most widely known and straightforward confidence calibration technique remaining temperature scaling (Platt et al., 1999). However, it is unclear how to apply these frameworks to the ranking scenario, where relevance scores are neither soft probabilities nor logits but unscaled scalars.
Selective prediction and confidence estimation in NLP have seen targeted applications but have room for expansion across broader scenarios. Dong et al. (2018) describe a model developed to estimate confidence specifically for semantic parsing, while Kamath et al. (2020) delve into selective prediction for out-of-distribution (OOD) question answering, allowing the model to abstain from answering questions deemed too difficult or outside the training distribution. More recently, Xin et al. (2021) have applied selective prediction through loss regularization in various classification settings. Additionally, datasets such as SQuAD2.0 (Rajpurkar et al., 2018) illustrate the challenge of unanswerable questions. In the IR field specifically, strategies like those proposed by Cheng et al. (2010) and Mao et al. (2023) allow a model to abstain at a certain cost during training by assessing the confidence level on partial ranks. Here again, such methods do not fit the black-box constraint mentioned in Section 2.2.
Confidence Assessment for Document Reranking
In this paper, as stated in Section 2.2, the confidence scorer we build only takes into account the list of relevance scores. Our intuition is that, by analyzing the distribution of the ranker’s scores, it should be possible to estimate its confidence on a given instance. In the next two subsections, we describe two methods for calculating the confidence score: the first one is reference-free, meaning it does not require any external data, while the second one relies on access to reference data for calibration purposes.
Reference-Free Scenario
First, we present the reference-free approach, which can be divided into three stages (Figure 1):
Observation. We first observe the relevance scores (Equation 2) for a given test instance .
Estimation. We then assess confidence using a simple heuristic function , based solely on these relevance scores (e.g., maximum).
Thresholding. Finally, we compare the confidence score computed in step 2 to a threshold . If , we make a prediction using ranker , otherwise, we abstain (Equation 5).
In this work, we evaluate a bunch of reference-free confidence functions, relying on simple statistics computed on the relevance scores. We focus more particularly on three functions inspired from MSP (Hendrycks & Gimpel, 2016): (i) the maximum relevance score , (ii) the standard deviation , and (iii) the difference between the first and second highest relevance scores (Narayanan et al., 2012).
Data-Driven Scenario
In this scenario, rather than arbitrarily constructing a relevance-score-based confidence scorer, we consider that we have access to a reference set (Equation 1) and are therefore able to evaluate ranker (Equation 4) on each of the labeled instances. We thus define dataset :
As a reminder, is the ascending sort of query-document relevance scores (Equation 3) and is the evaluation of the ranking induced by given ground truth and metric function .
An intuitive approach is to fit a simple supervised model to predict ranking performance given a vector of sorted relevance scores . In this section, we develop a regression-based approach (Figure 1):
Calibration. We use reference set to derive (Equation 6) and then fit a regressor on . Next, we derive , the function that takes a vector of unsorted scores as input and returns the predicted ranking quality.
Observation. As in Section 3.1, we observe the relevance scores for a given test instance .
Estimation. We then assess confidence using the function. Intuitively, the greater , the more confident we are that correctly ranks the documents with respect to the query.
Thresholding. As in Section 3.1, an abstention decision is finally made by comparing to . In Section 5.3, we propose an approach to choose .
In this work, we use a linear-regression-based confidence function (Fisher, 1922). Formally, for a given unsorted vector of relevance scores ,
where are the coefficients fitted on , with an regularization parameter (Hoerl & Kennard, 1970). More data-driven confidence functions are explored in Appendix D.
Experimental Setup
In this section, we propose a novel experimental setup for assessing performance of abstention mechanisms in a black-box reranking setting. We present both our benchmark and evaluation metrics.
Models and Datasets
An extensive benchmark is built to evaluate the abstention mechanisms presented in Section 3. We collect six open-source reranking datasets (Lhoest et al., 2021) in three different languages, English, French and Chinese: stackoverflowdupquestions-reranking (Zhang et al., 2015), denoted StackOverflow in the experiments, askubuntudupquestions-reranking (Lei et al., 2015), denoted AskUbuntu, scidocs-reranking (Cohan et al., 2020), denoted SciDocs, mteb-fr-reranking-alloprof-s2p (Lefebvre-Brossard et al., 2023), denoted Alloprof, CMedQAv1-reranking (Zhang et al., 2017), denoted CMedQAv1, and Mmarco-reranking (Bonifacio et al., 2021), denoted Mmarco.
We also collect 22 open-source models for evaluation on each of the six datasets. These include models of various sizes, bi-encoders and cross-encoders, monolingual and multilingual: ember-v1 (paper to be released soon), llm-embedder (Zhang et al., 2023), bge-base-en-v1.5, bge-reranker-base/large (Xiao et al., 2023), multilingual-e5-small/large, e5-small-v2/large-v2 (Wang et al., 2022), msmarco-MiniLM-L6-cos-v5, msmarco-distilbert-dot-v5, ms-marco-TinyBERT-L-2-v2, ms-marco-MiniLM-L-6-v2 (Reimers & Gurevych, 2021), stsb-TinyBERT-L-4, stsb-distilroberta-base, multi-qa-distilbert-cos-v1, multi-qa-MiniLM-L6-cos-v1, all-MiniLM-L6-v2, all-distilroberta-v1, all-mpnet-base-v2, quora-distilroberta-base and qnli-distilroberta-base (Reimers & Gurevych, 2019).
In addition, each dataset is preprocessed in such a way that there are only 10 candidate documents per query and a maximum of five positive documents, in order to create a scenario close to real-life reranking use cases. Moreover, to fit the black-box setting, query-documents relevance scores are calculated upstream of the evaluation and are not used thereafter. Further details are given in appendix A.
Instance-Wise Metrics
In this work, we rely on three of the metrics most commonly used in the IR setting (e.g., MTEB leaderboard (Muennighoff et al., 2022)): Average Precision (AP), Normalized Discounted Cumulative Gain (NDCG) and Reciprocal Rank (RR): AP (Zhu, 2004) computes a proxy of the area under the precision-recall curve; NDCG (Järvelin & Kekäläinen, 2002) measures the relevance of the top-ranked items by discounting those further down the list using a logarithmic factor; and RR (Voorhees et al., 1999) computes the inverse rank of the first relevant element in the predicted ranking. For all three metrics, higher values indicate better performance. When relevant, we rely on their averaged versions across multiple instances: mAP, mNDCG and mRR.
Assessing Abstention Performance
The compromise between abstention rate and performance in predictive modeling represents a delicate balance that requires careful consideration (El-Yaniv & Wiener, 2010). First, we want to make sure that an increasing abstention rate implies increasing performance, otherwise the mechanism employed is ineffective or even deleterious. Secondly, we aim to abstain in the best possible way for every abstention rate, i.e., we want to maximize the growth of the performance-abstention curve.
Inspired by the risk-coverage curve (El-Yaniv & Wiener, 2010; Geifman & El-Yaniv, 2017), we evaluate abstention strategies by reporting the normalized Area Under the performance-abstention Curve, where the x-axis corresponds to the abstention rate of the strategy and the y-axis to the achieved average performance regarding metric function . Our evaluation protocol is as follows, assuming access to a test set, :
Multi-thresholding. First of all, we evaluate abstention mechanism (Equation 5) on test set for a list of abstention thresholds . For a given , the performance of mechanism on and its corresponding abstention rate are respectively denoted by
being the set of predicted instances, i.e., . We collect abstention rates, , and associated performances, , and then compute the area under the performance-abstention curve for metric function .
Random baseline. Second, we evaluate , the mechanism that performs random (i.e., ineffective) abstention. Intuitively, random abstention shows flat performance as the abstention rate increases, equal to (Equation 7).
Oracle evaluation. Then, we evaluate the oracle on the same task. Intuitively, the oracle has access to the test labels and can therefore select the best instances for a given abstention rate. thus upper-bounds .
Normalization. We finally compute normalized AUC. Formally,
In particular, means that abstention mechanism reaches oracle performance. In contrast, indicates that has a deleterious effect, with declining average ranking performance while abstention increases.
In this study, in order to guarantee consistent comparisons between abstention mechanisms, we randomly set aside 20% of the initial dataset as a test set, treating the remaining 80% as the reference set. Results, unless specified otherwise, are averaged across five random seeds.
Results
Abstention Performance
We report nAUC (Equation 8) for all methods described in Section 3, averaged model-wise (Table 2), and illustrate the dynamics of the performance-abstention curves for the ember-v1 model on the StackOverflow dataset in Figure 2.
Abstention works. All evaluated abstention-based methods improve downstream evaluation metrics (nAUCs greater than 0), showcasing the relevance of abstention approaches in a practical setting.
Reference-based abstention works better. The value of reference-based abstention approaches is demonstrated in Table 2, in which we notice that the linear-regression-based method performs on average largely better than all reference-free baselines, edging out the best baseline strategy () by almost 10 points on the mAP metric.
Having shown the superiority of reference-based abstention methods across the entire benchmark, we conduct (unless otherwise specified) the following experiments on the ember-v1 model using mAP for evaluation (main metric in the MTEB leaderboard (Muennighoff et al., 2022)), and compare to , respectively the best reference-based and reference-free methods mAP-wise.
Abstention Effectiveness vs. Raw Model Performance
We investigate whether a correlation exists between abstention effectiveness and model raw performance (i.e., without abstention) on the reranking task. For each model-dataset pair, we compute both no-abstention mAP and abstention nAUC, using as a confidence function (Figure 3, Table 3).
A better ranker implies better abstention. Figure 3 and Table 3 showcase a clear positive correlation between model raw performance and abstention effectiveness, albeit with disparities from one dataset to another. Better reranking methods naturally produce more calibrated score distributions, which in turn leads to improved abstention performance. This highlights the value of incorporating abstention mechanisms into high-performing retrieval systems and reinforces that their purpose is not to turn weak rankers into strong ones, but to enhance the quality of models that already perform reasonably well. For thoroughness, we evaluated a range of open-source models with varying performance levels, though in practice, users typically select models they already know to be sufficiently effective.
Threshold Calibration
In practical industrial settings, a major challenge with abstention methods lies in choosing the right threshold to ensure a desired abstention rate or performance level on new data. To evaluate threshold calibration quality, we choose three target abstention rates (10%, 50%, and 90%) and rely on the reference set to infer the corresponding threshold and level of performance (here, the mAP). Then, the Mean Absolute Error (MAE) between target and achieved values on test instances is reported (Table 5.3), averaging across 1000 random seeds on the StackOverflow dataset.
is better calibrated than . The lower part of Table 5.3 shows that the MAE between the target and achieved mAP increases with the abstention rate, which is logical because a higher abstention rate reduces the number of evaluated instances and therefore increases volatility. However, we observe that the MAE increases much less significantly for the method than for the method, with the latter having a MAE twice as high at a target abstention rate of 90%. This provides strong evidence that is more reliable at high abstention rates.
Domain Adaptation Study
In a practical setting, it is rare to have a reference set that perfectly matches the distribution of samples seen at test time. To measure the robustness of our method to data drifts, we fit them on a given dataset and evaluate on all others.
Reference-based approaches are globally not robust to domain changes. From Table 5.3, we see on average that the reference-based method underperforms reference-free baselines when fitted on the "wrong" reference set. However, certain reference datasets seem to enable methods to generalize better overall, even out of distribution, which is mainly an artifact of the number of positive documents per instance (further insights in Appendix C).
Reference Set Minimal Size
Calibrated reference-based methods outperform reference-free baselines (Section 5.1) but require having access to an in-domain reference set (Section 5.4). To assess the efforts required for calibrating these techniques to extract best abstention performance, we study the impact of reference set size on method performance.
Small reference sets suffice. From Figure 4 and Table 4, we note that requires only a fairly small amount of reference data (less than 40 samples on average) to outperform , which demonstrates the effectiveness of using a reference set even when data is scarce. This provides strong evidence on the applicability of our method to practical industrial contexts, the labeling of around 50 samples appearing perfectly tractable in such settings.
Computational Overhead Analysis
Crucial to the adoption of our abstention method is the minor latency overhead incurred at inference time. In our setup, we consider documents are pre-embedded by the bi-encoders, and stored in a vector database. We average timed results over 100 runs on a single instance prediction, running the calculations on one Apple M1 CPU (Figure 5). To upper-bound the abstention method overhead, we baseline the smallest model with the fastest embedding time available (all-MiniLM-L6-v2).
Our data-based abstention method is free of any significant time overhead. -based confidence estimation accounts for only 1.2% of relevance scores calculation time (Figure 5), making it an almost cost-free option.




Conclusion
We developed a lightweight abstention mechanism tailored to real-world constraints, agnostic to the ranking method and shown to be effective across various settings and use cases. Our method, which only requires black-box access to relevance scores and a small reference set for calibration, is essentially a free-lunch to plug to any retrieval system, in order to gain better control over the whole IR pipeline.
Limitations and Future Work
Our study investigates abstention mechanisms specifically within the reranking stage of an IR pipeline. While this provides a framework for estimating the confidence of the final prediction, the absence of datasets with explicit document-wise labels has limited our ability to evaluate these methods in the primary retrieval stage. These datasets typically lack labels indicating relevant and irrelevant documents, as is the case with classical retrieval benchmarks like BEIR (Thakur et al., 2021). However, in theory, our methods should be applicable at this earlier stage of the pipeline, making this a potential area for future exploration.
Moreover, our experiments have mainly focused on reranking the top-10 retrieved documents, aligning with common industrial use cases. A natural extension would be to explore how abstention mechanisms perform when applied to larger sets of documents, such as the top-50 or top-100 results. Since our linear-regression-based abstention method is designed to scale efficiently, it could potentially benefit from the richer decision-making context provided by more document scores, although this impact has yet to be quantified.
A broader consideration, however, lies in the potential of generative models, such as those used in RAG, to handle abstention on their own (Zhang et al., 2024). These models might inherently possess the capability to estimate confidence without needing a separate abstention mechanism, a compelling prospect for further investigation.
Another promising avenue is to test abstention mechanisms on relevance-scoring methods that offer more detailed information, such as token-level relevance scores for each query-document pair. Methods like ColBERT (Khattab & Zaharia, 2020) or the ColPALI (Faysse et al., 2024) model family provide richer signals, which could lead to improved abstention performance. It would be interesting to see if the additional granularity in relevance scores results in better decision-making, particularly in scenarios where token-level understanding could refine the abstention process.
Next step
A problem worth researching?
Tell us what you are trying to solve, and we will put you in touch with the people who work on it.