Leveraging Passage Embeddings for Efficient Listwise Reranking with Large Language Models
Qi Liu, Bo Wang, Nan Wang, Jiaxin Mao
TL;DR
This paper tackles the inefficiency of listwise reranking with large language models by introducing PE-Rank, which compresses multiple passages into a compact context using passage embeddings treated as special tokens. A two-stage training regime aligns the embedding space and trains for ranking, while a Dynamic-Constrained Decoding strategy confines the LLM's output to a small set of passage tokens, drastically reducing input length and decoding cost. Empirical results on TREC DL and BEIR show PE-Rank achieves competitive ranking performance with substantial efficiency gains, including multi-fold reductions in latency and a practical 0.5-second per-query time for top-20 reranking. The approach demonstrates that embedding-based context compression can make online LLM-based listwise reranking feasible, with code available for reproduction.
Abstract
Recent studies have demonstrated the effectiveness of using large language language models (LLMs) in passage ranking. The listwise approaches, such as RankGPT, have become 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, in this paper, we propose PE-Rank, leveraging the single passage embedding as a good context compression for efficient listwise passage reranking. By treating each passage as a special token, we can directly input passage embeddings into LLMs, thereby reducing input length. Additionally, we introduce an inference method that dynamically constrains the decoding space to these special tokens, accelerating the decoding process. For adapting the model to reranking, we employ listwise learning to rank loss for training. 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.
