RankSHAP: Shapley Value Based Feature Attributions for Learning to Rank

## Abstract

Abstract Numerous works propose post-hoc, model-agnostic explanations for learning to rank, focusing on ordering entities by their relevance to a query through feature attribution methods. However, these attributions often weakly correlate or contradict each other, confusing end users. We adopt an axiomatic game-theoretic approach, popular in the feature attribution community, to identify a set of fundamental axioms that every ranking-based feature attribution method should satisfy. We then introduce Rank-SHAP, extending classical Shapley values to ranking. We evaluate the RankSHAP framework through extensive experiments on two datasets, multiple ranking methods and evaluation metrics. Additionally, a user study confirms RankSHAP’s alignment with human intuition. We also perform an axiomatic analysis of existing rank attribution algorithms to determine their compliance with our proposed axioms. Ultimately, our aim is to equip practitioners with a set of axiomatically backed feature attribution methods for studying IR ranking models, that ensure generality as well as consistency.

## 1 Introduction

A user submits a query to a search engine, wanting to know, say, what is the best car to purchase. The search engine processes the query and outputs a ranked list of documents (web pages) in response to the query. How did the search engine decide on the order in which the documents are presented? The task of ranking entails a query $\vec{q}$ and a set of documents $D$ as input to a ranking model $f_{R}$, which in turn generates an ordering of these documents.
We assume that the ranking model is available only as a black-box which can be queried using an API.
For a particular query, we wish to understand the logic behind the generated ordering, to verify the functionality of the model as well as to help end users.
Ranking feature attributions are critical for building trust in systems which are used for high stakes decision making (Anand et al., ; Chowdhury et al., ).
Such feature attributions are also useful in ruling out prejudices in widely used web search, product search and recommendation systems (Singh & Anand, ; Singh et al., ).

Additive feature attributions have become a well studied topic in recent years, especially for regression and classification tasks.
To maintain a consistency between different feature attribution methods, various authors (Lundberg & Lee, ; Datta et al., ) proposed a unique solution based on the Shapley value (Shapley, ). This solution is considered the reference standard of feature attributions because of the several fundamental axioms it uniquely satisfies. Different approximations such as KernelSHAP (Lundberg & Lee, ) and DeepSHAP (Lundberg & Lee, ; Shrikumar et al., ) are used for popular real-world applications.

Quite a few attempts have been made to generate feature attributions for ranking tasks, often by extending attribution methods from classification/regression. EXS (Singh & Anand, ) and Rank-LIME (Chowdhury et al., ) extend LIME in different manners to obtain ranking feature attributions. However, these attributions contradict each other across the different settings in the very same algorithm. Fernando et al. () also generate explanations for ranking models using DeepSHAP and report little correlation between the attributions generated by different reference values for the very same query. This shows us that extensions of popular feature attribution methods for classification and regression are not good attribution candidates for ranking. More recently, RankingSHAP (Heuss et al., ) extend Shapley values to generate feature attributions for ordered lists. However, we show that even their proposed-framework does not satisfy fundamental properties like monotonicity and efficiency. Consequently, establishing a robust reference standard for ranking feature attributions is imperative. Such a framework will significantly benefit a wide range of stakeholders, from end users seeking more reliable search results to researchers and practitioners aiming to gain deeper insights into model behavior.

#### Our Contributions.

We present a set of fundamental axioms for Information Retrieval (IR) value functions—*Relevance Sensitivity* and *Position Sensitivity*—along with Shapley properties specific to ranking: *Rank-Efficiency*, *Rank-Missingness*, *Rank-Symmetry*, and *Rank-Monotonicity*. We believe, these axioms are essential for any ranking feature attribution method to uphold without sacrificing generality. To address this need, we introduce *RankSHAP*, an extension of the Shapley value that satisfies all the aforementioned axioms. We discuss computationally feasible approximations using KernelSHAP to make RankSHAP practical for real-world applications. We conduct extensive experiments on two datasets—MS MARCO and Robust04—using multiple document re-ranking models based on BERT, T5, and LLAMA2. Our results demonstrate that RankSHAP outperforms existing ranking feature attribution methods, surpassing the best baseline by $25.78\%$ in *Fidelity* and $19.68\%$ in *weighted Fidelity* (wFidelity). Additionally, we carry out an IRB-approved user study to assess how well the proposed axioms align with human intuition. We also provide an axiomatic analysis of existing rank attribution methods—EXS, RankLIME, and RankingSHAP—to determine whether they satisfy the fundamental axioms. Ultimately, we advocate for practitioners to adopt RankSHAP-based, axiomatically grounded feature attribution methods as the reference standard for their IR explanation needs. Once the work is accepted, we plan to release our code as a python library.

## 2 Background

We start by briefly describing the Shapley value, as used for credit assignment in coalitional game theory, and its consequent use in feature attributions for machine learning models. Following this, we outline some basic properties of information retrieval systems and discuss evaluation metrics for ordered document lists.

### 2.1 Basic Axioms and the Shapley Value

The Shapley axioms for feature attributions have been borrowed from coalitional game theory, where they are foundational constraints, used to fairly distribute costs/rewards among a set of players. In the context of feature attributions for ML models, we can think of each feature as a *player* contributing to the model’s output. Thus, given any model $f$, that has a scalar output, the feature attribution of feature $i$ in the decision made by $f$ towards the model input $\vec{s}$ is represented by $\phi_{i}(f,\vec{s})$. Let us assume there are a total of $m$ features. For a feature attribution $\phi_{i}(f,\vec{s})$ to be sound, it is necessary for it to satisfy certain basic axioms, namely: Efficiency, Missingness, Symmetry and Monotonicity (Appendix B).

The *Shapley value* (Young, ; Shapley, ) uniquely satisfies the four axioms above and has been widely adopted in feature attribution for regression/classification tasks. It is defined as:

$$ $\displaystyle\phi_{i}(f,\vec{s})$ $\displaystyle=\sum_{\vec{z}\subseteq\vec{s}}\frac{|\vec{z}|!(m-|\vec{z}|-1)!}{ m!}\left[f(\vec{z})-f(\vec{z}\setminus i)\right]$ (1) $$

where $\vec{z}\subseteq\vec{s}$ represents all binary vectors $\vec{z}$ where the non-zero entries correspond to a subset of the non-zero entries in $\vec{s}$. Essentially, $\vec{z}$ indicates which features are included (non-zero) and which are excluded (zero) in a particular subset; $|\vec{z}|$ is the number of non-zero entries in $\vec{z}$; $\vec{z}\setminus i$ denotes the vector $\vec{z}$ with the $i$-th feature removed (set to zero/replaced by baseline value); $f(\vec{z})$ denotes the output of the model $f$ when the input features corresponding to the non-zero entries in $\vec{z}$ are set to their values in $\vec{s}$, and the remaining features are set to some baseline value (e.g., zero).

Satisfying these basic axioms ensures that a feature attribution method is fair and consistent, and as a result, trustworthy for end users. The classical Shapley framework cannot be directly applied to the ranking feature attribution task as in the ranking scenario, the model output $f_{R}(\vec{s})$ is not scalar, but an ordering of documents.

### 2.2 Document Relevance and IR Evaluation Metrics

In Information Retrieval (IR), the concept of *relevance* is fundamental to understanding how search systems operate. Relevance $rel(\vec{q},\vec{d}_{i})$ quantifies how well a document $\vec{d}_{i}$ matches a user’s query $\vec{q}$. For simplicity, the relevance score of a particular document $\vec{d}_{j}$ can be denoted as $rel_{j}$. These scores can be binary (relevant or not relevant) or numerical values indicating varying degrees of relevance, with higher scores representing better matches. Assigning relevance scores allows IR systems to prioritize the most pertinent documents in search results, enhancing the user’s ability to find useful information quickly.

Evaluating the quality of an ordered list of documents (e.g., web pages) is crucial for assessing how effectively an IR system meets users’ needs. Given an ordered list, we need to determine how well this arrangement serves the user compared to other possible orderings. Several evaluation metrics are commonly used for this purpose. Precision measures the proportion of retrieved documents that are relevant.
Mean Average Precision (MAP) calculates the average precision across multiple queries, considering the rank positions of all relevant documents. Discounted Cumulative Gain (DCG) takes into account both the relevance of documents and their positions in the ranked list. It applies a logarithmic discount factor to penalize relevant documents that appear lower in the list. Normalized Discounted Cumulative Gain (NDCG) (Järvelin & Kekäläinen, ) is a normalized version of DCG that scales the scores between 0 and 1. This allows for fair comparison across different queries and systems.

Among these metrics, NDCG has become the *standard* and is *almost universally used* to evaluate the effectiveness of ranked lists (Yining et al., ). Due to its ability to effectively account for both the relevance and the position of documents, NDCG is extensively adopted in modern IR systems, search engines, and recommendation platforms to assess and compare the performance of different ranking algorithms (Appendix C).

## 3 The RankSHAP Framework

We first define the feature attribution problem for ranking models in Section 3.1. We then define the Shapley axioms for the ranking task in Section 3.2. Next, in Section 3.3, we discuss ideal properties of ordered list value functions and propose a Generalized Ranking Effectiveness Metric (GREM). Finally, in Section 3.4 we present the unique solution that satisfies the Shapley and GREM constraints for the ranking feature attribution task. In Section 3.5, we discuss computationally feasible approximations of the RankSHAP expression, making it suitable for practical use cases.

