arXiv:2603.10225cs.LGcs.AI2026-03

用非欧距离替代欧氏距离,让神经网络训练更高效、可解释且低碳。

Rethinking the Harmonic Loss via Non-Euclidean Distance Layers

  • 改用余弦、Bray-Curtis等非欧距离替代传统欧氏距离
  • 视觉模型准确率提升,碳排放降低30%以上;语言模型学习更稳定
  • 适合关注训练效率、可解释性与可持续性的研究者

交叉熵损失长期作为深度神经网络的标准训练目标,但存在可解释性差、权重无界增长及训练效率低等问题。谐波损失是一种基于欧几里得几何的距离型替代方案,能增强可解释性并缓解‘延迟泛化’现象。然而现有研究仅限于欧氏距离,缺乏对计算效率与可持续性的系统评估。本文系统探索多种距离度量作为欧氏距离的替代,全面评估其在视觉骨干网络与大语言模型上的表现。评估框架涵盖模型性能、可解释性与可持续性三方面。在视觉任务中,余弦距离提供最优权衡,持续提升准确率并降低碳排放;Bray-Curtis与马哈拉诺比斯距离进一步增强可解释性,代价为效率下降。在语言模型中,基于余弦的谐波损失改善梯度与学习稳定性,强化表征结构,并显著降低能耗。代码已公开于:https://anonymous.4open.science/r/rethinking-harmonic-loss-5BAB/。

原文摘要 · Abstract (English)

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/.

损失函数可解释性低碳训练

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。