NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Leveraging Decoder Architectures for Learned Sparse Retrieval

Jingfen Qiao, Thong Nguyen, Evangelos Kanoulas, Andrew Yates

TL;DR

While Large Language Models (LLMs) have revolutionized dense retrieval, Learned Sparse Retrieval (LSR) has remained stuck in the era of small, encoder-only models like BERT. This paper explores how to effectively adapt decoder-only and encoder-decoder architectures for LSR, revealing that while LLMs struggle in zero-shot settings due to noisy term expansions, a fine-tuned encoder-decoder model using a novel "multi-tokens decoding" approach can outperform traditional state-of-the-art sparse retrievers.

What Problem Does This Paper Address?

Information Retrieval (IR) generally falls into two camps: Dense Retrieval, which uses high-dimensional latent vectors, and Learned Sparse Retrieval (LSR), which maps text into high-dimensional but "sparse" lexical vectors (where each dimension corresponds to a word in a vocabulary). LSR is prized for its interpretability and its ability to use efficient, battle-tested inverted indexes.

However, most LSR research is built on small encoder-only architectures (like BERT). As the field moves toward massive decoder-only LLMs (like GPT or Llama), it remains unclear if these architectures are actually good at generating sparse representations. Early attempts at "zero-shot" sparse retrieval with LLMs often fail because the models expand queries with irrelevant "noisy" terms, leading to poor precision. This paper investigates how to bridge the gap between modern LLM architectures and effective sparse retrieval.

Methods

The authors compare three transformer backbones: Encoder-only (DistilBERT), Decoder-only (OPT), and Encoder-Decoder (Flan-T5). To turn these into sparse retrievers, they experiment with different "heads":

  • MLP head: Assigns weights only to tokens already present in the text.
  • MLM-SingleToken (MLM-ST): Uses a single hidden state to determine term importance across the entire vocabulary.
  • MLM-MultiTokens (MLM-MT): The authors' preferred approach. It aggregates information across all input tokens to perform "term expansion"—adding contextually relevant words that weren't in the original text.

Crucially, for decoder-based models, they propose a multi-tokens decoding approach. Instead of the standard autoregressive (token-by-token) generation, they feed the entire sequence through the decoder in one pass and aggregate the hidden states. This allows the decoder to act more like an encoder, capturing broader contextual information.

Finally, they use Knowledge Distillation (specifically MarginMSE) to train these "student" models to mimic the ranking performance of powerful "teacher" models (like RankLLaMA-13B).

Datasets

The models were trained and evaluated on standard IR benchmarks:

  • MS MARCO Passage Dataset: 8.8 million passages used for large-scale training and development.
  • TREC Deep Learning (DL) 2019 & 2020: Used for robust evaluation of ranking effectiveness.

Key Insights and Ideas

  • The Zero-Shot Struggle: Without fine-tuning, even massive LLMs are terrible at LSR. They tend to expand queries with "noisy" terms (e.g., adding 'ray' or 'mil' to a query about a person's brother), which causes "semantic drift" and tanks retrieval performance.
  • Encoder-Decoder is the Sweet Spot: The encoder-decoder architecture (Flan-T5) performed best. The authors attribute this to its hybrid attention: bidirectional attention in the encoder and causal attention in the decoder allow it to identify complex semantic dependencies more effectively than pure encoder or decoder models.
  • Multi-Token Aggregation is Essential: For decoders to work in LSR, you can't just look at the last token. Aggregating lexical information across the entire input sequence is necessary to create a high-quality sparse vector.
  • The Scaling Paradox: While decoder-only models (like OPT) initially performed worse than smaller encoders, they showed significant gains when scaled to billions of parameters, suggesting that "bigger is better" eventually holds true for sparse retrieval, though it is computationally expensive.

Key Results

  • Top Performer: The EncDec.MultiTokens (Flan-T5-base) model achieved an nDCG@10 of 70.5 on TREC DL2020, outperforming the popular DistilSplade-max (67.9).
  • Efficiency: The encoder-decoder approach achieved these results with fewer "FLOPs" (a proxy for query-document term overlap) than some encoder-only baselines, meaning it is both more effective and potentially more efficient for indexing.
  • Scaling Student Models: Scaling the decoder-only model from 350M to 1.3B parameters improved its MRR@10 on MS MARCO from 33.7 to 36.9, finally allowing it to surpass the performance of the standard DistilBERT-based encoder.

Limitations and Future Work

  • Teacher Sensitivity: The authors noted that decoder-only models are very sensitive to the score distribution of the teacher model during distillation. If the teacher's scores are too "sharp" (concentrated), the decoder-only student struggles to learn.
  • Computational Cost: While the encoder-decoder model is effective, scaling to very large LLMs for sparse retrieval remains computationally demanding compared to traditional BERT-based methods.
  • Future Directions: The authors suggest further investigation into why decoder-only models struggle with certain teacher distributions and exploring even larger scales to see if the decoder-only architecture eventually becomes the dominant choice for LSR, as it has for dense retrieval.

Summary updated

BibTeX
@inproceedings{qiao2025leveraging,
  author = {Jingfen Qiao and Thong Nguyen and Evangelos Kanoulas and Andrew Yates},
  title = {{Leveraging Decoder Architectures for Learned Sparse Retrieval}},
  booktitle = {KEIR},
  year = {2025},
  url = {https://openreview.net/forum?id=wsMhRbCXja},
}
Figure