Instruction Distillation Makes Large Language Models Efficient Zero-shot Rankers

Weiwei Sun, Zheng Chen, Xinyu Ma, Lingyong Yan, Shuaiqiang Wang, Pengjie Ren, Zhumin Chen, Dawei Yin, Zhaochun RenarXiv 2023 · DOI

Abstract

Large Language Models (LLMs) have demonstrated remarkable zero-shot capabilities in information retrieval, yet they face a significant challenge in balancing ranking effectiveness with computational efficiency. While pairwise ranking instructions yield high accuracy, their quadratic complexity ($O(N^2)$) makes them impractical for large-scale applications. Conversely, pointwise ranking is efficient ($O(N)$) but often suffers from poor calibration and lower performance. This paper proposes Instruction Distillation, a novel unsupervised framework that transfers the sophisticated ranking logic of pairwise "teacher" instructions into efficient pointwise "student" instructions. Our approach achieves a 10x to 100x inference speedup while outperforming established supervised models like monoT5.

Introduction

In Information Retrieval (IR), the task of re-ranking involves ordering a set of documents by their relevance to a specific query. Current LLM-based rankers generally fall into three categories, each presenting a trade-off between efficiency, effectiveness, and stability:

  1. Pointwise Ranking: Evaluates documents individually ($O(N)$). It is fast but often inaccurate due to poor score calibration in LLMs.
  2. Pairwise Ranking: Compares pairs of documents ($O(N^2)$). It is highly accurate but computationally expensive, making it unsuitable for production environments.
  3. Listwise Ranking: Ranks an entire list in one pass. While effective, it is often unstable on smaller open-source models and limited by context window sizes.

The authors introduce Instruction Distillation to bridge this gap, capturing the reasoning quality of pairwise ranking within the efficient framework of pointwise inference.

Methodology

The core innovation of this work is the distillation of complex instructions into simple instructions, rather than the traditional approach of distilling large models into smaller ones. The process consists of three primary stages:

  • Teacher Inference: An open-source LLM (e.g., FLAN-T5) uses a computationally intensive pairwise "Teacher Instruction" to generate high-quality rankings for a set of unlabeled queries.
  • Student Learning: The same LLM (or a smaller version) is provided with a simple pointwise "Student Instruction" (e.g., "Is this document relevant?").
  • Distillation via RankNet: The student model is trained to match the teacher's ranking preferences using the RankNet loss function, effectively tuning the student's output probabilities to serve as reliable relevance scores.
The Instruction Distillation framework: distilling pairwise teacher logic into pointwise student instructions via RankNet loss.

This method is entirely unsupervised, requiring only unlabeled queries and documents, making it highly scalable.

Experimental Setup

The proposed method was evaluated across several standard benchmarks to ensure robustness and generalizability:

  • TREC-DL19 & TREC-DL20: Standard passage re-ranking tasks.
  • BEIR: A diverse benchmark covering eight retrieval tasks, including biomedical and social media data.
  • ReDial: A movie recommendation dataset used to test cross-domain generalization.
  • MS MARCO: Used to sample 10,000 unlabeled queries for the distillation phase.

Results and Analysis

The experimental results demonstrate that Instruction Distillation successfully resolves the efficiency-effectiveness trilemma.

Performance vs. Efficiency

As shown in Figure 1, the distilled pointwise models (marked as "This work") achieve a Pareto-optimal balance. They provide a 10x to 100x speedup over pairwise teacher models while maintaining or exceeding their accuracy. On TREC benchmarks, the distilled FLAN-T5-XL (3B) outperformed monoT5-3B, a model supervised on massive human-labeled datasets.

Comparison of nDCG@10 vs. relative inference cost. The distilled models (stars) achieve high performance at significantly lower computational costs compared to pairwise methods (PRP).

Key Insights

  • Knowledge Unlocking: The results suggest that ranking knowledge is already present in LLMs; complex instructions simply act as a mechanism to unlock it. Distillation then "bakes" this capability into simpler prompts.
  • Self and Cross-Model Distillation: Distilling from a larger teacher (XL) to a smaller student (Base) allows smaller models to outperform supervised models ten times their size. Even self-distillation (XL to XL) yields significant performance boosts for pointwise ranking.
  • Zero-Shot Superiority: The method achieved state-of-the-art zero-shot results on the BEIR benchmark, proving that unsupervised distillation can rival supervised training.

Conclusion

Instruction Distillation offers a powerful path forward for deploying LLMs in real-world retrieval systems. By transforming expensive pairwise reasoning into efficient pointwise scoring, it achieves state-of-the-art performance without the need for human labels. Future work may explore applying this technique to proprietary "black-box" models and further optimizing the first-stage retrieval dependency.

Summary updated

BibTeX
@misc{sun2023instruction,
  author = {Weiwei Sun and Zheng Chen and Xinyu Ma and Lingyong Yan and Shuaiqiang Wang and Pengjie Ren and Zhumin Chen and Dawei Yin and Zhaochun Ren},
  title = {{Instruction Distillation Makes Large Language Models Efficient Zero-shot Rankers}},
  year = {2023},
  eprint = {2311.01555},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.01555},
}
Figure