NUDGE: Lightweight Non-Parametric Fine-Tuning of Embeddings for Retrieval

Sepanta Zeighami, Zac Wellmer, Aditya G. Parameswaran · DOI

Introduction

NUDGE introduces a "non-parametric" approach to fine-tuning retrieval systems, bypassing the expensive process of retraining model weights. By directly "nudging" data embeddings to better align with query patterns, NUDGE achieves up to a 200x speedup and significantly higher accuracy than traditional fine-tuning methods.

The Challenge in Embedding Retrieval

Modern search and Retrieval-Augmented Generation (RAG) pipelines rely on pre-trained models to convert text or images into high-dimensional vectors. While $k$-Nearest Neighbor ($k$-NN) search is effective, "out-of-the-box" models often underperform on domain-specific datasets or niche query workloads.

Traditionally, developers face a trade-off:

  1. Pre-Trained Fine-Tuning (PTFT): Retraining the entire model is accurate but computationally intensive, slow, and often impossible for closed-source API-based models.
  2. Adaptors: Training small "wrapper" models is faster but typically yields mediocre accuracy improvements.

NUDGE proposes a third way: optimizing the data points (embeddings) directly to improve $k$-NN search performance.

The NUDGE Method

NUDGE treats the embeddings of data records as the parameters to be optimized. The core logic employs a bi-level optimization strategy:

  • Inner Optimization: For a given constraint $\gamma$, NUDGE modifies each data embedding to maximize its similarity to the training queries it should answer.
  • Outer Optimization: A validation set is used to find the optimal "budget" $\gamma$, preventing overfitting and ensuring embeddings retain their original semantic meaning.
Conceptual overview of NUDGE: data embeddings are "nudged" toward training queries within a constrained region.

The paper explores two variants:

  • NUDGE-M (Magnitude): Constrains the distance an embedding can move from its original position.
  • NUDGE-N (Normalized): Adds a constraint that the final "nudged" embedding must still sit on the unit ball, which is standard for cosine similarity search.

Crucially, these constrained versions have closed-form solutions, allowing "training" to be completed in a single pass over the data.

Experimental Setup

The researchers evaluated NUDGE across nine diverse datasets, including text retrieval (BEIR & KILT) and image retrieval (COCO, Flickr). They tested against five pre-trained models, ranging from open-source options like BGE-S and GTE-L to closed-source models like OpenAI’s text-embedding-large-3.

Key Insights

  • Surgical Precision: Unlike traditional fine-tuning that alters the global mapping function, NUDGE makes local changes. It moves specific documents closer to relevant queries without affecting the rest of the vector space.
  • Zero Query Latency: Since NUDGE modifies stored embeddings in the vector database, there is no additional overhead at query time.
  • Model Agnostic: NUDGE works with any embedding output, making it ideal for closed-source APIs where model weights are inaccessible.
  • Robustness: NUDGE-N remains resilient to out-of-distribution queries by keeping embeddings on the unit ball, preventing unrelated vectors from becoming false positives.

Results and Performance

NUDGE demonstrates significant advantages in both speed and accuracy.

Comparison of NUDGE against traditional fine-tuning (PTFT) and adaptors, highlighting speed and accuracy gains.
  • Speed: NUDGE is approximately 200x faster than full model fine-tuning (PTFT) and 3x faster than training adaptors.
  • Accuracy: NUDGE provided a 3.3x higher increase in NDCG@10 compared to PTFT and a 4.3x higher increase compared to adaptors. On the NQ dataset with BGE-S, NUDGE-N improved scores by 24.8%, far outperforming the 6.2% boost from an adaptor.

Limitations and Future Outlook

While highly effective, NUDGE currently focuses on optimizing existing datasets. Adding large volumes of new data requires periodic re-running of the "nudge" process. Future work includes integrating NUDGE as a native feature in vector databases and developing synthetic query generation to simplify deployment for new datasets.

Summary updated

BibTeX
@inproceedings{zeighami2025nudge,
  author = {Sepanta Zeighami and Zac Wellmer and Aditya G. Parameswaran},
  title = {{NUDGE: Lightweight Non-Parametric Fine-Tuning of Embeddings for Retrieval}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=MYw74B77KQ},
}
Figure