arXiv:2605.06274cs.LGcs.CV2026-05被引 1

改进图像分类损失函数,让模型更懂类别之间的上下级关系。

When Labels Have Structure: Improving Image Classification with Hierarchy-Aware Cross-Entropy

论文配图:When Labels Have Structure: Improving Image Classification with Hierarchy-Aware Cross-Entropy
图 1 · 摘自论文原文
  • 用层级结构重构交叉熵损失,让父类继承子类的置信度。
  • 在18组实验中平均提升4.66%准确率,线性探测下平均增益2.18%。
  • 适合有明确类别层次的数据集,如细粒度图像分类任务。

标准交叉熵损失在几乎所有机器学习任务中被广泛使用,但它对所有误分类一视同仁,忽略了类别层级所蕴含的语义距离。本文提出层级感知交叉熵(HACE),一种可直接替代标准交叉熵的损失函数,将已知的类别层级结构融入训练过程。HACE包含两个组件:预测聚合,将模型概率向上传播至父类,使父节点累积子类的置信度;祖先标签平滑,将真实标签信号沿从真类到根节点的路径分布。我们在CIFAR-100、FGVC Aircraft和NABirds三个数据集上评估HACE,涵盖六种不同架构(含卷积与注意力结构)的端到端训练,以及基于冻结DINOv2-Large特征的线性探测。在端到端训练中,HACE在18组实验中的15组超越标准交叉熵,平均提升4.66%;在线性探测中,其在三个数据集上均优于所有对比方法,平均比次优基线高出2.18%。

原文摘要 · Abstract (English)

Standard cross-entropy is the default classification loss across virtually all of machine learning, yet it treats all misclassifications equally, ignoring the semantic distances that a class hierarchy encodes. We propose Hierarchy-Aware Cross-Entropy (HACE), a drop-in replacement for standard cross-entropy that incorporates a known class hierarchy directly into the loss. HACE combines two components: prediction aggregation, which propagates the model's probability mass upward through the class hierarchy to ensure that parent nodes accumulate the confidence of their children; and ancestral label smoothing, which distributes the ground-truth signal along the path from the true class to the root. We evaluate HACE on CIFAR-100, FGVC Aircraft, and NABirds in two regimes: end-to-end training across six architectures spanning convolutional and attention-based designs, and linear probing on frozen DINOv2-Large features. In end-to-end training, HACE improves accuracy over standard cross-entropy in 15 out of 18 architecture--dataset pairs, with a mean gain of 4.66\%. In linear probing on frozen DINOv2-Large features, HACE outperforms all competing methods on all three datasets, with a mean improvement of 2.18\% over the next best baseline.

图像分类损失函数层级结构

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