arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.16736cs.LGstat.ML
收藏

自回归语言模型的序列级监督学习难度研究

On the Difficulty of Sequence-Level Supervised Learning for Autoregressive Language Models

Google DeepMind(谷歌DeepMind)

Mathieu Blondel, Michaël E. Sander, Germain Vivier-Ardisson, Tianlin Liu, Vincent Roulet

AI总结:

本文研究自回归语言模型序列级监督学习的难度,发现两种含推理解码的损失函数存在下界无界缺陷,提出矩匹配方向虽有效但方差高,最终认为教师强迫或已足够。

摘要:

在监督学习阶段,自回归语言模型通常通过最小化训练数据的负对数似然进行训练,该损失通过教师强迫分解为标记级交叉熵之和。该目标简单高效,但可能存在所谓的暴露偏差:模型训练方式与推理时使用方式不匹配。我们能否设计包含推理时解码过程(如贪心解码或自回归采样)的序列级损失函数?我们表明两种自然尝试会导致本质上有缺陷的损失函数:下界无界。我们进一步表明这两种有缺陷的损失函数密切相关:使用自回归Gumbel技巧,基于采样的损失是Gumbel扰动下贪心损失的期望。由于该问题源于解码序列对模型参数的依赖,我们分析了对采样过程应用停止梯度得到的更新方向,得到矩匹配方向。虽然它不是任何损失函数的梯度,但我们证明它在函数空间中为自回归负对数似然定义了有效下降方向。尽管有这些理论见解,矩匹配方向仍存在高方差问题。我们得出结论,教师强迫很可能是自回归模型监督学习所需的全部。

英文摘要:

During the supervised learning phase, autoregressive language models are typically trained by minimizing the negative log-likelihood of the training data, which decomposes as a sum of token-level cross-entropies via teacher forcing. This objective is simple and efficient but potentially suffers from so-called exposure bias: a mismatch between the way the model is trained and the way it is used at inference time. Can we instead design sequence-level loss functions that incorporate inference-time decoding procedures, such as greedy decoding or autoregressive sampling? We show that two natural attempts lead to loss functions that are fundamentally flawed: unbounded below. We further show that these two flawed loss functions are intimately connected: using autoregressive Gumbel tricks, the sampling based loss is the expected greedy loss under Gumbel perturbations. Since the pathology stems from the dependence of the decoded sequence on the model parameters, we analyze the update direction obtained by applying a stop gradient on the sampling procedure, leading to a moment matching direction. While it is not the gradient of any loss function, we prove that it defines a valid descent direction in function space for the autoregressive negative log-likelihood. Despite these theoretical insights, the moment matching direction suffers from high variance. We conclude that teacher forcing may well be ``all you need'' for supervised learning of autoregressive models.

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

↑