An Attention-Based Deep Net for Learning to Rank

Baiyang Wang, Diego KlabjanarXiv 2017

Abstract

Learning to Rank (LTR) is a critical task in information retrieval, traditionally relying on single feature representations. This paper introduces the Attention-based Ranking Network (AttRN), a novel deep learning architecture that leverages multiple data embeddings simultaneously. By integrating a double attention mechanism with a listwise recurrent decoder, AttRN dynamically weighs diverse representations of queries and search results. Experimental results on image and text retrieval tasks demonstrate that AttRN consistently outperforms established baselines like LambdaMART and Ranking SVM, particularly as the number of embeddings increases.

Introduction

In Information Retrieval (IR), the primary objective is to order search results by their relevance to a specific query. Conventional LTR models often depend on a single embedding, which may be susceptible to noise or fail to capture the multifaceted nature of the data. Furthermore, many existing approaches are pointwise or pairwise, potentially overlooking the global structure of the ranked list.

The Attention-based Ranking Network (AttRN) addresses two fundamental challenges:

  1. Embedding Robustness: Effectively combining multiple, diverse embeddings (e.g., different CNN architectures or word embedding models) to create a more resilient ranking system.
  2. Listwise Context: Modeling the ranking process as a sequence where the selection of each item is informed by the current state of the ranked list.

Architecture and Methodology

The AttRN architecture is characterized by three innovative components:

  • Multiple Embeddings: The model accepts $M$ query embeddings and $N$ search result embeddings. For image tasks, these are derived from CNNs with varying regularization; for text, a mix of word2vec and GloVe models is used.
  • Double Attention Mechanism: Attention is applied to both query and result embeddings, allowing the network to prioritize the most relevant representations at each step of the ranking process.
  • Listwise Decoder: Utilizing a Recurrent Neural Network (RNN) decoder, the model ranks items iteratively. The choice of the $t$-th item depends on the hidden state $z_t$, which encapsulates information about previously ranked items.
The AttRN architecture featuring convolutional layers, multiple embeddings, a double attention mechanism, and an RNN-based listwise decoder.

The model computes similarity scores through a learned weight matrix interacting with context vectors from the attention layers. Two loss functions were evaluated: Softmax (AttRN-SM) and Hinge Loss (AttRN-HL).

Experimental Setup and Results

The authors evaluated AttRN across three diverse datasets: MNIST (handwritten digits), CIFAR-10 (object categories), and 20 Newsgroups (text documents). AttRN consistently surpassed baselines such as OASIS, Ranking SVM, and LambdaMART.

On MNIST, AttRN-HL achieved a Mean Average Precision (MAP) error of 0.44%, outperforming Ranking SVM's 0.52%. On CIFAR-10, AttRN-HL reached a MAP error of 13.41%, a significant improvement over LambdaMART's ~19%. A crucial finding is the "Committee Effect": using multiple embeddings helps mitigate individual representation errors. The attention mechanism acts as a dynamic aggregator, selecting the optimal "expert" embedding for a given query context.

Error rates (MAP, NDCG) decrease as the number of embeddings increases from 3 to 7, demonstrating the model's ability to leverage additional information.

Furthermore, the Hinge Loss variant (AttRN-HL) generally outperformed the Softmax version, suggesting that maximizing the margin between relevant and irrelevant results is more effective for ranking than simple probability modeling.

Conclusion and Future Work

The AttRN model demonstrates the power of combining multiple representations with attention-driven listwise decoding. While increasing the number of embeddings improves accuracy, it comes with a computational trade-off; for instance, moving from 5 to 7 embeddings increased training time by approximately 33%. Future research could explore more sophisticated RNN structures like LSTMs or GRUs and investigate joint training of text embeddings with the ranking objective to further enhance performance.

Summary updated

BibTeX
@misc{wang2017attention,
  author = {Baiyang Wang and Diego Klabjan},
  title = {{An Attention-Based Deep Net for Learning to Rank}},
  year = {2017},
  eprint = {1702.06106},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1702.06106},
}
Figure