arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.22244cs.LGstat.ML
收藏

Transformer中的突变式学习:基于矩阵补全的案例研究

Abrupt Learning in Transformers: A Case Study on Matrix Completion

University of Michigan(密歇根大学);Harvard University(哈佛大学)

Pulkit Gopalani, Ekdeep Singh Lubana, Wei Hu

AI总结:

该研究将低秩矩阵补全建模为MLM任务,发现训练BERT时损失会先平台后骤降,通过分析模型预测、注意力头及隐藏状态等揭示了突变式学习的内在机制。

摘要:

近期针对Transformer训练动态的分析揭示了一个有趣的特性:训练损失会在大量训练步中处于平台期,随后突然(且急剧)下降至接近最优的值。为深入理解这一现象,我们将低秩矩阵补全问题建模为掩码语言建模(MLM,Masked Language Modeling)任务,并证明可以训练BERT模型以低误差求解该任务。此外,尽管训练流程或超参数未发生任何变化,损失曲线在训练早期呈现平台期,随后突然下降至接近最优的值。为获得对这一骤降现象的可解释性见解,我们分析了转变前后模型的预测结果、注意力头和隐藏状态。具体而言,我们观察到:(a) 模型从简单复制掩码输入转变为准确预测掩码条目;(b) 注意力头转变为与任务相关的可解释模式;(c) 嵌入和隐藏状态编码了与问题相关的信息。我们还分析了单个模型组件的训练动态,以理解损失骤降的原因。

英文摘要:

Recent analysis on the training dynamics of Transformers has unveiled an interesting characteristic: the training loss plateaus for a significant number of training steps, and then suddenly (and sharply) drops to near--optimal values. To understand this phenomenon in depth, we formulate the low-rank matrix completion problem as a masked language modeling (MLM) task, and show that it is possible to train a BERT model to solve this task to low error. Furthermore, the loss curve shows a plateau early in training followed by a sudden drop to near-optimal values, despite no changes in the training procedure or hyper-parameters. To gain interpretability insights into this sudden drop, we examine the model's predictions, attention heads, and hidden states before and after this transition. Concretely, we observe that (a) the model transitions from simply copying the masked input to accurately predicting the masked entries; (b) the attention heads transition to interpretable patterns relevant to the task; and (c) the embeddings and hidden states encode information relevant to the problem. We also analyze the training dynamics of individual model components to understand the sudden drop in loss.

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

↑