### 3.1 The Ranking attribution Problem

Let $f_{R}$ represent a ranking model, acessible to us only as a black-box. Given a query $\vec{q}$ and a set of documents $D=\{\vec{d}_{1},\dots,\vec{d}_{k}\}$, $f_{R}$ computes an ordering of documents in $D$, i.e., $f_{R}(\vec{q},D)$. Let the query and set of documents $(\vec{q},D)$ jointly form the instance ($\vec{x}$). The goal is to generate post-hoc feature attributions $\phi_{R}(f_{R},\vec{x})$, to understand the ranking model’s decision corresponding to $\vec{x}$.

We assume that there are $n$ documents in $D$, and that there are $m$ features of interest. $\phi_{R}(f_{R},\vec{x})$ is thus a $m$- dimensional vector where each element represents the contribution of a particular feature to the ranking decision. The query and documents here can be represented in any manner, for example: bag of words, human engineered features, vectors in some embedding space, etc.

### 3.2 Shapley Axioms for Ranking

Let the set of features being studied be represented by $M=\{1,2,3...,m\}$ and let $V_{R}$ be a function that assigns a real-valued effectiveness score to each ordering of documents. The effectiveness score reflects the quality of the ranking based on the relevance of the documents to the query. We refer to the mean value of a feature across the dataset being studied as its baseline value. Using these, we re-write the Shapley axioms for the ranking task as follows:

The sum total of all feature attributions for a particular ordering should be equal to the difference between the effectiveness scores of the orderings obtained when all features are included and when all features are replaced by their baseline values.

$$ $\displaystyle\sum_{i=1}^{m}\phi_{R}(f_{R},\vec{x},i)=V_{R}(f_{R}(\vec{x}))-V_{ R}(f_{R}(\emptyset))$ $$

where $f_{R}(\emptyset)$ represents the model’s output when all features are replaced by their baseline values.

If the inclusion of a feature $i$ does not change the effectiveness score for any ordering as compared to when the feature is replaced by its baseline value, it must be assigned an attribution of 0 0.

More formally, if for all $S\subseteq M\setminus\{i\}$
we have $V_{R}(f_{R}(S\cup i,\vec{x}))=V_{R}(f_{R}(S,\vec{x}))$, then $\phi_{R}(f_{R},\vec{x},i)=0$.

Two features $i,j\in M$ are called *symmetric* if they produce equal effectiveness scores when added individually to every possible feature coalition excluding them. The Rank-symmetry axiom requires that we assign equal attributions to symmetric features.

If for all $S\subseteq M\setminus\{i,j\}$ we have $V_{R}(f_{R}(S\cup i,\vec{x}))=V_{R}(f_{R}(S\cup j,\vec{x}))$, then $\phi_{R}(f_{R},\vec{x},i)=\phi_{R}(f_{R},\vec{x},j)$.

For input $\vec{x}$ and two ranking models $f_{R}$ and $f_{R}^{\prime}$, if for all coalitions $S$ where $S\subseteq M\setminus\{i\}$, the marginal effectiveness gain of adding $i$ to $S$ in $f_{R}$, is greater than or equal to the marginal effectiveness gain of adding $i$ to $S$ in $f_{R}^{\prime}$, the attribution of $i$ in $f_{R}$ has to be greater in $f_{R}$ as compared to $f_{R}^{\prime}$.

If for all $S\subseteq M\setminus\{i\}$ we have $V_{R}(f_{R}(S\cup i,\vec{x}))-V_{R}(f_{R}(S,\vec{x}))\geq V_{R}(f_{R}^{\prime}
(S\cup i,\vec{x}))-V_{R}(f_{R}^{\prime}(S,\vec{x}))$
then $\phi_{R}(f_{R},\vec{x},i)\geq\phi_{R}(f_{R}^{\prime},\vec{x},i)$.

### 3.3 A Generalized Ranking Effectiveness Metric ( GREM )

In this section, we study the desired properties for the ordering effectiveness score $V_{R}$. The IR evaluation community uses a number of measures to evaluate the effectiveness of a search engine’s ranking system. Different measures focus on different aspects of the retrieval and different needs of users (Gupta et al., ). A key part of all measures is the relationship between a document’s rank and the relevance score: they are expected to be consist with each other. Summarizing most work on IR evaluation leads us to two high-level properties that we expect any metric quanitifying effectiveness of a ranking to provide.

Given a query $\vec{q}$, a set of $n$ documents $D=[\vec{d}_{1},\vec{d}_{2},\ldots,\vec{d}_{k}]$, a human-generated relevance value $rel_{j}$ associated with each document $d_{j}$, and a metric value $\textit{GREM}_{n}$ determined from the set of query-document pairs, consider the ordered list $f_{R}({\vec{q},D})$. For an evaluation of the ordering, it is ideal for the metric ($\textit{GREM}_{n}$) to satisfy the following axioms:

If the relevance score of any document increases, while the relevance scores of all other documents remain the same, the metric value $\textit{GREM}_{n}$ should not decrease.

Formally, if $rel_{j}^{\prime}>rel_{j}$ for some $j$, and $rel_{i}^{\prime}=rel_{i}$ for all $i\neq j$, then $\textit{GREM}_{n}^{\prime}\geq\textit{GREM}_{n}$, where $\textit{GREM}_{n}^{\prime}$ is the metric computed with the updated relevance scores $\{rel_{1}^{\prime},rel_{2}^{\prime},\ldots,rel_{k}^{\prime}\}$.

If two documents $\vec{d}_{i}$ and $\vec{d}_{j}$ are swapped in the ranking, moving the document with the higher relevance score to a higher (better) rank, the metric value $\textit{GREM}_{n}$ should not decrease.

*Formally*, let $o$ be the original ordering, and $o^{\prime}$ be the ordering where only $\vec{d}_{i}$ and $\vec{d}_{j}$ are swapped. If $rel_{i}\geq rel_{j}$ and $\text{rank}_{o}(\vec{d}_{i})>\text{rank}_{o}(\vec{d}_{j})$, then $\textit{GREM}_{n}^{\prime}\geq\textit{GREM}_{n}$, where $\textit{GREM}_{n}^{\prime}$ is the metric computed with the new ordering $o^{\prime}$.

Relevance Sensitivity intuitively captures the principle that more relevant documents should enhance the overall effectiveness, while Position Sensitivity reflects that users prefer to find relevant information earlier in the ranking. These axioms are fundamental to any rank effectiveness metric because they align with the core goal of retrieval systems: to present the most relevant information prominently, thereby maximizing user satisfaction and system effectiveness.

###### Theorem 3.1 .

An ordered list evaluation metric satisfies the axioms of Relevance Sensitivity and Position Sensitivity if and only if it can be represented as

$$ $\displaystyle\textit{GREM}_{n}$ $\displaystyle=\sum_{j=1}^{n}g(rel_{j})\cdot h(j),$ $$

where $g(rel_{j})$ is a non-decreasing function of the relevance score $rel_{j}$ (gain function), and $h(j)$ is a non-increasing function of the rank position $j$ (discount function).

Proof of Theorem 3.1 is sketched in Appendix A. Examples of gain functions $g(rel_{j})$ include linear gain $rel_{j}$ and exponential gain $2^{rel_{j}}-1$. Examples of discount functions $h(j)$ include no discount $h(j)=1$, logarithmic discount $h(j)=\frac{1}{\log_{2}(j+1)}$
and reciprocal discount $h(j)=\frac{1}{j}$. Most widely-used IR metrics like CG, DCG, NDCG, reciprocal rank, precision@k belong to the $GREM_{n}$ framework.

###### Theorem 3.1 .

### 3.4 RankSHAP Attributions

Building upon the Shapley axioms adapted for ranking tasks (Section 3.2) and the characterization of ordering effectiveness metrics (Theorem 3.1), we conclude the following:

###### Theorem 3.2 .

Let $V_{R}$ be a ranking effectiveness metric that belongs to $GREM_{n}$, as characterized in Theorem 3.1. Then, the Shapley value $\phi_{R}$ computed with respect to $V_{R}$ is the unique feature attribution method that satisfies the axioms of Rank-Efficiency, Rank-Missingness, Rank-Symmetry, and Rank-Monotonicity.

Specifically, the attribution for feature $i$ is given by:

$$ $\phi_{R}(f_{R},\vec{x},i)=\sum_{S\subseteq M\setminus\{i\}}\frac{|S|!\,(m-|S|- 1)!}{m!}\left[V_{R}\big{(}f_{R}(S\cup\{i\},\vec{x})\big{)}-V_{R}\big{(}f_{R}(S ,\vec{x})\big{)}\right],$ $$

where the sum is over all subsets $S$ of $M\setminus\{i\}$, $|S|$ is the cardinality of $S$, and $m$ is the total number of features.

###### Proof.

