[论文解读] ContraNorm: A Contrastive Learning Perspective on Oversmoothing and Beyond
ContraNorm 引入一种对比-统一性灵感的归一化层,以缓解 GNNs 和 Transformer 的过平滑和维度崩溃,并在 BERT/ALBERT、DeiT、GCN 骨干上具有理论保证和广泛的经验收益。
Oversmoothing is a common phenomenon in a wide range of Graph Neural Networks (GNNs) and Transformers, where performance worsens as the number of layers increases. Instead of characterizing oversmoothing from the view of complete collapse in which representations converge to a single point, we dive into a more general perspective of dimensional collapse in which representations lie in a narrow cone. Accordingly, inspired by the effectiveness of contrastive learning in preventing dimensional collapse, we propose a novel normalization layer called ContraNorm. Intuitively, ContraNorm implicitly shatters representations in the embedding space, leading to a more uniform distribution and a slighter dimensional collapse. On the theoretical analysis, we prove that ContraNorm can alleviate both complete collapse and dimensional collapse under certain conditions. Our proposed normalization layer can be easily integrated into GNNs and Transformers with negligible parameter overhead. Experiments on various real-world datasets demonstrate the effectiveness of our proposed ContraNorm. Our implementation is available at https://github.com/PKU-ML/ContraNorm.
研究动机与目标
- 动机化并刻画 GNN 与 Transformer 中超平滑现象,超越完全崩溃,将维度崩溃作为一个关键问题。
- 利用对比学习的洞见,尤其是统一性,来设计一种自然防止崩塌的归一化机制。
- 将 ContraNorm 发展为一种以优化驱动的归一化,具有最小的参数开销与易于插入的能力。
- 在给定条件下提供理论保证,表明 ContraNorm 能缓解完整崩塌和维度崩塌。
- 在 NLP(GLUE 上的 BERT/ALBERT)、视觉(ImageNet 上的 DeiT)以及图学习(节点分类上的 GCN)等领域进行经验验证。
提出的方法
- 使用有效秩(erank)作为诊断指标,将过平滑与维度崩塌联系起来。
- 将对比学习中的统一性损失转移到作用于表征的能量函数上,然后将其优化展开为前向层更新。
- 推导 ContraNorm 为一个与软化的自注意力项成正比的表示更新规则,另有一个 stop-gradient 变体以稳定训练。
- 给出两种实际实现:(i) 使用特征范数正则化或 LayerNorm 的 ContraNorm,以及 (ii) 面向大规模图的 ContraNorm-D。
- 在理论上将更新与维度崩塌目标(erank)联系起来,并证明 erank 增加的条件。
- 提供一个受去相关化方法(如 Barlow Twins)启发的对偶版本(ContraNorm-D),用于可扩展性。
实验结果
研究问题
- RQ1维度崩塌(超越完全崩塌)是否能够捕捉深层 GNN 与 Transformer 的过平滑现象,如何测量?
- RQ2以对比统一性为灵感的归一化层是否可在最小开销下缓解维度崩塌?
- RQ3ContraNorm 对表示方差和有效秩的理论影响是什么,在何种条件下它能够缓解过平滑?
- RQ4Can ContraNorm improve performance across diverse domains—NLP, vision, and graph learning—without extensive parameter tuning?
- RQ5在实践中,ContraNorm 与现有归一化方法(如 LayerNorm、PairNorm)在防止过平滑方面的对比如何?
主要发现
- ContraNorm 在 GLUE 上以 BERT/ALBERT 骨干相较于原生模型取得提升(BERT 平均分从 82.59% 提升至 83.39%,ALBERT 从 83.74% 提升至 84.67%)。
- 在视觉领域,ContraNorm 在 ImageNet100 和 ImageNet1k 的不同深度上提升 DeiT,取得显著增益(例如 ImageNet100 在 12/16/24 层均显示出持续的准确度提升)。
- 在图学习方面,ContraNorm 在若干层深度区间优于原生 GCN 与竞争方法,展现出对深层过平滑比 LayerNorm 和 PairNorm 更强的抵抗力(涵盖 Cora、Citeseer、Chameleon、Squirrel 数据集)。
- 该方法模块化,可在表示层之后接入,参数开销极小,且可扩展的变体(ContraNorm-D)适用于大规模图。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。