[论文解读] Rethinking the Harmonic Loss via Non-Euclidean Distance Layers
论文通过在最终分类层用一系列非欧几里得距离替代欧几里得距离来扩展谐波损失,并在视觉和语言任务中评估性能、可解释性与绿色AI表现。
Cross-entropy loss has long been the standard choice for training deep neural networks, yet it suffers from interpretability limitations, unbounded weight growth, and inefficiencies that can contribute to costly training dynamics. The harmonic loss is a distance-based alternative grounded in Euclidean geometry that improves interpretability and mitigates phenomena such as grokking, or delayed generalization on the test set. However, the study of harmonic loss remains narrow: only Euclidean distance is explored, and no systematic evaluation of computational efficiency or sustainability was conducted. We extend harmonic loss by systematically investigating a broad spectrum of distance metrics as replacements for the Euclidean distance. We comprehensively evaluate distance-tailored harmonic losses on both vision backbones and large language models. Our analysis is framed around a three-way evaluation of model performance, interpretability, and sustainability. On vision tasks, cosine distances provide the most favorable trade-off, consistently improving accuracy while lowering carbon emissions, whereas Bray-Curtis and Mahalanobis further enhance interpretability at varying efficiency costs. On language models, cosine-based harmonic losses improve gradient and learning stability, strengthen representation structure, and reduce emissions relative to cross-entropy and Euclidean heads. Our code is available at: https://anonymous.4open.science/r/rethinking-harmonic-loss-5BAB/.
研究动机与目标
- 为谐波损失引入超越欧几里得距离的替代距离度量提供动机。
- 在谐波损失框架中系统性地评估一组广泛的距离度量。
- 在不同领域评估模型性能、表示的可解释性与能效。
- 提供关于几何含义和不同距离下收敛性的理论洞见。
提出的方法
- 在谐波损失中将欧几里得距离替换为集合中的一个度量 d(·,·),该集合包括曼哈顿、切比雪夫、闵可夫斯基、余弦、汉明、坎布拉、布雷-柯蒂斯以及马氏距离。
- 与主干网络共同学习类别原型(权重向量),作为一个可直接使用的分类头。
- 在视觉任务(MNIST、CIFAR-10/100、MarathiSignLanguage、TinyImageNet)和语言任务(OpenWebText,带GPT/BERT/Qwen风格解码器)上,在统一的训练协议下进行评估。
- 分析三个方面:模型性能(准确率/ F1、困惑度)、表示的可解释性(通过PCA等度量的嵌入几何)、以及可持续性(训练时长、GFLOPs、排放量)。
- 提供理论结果,给出1-同类距离的尺度不变性与有限极小值,以及PAC-Bayes一般化界。

实验结果
研究问题
- RQ1RQ1:非欧几里得谐波损失是否比交叉熵和欧几里得谐波损失具有更高的准确性或更快的收敛?
- RQ2RQ2:这些损失是否比交叉熵产生更可解释的表示?
- RQ3RQ3:性能提升是否伴随更高的计算成本,还是能以相似或更低的能耗实现?
- RQ4不同距离的选择如何影响学习到的原型和特征空间的几何?
主要发现
- 基于余弦的谐波损失在视觉任务中提供最可靠的整体性能,具备竞争性的准确性并且排放降低或中性。
- 布雷-柯蒂斯距离与切比雪夫距离通过增强嵌入结构并降低解释90%方差所需的维度,提高了可解释性。
- 马氏距离在表示清晰度上表现强劲,但计算成本较高,在复杂数据上有时优化稳定性较差。
- 在语言模型中,基于余弦的距离及闵可霍斯Distances提升了梯度稳定性和表示结构,通常具有较好的可持续性表现。
- 总体而言,非欧几里得距离在准确性、可解释性与可持续性之间提供三方权衡,且通常余弦距离实现最佳平衡。

更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。