The proof is a direct application of Shapley’s theorem (Shapley, ) in the context of ranking models. By adapting the classical Shapley axioms to the ranking task (as detailed in Section 3.2), we establish a set of axioms (Rank-Efficiency, Rank-Missingness, Rank-Symmetry, Rank-Monotonicity) tailored to ranking feature attributions. Given that $V_{R}$ satisfies Relevance Sensitivity and Position Sensitivity (as per Theorem 3.1), it ensures that $V_{R}$ is appropriate for evaluating the effectiveness of document rankings in response to feature subsets.

Shapley’s theorem states that the Shapley value is the unique method that satisfies the axioms of Efficiency, Null Player (Missingness), Symmetry, and Additivity (which corresponds to Monotonicity in our context). By applying this theorem to the ranking scenario with our adapted axioms, we conclude that the Shapley value $\phi_{R}$ is the unique feature attribution method satisfying all the specified axioms. Therefore, the attributions computed using the Shapley value formula provide a fair and consistent distribution of the total ranking effectiveness among the features, reflecting each feature’s contribution to the ranking decision.
∎

Hence, we recommend practitioners use *RankSHAP* for their ranking attribution needs due to its adherence to a set of fundamental properties.

###### Theorem 3.2 .

###### Proof.

### 3.5 Approximating RankSHAP

Among the metrics in GREM, we use NDCG in further experiments due to its appealing properties discussed in Appendix C. Computing the exact Shapley value is NP-Hard (Shapley, ) because it grows exponentially with the number of features. Additionally, NDCG computation for each subset increases the complexity by $O(n\log n)$. Relevance labels, necessary for ranking value functions, are often unavailable. Here we discuss how we approximate the RankSHAP solution for practical applications.

The NDCG score relies on knowing the relevance scores for each document, ideally obtained from ground truth labels in a human-annotated dataset, which are often unavailable. Several neural rankers (e.g., BERT (Nogueira & Cho, )) assign a similarity score to each query-document pair, which can infer relevance and compute NDCG. In the absence of similarity scores, relevance can be indirectly inferred using methods such as click-through rate, time spent on page, bounce rate, scroll depth, bookmarking, and social media shares (Zoeter et al., ).

While the Shapley value itself is NP-hard to compute, KernelSHAP (Lundberg & Lee, ) leverages a kernel based model to faithfully approximate the Shapley value.
It is a linear approximation of the ranking model $f_{R}$ at instance $\vec{x}$, which extends the LIME optimization function with a defined kernel and loss function. Below we write it for ranking attributions and name it Kernel-RankSHAP. Let $G$ be the class of all linear additive attributions. $\phi_{R}(f_{R},\vec{x},i)=\arg\min_{g\in G}L(f_{R},g,\pi_{\vec{x}})\ \text{
where}\ L(f_{R},g,\pi_{\vec{x}})=\sum_{\vec{z}\in Z}[\textit{NDCG}(f_{R}(\vec{
z}))-\textit{NDCG}(g(\vec{z}))]^{2}\pi_{\vec{x}}(\vec{z})\ \text{and}\ \pi_{
\vec{x}}(\vec{z})=\frac{(m-1)}{{m\choose{|\vec{z}|}}|\vec{z}|(m-|\vec{z}|)}$ .

Another popular way to approximate Shapley values is to use sampling based QII (Datta et al., ) in place of kernels. The decision to use kernels rather than sampling in high-dimensional feature spaces is computationally motivated. Sampling can introduce significant noise, reducing the reliability of estimates. Kernels, however, can more effectively approximate feature contributions without the extensive computation and noise associated with random sampling, especially in large feature spaces.

## 4 Axiomatic Analysis of Rank Feature Attribution algorithms

Previously, we discussed the importance of feature attribution methods satisfying the foundational Shapley axioms to be considered effective for IR feature attributions. Here, we mathematically formalize existing ranking feature attribution methods and analyze them axiomatically to determine if they fulfill Shapley criteria.

**Table 1: Analysis of Ranking Feature Attribution algorithms EXS, RankLIME, RankingSHAP and RankSHAP for axiomatic compliance of Rank-Shapley axioms.**
| Algorithm | Rank-Efficiency | Rank-Missingness | Rank-Symmetry | Rank-Monotonicity |
| --- | --- | --- | --- | --- |
| EXS | ✗ | ✗ | ✗ | ✗ |
| RankLIME | ✗ | ✗ | ✗ | ✗ |
| RankingSHAP | ✗ | ✗ | ✓ | ✗ |
| RankSHAP | ✓ | ✓ | ✓ | ✓ |

### 4.1 Optimization Function

In order to study these feature attribution algorithms individually, we write out their KernelSHAP optimization function and use them to analyze if the algorithms satisfy the axioms of Rank-Efficiency, Rank-Missingness, Rank-Symmetry and Rank-Monotonicity.

$$ $\displaystyle L_{\text{RANKLIME}}(f_{R},g,\pi_{\vec{x}})$ $\displaystyle=\sum_{\vec{z}\in Z}ApproxNDCG(f_{R}(\vec{z}),g(\vec{z}))\ \pi_{ \vec{x}}(\vec{z})$ $\displaystyle L_{\text{RANKINGSHAP}}(f_{R},g,\pi_{\vec{x}})$ $\displaystyle=\sum_{\vec{z}\in Z}[\tau(f_{R}(\vec{z}),g(\vec{z}))]^{2}\ \pi_{ \vec{x}}(\vec{z})$ $\displaystyle L_{\text{RANKSHAP}}(f_{R},g,\pi_{\vec{x}})$ $\displaystyle=\sum_{\vec{z}\in Z}[NDCG(f_{R}(\vec{z}))-NDCG(g(\vec{z}))]^{2}\ \pi_{\vec{x}}(\vec{z})$ $$

Here, $f_{R}$ is the original ranking model, $g$ is the surrogate model used for explanation, $\pi_{\vec{x}}$ is the KernelSHAP weighting kernel, $Z$ is the set of all possible coalitions (subsets of features), $\tau$ is Kendall’s tau rank correlation coefficient, and ApproxNDCG is an approximation of the Normalized Discounted Cumulative Gain (NDCG). The details of the axiomatic analysis are presented in Appendix E. The results are summarized in Table 1. Our analysis reveals that RankSHAP is the only method that have a decomposable and additive value function and as a result satisfies the fundamental Shapley axioms, making it reliable to use for ranking feature attributions.

**Table 2: Comparing performance between different feature attribution methods (Random, EXS, RankLIME, RankingSHAP and RankSHAP) for token-based explanations of textual rankers (BM25, BERT, T5 and LLAMA2) based on model fidelity (Fidelity) and weighted-fidelity (wFidelity) with ranking models fine tuned on the MS MARCO (MM) and TREC ROBUST 2004 (R04) datasets. For these experiments, we generate feature attributions for each ranking models with the 10, 20 and 100 most relevant documents for a particular query respectively.**
| Ranker $\downarrow$ |  | Top-10 | Top-20 | Top-100 |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Metric $\rightarrow$ |  | Fidelity | wFidelity | Fidelity | wFidelity | Fidelity | wFidelity |
| MM/BM25 | Random | 0.08 | 0.04 | -0.05 | 0.01 | -0.09 | 0.00 |
| EXS | 0.39 | 0.34 | 0.31 | 0.29 | 0.24 | 0.17 |  |
| RankLIME | 0.45 | 0.37 | 0.37 | 0.29 | 0.26 | 0.20 |  |
| RankingSHAP | 0.52 | 0.41 | 0.45 | 0.33 | 0.31 | 0.24 |  |
|  | RankSHAP | 0.63 | 0.48 | 0.54 | 0.40 | 0.47 | 0.33 |
| MM/BERT | Random | 0.12 | 0.02 | -0.09 | 0.01 | -0.12 | 0.00 |
| EXS | 0.36 | 0.21 | 0.28 | 0.18 | 0.11 | 0.08 |  |
| RankLIME | 0.41 | 0.24 | 0.32 | 0.24 | 0.23 | 0.18 |  |
| RankingSHAP | 0.45 | 0.29 | 0.38 | 0.27 | 0.28 | 0.24 |  |
|  | RankSHAP | 0.59 | 0.41 | 0.45 | 0.38 | 0.39 | 0.29 |
| MM/T5 | Random | 0.05 | 0.03 | -0.11 | 0.01 | -0.04 | 0.00 |
| EXS | 0.36 | 0.21 | 0.30 | 0.17 | 0.11 | 0.06 |  |
| RankLIME | 0.35 | 0.24 | 0.35 | 0.20 | 0.27 | 0.17 |  |
| RankingSHAP | 0.41 | 0.30 | 0.38 | 0.32 | 0.31 | 0.22 |  |
|  | RankSHAP | 0.56 | 0.39 | 0.43 | 0.37 | 0.36 | 0.29 |
| MM/LLAMA2 | Random | 0.04 | 0.01 | -0.2 | 0.0 | 0.02 | 0.1 |
| EXS | 0.39 | 0.20 | 0.32 | 0.15 | 0.17 | 0.05 |  |
| RankLIME | 0.35 | 0.24 | 0.35 | 0.20 | 0.27 | 0.17 |  |
| RankingSHAP | 0.44 | 0.33 | 0.37 | 0.23 | 0.31 | 0.22 |  |
|  | RankSHAP | 0.60 | 0.42 | 0.45 | 0.39 | 0.39 | 0.32 |
| R04/BM25 | Random | 0.08 | 0.04 | -0.04 | 0.00 | -0.07 | 0.00 |
| EXS | 0.37 | 0.33 | 0.30 | 0.26 | 0.22 | 0.18 |  |
| RankLIME | 0.43 | 0.36 | 0.36 | 0.25 | 0.25 | 0.18 |  |
| RankingSHAP | 0.45 | 0.35 | 0.37 | 0.29 | 0.26 | 0.24 |  |
|  | RankSHAP | 0.61 | 0.44 | 0.52 | 0.38 | 0.45 | 0.31 |
| R04/BERT | Random | 0.12 | 0.02 | -0.09 | 0.01 | -0.12 | 0.00 |
| EXS | 0.35 | 0.20 | 0.27 | 0.16 | 0.10 | 0.07 |  |
| RankLIME | 0.40 | 0.22 | 0.31 | 0.23 | 0.23 | 0.17 |  |
| RankingSHAP | 0.43 | 0.26 | 0.36 | 0.28 | 0.28 | 0.23 |  |
|  | RankSHAP | 0.59 | 0.41 | 0.45 | 0.38 | 0.39 | 0.29 |
| R04/T5 | Random | 0.05 | 0.03 | -0.11 | 0.01 | -0.04 | 0.00 |
| EXS | 0.38 | 0.21 | 0.32 | 0.17 | 0.13 | 0.06 |  |
| RankLIME | 0.38 | 0.24 | 0.35 | 0.20 | 0.28 | 0.17 |  |
| RankingSHAP | 0.41 | 0.31 | 0.38 | 0.24 | 0.32 | 0.24 |  |
|  | RankSHAP | 0.56 | 0.39 | 0.43 | 0.37 | 0.36 | 0.29 |

