由 f-divergences 生成的损失函数与算子
机器学习
2025-06-16 v2 机器学习
摘要
Logistic loss(即交叉熵 loss)是多类分类中最常用的损失函数之一,也是语言模型中下一词预测的首选损失函数。它与 Kullback--Leibler (KL) 散度及 softargmax 算子相关联。本文提出了一种基于 f-divergences 构造新型凸损失函数的方法。我们的损失函数从两个方向扩展了 logistic loss:i) 将 KL 散度替换为 f-divergences;ii) 允许非均匀参考测度。我们为众多 f-divergences 实现了该框架,既能恢复已有损失函数,也能创造新的损失函数。类似 logistic loss 的损失函数与一个算子相关联,我们称之为 f-softargmax。我们推导了一个新型可并行的二分查找算法,用于计算任何 f-divergences 对应的 f-softargmax。在实证方面,本文旨在确定超越经典交叉熵的损失函数在语言模型中的有效性,包括预训练、后训练 (SFT) 和蒸馏。我们表明,以 -divergence 生成的损失函数(在单位参考测度下等价于 Tsallis -negentropy)取 在多个任务中表现良好。
引用
@article{arxiv.2501.18537,
title = {Loss Functions and Operators Generated by f-Divergences},
author = {Vincent Roulet and Tianlin Liu and Nino Vieillard and Michael E. Sander and Mathieu Blondel},
journal= {arXiv preprint arXiv:2501.18537},
year = {2025}
}