Skip to main content
QUICK REVIEW

[论文解读] Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere

Tongzhou Wang, Phillip Isola|arXiv (Cornell University)|May 20, 2020
Domain Adaptation and Few-Shot Learning参考文献 55被引用 170
一句话总结

本文通过对比表示学习的两个属性——正样本对的对齐与在单位超球面上的特征均匀性,证明它们是损失的渐近目标,并给出与下游性能高度相关的经验指标;直接优化这些属性可达到或优于标准对比学习。

ABSTRACT

Contrastive representation learning has been outstandingly successful in practice. In this work, we identify two key properties related to the contrastive loss: (1) alignment (closeness) of features from positive pairs, and (2) uniformity of the induced distribution of the (normalized) features on the hypersphere. We prove that, asymptotically, the contrastive loss optimizes these properties, and analyze their positive effects on downstream tasks. Empirically, we introduce an optimizable metric to quantify each property. Extensive experiments on standard vision and language datasets confirm the strong agreement between both metrics and downstream task performance. Remarkably, directly optimizing for these two metrics leads to representations with comparable or better performance at downstream tasks than contrastive learning. Project Page: https://tongzhouwang.info/hypersphere Code: https://github.com/SsnL/align_uniform , https://github.com/SsnL/moco_align_uniform

研究动机与目标

  • 识别对比损失与表示质量之间的关系。
  • 引入可量化的对齐与均匀性指标。
  • 在理论上将对比损失与这些属性的渐近最优联系起来。
  • 在多个数据集上经验性地验证指标与下游任务表现的一致性。
  • 证明直接优化这些属性可达到或超过传统对比学习。

提出的方法

  • 将对齐形式化为正样本对特征之间的期望距离。
  • 通过单位超球面上的平均成对高斯势及其对数来定义均匀性。
  • 证明在无限负样本情况下,对比损失收敛到同时最小化错配与非均匀性的对齐与均匀性目标(定理1)。
  • 提出并用小批量数据计算实际的对齐指标(L_align)和均匀性指标(L_uniform)。
  • 在视觉与语言任务上实证验证这些指标,并与标准对比损失进行比较。
  • 直接优化 L_align 和 L_uniform 能获得与下游表现相当或更优的结果。

实验结果

研究问题

  • RQ1对齐和均匀性是否捕捉到了对比表示的本质质量?
  • RQ2是否存在两个可处理的度量来量化对齐与均匀性并预测下游表现?
  • RQ3在实际应用中,直接优化对齐与均匀性是否优于或至少等同于传统的对比损失?

主要发现

Loss FormulaValidation Set Accuracy ↑ Output + LinearValidation Set Accuracy ↑ Output + 5-NNValidation Set Accuracy ↑ fc7 + LinearValidation Set Accuracy ↑ fc7 + 5-NN
Best L_contrastive only | L_contrastive(τ=0.19)80.46%78.75%83.89%76.33%
Best L_align and L_uniform only | 0.98·L_align(α=2)+0.96·L_uniform(t=2)81.15%78.89%84.43%76.78%
Best among all encoders | L_contrastive(τ=0.5)+L_uniform(t=2)81.06%79.05%84.14%76.48%
  • 对比学习在单位超球面上既推动正样本对的对齐,也推动归一化特征的均匀分布。
  • 随着负样本数量增大,对比损失收敛为一种同时最小化错配与非均匀性的形式(定理1)。
  • 提出的 L_align 和 L_uniform 指标与多任务和多数据集的下游性能高度相关。
  • 通过直接优化 L_align 和 L_uniform 训练得到的编码器在下游表现上与使用标准对比损失训练的编码器相当或更好(表1–2)。
  • 结果在 MoCo 与 Quick-Thought Vector 等变体中也成立,表明对齐+均匀性视角具有普遍性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。