## 5 Computational and Human Evaluation Studies

In this section, we first describe our experimental design. Next we evaluate the performance of our attribution algorithm based on various metrics. Lastly we conduct a user study to investigate how well different attribution algorithms align with human intuition for the ranking task.

### 5.1 Experimental Settings

We test our hypothesis on two datsets : (i) the MS MARCO (msm, ) passage reranking dataset (ii) the TREC 2004 Robust track dataset (Robust04, (Voorhees et al., )). MS MARCO is a large-scale dataset aggregated from anonymized Bing search queries containing $>8M$ passages from diverse text sources. The average length of a passage in the MS MARCO dataset is 1131 words. Similarly, Robust04 is aggregated from News Articles and Descriptions serve as its queries. It contains over 528,000 news articles, 250 queries and binary human-annotated relevance judgements.

For our ranking models, we use the classic BM25 ranker (Robertson & Spärck Jones, ) as well as models based on the BERT (Devlin et al., ), T5 (Raffel et al., ) and Llama2 (Touvron et al., ) large language models. We in particular use the versions of these LLMs fine-tuned on the MS MARCO and Robust04 datasets for the document re-ranking task, released by various authors  (Nogueira & Cho, ; Nogueira et al., ; Ma et al., ). All the above ranking approaches are score based rankers, i.e they return a relevance score corresponding to each document. This makes relevance score estimation straightforward for NDCG computation, as discussed previously, in Section 2.

Similar to related works, we randomly sample 250 queries from the test sets of the MS MARCO and Robust04 datasets, retrieving the 100 highest scoring documents for each query. Using these query-document sets, we apply the ranking models to obtain an ordered list of documents. We then generate feature attributions for the top-10, top-20, and top-100 documents. Stemmed tokens from the vocabulary of the query-document sets as bag of words make up the features for which we generate attributions. Binary feature values are assigned based on their presence or absence. I.e if a feature (token) is excluded from a coalition, all occurrences of that token are omitted from the query and documents for that pass of the model (Ribeiro et al., ).

We generate feature attributions for each query and corresponding ordered-document set using EXS (Singh & Anand, ), RankLIME (Chowdhury et al., ), RankingSHAP (Heuss et al., ), and our proposed method, RankSHAP. For EXS, we utilize the rank-based setting to allow direct comparison with RankSHAP. For RankLIME, we compute attributions using the NeuralNDCG loss function in the single-perturbation setting. In the case of RankingSHAP, we employ Kendall’s Tau to calculate the marginal contributions. To ensure consistency across all methods, we extend KernelSHAP for implementation and apply the same masking techniques as used in LIME. Each algorithm is limited to 5,000 neighborhood samples per decision. For evaluation, we process only the top 7 most significant features produced by each algorithm, adhering to human comprehension limits (Chowdhury et al., ).

Apart from human evaluations, feature attributions can be evaluated using either fidelity-based metrics or via reference-based metrics. Since ground truth attributions are not available in this case, we stick to fidelity-based metrics, which measure the degree to which an attribution algorithm is successful in recreating the underlying model decision (Anand et al., ; Chowdhury et al., ). For this, we use the metrics Fidelity and its weighted version wFidelity. Given a feature attribution and a set of documents, we reconstruct the attribution ordering by sorting linearly-combined document features multiplied with their attributions. For Fidelity, we report the simplified unweighted Kendall’s Tau between the original ranking model’s ordering and the attribution-reconstructed ordering. For wFidelity, we penalize each swap in passages found in the reconstructed ordering by the difference in their positions.
More formally, let $o_{f_{R}}=f_{R}(\vec{x})$ be the ranking output by $f_{R}$, and let $o_{\phi}$ be the ranking of documents by their total importance according to some feature attribution method $\phi$; that is, each document in $\vec{x}$ is given a score of $\sum_{i=1}^{M}\phi_{R}(f_{R},\vec{x},i)\times x_{i}$.
Given two rankings $a$ and $b$, let $r_{a}[i]$ be the rank of the $i$-th element in $a$. We set $\tau(a,b)$ to be the Kendall’s tau distance between $a$ and $b$, i.e.

$$ $\displaystyle\frac{2}{n(n-1)}\sum_{i<j}\text{sgn}(r_{a}[i]-r_{a}[j])\cdot\text {sgn}(r_{b}[i]-r_{b}[j])$ $$

and let $\tau_{w}(a,b)$ be the weighted Kendall’s Tau distance:

$$ $\displaystyle\frac{\sum_{i<j}w_{ij}\cdot(\text{sgn}(r_{a}[i]-r_{a}[j])\cdot \text{sgn}(r_{b}[i]-r_{b}[j]))}{\sum_{i<j}w_{ij}}$ $$

Here, $w_{ij}$ is $|r_{a}[i]-r_{a}[j]|$.
Fidelity is defined as $\tau(o_{\phi},o_{f_{R}})$, and
wFidelity is set to be $\tau_{w}(o_{\phi},o_{f_{R}})$ (Kendall, ; Vigna, ). The range of both Fidelity and wFidelity is $[-1,1]$.

### 5.2 Experimental Results

The results of the above experiments can be seen in Table 2. We discuss them below.

RankSHAP surpasses the top-performing competitor by $25.78\%$ on Fidelity and $19.68\%$ on weighted Fidelity, averaged across all ranking models, datasets, and document settings. This demonstrates that RankSHAP is most effective at recovering the original ranking model’s order. RankingSHAP (Heuss et al., ) follows closely. All evaluated methods, except for Random, show a positive correlation between the original and reconstructed rankings.

Both metrics decline as the number of documents in the ordered set for which we generate attributions increases. Specifically, there is a $20\%$ average performance drop between attributions for $10$ documents and attributions for $20$ documents, and a further $14.6\%$ average decrease in Fidelity between $20$ and $100$ documents for RankSHAP, suggesting a performance reduction that scales with the logarithm of the number of documents. Notably, while EXS and RankLIME demonstrate similar Fidelity when generating attributions for $10$ and $20$ documents, EXS performs significantly worse in the $100$ document setting.

We observe that, on average, our ranking systems perform $5.7\%$ worse on the Robust04 dataset compared to the MS MARCO dataset, considering all systems, ranking methods, and metrics. This slightly lower performance on Robust04 can be attributed to its smaller size, which hinders convergence during fine-tuning. Notably, the neural ranking models used in the Robust04 experiments were initially fine-tuned on the MS MARCO dataset, which may further explain the performance difference.

BM25 is a heuristic-based ranking model, while BERT, T5, and LLAMA2 are large neural models. RankSHAP exhibits similar performance on BERT and T5, which is on average $13.3\%$ and $14.7\%$ lower on Fidelity than it’s performance on BM25. RankSHAP performs slightly better when explaining LLAMA2 as compared to when explaining BERT and T5. No experiments were conducted with a LLAMA2 ranker on the Robust04 dataset due to the lack of a publicly available fine-tuned model for that dataset.

### 5.3 User Study

The goal of developing RankSHAP is to help humans understand why a model ranks items in a specific order. Towards this, we conduct a user study with 30 participants to assess if RankSHAP aids human understanding. Following Institutional Review Board (IRB) approval each participant is shown sets of 5 short passages along with feature attributions from one of the competing systems, displayed as bar charts (see Figure 1 in Appendix G). Participants are then asked to (i) re-order the 5 documents from most to least important, and (ii) infer what the query might have been based on the attributions. The first task assesses which algorithm best aligns with human intuition, while the second evaluates how well the attributions explain the ranking task. We sampled query-document sets from the MS MARCO dataset and used BERT to rank the documents. Each participant was shown 10 such passage sets, with attributions randomly selected from one of Random, EXS, RankLIME, RankingSHAP, and RankSHAP. At the end, the Kendall’s Tau score (Fidelity) between the original ordering and the predicted ordering was used to identify the algorithm that better reconstructed the underlying model decision. A text-based semantic similarity measuring LLM was used to assess the quality of the queries estimated by the participants. The similarity metric returned scores in the range [0,1], with 1 indicating the estimated query was most similar to the original query. The results of this study are presented in Table 3.

