$f$-MICL: Understanding and Generalizing InfoNCE-based Contrastive Learning

📄 arXiv: 2402.10150v1 📥 PDF

作者: Yiwei Lu, Guojun Zhang, Sun Sun, Hongyu Guo, Yaoliang Yu

分类: cs.LG

发布日期: 2024-02-15

备注: Accepted to TMLR in 2023


💡 一句话要点

提出$f$-MICL以解决InfoNCE对比学习的局限性

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 对比学习 自监督学习 信息论 深度学习 特征表示

📋 核心要点

  1. 现有的InfoNCE方法依赖于余弦相似度,可能限制了对比学习的表现和灵活性。
  2. 论文提出了$f$-MICL,通过引入$f$-散度,扩展了KL互信息的定义,提供了多种新的目标函数。
  3. 实验结果表明,$f$-MICL在多个视觉和自然语言基准任务上普遍优于现有方法,且最佳的$f$-散度依赖于具体任务和数据集。

📝 摘要(中文)

在自监督对比学习中,InfoNCE是广泛采用的目标函数,它使用启发式的余弦相似度进行表示比较,并与最大化基于Kullback-Leibler(KL)互信息密切相关。本文旨在回答两个有趣的问题:(1)我们能否超越基于KL的目标?(2)除了流行的余弦相似度,我们能否设计出更好的相似度函数?我们通过使用$f$-散度将KL互信息推广到对比学习中的$f$-互信息($f$-MICL)来回答这两个问题。我们提供了一系列共享InfoNCE良好特性的$f$-MICL目标,同时在性能上相似甚至更优。假设联合特征分布与高斯核成比例,我们推导出具有更好可解释性和经验性能的$f$-高斯相似度。最后,我们识别出$f$-MICL目标与几种流行的基于InfoNCE的目标之间的密切关系。

🔬 方法详解

问题定义:现有的InfoNCE方法主要依赖于余弦相似度进行表示比较,可能导致性能瓶颈,尤其是在特征分布复杂的情况下。

核心思路:本文通过引入$f$-散度,推广KL互信息的定义,提出了$f$-MICL目标函数,旨在提供更灵活和有效的对比学习框架。

技术框架:整体架构包括对比学习的预处理阶段、特征提取模块和损失计算模块。通过不同的$f$-散度,构建多种目标函数以进行对比学习。

关键创新:最重要的技术创新在于引入了$f$-高斯相似度,提供了更好的可解释性和性能,区别于传统的余弦相似度方法。

关键设计:在损失函数设计上,采用了多种$f$-散度,结合特定任务的特征分布,优化了网络结构以适应不同的数据集。实验中使用了SimCLR、MoCo等多种架构进行验证。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

$f$-MICL在多个基准任务中表现优异,普遍超越了现有的InfoNCE方法,特别是在特定任务和数据集上,最佳的$f$-散度选择显著提升了模型性能,具体提升幅度未知。

🎯 应用场景

该研究的潜在应用领域包括计算机视觉、自然语言处理等自监督学习任务。通过改进对比学习的目标函数,$f$-MICL能够提升模型在多种任务上的表现,具有广泛的实际价值和未来影响。

📄 摘要(原文)

In self-supervised contrastive learning, a widely-adopted objective function is InfoNCE, which uses the heuristic cosine similarity for the representation comparison, and is closely related to maximizing the Kullback-Leibler (KL)-based mutual information. In this paper, we aim at answering two intriguing questions: (1) Can we go beyond the KL-based objective? (2) Besides the popular cosine similarity, can we design a better similarity function? We provide answers to both questions by generalizing the KL-based mutual information to the $f$-Mutual Information in Contrastive Learning ($f$-MICL) using the $f$-divergences. To answer the first question, we provide a wide range of $f$-MICL objectives which share the nice properties of InfoNCE (e.g., alignment and uniformity), and meanwhile result in similar or even superior performance. For the second question, assuming that the joint feature distribution is proportional to the Gaussian kernel, we derive an $f$-Gaussian similarity with better interpretability and empirical performance. Finally, we identify close relationships between the $f$-MICL objective and several popular InfoNCE-based objectives. Using benchmark tasks from both vision and natural language, we empirically evaluate $f$-MICL with different $f$-divergences on various architectures (SimCLR, MoCo, and MoCo v3) and datasets. We observe that $f$-MICL generally outperforms the benchmarks and the best-performing $f$-divergence is task and dataset dependent.