[论文解读] DeBERTa: Decoding-enhanced BERT with Disentangled Attention
DeBERTa 引入了 disentangled attention(解耦注意力)与独立的内容向量和位置信息向量,以及增强的掩码解码器,并实现尺度不变微调,以在 NLU 和 NLG 任务上超越先前的 PLM,包括在 SuperGLUE 上以 1.5B 参数模型超过人类表现。
Recent progress in pre-trained neural language models has significantly improved the performance of many natural language processing (NLP) tasks. In this paper we propose a new model architecture DeBERTa (Decoding-enhanced BERT with disentangled attention) that improves the BERT and RoBERTa models using two novel techniques. The first is the disentangled attention mechanism, where each word is represented using two vectors that encode its content and position, respectively, and the attention weights among words are computed using disentangled matrices on their contents and relative positions, respectively. Second, an enhanced mask decoder is used to incorporate absolute positions in the decoding layer to predict the masked tokens in model pre-training. In addition, a new virtual adversarial training method is used for fine-tuning to improve models' generalization. We show that these techniques significantly improve the efficiency of model pre-training and the performance of both natural language understanding (NLU) and natural langauge generation (NLG) downstream tasks. Compared to RoBERTa-Large, a DeBERTa model trained on half of the training data performs consistently better on a wide range of NLP tasks, achieving improvements on MNLI by +0.9% (90.2% vs. 91.1%), on SQuAD v2.0 by +2.3% (88.4% vs. 90.7%) and RACE by +3.6% (83.2% vs. 86.8%). Notably, we scale up DeBERTa by training a larger version that consists of 48 Transform layers with 1.5 billion parameters. The significant performance boost makes the single DeBERTa model surpass the human performance on the SuperGLUE benchmark (Wang et al., 2019a) for the first time in terms of macro-average score (89.9 versus 89.8), and the ensemble DeBERTa model sits atop the SuperGLUE leaderboard as of January 6, 2021, out performing the human baseline by a decent margin (90.3 versus 89.8).
研究动机与目标
- 在预训练效率和下游NLP性能方面提升相对于 BERT/RoBERTa 基线。
- 引入分离内容信息与位置信息的解耦注意力机制。
- 在解码阶段(增强掩码解码器)中纳入绝对位置信息,以辅助 MLM 任务。
- 应用虚拟对抗训练以实现鲁棒微调(SiFT),以提升泛化能力。
提出的方法
- 用两个向量表示每个令牌:一个用于内容,一个用于位置。
- 使用四个分量计算注意力:内容到内容、内容到位置、位置到内容,通常省略位置到位置。
- 使用固定的 2k 范围的相对位置嵌入以提高效率。
- 在 MLM 预训练期间通过增强掩码解码器在 Transformer 层之后加入绝对位置信息。
- 引入尺度不变微调(SiFT),通过扰动归一化嵌入实现对下游微调的鲁棒性。
- 在约 78–160G 的文本数据集上对大规模(1.5B)和基础的 DeBERTa 模型进行预训练,并在 GLUE/SuperGLUE/NLG 任务上评估。
实验结果
研究问题
- RQ1解耦注意力是否相对于标准自注意力在 NLP 任务上提高了性能?
- RQ2通过增强掩码解码器引入绝对位置信息对 MLM 预训练有何影响?
- RQ3SiFT 是否能提高大型 DeBERTa 模型的微调鲁棒性和泛化能力?
- RQ4与 RoBERTa、XLNet、ELECTRA 等对比,DeBERTa 在不同模型规模下的性能如何提升?
- RQ5在像 SuperGLUE 这样的挑战性基准上,DeBERTa 是否能够超过人类基线?
主要发现
| 模型 | CoLA MCC | QQP 准确率 | MNLI-m 准确率 | MNLI-mm 准确率 | SST-2 准确率 | STS-B 相关性 | QNLI 准确率 | RTE 准确率 | MRPC 准确率 | 平均值 |
|---|---|---|---|---|---|---|---|---|---|---|
| BERT large | 60.6 | 91.3 | 86.6/- | 93.2 | 90.0 | 70.4 | 92.3 | 88.0 | - | 84.05 |
| RoBERTa large | 68.0 | 92.2 | 90.2/90.2 | 96.4 | 92.4 | 93.9 | 86.6 | 90.9 | 90.9 | 88.82 |
| XLNet large | 69.0 | 92.3 | 90.8/90.8 | 97.0 | 92.5 | 94.9 | 85.9 | 90.8 | 90.8 | 89.15 |
| ELECTRA large | 69.1 | 92.4 | 90.9/- | 96.9 | 92.6 | 95.0 | 88.0 | 90.8 | 90.0 | 89.46 |
| DeBERTa large | 70.5 | 92.3 | 91.1/91.1 | 96.8 | 92.8 | 95.3 | 88.3 | 91.9 | 90.0 | 90.00 |
- DeBERTa large 在大多数 GLUE 任务上超越相同训练数据量下的 RoBERTa large 和 XLNet large,达到更高的平均分。
- 与 RoBERTa-Large 相比,DeBERTa large 在 MNLI、SQuAD 等任务取得增益(例如 MNLI +0.9%,SQuAD v2.0 +2.3%,RACE +3.6%)。
- 1.5B 的 DeBERTa 模型在 SuperGLUE 宏平均分达到 89.9,超过人类基线(89.8)。
- 基础模型 DeBERTa(12L,768 隐藏层)在消融实验中持续优于 RoBERTa 和 XLNet,在 MNLI、SQuAD、RACE 上。
- 消融结果显示移除 EMD 或任一 C2P、P2C 项都会降低各基准的性能,证实了各组件的贡献。
- 用 1.5B 参数规模扩展可以提升 NLU 和 NLG 任务的性能,并为同等规模的模型(如 T5 11B)提供更高效的能耗替代方案。
- 在 SuperGLUE 上,DeBERTa 1.5B 加上 SiFT 获得具有竞争力的分数,集成模型在 2021 年达到顶级排名。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。