Skip to main content
QUICK REVIEW

[论文解读] Softmax Dissection: Towards Understanding Intra- and Inter-class Objective for Embedding Learning

Lanqing He, Zhongdao Wang|arXiv (Cornell University)|Aug 4, 2019
Face recognition and analysis参考文献 27被引用 5
一句话总结

本文提出 D-Softmax,一种解耦嵌入学习中类内与类间目标的解耦损失,实现独立优化。通过解耦这些目标并引入基于采样的变体(D-Softmax-B 与 D-Softmax-K),在大规模数据上实现最高 64 倍的训练加速,性能损失极小,优于现有加速方法在速度与准确率上的表现。

ABSTRACT

The softmax loss and its variants are widely used as objectives for embedding learning, especially in applications like face recognition. However, the intra- and inter-class objectives in the softmax loss are entangled, therefore a well-optimized inter-class objective leads to relaxation on the intra-class objective, and vice versa. In this paper, we propose to dissect the softmax loss into independent intra- and inter-class objective (D-Softmax). With D-Softmax as objective, we can have a clear understanding of both the intra- and inter-class objective, therefore it is straightforward to tune each part to the best state. Furthermore, we find the computation of the inter-class objective is redundant and propose two sampling-based variants of D-Softmax to reduce the computation cost. Training with regular-scale data, experiments in face verification show D-Softmax is favorably comparable to existing losses such as SphereFace and ArcFace. Training with massive-scale data, experiments show the fast variants of D-Softmax significantly accelerates the training process (such as 64x) with only a minor sacrifice in performance, outperforming existing acceleration methods of softmax in terms of both performance and efficiency.

研究动机与目标

  • 为解决标准 Softmax 损失中类内与类间目标之间的纠缠问题,该问题阻碍了两者的同步最优优化。
  • 将类内目标(拉近正样本)与类间目标(拉开类别中心)解耦,实现独立且严格的优化。
  • 通过识别类间计算中的冗余性,提出高效的采样策略,降低大规模训练中的计算成本。
  • 开发 D-Softmax 的快速、可扩展变体,在保持高性能的同时,显著加速包含数十万类的大规模数据集上的训练。

提出的方法

  • D-Softmax 将标准 Softmax 损失分解为两个独立组件:类内目标通过正样本类别权重强制实现类内特征紧凑性。
  • 类间目标独立于类内紧凑性,维持不同类别中心之间的大角度或基于边距的分离。
  • 该方法引入两种基于采样的变体:D-Softmax-B 从当前小批量中采样负类别,D-Softmax-K 从固定的负类别池中采样。
  • 通过仅采样部分负类别,类间计算成本被大幅降低,同时保持类内目标的优化稳定性。
  • 解耦结构确保即使通过采样放松类间优化,类内约束仍保持严格且有效。
  • 该框架与现有基于边距的损失(如 ArcFace)兼容,可应用于任意基于 Softmax 的嵌入学习系统。

实验结果

研究问题

  • RQ1标准 Softmax 损失中类内与类间目标的纠缠如何影响嵌入学习中的优化与泛化?
  • RQ2类内与类间目标是否可被解耦,以实现独立且更有效的优化?
  • RQ3Softmax 中类间目标的计算是否对所有负类别都真正必要,还是在实践中存在冗余?
  • RQ4类间目标的基于采样的近似是否能在保持性能的同时,实现大规模训练中的显著加速?
  • RQ5像 D-Softmax 这样的解耦损失是否能在准确率与训练效率两方面均优于完整 Softmax 和现有基于采样的方法?

主要发现

  • D-Softmax 在常规规模的人脸识别数据集上达到与 SOTA 损失(如 ArcFace)相当的性能,准确率无下降。
  • 在大规模数据(757K 类)上,D-Softmax-B 与 D-Softmax-K 相较于完整 Softmax 实现最高 64 倍的训练加速,仅伴随轻微性能下降。
  • 在 1/64 的采样率下,D-Softmax-K 在 LFW 准确率上较随机采样基线(Rand-Softmax、Rand-ArcFace)高出 0.53–0.55%。
  • 尽管 HF-Softmax 使用了近似最近邻采样,D-Softmax-K 仍凭借解耦的类内约束在准确率与速度上全面超越 HF-Softmax。
  • 完整 D-Softmax 损失优于所有基于采样的变体,并在大规模数据集上达到或超过完整 Softmax 的性能,证明了解耦的有效性。
  • D-Softmax-K 的单次前向-反向传播训练时间低至 0.20 秒(与 Rand-Softmax 相当),同时显著优于其他采样方法的准确率。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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