Skip to main content
QUICK REVIEW

[论文解读] Revisiting Over-smoothing in BERT from the Perspective of Graph

Han Shi, Jiahui Gao|arXiv (Cornell University)|Feb 17, 2022
Multimodal Machine Learning Applications被引用 7
一句话总结

本文揭示了BERT中的层归一化在标准差较大时会导致表示过平滑,使其向低秩子空间收敛,进而提出了一种分层融合策略,通过自适应地结合不同层的特征来缓解此问题,在GLUE、SWAG和SQuAD基准上均实现了稳定的性能提升。

ABSTRACT

Recently over-smoothing phenomenon of Transformer-based models is observed in both vision and language fields. However, no existing work has delved deeper to further investigate the main cause of this phenomenon. In this work, we make the attempt to analyze the over-smoothing problem from the perspective of graph, where such problem was first discovered and explored. Intuitively, the self-attention matrix can be seen as a normalized adjacent matrix of a corresponding graph. Based on the above connection, we provide some theoretical analysis and find that layer normalization plays a key role in the over-smoothing issue of Transformer-based models. Specifically, if the standard deviation of layer normalization is sufficiently large, the output of Transformer stacks will converge to a specific low-rank subspace and result in over-smoothing. To alleviate the over-smoothing problem, we consider hierarchical fusion strategies, which combine the representations from different layers adaptively to make the output more diverse. Extensive experiment results on various data sets illustrate the effect of our fusion method.

研究动机与目标

  • 从图神经网络的角度探究BERT过平滑现象的根本原因。
  • 理论分析层归一化在Transformer模型中诱发过平滑的机制。
  • 提出一种分层融合策略,通过组合多层表示来降低token相似度,缓解过平滑问题。
  • 通过实证验证理论发现,并在标准NLP基准上展示性能提升。

提出的方法

  • 将自注意力矩阵建模为加权图的归一化邻接矩阵,将BERT与图卷积网络联系起来。
  • 理论上证明:若层归一化的标准差足够大,则输出将收敛至低秩子空间,导致过平滑。
  • 提出三种融合策略——拼接融合、最大融合与门控融合,以自适应地结合不同层的表示。
  • 采用可学习的门控机制,根据输入token动态分配各层表示的重要性权重。
  • 通过余弦相似度和性能指标,在预训练BERT及微调模型上实证验证理论条件。
  • 可视化注意力权重与token相似度,以证明过平滑现象减少及表示多样性提升。

实验结果

研究问题

  • RQ1从图论视角看,BERT中过平滑现象的根本原因是什么?
  • RQ2层归一化如何在Transformer模型中导致过平滑现象?
  • RQ3多层表示融合能否有效降低token相似度并提升模型性能?
  • RQ4不同融合策略(拼接、最大、门控)是否在多样化的NLP基准上均带来一致的性能提升?
  • RQ5动态融合权重在不同token间如何变化?其分布是否与语义重要性一致?

主要发现

  • 当层归一化的标准差足够大时,BERT输出会收敛至低秩子空间,从而引发过平滑。
  • 实证分析证实,理论中导致过平滑的条件在真实预训练和微调的BERT模型中均成立。
  • 所提出的门控融合策略表现最佳,在GLUE(如SQuAD v1.1的F1提升+0.5)、SWAG(准确率82.1%)和SQuAD v2.0(F1 77.3%)上均优于BERT基线模型。
  • 在使用融合方法时,最终层的token级余弦相似度降低,尤其在STS-B数据集上表现明显,表明过平滑现象减少。
  • 可视化结果表明,高语义价值的token(如“women”、“fish”)更倾向于使用深层表示,而常见词(如“is”、“a”)则更偏好浅层表示。
  • 分层融合策略在多种NLP任务中均一致提升性能,包括文本分类、常识推理和问答任务。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。