Skip to main navigation Skip to search Skip to main content

Beyond Matryoshka: Revisiting Sparse Coding for Adaptive Representation

  • Tiansheng Wen
  • , Yifei Wang
  • , Zequn Zeng
  • , Zhong Peng
  • , Yudi Su
  • , Xinyang Liu
  • , Bo Chen
  • , Hongwei Liu
  • , Stefanie Jegelka
  • , Chenyu You
  • Xidian University
  • Stony Brook University
  • Massachusetts Institute of Technology
  • Technical University of Munich

Research output: Contribution to journalConference articlepeer-review

1 Scopus citations

Abstract

Many large-scale systems rely on high-quality deep representations (embeddings) to facilitate tasks like retrieval, search, and generative modeling. Matryoshka Representation Learning (MRL) recently emerged as a solution for adaptive embedding lengths, but it requires full model retraining and suffers from noticeable performance degradations at short lengths. In this paper, we show that sparse coding offers a compelling alternative for achieving adaptive representation with minimal overhead and higher fidelity. We propose Contrastive Sparse Representation (CSR), a method that sparsifies pre-trained embeddings into a high-dimensional but selectively activated feature space. By leveraging lightweight autoencoding and task-aware contrastive objectives, CSR preserves semantic quality while allowing flexible, cost-effective inference at different sparsity levels. Extensive experiments on image, text, and multimodal benchmarks demonstrate that CSR consistently outperforms MRL in terms of both accuracy and retrieval speed—often by large margins—while also cutting training time to a fraction of that required by MRL. Our results establish sparse coding as a powerful paradigm for adaptive representation learning in real-world applications where efficiency and fidelity are both paramount. Code is available at this https URL.

Original languageEnglish
Pages (from-to)66520-66538
Number of pages19
JournalProceedings of Machine Learning Research
Volume267
StatePublished - 2025
Event42nd International Conference on Machine Learning, ICML 2025 - Vancouver, Canada
Duration: Jul 13 2025Jul 19 2025

Fingerprint

Dive into the research topics of 'Beyond Matryoshka: Revisiting Sparse Coding for Adaptive Representation'. Together they form a unique fingerprint.

Cite this