自预训练让Transformer更好学注意力模式,解决监督训练失效问题
Towards Understanding Self-Pretraining for Sequence Classification

- 用掩码预测自预训练,让模型学会有用的注意力模式
- 发现标签监督在初始阶段难学注意力,而自预训练能突破此瓶颈
- 适合研究Transformer优化机制或注意力学习的读者
Amos等人(2024)表明,仅通过无外部数据或增强的掩码标记预测目标对Transformer进行自预训练(SPT),即可显著提升其在序列分类任务上的准确率。尽管该工作主要目的是展示Transformer在长程任务中的强表现,但其流程引发更根本的问题:自预训练如何引导优化至更优解?为何标准监督训练会失败?为此,我们复现并系统性地消融了Amos等人的结果。分析显示,在所研究设置中,核心瓶颈并非深度或泛化能力,而是标签监督难以从随机初始化中学习有效的查询-键注意力模式。在最小设置下,我们识别出‘学习邻近交互’——将绝对位置编码转为邻近偏好注意力得分——是自预训练带来性能提升的关键来源。最后,在简化理论框架中,我们证明标签监督可能在某些注意力方向上局部不可见,而掩码重建可检测这些方向。
原文摘要 · Abstract (English)
Amos et al. (2024) showed that the accuracy of Transformer models in sequence classification can be significantly improved by first pretraining with a masked token prediction objective without external data or augmentation, a procedure referred to as self-pretraining (SPT). While the primary objective of Amos et al. (2024) was to showcase that Transformers can achieve strong performance on the Long-Range Arena (LRA), their pipeline raises more fundamental questions: How does SPT drive optimization to better solutions? Why can standard supervised training fail in Transformers? To better understand this, we replicate and systematically ablate the findings of Amos et al. (2024). Our ablations suggest that a central bottleneck in the studied settings is not depth or generalization alone, but the ability of label supervision to learn useful query-key Attention patterns from random initialization. With a minimal setup, we identify learning proximity interactions - turning absolute positional encodings into proximity-biased Attention scores - as a key source of the improvements brought by SPT. Finally, in a simplified theoretical setup, we show that label supervision can be locally blind to certain Attention-score directions that are instead detectable through masked reconstruction.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。