Skip to main content
QUICK REVIEW

[论文解读] Matryoshka Representation Learning

Aditya Kusupati, Gantavya Bhatt|arXiv (Cornell University)|May 26, 2022
Domain Adaptation and Few-Shot LearningComputer Science被引用 24
一句话总结

MRL 在单一嵌入中学习分层的粗到细表示,实现自适应部署而无需额外推理成本,在各任务和模态下保持或提升准确度的同时,显著提高效率(例如表示尺寸小至原来的 14 倍,检索速度提升至 14 倍)

ABSTRACT

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.

研究动机与目标

  • 激发能够适应下游任务、具有可变计算约束的灵活表示。
  • 提出通过嵌套维度对多种粒度进行编码的单一嵌入。
  • 在多种资源水平下实现接近最优的准确性且无需额外部署成本。
  • 展示 MRL 在视觉、视觉+语言和语言模型上的适用性,包括万亿级数据。

提出的方法

  • 定义一个 d 维表示 z 和一个大小为 O(log d) 的嵌套集 M。
  • 在 M 中的每个 m 的前 m 维上训练多个线性分类器 W^{(m)},并使用权重 c_m 聚合损失。
  • 可选地将权重绑定以降低内存开销,即 W^{(m)} = W_{1:m} (MRL-E)。
  • 仅做最少的改动即可将 MRL 适配到监督、对比学习和掩蔽语言建模框架。
  • 展示在优化粒度之间插值的粗到细表示(在 M 中的 m 之间)。
  • 提供两种部署模式:自适应分类(AC)和自适应检索(AR)。

实验结果

研究问题

  • RQ1单一表示如何在不同计算预算下支持多种下游任务?
  • RQ2与独立训练的低维基线相比,粗到细的嵌套表示是否能保持或提升准确性?
  • RQ3MRL 是否能够扩展到万级数据集和多模态(视觉、视觉+语言、语言)且不增加额外推理成本?
  • RQ4在自适应分类和自适应检索工作流中的实际收益是什么?
  • RQ5嵌套表示在鲁棒性及少样本和长尾学习等下游任务中的表现如何?

主要发现

  • 在 ImageNet-1K 分类中,使用 MRL 的自适应分类实现同等准确度下的表示尺寸最多缩小至 14 倍。
  • 在 ImageNet-1K 与 4K 的大规模检索中,实际速度提升最多 14 倍,同时维持可比的准确度。
  • 在长尾少样本和持续学习设置中,准确率提升最多约 2%,鲁棒性与原始嵌入持平。
  • MRL 在模态之间(ResNet、ViT、ALIGN、BERT)以及万级数据(ImageNet、JFT、ALIGN)具备泛化性。
  • 粗到细表示在维度之间呈现插值,实现灵活部署且不增加额外推理成本。
  • 检索可通过自适应的初筛和重新排序有效执行,利用嵌套表示带来显著的加速。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。