**Table 3: Table demonstrating the user study results for (i)the passage reordering task, measured using Kendall’s Tau (Fidelity) (ii) the query estimation task, measured using GPT-4 similarity ($\mu$) for feature attributions generated using Random, EXS, RankLIME, RankingSHAP and RankSHAP feature attribution algorithms.**
|  | Random | EXS | RankLIME | RankingSHAP | RankSHAP |
| --- | --- | --- | --- | --- | --- |
| Q1 ($\tau$) | 0.23 | 0.43 | 0.47 | 0.52 | 0.56 |
| Q2 ($\mu$) | 0.3 | 0.48 | 0.52 | 0.58 | 0.69 |

Results. Initially, we observe that the randomly generated feature attributions achieve a concordance score of 0.23 on Task 1, which exceeds their metric-evaluated value (Table 2, Top-10 Fidelity - Random). This suggests that participants may rely on preconceived notions about the topics while performing the study. The inter-annotator agreement for participants shown the same feature attribution in Task 1 averaged 0.65 (Kendall’s Tau). RankSHAP outperformed the strongest baseline by $19.1\%$, following similar trends as reported in Table 2. In Task 2, some query estimates produced by all algorithms were off-topic, and we observed substantial variance in the queries generated by different participants for the same set of documents and feature attributions. However, participants shown RankSHAP attributions performed at least $30.9\%$ better than those shown other attributions, indicating that RankSHAP enhances the effectiveness of ranking feature attributions in real-world scenarios.

## 6 Related Work

In this section, we discuss additional related works that have not yet been covered in the paper so far. Fernando et al. () extend the DeepSHAP algorithm (Lundberg & Lee, ; Shrikumar et al., ) from classification/regression to propose a set of model-intrinsic feature attributions for neural ranking models. Recently, ShaRP (Pliatsika et al., ) generates feature attributions to explain a particular document’s score, its rank, and its presence within the top-k documents, by extending QII (Datta et al., ). Since ShaRP does not generate attributions for entire ranked lists, it is challenging to integrate it within the RankSHAP framework. Völske et al. () attempt to explain the performance of neural ranking models using axioms from statistical IR like term frequency and document length (Fang et al., ), lower bounding term frequency (Lv & Zhai, ), and query aspects (Wu & Fang, ), among others. Singh et al. () introduce the axioms of validity and completeness as a means to measure the effectiveness of ranking explanations and propose an algorithm to suggest a small set of features sufficient to explain a ranking decision. LRIME (Verma & Ganguly, ) proposes a set of heuristics to improve regression/classification-based feature attribution methods for information retrieval, such as choosing a diverse set of perturbation samples and parameters. Ranking GAMs (Zhuang et al., ) offer an inherently interpretable structure that can be distilled into a set of compact piece-wise linear functions with minimal accuracy loss. Anand et al. () provide a comprehensive summary of explanation methods proposed for the IR ranking task, also exploring free-text explanations (Rahimi et al., ), adversarial example-based explanations (Raval & Verma, ; Wu et al., ), probing the representation space (Choi et al., ), rationale-based explanations (Zhang et al., ; Wojtas & Chen, ), and more. Our work focuses on generating attributions for cooperative ranking systems, which differs from generating attributions for competitive ranking systems (Hu et al., ; Anahideh & Mohabbati-Kalejahi, ; Gale & Marian, ). The two frameworks differ mainly in that in cooperative ranking, entities are ranked based on their inherent attributes (e.g., relevance to a query) without direct competition against each other. In contrast, in competitive rankings, entities (e.g., participants in a chess tournament) are ranked against each other based on their performance or scores.

## 7 Conclusion and Limitations

We proposed RankSHAP, a valid feature attribution framework for ranking problems. We introduced axioms that a valid feature attribution algorithm should satisfy and provided a solution that meets these criteria. Additionally, we presented a computationally efficient approximation of RankSHAP that outperformed competing systems and conducted an user study to demonstrate its alignment with human intuition. We analyzed existing ranking feature attribution algorithms, to assess their adherence to fundamental axioms. Our work faces typical limitations associated with Shapley values, primarily the assumption of feature independence, which may not hold in practical applications. Moreover, our ranking value functions depend on the availability of relevance scores for each query-document pair. When relevance labels are inferred implicitly, such as through click rates in recommendation systems, RankSHAP can capture biases present in the logs, including recency bias. KernelSHAP is a perturbation-based approach, and the results may be influenced by sampling density.

## Appendix A Ranking Axioms

Given a query $\vec{q}$, a set of $n$ documents $D=[\vec{d}_{1},\vec{d}_{2},\ldots,\vec{d}_{k}]$, a human-generated relevance value $rel_{j}$ associated with each document $d_{j}$, and a metric value $\textit{GREM}_{n}$ determined from the set of query-document pairs, consider the ordered list $f_{R}({\vec{q},D})$. For an evaluation of the ordering, it is ideal for the metric ($\textit{GREM}_{n}$) to satisfy the following axioms:

If the relevance score of any document increases, while the relevance scores of all other documents remain the same, the metric value $\textit{GREM}_{n}$ should not decrease.

Formally, if $rel_{j}^{\prime}>rel_{j}$ for some $j$, and $rel_{i}^{\prime}=rel_{i}$ for all $i\neq j$, then $\textit{GREM}_{n}^{\prime}\geq\textit{GREM}_{n}$, where $\textit{GREM}_{n}^{\prime}$ is the metric computed with the updated relevance scores $\{rel_{1}^{\prime},rel_{2}^{\prime},\ldots,rel_{k}^{\prime}\}$.

If two documents $\vec{d}_{i}$ and $\vec{d}_{j}$ are swapped in the ranking, moving the document with the higher relevance score to a higher (better) rank, the metric value $\textit{GREM}_{n}$ should not decrease.

*Formally*, let $o$ be the original ordering, and $o^{\prime}$ be the ordering where only $\vec{d}_{i}$ and $\vec{d}_{j}$ are swapped. If $rel_{i}\geq rel_{j}$ and $\text{rank}_{o}(\vec{d}_{i})>\text{rank}_{o}(\vec{d}_{j})$, then $\textit{GREM}_{n}^{\prime}\geq\textit{GREM}_{n}$, where $\textit{GREM}_{n}^{\prime}$ is the metric computed with the new ordering $o^{\prime}$.

###### Theorem A.1 .

An ordered list evaluation metric satisfies the axioms of Relevance Sensitivity and Position Sensitivity if and only if it can be represented as

$$ $\displaystyle\textit{GREM}_{n}$ $\displaystyle=\sum_{j=1}^{n}g(rel_{j})\cdot h(j),$ $$

where $g(rel_{j})$ is a non-decreasing function of the relevance score $rel_{j}$ (gain function), and $h(j)$ is a non-increasing function of the rank position $j$ (discount function).

###### Proof.

We split the proof into two parts:

- (i)
If the metric satisfies the axioms, then it can be represented in the specified form.
- (ii)
If the metric is in the specified form, then it satisfies the axioms.

(i) Necessity

Assume that the metric $\textit{GREM}_{n}$ satisfies the Relevance Sensitivity and Position Sensitivity axioms.

Let us consider $\textit{GREM}_{n}$ as a function of the relevance scores and their rank positions:

$$ $\textit{GREM}_{n}=\phi\left((rel_{1},1),(rel_{2},2),\ldots,(rel_{n},n)\right).$ $$

We will show that $\textit{GREM}_{n}$ must be additive over the positions:

$$ $\textit{GREM}_{n}=\sum_{j=1}^{n}f(rel_{j},j).$ $$

Proof of Additivity:

Suppose that $\textit{GREM}_{n}$ is not additive. Then, there exist interactions between different positions that affect the metric. Consider changing $rel_{j}$ for a specific $j$ while keeping other $rel_{i}$ constant. The Relevance Sensitivity axiom requires that $\textit{GREM}_{n}$ does not decrease. If $\textit{GREM}_{n}$ depends on interactions between positions, increasing $rel_{j}$ might decrease $\textit{GREM}_{n}$ due to these interactions, violating the axiom. Therefore, to satisfy the axiom, $\textit{GREM}_{n}$ must be additive over positions.

We can now write:

$$ $\textit{GREM}_{n}=\sum_{j=1}^{n}f(rel_{j},j).$ $$

The Relevance Sensitivity axiom implies that for each fixed $j$, the function $f(rel_{j},j)$ is non-decreasing in $rel_{j}$:

$$ $\text{If }rel_{j}^{\prime}>rel_{j},\text{ then }f(rel_{j}^{\prime},j)\geq f( rel_{j},j).$ $$

The Position Sensitivity axiom implies that for each fixed $rel_{j}$, the function $f(rel_{j},j)$ is non-increasing in $j$:

