Leveraging Passage Embeddings for Efficient Listwise Reranking with Large Language Models

Qi Liu, Bo Wang, Nan Wang, Jiaxin Mao · DOI

Abstract

Recent studies have demonstrated the effectiveness of using large language models (LLMs) in passage ranking. The listwise approaches, such as RankGPT, have become the new state-of-the-art in this task. However, the efficiency of RankGPT models is limited by the maximum context length and relatively high latency of LLM inference. To address these issues, we propose PE-Rank, which leverages single passage embeddings as a form of context compression for efficient listwise passage reranking. By treating each passage as a special token, we can directly input passage embeddings into LLMs, thereby significantly reducing input length. Additionally, we introduce an inference method that dynamically constrains the decoding space to these special tokens, accelerating the decoding process. Evaluation results on multiple benchmarks demonstrate that PE-Rank significantly improves efficiency in both prefilling and decoding while maintaining competitive ranking effectiveness. The code is available at https://github.com/liuqi6777/pe_rank.

Introduction

In modern search engines, the "retrieve-then-rerank" pipeline is standard: a fast bi-encoder model retrieves candidates, and a more sophisticated reranker sorts them. Recently, Large Language Models (LLMs) have set new records in listwise reranking—where the model evaluates a query and a list of passages simultaneously. However, LLM-based reranking faces two major hurdles: context length limitations and high inference latency. Feeding dozens of full-text passages into a prompt quickly exhausts memory and slows down live search results.

PE-Rank (Passage Embedding Ranker) addresses these issues by treating a passage's dense embedding as a single "special token" in the LLM’s vocabulary. This approach allows the model to process the "essence" of a passage without the overhead of raw text.

Figure 1: Comparison of traditional full-text prompts versus PE-Rank's embedding-based prompts, along with performance metrics showing a 4.5x speedup and significant token reduction with minimal impact on NDCG@10.

Methodology

PE-Rank utilizes a two-stage training process and a novel decoding strategy to achieve high efficiency without sacrificing accuracy.

Architecture and Training

Instead of inputting raw text, the model inputs a vector representation of the passage. A Projector (a 2-layer MLP) maps the embedding space of a retriever into the input space of the LLM (e.g., Mistral-7B).

  1. Alignment Stage: The model is trained to reconstruct original text from embeddings, teaching the LLM to "read" the vectors.
  2. Learning-to-Rank Stage: The model is fine-tuned using a listwise loss (ListMLE) and distillation to match the performance of full-text teacher models.

Dynamic-Constrained Decoding

Standard LLMs are prone to formatting errors and slow generation when outputting rankings. PE-Rank introduces a decoding strategy that forces the LLM to choose only from the remaining passage tokens at each step. Once a passage is selected, it is removed from the pool, ensuring a valid and fast ranking process.

Figure 6: The PE-Rank architecture, showing (a) retrieval, (b) projection of passage embeddings into the Transformer layer, and (c) the dynamic-constrained decoding process.

Experimental Results

The model was evaluated on TREC DL (2019 & 2020) and the BEIR benchmark. Key findings include:

  • Massive Speedup: PE-Rank is approximately 4.5x faster than uncompressed LLM rerankers. For top-20 reranking, latency dropped to ~0.5 seconds, making it viable for production.
  • Competitive Accuracy: On TREC DL, PE-Rank’s NDCG@10 was within 2% of the full-text RankMistral model.
  • Efficiency in Prefilling: Because input length is reduced to one token per passage, prefill time remains nearly constant even as passages get longer.

Conclusion

PE-Rank demonstrates that dense embeddings can effectively compress semantic information for LLM reranking. By treating embeddings as special tokens, the system bypasses the context and latency bottlenecks of traditional listwise rerankers. Future work may involve integrating this method into Retrieval-Augmented Generation (RAG) pipelines to allow LLMs to process hundreds of documents efficiently.

Summary updated

BibTeX
@inproceedings{liu2024leveraging,
  author = {Qi Liu and Bo Wang and Nan Wang and Jiaxin Mao},
  title = {{Leveraging Passage Embeddings for Efficient Listwise Reranking with Large Language Models}},
  booktitle = {The Web Conference},
  year = {2024},
  doi = {10.1145/3696410.3714554},
}
Figure