Search-Adaptor: Embedding Customization for Information Retrieval

Jinsung Yoon, Yanfei Chen, Sercan Ö. Arik, Tomas Pfister

Abstract

Modern information retrieval (IR) increasingly relies on large language model (LLM) embeddings to represent semantic meaning. However, these models are often "black boxes" accessed via APIs, preventing traditional fine-tuning. Search-Adaptor is a lightweight framework designed to customize these fixed embeddings for specific tasks without requiring access to internal model parameters. By employing a trainable residual adaptor and a novel ranking loss, Search-Adaptor significantly enhances retrieval performance across diverse domains, including text, multimodal, and tool-use benchmarks.

Introduction

In the current landscape of information retrieval, text embeddings generated by LLMs serve as the backbone for semantic search. While general-purpose embeddings from providers like Google or OpenAI are highly capable, they are typically applied in a "zero-shot" manner. This often results in sub-optimal performance for niche domains or specialized corporate datasets where the general semantic space does not align perfectly with specific user intents.

The primary obstacle to optimization is that the most powerful models are proprietary and accessible only through inference APIs. Traditional fine-tuning—which requires updating model weights and gradients—is impossible for the end-user. Furthermore, even when weights are available, fine-tuning on small, domain-specific datasets often leads to "catastrophic forgetting" or overfitting. Search-Adaptor addresses these challenges by providing an efficient, robust, and API-friendly method for embedding customization.

Methodology

Search-Adaptor introduces a modular architecture that functions as a post-processing layer for any existing embedding model. The framework consists of several key technical innovations:

1. The Adaptor Module

The core of the system is a low-capacity Multi-Layer Perceptron (MLP) that modifies the original embeddings. To preserve the high-quality semantic information already present in the LLM, the module utilizes a skip connection. This ensures the adaptor only learns the residual—the specific adjustments needed for the target task—rather than attempting to reconstruct the embedding space from scratch.

2. Shared Semantic Space

To maintain alignment between different types of inputs, the same adaptor parameters are shared for both query and document embeddings. This unified approach prevents the semantic drift that occurs when queries and documents are mapped into divergent spaces, a common failure mode in dual-encoder fine-tuning.

3. Differentiable Ranking Loss

Unlike standard classification or regression losses, Search-Adaptor employs a specialized ranking loss. This objective function penalizes the model based on the discrepancy between predicted similarity scores and ground-truth relevance. By focusing on the relative order of results rather than absolute values, the model becomes more effective at the primary task of retrieval.

4. Dual Regularization

To ensure stability and prevent overfitting, the framework incorporates two regularization terms:

  • Recovery Loss: This term constrains the adapted embeddings, preventing them from deviating too far from the original LLM outputs.
  • Prediction Loss: This component tasks the model with predicting the query embedding based on the document embedding, reinforcing the bidirectional relationship between relevant pairs.

Experimental Evaluation

The researchers evaluated Search-Adaptor across a comprehensive suite of benchmarks:

  • BEIR: A collection of 14 diverse English retrieval datasets (e.g., MSMarco, SciFact, Quora).
  • MIRACL: 17 multilingual datasets covering a wide array of languages including Arabic, Japanese, and Thai.
  • Fashion-200K: A multimodal dataset used to test text-to-image retrieval capabilities.
  • ToolE & ToolBench: Specialized benchmarks for "tool retrieval," where AI agents must identify the correct API to execute a user's request.

Key Insights and Results

The Customization Advantage

A significant finding of the study is the "distillation" effect: a smaller model (such as ST5-Base) equipped with a Search-Adaptor can outperform a much larger model (such as ST5-Large) used in a zero-shot configuration. This indicates that task-specific customization is often more impactful than raw parameter count.

Performance Gains

  • General Retrieval: Search-Adaptor improved Google Embedding APIs by an average of over 5% in nDCG@10 across the BEIR suite. In specific cases like the Arguana dataset, improvements reached 17%.
  • Competitive Benchmarking: When tested against OpenAI’s proprietary embedding customization solutions, Search-Adaptor consistently yielded superior ranking metrics.
  • Multimodal and Tool Use: The framework demonstrated remarkable versatility, achieving 12% to 45% gains in image retrieval and up to 57% gains in tool retrieval for AI agents.

Efficiency and Compatibility

Because the adaptor is a lightweight MLP, it adds negligible latency to the search pipeline. Furthermore, since it only requires the output vectors, it is fully compatible with any "black-box" embedding API, making it a practical solution for developers using proprietary models like GPT-4 or Gecko.

Conclusion and Future Work

Search-Adaptor demonstrates that significant gains in retrieval accuracy can be achieved without the need for full model fine-tuning. By focusing on residual learning and ranking-specific loss functions, the framework provides a robust path for customizing LLM embeddings.

While highly effective, the authors acknowledge that the method is constrained by the fixed nature of the underlying LLM. Future research may explore "partial tuning" strategies or the application of this framework to other embedding-centric tasks such as recommendation systems and anomaly detection.

Summary updated

BibTeX
@inproceedings{yoon2024search,
  author = {Jinsung Yoon and Yanfei Chen and Sercan Ö. Arik and Tomas Pfister},
  title = {{Search-Adaptor: Embedding Customization for Information Retrieval}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.661},
}
Figure