$$ $\text{If }j^{\prime}<j,\text{ then }f(rel_{j},j^{\prime})\geq f(rel_{j},j).$ $$

Given the monotonicity conditions, $f(rel_{j},j)$ can be separated into a product of a function of $rel_{j}$ and a function of $j$:

$$ $f(rel_{j},j)=g(rel_{j})\cdot h(j).$ $$

This separation ensures that the impact of $rel_{j}$ and $j$ on $\textit{GREM}_{n}$ is independent, satisfying the axioms.

(ii) Sufficiency

Assume that the metric is defined as

$$ $\textit{GREM}_{n}=\sum_{j=1}^{n}g(rel_{j})\cdot h(j),$ $$

where $g(rel_{j})$ is non-decreasing in $rel_{j}$ and $h(j)$ is non-increasing in $j$.

We will show that $\textit{GREM}_{n}$ satisfies both axioms.

Relevance Sensitivity

If $rel_{j}^{\prime}>rel_{j}$ for some $j$, and $rel_{i}^{\prime}=rel_{i}$ for all $i\neq j$, then

$$ $\textit{GREM}_{n}^{\prime}-\textit{GREM}_{n}=\left[g(rel_{j}^{\prime})-g(rel_{ j})\right]\cdot h(j)\geq 0,$ $$

since $g(rel_{j}^{\prime})\geq g(rel_{j})$ and $h(j)\geq 0$. Thus, $\textit{GREM}_{n}^{\prime}\geq\textit{GREM}_{n}$.

Position Sensitivity

Suppose we swap $\vec{d}_{i}$ and $\vec{d}_{j}$ where $i>j$ and $rel_{i}\geq rel_{j}$. The change in the metric is

$$ $\displaystyle\Delta\textit{GREM}_{n}$ $\displaystyle=\left[g(rel_{i})\cdot h(j)+g(rel_{j})\cdot h(i)\right]-\left[g( rel_{i})\cdot h(i)+g(rel_{j})\cdot h(j)\right]$ $\displaystyle=g(rel_{i})\left[h(j)-h(i)\right]+g(rel_{j})\left[h(i)-h(j)\right]$ $\displaystyle=\left[g(rel_{i})-g(rel_{j})\right]\left[h(j)-h(i)\right].$ $$

Since $rel_{i}\geq rel_{j}$, $g(rel_{i})\geq g(rel_{j})$. Also, since $j<i$, $h(j)\geq h(i)$. Therefore,

$$ $\Delta\textit{GREM}_{n}\geq 0.$ $$

Thus, swapping documents to place the higher relevance document higher in rank does not decrease $\textit{GREM}_{n}$.

∎

###### Theorem A.1 .

###### Proof.

## Appendix B Basic Shapley Axioms and the Shapley Value

The Shapley axioms for feature attributions have been borrowed from coalitional game theory, where they are used to fairly distribute costs/rewards among a set of players.
We are given a classification/regression model $f$.
The feature attribution of feature $i$ (can be words, human engineered features etc. ) in the decision made by $f$, towards the model input $\vec{s}$ is represented by $\phi_{i}(f,\vec{s})$.

We adopt ’s characterization of the Shapley value, also used by Datta et al. (). Let us assume there are a total of $m$ features. For a feature attribution $\phi_{i}(f,\vec{s})$ to be considered valid, it is necessary for it to satisfy certain axioms. We briefly describe the axioms below:

The sum of feature attributions over a set of features should be equal to the difference between the model output containing all features and the output containing no features. $\sum_{i=1}^{m}\phi_{i}(f,\vec{s})=f(\vec{s})-f(\phi)$.

If for every subset of features $S$ s.t features $i\not\in S$, $f(S\cup i,\vec{s})$ is equal to $f(S,\vec{s})$, then $\phi_{i}(f,\vec{s})$ must be given an attribution of 0 0. $f(S,\vec{s})$ represents the case where features not in set S, have been replaced by their reference value, and model input $\vec{s}$ has been reconstructed.

If for every subset of features $S$ s.t features $i,j\not\in S$, the effects of adding $i$ to $S$ is equal to the effect of adding $j$ to $S$, then features $i$ and $j$ should be assigned equal attribution towards $f(\vec{s})$.

Given two models $f$ and $f^{\prime}$, if for all feature coalitions $S,i\not\in S$, $f(S\cup i,\vec{s})-f(S,\vec{s})$ is greater than or equal to $f^{\prime}(S\cup i,\vec{s})-f^{\prime}(S,\vec{s})$, then $\phi_{i}(f,\vec{s})$ is greater than or equal to $\phi_{i}(f^{\prime},\vec{s})$.

The *Shapley value* (Young, ; Shapley, ) uniquely satisfies the four axioms above, and has been widely adopted in feature attribution for regression/classification tasks. It is defined as:

$$ $\displaystyle\phi_{i}(f,\vec{s})$ $\displaystyle=\sum_{\vec{z}\subseteq\vec{s}}\frac{|\vec{z}|!(m-|\vec{z}|-1)!}{ m!}[f(\vec{z})-f(\vec{z}\setminus i)]$ $$

where $|\vec{z}|$ is the number of non-zero entries in $\vec{z}$, and $\vec{z}\subseteq\vec{s}$ represents all $\vec{z}$ vectors where the non-zero entries are a subset of the non-zero entries in $\vec{s}$.

## Appendix C The NDCG metric

Normalized Discounted Cumulative Gain (NDCG)  (Järvelin & Kekäläinen, ) is an extremely popular metric to evaluate the effectiveness of an ordering, often used in search engines and e-commerce. It assumes that some relevance score $\textit{rel}_{j}$ for each document $d_{j}$ is known, and that in an effective ordering highly relevant documents appear at the beginning of the list.
For an ordered list of $n$ documents, the Discounted Cumulative Gain is computed as:

$$ $\displaystyle\textit{DCG}_{n}$ $\displaystyle=\sum_{j=1}^{n}\frac{\textit{rel}_{j}}{\log_{2}{(j+1)}}$ $$

The above expression is dependent on the number of documents in the set being evaluated. This metric is thus difficult to use as-is, when comparing document lists of different lengths. As a result, we normalize it by dividing it with the maximum possible $\textit{DCG}_{n}$ score, also known as Ideal-$\textit{DCG}_{n}$($\textit{IDCG}_{n}$). This is obtained by sorting documents in decreasing order of relevance and computing $\textit{DCG}_{n}$ using the so obtained ideal ordering.
To compute $\textit{NDCG}_{n}$, we simply normalize $\textit{DCG}_{n}$: $\textit{NDCG}_{n}=\frac{\textit{DCG}_{n}}{\textit{IDCG}_{n}}$.
Note that $\textit{NDCG}_{n}\in[0,1]$, and that the higher the value, the more effective the ranking.
In situations where document relevance scores $\textit{rel}_{j}$ are unknown, they can be estimated using implicit measures such as clicks, views or the time spent on a page.

NDCG is a better choice for the value function compared to other rank evaluation metrics because of numerous reasons. NDCG discounts the relevance of a document based on its position logarithmically. Unlike metrics that depend on binary relevance (precision, recall, F1), NDCG accommodates a smooth relevance function. NDCG is also more effective in measuring the quality of a large ranked list. Lastly, a large number of product search on e-commerce and recommendation systems (which we might be trying to explain) already use NDCG to evaluate the quality of their orderings. It is the single most popular metric to evaluate the quality of a ranked list and has been used by most major search engines and e-commerce websites at some point.

## Appendix D Ranking Feature Attribution algorithms

### D.1 Feature Attribution Methods for Ranking Tasks

The following solutions have been proposed to address the ranking attribution problem described above:

: In EXS, first use LIME (Ribeiro et al., ) to generate feature attributions for each query-document pair individually. In order to compute LIME attributions, they perturb documents and assign a binary relevance label to each perturbation, assigning a positive label if the rank of the perturbed document is higher than $k$. The authors then add the LIME attributions of top-$k$ documents to assign a feature attribution to the entire query-document set.

: Chowdhury et al. () extend LIME in a listwise manner, replacing the $L_{2}$ loss function in LIME with a differentiable ordering distance metric. This enables them to directly compute LIME feature attributions from ranked lists. Two of the loss functions used by them, which lead to the best results, are ApproxNDCG (Qin et al., ) and NeuralNDCG (Pobrotyn & Bialobrzeski, ), both differentiable alternatives to NDCG, with all relevance scores set to 1.

: Heuss et al. () propose using the Shapley value along with ordered list distance metrics to compute feature attributions for listwise ranking models. Specifically, they calculate the marginal contribution of a particular feature by determining Kendall’s Tau of the ranking model output with and without that feature.

## Appendix E Analysis of KernelSHAP Optimization Algorithms and Shapley Axioms

In this section, we provide a detailed analysis of whether the algorithms using the following KernelSHAP optimization objectives approximate the Shapley axioms. We examine each algorithm’s loss function and discuss whether it satisfies the fundamental properties of the Shapley value.

The optimization objectives for the algorithms are:

