这篇论文揭示了自预训练提升Transformer序列分类的核心机制——学习邻近交互注意力模式,做序列建模或注意力机制研究的开发者值得深入理解,尤其对改进长序列分类有启发。
Amos等人(2024)发现,Transformer模型在序列分类任务中,先通过掩码标记预测目标进行自预训练(SPT),无需外部数据或增强,即可显著提升准确率。本研究复现并系统消融了该发现,指出瓶颈不在于深度或泛化,而在于标签监督从随机初始化学习有用查询-键注意力模式的能力。通过最小化设置,识别出学习邻近交互——将绝对位置编码转化为邻近偏置注意力分数——是SPT改进的关键来源。在简化理论框架中,证明标签监督对某些注意力分数方向局部不可见,而掩码重建可检测这些方向。
Towards Understanding Self-Pretraining for Sequence Classification
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.