Abstract
PEFA (ParamEter-Free Adapters) is a novel framework designed to enhance the performance of large-scale Embedding-based Retrieval Models (ERMs) without the need for computationally expensive, gradient-based fine-tuning. By integrating a non-parametric k-nearest neighbor (kNN) component, PEFA achieves state-of-the-art results on document and product search tasks. It is particularly effective for "black-box" models where internal gradients are inaccessible, providing a scalable and efficient alternative to traditional adaptation methods.
Introduction
In modern search and recommendation systems, Embedding-based Retrieval Models (ERMs)—or bi-encoders—are the standard for mapping queries and documents into a shared vector space. Achieving peak performance with these models typically requires thousands of GPU hours and complex pipelines involving hard-negative mining and distillation. Furthermore, the shift toward proprietary large language models (LLMs) often prevents researchers from accessing internal gradients. PEFA addresses these challenges by supplementing fixed ERMs with an external memory component, allowing for rapid task adaptation without modifying underlying parameters.
Methodology
The core of PEFA is the combination of a standard ERM score with a non-parametric kNN score using a convex combination: $$\text{Score} = \lambda \cdot \text{Score}_{\text{ERM}} + (1 - \lambda) \cdot \text{Score}_{\text{kNN}}$$
PEFA-XL: Dual-Index Retrieval
PEFA-XL (Extra Large) utilizes two separate Approximate Nearest Neighbor (ANN) indices. One index stores standard document embeddings, while the other stores embeddings of queries from the training set. At inference, the system identifies training queries most similar to the input query and retrieves their associated relevant documents. This "query-aware" approach provides high accuracy but involves increased storage and latency.
PEFA-XS: Latency-Neutral Adaptation
PEFA-XS (Extra Small) is designed for maximum efficiency. It approximates the kNN neighborhood by pre-aggregating relevant training query embeddings into the document embeddings during the offline indexing stage. By baking the interpolation into the document embeddings, PEFA-XS requires only a single ANN index and introduces zero additional latency during online serving.
Evaluation and Results
PEFA was evaluated across document retrieval (NQ-320K, Trivia-QA) and large-scale product search (Amazon ProdSearch) domains.
- State-of-the-Art Benchmarks: On NQ-320K, PEFA-XL combined with a GTR-base model achieved a Recall@10 of 88.71%, significantly outperforming previous benchmarks like NCI (85.20%).
- Generalization: For models not fine-tuned on specific tasks like Trivia-QA, PEFA improved Recall@100 by an average of 13.2%.
- Industrial Scale: On Amazon's 30-million product dataset, PEFA-XL improved the Recall@100 of already fine-tuned models by 14.5%.
- Efficiency: Building PEFA indices for billion-scale datasets takes only a few hours on standard CPUs, a fraction of the time required for traditional fine-tuning.
Discussion and Limitations
PEFA demonstrates that treating models as fixed feature extractors and using training data as external memory can outperform complex fine-tuning regimes. While PEFA-XS offers a "free lunch" in terms of latency, PEFA-XL requires significant storage overhead. Additionally, as a non-parametric method, PEFA's effectiveness is tied to the coverage of the training data. Future research may focus on real-time index updates for streaming data environments.
Summary updated