One vector is trained to contain nested resolutions
Aditya Kusupati and coauthors introduced Matryoshka Representation Learning in 2022. The method trains predictive representations at multiple prefix lengths, borrowing its name from nesting dolls.
Earlier dimensions must carry a useful coarse representation while later dimensions add detail.
A system can index a shorter prefix for a broad candidate search and retain the longer vector for a more precise second pass. That flexibility comes from the training objective, not from the array-slicing operation itself.
Truncation, quantization, and dimensionality reduction are not interchangeable
Truncation discards trailing dimensions. Product quantization compresses vector subspaces into codebook identifiers, while a separately learned dimensionality-reduction transform maps vectors into a new space.
Each changes storage and retrieval behavior differently.
An MRL prefix remains in the coordinate system the model was trained to organize. That training property is why prefix truncation can be evaluated as a deliberate operating point rather than an arbitrary loss of dimensions.
A two-stage catalog search shows the intended use
A catalog can search compact prefixes to retrieve a broad candidate set, then rescore those candidates with longer embeddings from the same MRL model. The design makes sense only after recall is evaluated at both stages on representative queries.
The embedding model guide covers model selection and vector dimensions. The common misuse is chopping any embedding to a convenient size and assuming the result preserves meaning because an MRL-trained model could do so.
The prefix length becomes a deployment parameter
Choosing a shorter prefix can reduce index storage and distance-computation work, but the effect depends on the model, corpus, and retrieval task. A product-name lookup may tolerate a compact representation that loses distinctions needed for legal or scientific search.
The useful comparison holds the model and evaluation queries constant, then measures recall as dimensions are removed. A smaller vector is not automatically cheaper end to end if lower recall forces a much larger candidate set or reranking stage.
Continue with these glossary entries: