Abstract
Learning to rank is an important task that has been successfully deployed in many real-world information retrieval systems. Most existing methods compute relevance judgments of documents independently, without holistically considering the entire set of competing documents. In this paper, we explore modeling documents interactions with self-attention based neural networks. Although self-attention networks have achieved state-of-the-art results in many NLP tasks, we find empirically that self-attention provides little benefit over baseline neural learning to rank architecture. To improve the learning of self-attention weights, We propose simple yet effective regularization terms designed to model interactions between documents. Evaluations on publicly available Learning to Rank (LETOR) datasets show that training self-attention network with our proposed regularization terms can significantly outperform existing learning to rank methods.
Introduction
Traditional Learning to Rank (LTR) models typically process documents in isolation. Whether using pointwise, pairwise, or listwise approaches, the relevance score for a specific document is often computed independently of its competitors at inference time. This ignores a fundamental aspect of human judgment: we rank items by comparing them against the entire available pool. While Self-Attention mechanisms are theoretically capable of modeling such interactions, empirical evidence suggests that standard self-attention layers struggle to learn meaningful ranking patterns without explicit guidance.
Regularized Self-Attention (RSA)
To address the limitations of vanilla self-attention, we introduce Regularized Self-Attention (RSA). Built upon the ListNet architecture, our model utilizes a specialized "Document Encoder" (DE) structure. The core innovation lies in supervising the attention mechanism through four distinct encoders, each governed by a unique regularization term based on ground-truth relevance:
- $DE_+$: Encourages attention toward documents that are more relevant than the current one.
- $DE_>$: Assigns exponentially higher weights to significantly more relevant documents.
- $DE_-$: Encourages attention toward less relevant documents.
- $DE_<$: Assigns exponentially higher weights to significantly less relevant documents.
The final ListNet + RSA model concatenates the outputs of these four encoders. The loss function combines standard ListNet loss with the Binary Cross Entropy (BCE) between the learned attention matrices and these four "ideal" target matrices.
Experimental Evaluation
We evaluated RSA on five major Learning to Rank (LETOR) datasets: Yahoo LETOR, MSLR-WEB10K, MSLR-WEB30K, Istella-S, and Istella LETOR. These datasets provide pre-extracted feature vectors and relevance labels ranging from 0 to 4. Our analysis revealed that vanilla self-attention often produces noisy, unexplainable weights. By applying our proposed regularization, we "nudge" the model to learn a robust internal hierarchy of the document set.
Key Results
The ListNet + RSA model consistently outperformed strong baselines, including standard ListNet and Gradient Boosted Decision Tree (GBDT) models like LambdaMART. On the MSLR-WEB10K dataset, RSA achieved an NDCG@10 of 0.4568, compared to 0.4510 for LambdaMART and 0.4292 for vanilla ListNet.
Beyond peak performance, the regularization terms significantly improved training efficiency. As shown in the convergence plots, models with RSA reached higher performance levels much faster than those without regularization. Furthermore, ensembling the four different document perspectives improved NDCG@10 scores by up to 2.3 points over single-encoder variants.
Conclusion
This work demonstrates that while self-attention is a powerful tool for modeling interactions, it requires explicit regularization to be effective in the context of Learning to Rank. By forcing the model to compare documents against their more and less relevant peers, RSA achieves state-of-the-art results on major benchmarks. Future work will explore refining the optimization of exponential regularization terms and integrating RSA into end-to-end models that process raw text directly.
Summary updated