[论文解读] Supervised Contrastive Learning with Hard Negative Samples
本文提出硬负样本监督对比学习(H-SCL),一种结合标签信息与硬负样本采样的对比学习框架,以提升表征学习性能。H-SCL 在图像基准测试中优于 SCL 和 H-UCL,且理论上证明了 H-SCL 损失被 H-UCL 损失所界定,解释了 H-UCL 在经验上优于 UCL 的原因。
Through minimization of an appropriate loss function such as the InfoNCE loss, contrastive learning (CL) learns a useful representation function by pulling positive samples close to each other while pushing negative samples far apart in the embedding space. The positive samples are typically created using "label-preserving" augmentations, i.e., domain-specific transformations of a given datum or anchor. In absence of class information, in unsupervised CL (UCL), the negative samples are typically chosen randomly and independently of the anchor from a preset negative sampling distribution over the entire dataset. This leads to class-collisions in UCL. Supervised CL (SCL), avoids this class collision by conditioning the negative sampling distribution to samples having labels different from that of the anchor. In hard-UCL (H-UCL), which has been shown to be an effective method to further enhance UCL, the negative sampling distribution is conditionally tilted, by means of a hardening function, towards samples that are closer to the anchor. Motivated by this, in this paper we propose hard-SCL (H-SCL) {wherein} the class conditional negative sampling distribution {is tilted} via a hardening function. Our simulation results confirm the utility of H-SCL over SCL with significant performance gains {in downstream classification tasks.} Analytically, we show that {in the} limit of infinite negative samples per anchor and a suitable assumption, the {H-SCL loss} is upper bounded by the {H-UCL loss}, thereby justifying the utility of H-UCL {for controlling} the H-SCL loss in the absence of label information. Through experiments on several datasets, we verify the assumption as well as the claimed inequality between H-UCL and H-SCL losses. We also provide a plausible scenario where H-SCL loss is lower bounded by UCL loss, indicating the limited utility of UCL in controlling the H-SCL loss.
研究动机与目标
- 为解决尽管 H-UCL 在经验上表现更优,但其性能仍显著优于标准监督对比学习(SCL)的问题。
- 提出一个统一框架,整合标签信息与硬负样本采样,以提升表征学习性能。
- 从理论上解释为何 H-UCL 优于 UCL,通过证明 H-SCL 损失被 H-UCL 损失所界定,但不被 UCL 损失所界定。
- 提供 UCL、H-UCL、SCL 和 H-SCL 的清晰统一比较,阐明其相互关系与差异。
提出的方法
- 提出 H-SCL,一种对比学习目标,利用类别标签定义正样本对,并基于嵌入相似度选择硬负样本。
- 引入温度缩放的对比损失,使用硬度参数 β 加权硬负样本,使其在损失函数中具有更大影响。
- 采用标准的 ResNet-50 主干网络与 128 维投影头进行表征学习。
- 使用小批量近似负样本采样分布,其中负样本从当前小批量中选取。
- 对 β ∈ {0.1, 0.5, 1, 2, 5} 进行网格搜索,以调整损失函数中硬度权重。
- 在预训练后固定表示函数,并通过线性分类头评估性能。
实验结果
研究问题
- RQ1将标签信息与硬负样本采样相结合,是否能将对比学习性能提升至超过标准 SCL 和 H-UCL 的水平?
- RQ2H-SCL 损失与 H-UCL 损失之间是否存在理论关系,可解释 H-UCL 在经验上的成功?
- RQ3H-SCL 目标是否比 UCL 目标更优,作为最小化 H-SCL 损失的代理?
- RQ4硬度参数 β 如何影响 H-SCL 框架的优化与泛化性能?
主要发现
- 在 CIFAR100 上,H-SCL 达到 75.11% 的 top-1 准确率,优于 SCL(71.68%)与 H-UCL(67.77%),提升超过 3 个百分点。
- 在 STL10 上,H-SCL 达到 72.52% 的准确率,较 SCL 提升 4.24%,较 H-UCL 提升 4.70%。
- H-SCL 在不到 50 个周期内即达到 SCL 在 200 个周期时的性能,表明收敛速度更快。
- 理论分析表明,在特定条件下,H-SCL 损失被 H-UCL 损失所界定,但不被 UCL 损失所界定。
- 图 4 的实证结果表明,无论 β 取值如何,H-SCL 损失始终被 H-UCL 损失上界所约束,验证了理论边界的正确性。
- 关键不等式(17)左侧平均值为 1.44,显著高于右侧平均值 0.99,支持假设 1。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。