Skip to content

Matryoshka Hash Representations for Model-Aware Compact Semantic Retrieval

Sep 2026 · 1 citation · 50 references
Computer Science

TL;DR

This work introduces Matryoshka Hash Representations (MHR), a two-stage procedure that separates full-width training from prefix organization and strengthens two common pipelines: shortlisting candidates for full-precision reranking, and pruning a low-storage graph index such as LEANN.

Abstract

Retrieval-augmented generation (RAG) depends on dense retrieval: each document is stored as a learned vector, and a query is answered by finding its nearest neighbors in that vector space. Keeping one full-precision vector per document is the dominant index cost at corpus scale, so retrieval systems replace each vector with a short code of a few bytes---a step called quantization. Standard quantizers such as product quantization (PQ) pick the code that reconstructs the original vector most closely. A single code is even more useful if it serves several byte budgets at once: when its short prefixes are each directly searchable, a deployment can set its efficiency--quality operating point without re-encoding the corpus. But training all prefixes under one objective makes the early bits a compromise across budgets---short codes improve while the full-width code degrades. Quantization to low-bit representation, such as binary codes, further sharpens the conflict. We introduce Matryoshka Hash Representations (MHR), a two-stage procedure that separates full-width training from prefix organization. MHR first learns a longer binary code, then freezes the model and trains additional zero-initialized residual code adaptors for directly searchable prefixes. Documents are stored at one bit per coordinate, while queries keep continuous logits like PQ to attain sufficient expressivity. We implement the search process with FAISS FastScan. Trained on MS MARCO and zero-shot transferred to seven BEIR datasets, MHR reaches .5561 NDCG@10 and .6535 Recall@100 at 32 bytes, surpassing the best baseline of the same budget. The advantage is more pronounced in lower budgets. The same code also strengthens two common pipelines: shortlisting candidates for full-precision reranking, and pruning a low-storage graph index such as LEANN.

View source

Similar papers

#machine learning Preprint Sep 2026

Spruce: Scalable Private Outsourced Retrieval Using Compact Embeddings

Spruce learns compact binary codes that preserve candidates for full-precision reranking, replacing corpus-wide embedding scoring with efficient Hamming-distance computation under two-server multi-party computation under two-server multi-party computation (MPC).

Pei-Chun Hua, Yun-Ming Xiao · 4 citations
Preprint Aug 2026

AdaWidth: Query-Adaptive Embedding Width for Dense Retrieval

AdaWidth is introduced, which adapts the number of evaluated dimensions to each query within a shared prefix representation, and derives a prefix sufficiency analysis showing that the required number of dimensions is set by the competing documents at the retrieval cutoff.

Shu-Bing Yang, Dongfang Zhao · 0 citations
#machine learning Preprint Aug 2026

RSLM: Training-Free Vector Quantization for Approximate Nearest Neighbor Search

By introducing RSLM (Rotated Scaled Lloyd-Max), a family of training-free vector quantization codecs compressing embeddings to 1--4 bits per dimension, this work reduces memory cost and memory bandwidth of a typical large-scale Approximate Nearest Neighbor (ANN) search system, while reducing its complexity and keeping...

Rastislav Lenhardt, Teodora Dobos, Thomas Vecchiato et al. · 0 citations
Book Open access Aug 2026

FLASH: Fast Generative Retrieval via Autoregressive Semantic Hashing with Provably Distance Bounds

Retrieval-Augmented Generation (RAG) relies critically on the effectiveness of its retrieval component. Dense retrieval with Approximate Nearest Neighbor (ANN) search is efficient but relies on symmetric similarity metrics that can limit the modeling of directional relevance. Generative retrieval addresses this limitat...

Yifei Zhang, Hao Zhu, Haoran Shi et al. · 0 citations
#machine learning Preprint Aug 2026

Self-Indexing Attention for Compression-Compatible Sparse Long-Context LLM Inference

Self-Indexing Attention is proposed, a training-free framework built on a shared transform-domain sign-magnitude representation that provides a reusable token-level index for grouped prefill selection and decode retrieval, while the same representation remains compatible with external KV-cache compression without separ...

Xu Yang, Jia-Peng Zhang, Yu-Xi Chen et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Sep 29, 2026

Who we become when we talk to machines

Professor Sherry Turkle’s new book, “Artificial Intimacy,” offers a withering critique of chatbots and the antisocial dynamics she believes they encourage.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.