$$ $\displaystyle L_{\text{RANKLIME}}(f_{R},g,\pi_{\vec{x}})$ $\displaystyle=\sum_{\vec{z}\in Z}\text{ApproxNDCG}(f_{R}(\vec{z}),g(\vec{z})) \cdot\pi_{\vec{x}}(\vec{z})$ $\displaystyle L_{\text{RANKINGSHAP}}(f_{R},g,\pi_{\vec{x}})$ $\displaystyle=\sum_{\vec{z}\in Z}\left[\tau(f_{R}(\vec{z}),g(\vec{z}))\right]^ {2}\cdot\pi_{\vec{x}}(\vec{z})$ $\displaystyle L_{\text{RANKSHAP}}(f_{R},g,\pi_{\vec{x}})$ $\displaystyle=\sum_{\vec{z}\in Z}\left[\text{NDCG}(f_{R}(\vec{z}))-\text{NDCG} (g(\vec{z}))\right]^{2}\cdot\pi_{\vec{x}}(\vec{z})$ $$

Here, $f_{R}$ is the original ranking model, $g$ is the surrogate model used for explanation, $\pi_{\vec{x}}$ is the KernelSHAP weighting kernel, $Z$ is the set of all possible coalitions (subsets of features), $\tau$ is Kendall’s tau rank correlation coefficient, and ApproxNDCG is an approximation of the Normalized Discounted Cumulative Gain (NDCG).

### E.1 Analysis of RANKLIME

The RANKLIME algorithm uses the loss function:

$$ $L_{\text{RANKLIME}}(f_{R},g,\pi_{\vec{x}})=\sum_{\vec{z}\in Z}\text{ApproxNDCG }(f_{R}(\vec{z}),g(\vec{z}))\cdot\pi_{\vec{x}}(\vec{z})$ $$

#### Efficiency

RankLIME does not guarantee the Efficiency axiom because the loss function minimizes the approximation error between $f_{R}$ and $g$ in terms of ApproxNDCG over weighted coalitions but does not ensure that the sum of feature contributions equals the total difference in model outputs. Since ApproxNDCG is not necessarily additive over features, the attributions may not sum up appropriately.

#### Symmetry

RankLIME may violate the Symmetry axiom. If two features have identical effects on the model’s output across all coalitions, ApproxNDCG may still produce different values due to its dependence on the ranking positions, which can be sensitive to slight variations in feature interactions.

#### Missingness

RankLIME might not satisfy the Dummy axiom. A feature that does not affect the model’s output should receive zero attribution, but since ApproxNDCG considers ranking positions, even a non-influential feature could indirectly affect the approximate rankings, leading to non-zero attributions.

#### Monotonicity

RankLIME does not inherently satisfy the Monotonicity axiom. The ApproxNDCG metric is non-linear and depends on the ranking order, so the attributions for a combined model may not be the sum of attributions from individual models.

RankLIME’s optimization using ApproxNDCG does not fully approximate the Shapley axioms due to the non-additive and rank-dependent nature of ApproxNDCG. Therefore, RANKLIME may not produce explanations that satisfy the fundamental properties of Shapley values.

### E.2 Analysis of RANKINGSHAP

The RankingSHAP algorithm uses the loss function:

$$ $L_{\text{RANKINGSHAP}}(f_{R},g,\pi_{\vec{x}})=\sum_{\vec{z}\in Z}\left[\tau(f_ {R}(\vec{z}),g(\vec{z}))\right]^{2}\cdot\pi_{\vec{x}}(\vec{z})$ $$

#### Efficiency

The Kendall’s tau coefficient $\tau$ measures the correlation between two rankings but does not quantify the exact differences in model outputs. Since the loss minimizes the squared difference of $\tau$, there is no guarantee that the sum of feature attributions equals the total change in model output, thus violating the Efficiency axiom.

#### Symmetry

RANKINGSHAP may violate the Symmetry axiom because $\tau$ is sensitive to changes in rankings, and two features with identical contributions could result in different rankings due to interactions with other features, leading to unequal attributions.

#### Dummy (Null Player)

A dummy feature that does not affect the ranking should, in theory, have zero impact on $\tau$. However, due to the way $\tau$ is computed over permutations, even non-influential features might affect the rankings indirectly, potentially violating the Dummy axiom.

#### Monotonicity

The squared difference of $\tau$ is a non-linear function, and as such, RankingSHAP does not satisfy the Linearity axiom. The attributions for combined models may not equal the sum of individual attributions. As a result, RankingSHAP also does not satisfy the monotonicity axiom.

Due to the dependence on Kendall’s tau and its non-linear properties, RankingSHAP does not approximate the Shapley axioms well. It may not produce explanations that satisfy the fundamental Shapley properties.

### E.3 Analysis of RANKSHAP

The RANKSHAP algorithm uses the loss function:

$$ $L_{\text{RANKSHAP}}(f_{R},g,\pi_{\vec{x}})=\sum_{\vec{z}\in Z}\left[\text{NDCG }(f_{R}(\vec{z}))-\text{NDCG}(g(\vec{z}))\right]^{2}\cdot\pi_{\vec{x}}(\vec{z})$ $$

We have already proven that RankSHAP satisfies the Ranking Shapley axioms. The Normalized Discounted Cumulative Gain (NDCG) can be expressed as an additive function over individual documents, as per $GREM_{N}$. This additive nature allows NDCG to fit into the Shapley value framework, where the total effectiveness score is the sum of individual contributions from each feature. Unlike NDCG, RankingSHAP uses Kendall’s tau, which cannot be expressed as a sum over individual features or documents. It is inherently a non-linear, non-additive measure and thus does not satisfy Shapley axioms.

## Appendix F Rank Comparison Metrics

The following rank comparison metrics are popularly used in literature :

- 1.
Kendall’s Tau: Measures the number of pairs of alternatives over which two rankings disagree. Equivalently, it is also the minimum number of swaps of adjacent alternatives required to convert one ranking into another.
- 2.
Spearman’s Footrule Distance: Measures the total displacement of all alternatives between two rankings, i.e., the sum of the absolute differences between their positions in two rankings.
- 3.
Maximum Displacement Distance (MD): Measures the maximum of the displacements of all alternatives between two rankings.
- 4.
Cayley Distance: Measures the minimum number of swaps (not necessarily of adjacent alternatives) required to convert one ranking into another.
- 5.
Copeland’s Method: Copeland’s method is an algorithm to assign scores to candidates in Ranked choice voting. Quoting Wikipedia, each voter is asked to rank candidates in order of preference. A candidate A is said to have majority preference over another candidate B if more voters prefer A to B than prefer B to A; if the numbers are equal then there is a preference tie. The Copeland score for a candidate is the number of other candidates over whom he or she has a majority preference plus half the number of candidates with whom he or she has a preference tie. The winner of the election under Copeland’s method is the candidate with the highest Copeland score; under Condorcet’s method this candidate wins only if he or she has the maximum possible score of n – 1 where n is the number of candidates.

## Appendix G User Study Instance

Figure: Figure 1: A user study instance, depicting 5 passages and a corresponding feature attribution. Words that influenced the ranking decision positively are shown in green, whereas those that influenced negatively were shown in red. Participants were asked to re-rank documents based on the feature attribution to try and estimate the query.
Refer to caption: extracted/5912411/honeybar1.png

## Appendix H User Study details

### H.1 Anonymized Instructions

For each question, you will be shown 5 short passages related to a web search query in no particular order, and a bar chart of important words as explanation depicting an unknown ranking model’s rationale for ordering those answers. You have to briefly read the passages and then using your intuition (i) reorder the passages from most relevant to least relevant based on the explanation (ii) guess the query/question that led to this particular ordering.

A word in the bar chart explanation, with positive or negative values, indicate whether they affected the order of documents that contain them, positively or negatively. Your response, which would be of the form (3,1,2,5,4) and a short text phrase/question would be recorded. This would just be used to understand how well the explanations aid in human understanding of an unknown model’s intent.

This session has 10 such questions and should take no longer than 30 minutes. We don’t recommend spending more than 3 minutes on a question. You would be completed within Cash cards worth $10 on successful completion of a session.

Figure: Figure 2: User Study Passage Snapshot
Refer to caption: extracted/5912411/ustudy1.png

Figure: Figure 3: User Study Bar Chart and questions snapshot
Refer to caption: extracted/5912411/ustudy2.png

### H.2 User Study Snapshot

