Lune

WWW2025Top-tier venue

Fitting Into Any Shape: A Flexible LLM-Based Re-Ranker With Configurable Depth and Width

Zheng Liu, Chaofan Li, Shitao Xiao, Chaozhuo Li, Chen Jason Zhang, Hao Liao, Defu Lian, Yingxia Shao

Abstract

Large language models (LLMs) provide powerful foundations to perform fine-grained text re-ranking. However, they are often prohibitive in reality due to constraints on computation bandwidth. In this work, we propose a flexible architecture called Matroyshka Re-Ranker, which is designed to facilitate runtime customization of model layers and sequence lengths at each layer based on users' configurations. Consequently, the LLM-based re-rankers can be made applicable across various real-world situations. The increased flexibility may come at the cost of precision loss. To address this problem, we introduce a suite of techniques to optimize the performance. First, we propose cascaded self-distillation, where each sub-architecture learns to preserve a precise re-ranking performance from its super components, whose predictions can be exploited as smooth and informative teacher signals. Second, we design a factorized compensation mechanism, where two collaborative LoRA modules, vertical and horizontal, are jointly employed to compensate for the precision loss resulted from arbitrary combinations of layer and sequence compression. We perform comprehensive experiments using passage and document retrieval datasets from MSMARCO, along with all public datasets from BEIR. In our experiments, Matryoshka Re-Ranker substantially outperforms existing methods, while effectively preserving its superior performance across various compression forms and application scenarios. We have publicly released our method at this https://github.com/FlagOpen/FlagEmbedding repo.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

its abstract · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Reinforced IR: A Self-Boosting Framework For Domain-Adapted Information RetrievalChaofan Li, Jianlyu Chen, Yingxia Shao, Chaozhuo Li et al.ACL 2025

Related papers

  1. MatryoshkaKV: Adaptive KV Compression via Trainable Orthogonal ProjectionBokai Lin, Zihao Zeng, Zipeng Xiao, Siqi Kou et al.ICLR 2025
  2. Matryoshka-Adaptor: Unsupervised and Supervised Tuning for Smaller Embedding DimensionsJinsung Yoon, Rajarishi Sinha, Sercan Ömer Arik, Tomas PfisterEMNLP 2024 · 1 citation
  3. SMEC:Rethinking Matryoshka Representation Learning for Retrieval Embedding CompressionBiao Zhang, Lixin Chen, Tong Liu, Bo ZhengEMNLP 2025
  4. Compress-then-Rank: Faster and Better Listwise Reranking with Large Language Models via Ranking-Aware Passage CompressionZhewei Zhi, Yingyi Zhang, Yizhen Jing, Xianneng Li et al.AAAI 2026 · 1 citation
  5. LoRAExit: Empowering Dynamic Modulation of LLMs in Resource-limited Settings using Low-rank AdaptersJiacheng Liu, Peng Tang, Xiaofeng Hou, Chao Li et al.EMNLP Findings 2024 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines