arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2412.09579cs.LGcs.AI
收藏

神经网络中软标签与硬标签训练的理论分析

A Theoretical Analysis of Soft-Label vs Hard-Label Training in Neural Networks

UIUC(伊利诺伊大学厄巴纳-香槟分校);CUHK(香港中文大学)

Saptarshi Mandal, Xiaojun Lin, R. Srikant

AI总结:

该研究针对知识蒸馏中软标签训练神经元需求更少的问题,通过实验与两层神经网络理论分析,证明软标签训练神经元复杂度更低,且数据集越难优势越显著,深度网络实验也验证了该结论。

摘要:

自Hinton等人2015年的开创性工作以来,知识蒸馏(小型学生模型从预训练的大型教师模型中学习)已取得了大量实证成功。尽管已有理论研究探索了知识蒸馏的优势,但一个重要问题仍未得到解答:为什么使用教师的软标签训练所需的神经元数量,远少于直接用硬标签训练小型神经网络?为解决这一问题,我们首先在二分类问题上使用简单神经网络模型给出了启发性实验结果。这些结果表明,软标签训练的准确率始终优于硬标签训练,且随着数据集分类难度提升,性能差距会愈发明显。随后我们基于两层神经网络模型的理论贡献佐证了这些观察结论。具体而言,我们证明使用梯度下降的软标签训练仅需$O\left(\frac{1}{γ^2 ε}\right)$个神经元,即可实现跨epoch平均的分类损失小于任意$ε> 0$,其中$γ$是极限核的间隔裕度。相比之下,根据对Ji等人2020年梯度下降分析的改编版本推导,硬标签训练需要$O\left(\frac{1}{γ^4} \cdot \ln\left(\frac{1}ε\right)\right)$个神经元。这意味着当$γ\leq ε$时,即数据集难以分类时,软标签训练的神经元需求可能远低于硬标签训练。最后,我们在深度神经网络上给出了实验结果,进一步验证了这些理论发现。

英文摘要:

Knowledge distillation, where a small student model learns from a pre-trained large teacher model, has achieved substantial empirical success since the seminal work of \citep{hinton2015distilling}. Despite prior theoretical studies exploring the benefits of knowledge distillation, an important question remains unanswered: why does soft-label training from the teacher require significantly fewer neurons than directly training a small neural network with hard labels? To address this, we first present motivating experimental results using simple neural network models on a binary classification problem. These results demonstrate that soft-label training consistently outperforms hard-label training in accuracy, with the performance gap becoming more pronounced as the dataset becomes increasingly difficult to classify. We then substantiate these observations with a theoretical contribution based on two-layer neural network models. Specifically, we show that soft-label training using gradient descent requires only $O\left(\frac{1}{γ^2 ε}\right)$ neurons to achieve a classification loss averaged over epochs smaller than some $ε> 0$, where $γ$ is the separation margin of the limiting kernel. In contrast, hard-label training requires $O\left(\frac{1}{γ^4} \cdot \ln\left(\frac{1}ε\right)\right)$ neurons, as derived from an adapted version of the gradient descent analysis in \citep{ji2020polylogarithmic}. This implies that when $γ\leq ε$, i.e., when the dataset is challenging to classify, the neuron requirement for soft-label training can be significantly lower than that for hard-label training. Finally, we present experimental results on deep neural networks, further validating these theoretical findings.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