Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Matryoshka Representation Learning

About

Learned representations are a central component in modern ML systems, serving a multitude of downstream tasks. When training such representations, it is often the case that computational and statistical constraints for each downstream task are unknown. In this context rigid, fixed capacity representations can be either over or under-accommodating to the task at hand. This leads us to ask: can we design a flexible representation that can adapt to multiple downstream tasks with varying computational resources? Our main contribution is Matryoshka Representation Learning (MRL) which encodes information at different granularities and allows a single embedding to adapt to the computational constraints of downstream tasks. MRL minimally modifies existing representation learning pipelines and imposes no additional cost during inference and deployment. MRL learns coarse-to-fine representations that are at least as accurate and rich as independently trained low-dimensional representations. The flexibility within the learned Matryoshka Representations offer: (a) up to 14x smaller embedding size for ImageNet-1K classification at the same level of accuracy; (b) up to 14x real-world speed-ups for large-scale retrieval on ImageNet-1K and 4K; and (c) up to 2% accuracy improvements for long-tail few-shot classification, all while being as robust as the original representations. Finally, we show that MRL extends seamlessly to web-scale datasets (ImageNet, JFT) across various modalities -- vision (ViT, ResNet), vision + language (ALIGN) and language (BERT). MRL code and pretrained models are open-sourced at https://github.com/RAIVNLab/MRL.

Aditya Kusupati, Gantavya Bhatt, Aniket Rege, Matthew Wallingford, Aditya Sinha, Vivek Ramanujan, William Howard-Snyder, Kaifeng Chen, Sham Kakade, Prateek Jain, Ali Farhadi• 2022

Related benchmarks

TaskDatasetResultRank
Image ClassificationImageNet A
Top-1 Acc3.99
553
Image ClassificationImageNet V2
Top-1 Acc64.95
487
Image ClassificationImageNet-R
Top-1 Acc35.07
474
Link PredictionWN18RR (test)
Hits@1027.1
380
Image ClassificationImageNet-Sketch
Top-1 Accuracy23.72
360
Link PredictionFB15k-237
MRR3
280
Image ClassificationImageNet V2 (test)
Top-1 Accuracy55.15
181
Image ClassificationImageNet-A (test)
Top-1 Acc37.95
154
Image ClassificationImageNet-R (test)--
105
Image ClassificationImageNet-1K 1.0 (val)
k-NN Accuracy71.21
80
Showing 10 of 27 rows

Other info

Code

Follow for update