Snapshots from the User study for a particular query-document set, as seen by study participants are shown in Figures 2,3. The study was conducted via Google Forms.

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 8
presentation: 4
questions: - Since the model can be black box, what if the model is itself self-contradictory or inconsistent? For example, a listwise ranking models that ranks documents A and B as A>B>C in the presence of C but as D>B>A in the presence of a document D. Would the explanations provided by RankSHAP in such a scenario inconsistent or unfaithful? Similarly, what happens when the model handles uncertainly or chooses to use stochastic rankings (drawing a different sample from a distribution over permutations), e.g., Singh, Kempe, Joachims. Fairness in Ranking under Uncertainty (2021).
- Can you explain why the fidelity scores are different for the two datasets? You mention that it is due to the difference in dataset sizes but I am not sure if it is clear if that is the reason.  
- See weaknesses section too.
soundness: 3
strengths: - Axiomatic Foundation: I appreciate that the authors propose a set of fundamental axioms specifically tailored for ranking feature attributions, drawing inspiration from Shapley values in coalitional game theory. These axioms, namely Rank-Efficiency, Rank-Missingness, Rank-Symmetry, and Rank-Monotonicity, ensure that the attributions are fair, consistent, and meaningful.
- Generalized Ranking Effectiveness Metric (GREM): The authors introduce GREM, a generalized framework for evaluating the effectiveness of ordered lists. This framework encompasses widely used metrics like NDCG and provides a solid theoretical foundation for assessing the quality of rankings produced by considering feature subsets.
- Computational Feasibility: Acknowledging the NP-completeness of exact Shapley value calculations, the authors propose an approximate algorithm to leverage a linear model between feature subsets and the ranking effectiveness metric, as well as Kernel-RankSHAP to induce non-linearity into this model. This makes RankSHAP practical for real-world applications.
- Extensive Empirical Evaluation: The authors conduct comprehensive experiments on two datasets (MS MARCO and Robust04) using multiple ranking models, including BM25, BERT, T5, and LLAMA2. The results demonstrate RankSHAP's superior performance over competing methods like EXS, RankLIME, and RankingSHAP across various metrics like Fidelity and weighted Fidelity.
- User Study Validation: The paper includes a user study to assess the alignment of RankSHAP with human intuition. This is an interesting study that tasks participants with re-ordering documents and inferring queries based on feature attributions. The results show that RankSHAP significantly improves user understanding of ranking decisions.
summary: This paper proposes RankSHAP as a framework for explaining how features contribute to a ranking model's output. The authors extend the classifcal Shapley value concept to the ranking domain by specifying two axioms that a ranking-based feature attribution must satisfy, in additon to the set of four fundamental axioms that Shapely values already satisfy. The authors argue that current methods for explaining ranking models often provide inconsistent or contradictory explanations, making it difficult for users to understand model behavior. These axioms, which are based on game theory and information retrieval principles, ensure the fairness, consistency, and reliability of the explanations. Through extensive experiments, the authors demonstrate that RankSHAP outperforms existing methods in terms of accuracy and alignment with human intuition.
weaknesses: - User study caveats: (a) Preconceived Notions: The authors observed that randomly generated feature attributions achieved a higher concordance score in the re-ordering task than expected based on their metric evaluation. This suggests that participants might have relied on pre-existing assumptions or biases about the topics, potentially influencing their judgments throughout the experiment. Is that a drawback of the setup that also impacts rest of the observations?
(b) Subjectivity: The authors noted significant variance in the queries estimated by participants for the same document set and feature attributions. This probably highlights the inherent subjectivity in interpreting feature attributions and formulating queries, which can lead to diverse responses and impact the evaluation's reliability. 
Despite limitations, it is indeed on interesting study to include in the paper since progress in the field of interpretability requires human subjects to be involved. 
- Dependence on Relevance Scores: The effectiveness of RankSHAP relies on the availability of accurate relevance scores for each query-document pair. Obtaining these scores often necessitates ground truth labels, which can be scarce or unavailable. The paper proposes using implicit measures like click-through rates to infer relevance when explicit labels are absent.
-

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: How does RankSHAP perform when features are highly interdependent? Are there adjustments made for such cases?

How does the RankSHAP framework handle scenarios where relevance scores are subjective or unavailable?
soundness: 3
strengths: The introduction of axioms specific to ranking provides a robust framework, distinguishing RankSHAP from other feature attribution methods.

The authors incorporate a user study to validate that RankSHAP explanations align with human understanding, which adds practical value.
summary: The paper introduces a Shapley-value-based feature attribution method tailored specifically for ranking tasks. Traditional feature attribution methods, mostly developed for regression or classification, often produce conflicting results when adapted to ranking, which can lead to confusion among end-users. RankSHAP addresses this by adhering to a set of axioms tailored for ranking. Extensive experiments demonstrate that RankSHAP aligns well with human intuition and outperforms existing methods in fidelity and weighted fidelity. Additionally, a user study confirms its practical value in helping users understand model decisions.
weaknesses: RankSHAP’s reliance on relevance scores for accurate NDCG calculations could be a limitation in scenarios where relevance is difficult to quantify or subjective.

Although RankSHAP was tested in a user study, the evaluation might have limited generalizability due to sample size.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 2
questions: Are there experiments with GREM metrics other than NDCG? While the choice of NDCG is understandable (appendix C), experiments with other metrics are needed to demonstrate the validity of the proposed method across different metrics, which would strengthen its generality.
soundness: 2
strengths: - The paper introduces a thoughtful adaptation of the Shapley value for the ranking domain, defining new ranking-specific properties that enhance SHAP's applicability in ranking contexts.
- The authors have conducted both performance evaluations and a user study to validate their method.
summary: This paper presents RankSHAP, an extension of SHAP value tailored to interpret learning-to-rank models. The authors reinterpreted the Shapley value axioms (Rank-Efficiency, Rank-Missingness, Rank-Symmetry, and Rank-Monotonicity), and defined new properties (Relevance Sensitivity and Position Sensitivity) to better capture the unique requirements of ranking models in feature attribution. To demonstrate practicality, they integrated the NDCG metric into KernelSHAP and validated their method through experiments.
weaknesses: The proposed method, RankSHAP, heavily relies on the KernelSHAP method [1] with modifications to incorporate NDCG for ranking applications. Rather than introducing a fundamentally new method, the paper adapts an existing approach specifically for ranking tasks. While the axiomatic reformulation is valuable, the technical novelty beyond extending KernelSHAP with NDCG remains limited.

[1] Scott M Lundberg and Su-In Lee, A Unified Approach to Interpreting Model Predictions, in NeurIPS, 2017.

---

confidence: 2
contribution: 3
initial_rating: 6
presentation: 4
questions: I think RankSHAP is a nice contribution to ranking explainability, but improving the handling of bias, refining its reliance on averages, and clarifying its application scope could elevate its impact further.
soundness: 3
strengths: 1. The paper provides a good motivation for RankSHAP by discussing the limitations of simpler ranking explanation methods, like LIME, which lack consideration for full feature interaction and listwise ranking structure. By addressing these limitations, RankSHAP presents a more nuanced and comprehensive approach to ranking explainability.

2. RankSHAP's performance is evaluated using fidelity metrics, which assess how accurately RankSHAP captures feature contributions in line with the model’s scoring function. This fidelity-based evaluation aligns RankSHAP’s explanations with the ranking model’s actual logic, resulting in explanations that are reflective of the ranker's structure rather than arbitrary feature importance.

3. The method is flexible since RankSHAP can work with a range of ranking models, from traditional learning-to-rank approaches to neural ranking models. This makes RankSHAP’s applicable to many fields, including search, recommendation, and information retrieval.
summary: The RankSHAP method leverages Shapley values, considering all possible feature combinations and their interactions (or approximations thereof), to provide a detailed, interaction-aware explanation of feature contributions in ranking models. This approach aligns well with the feature importance analysis used in regression models, making the methodology intuitive.
weaknesses: 1. **Correlation, Not Causation**: While RankSHAP provides insight into feature importance, the explanations are inherently correlational, not causal. Therefore, while RankSHAP can reveal which features push an item up in ranking, this does not imply that these features are directly causing higher ranks. I'm not saying the authors claim causality, but in terms of doing "better" at explaining ranking, they're explaining correlations between the rank and the features better, and not want causally drives a higher ranking. 

2. **Model Dependency and Bias**: The effectiveness of RankSHAP is fundamentally dependent on the quality and calibration of the ranker itself (correct?). If the scoring function is miscalibrated or biased (e.g., favoring higher-ranked items based solely on position), RankSHAP’s explanations may reinforce these biases instead of offering corrective insights. The authors could discuss how potential biases (position, selection, algorithmic biases) within the ranker affect the usefulness of RankSHAP’s explanations to be truly meaningful.

3. **Limitations in Simple Averages for Shapley Values**: The reliance on simple averages in traditional Shapley values means that RankSHAP does not consider the number of interactions (N) or the variance in a feature’s impact across different contexts. This averaging could dilute the significance of features with occasional strong influence, potentially overlooking context-dependent importance and limiting RankSHAP’s insights.

4. **Reinforcement of Potentially Polarized Content**: Because RankSHAP's explanations reflect the ranker’s scoring function, any inherent polarization or bias in the model could be echoed in the explanations. This could inadvertently support polarized content if the ranking model favors certain types of data, raising concerns for applications in content moderation and recommendation.

5. **Redundancy in Presentation and Scope of Rankers**: The paper does not clearly specify the types of ranking models used in its evaluation, which, I think could and maybe should matter? Or at least will help elucidate where it's particularly useful (I imagine the more non linear the ranker the more useful?)

Meta-review: The paper extends the idea to using Shapley values for feature attributed to ranking tasks. In addition to the standard axioms of the original Shapley values, the proposed extension satisfies two axioms specific to ranking tasks. Further, the paper demonstrates empirically that their extension to Shapley values outperform existing methods in terms of accuracy and alignment with human intuition. All the reviewers appreciated the contribution and even though they highlighted a number of points for improvement, which the reviewers successfully addressed during the rebuttal period. In terms of overall score, all the reviewers are mildly positive or positive. As a consequence, I recommend acceptance.

Decision: Accept (Poster)