DEBERTA: DECODING-ENHANCED BERT WITH DISENTANGLED ATTENTION

Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen

TL;DR

DeBERTa (Decoding-enhanced BERT with Disentangled Attention) is a powerful evolution of the BERT architecture that treats a word's content and its relative position as separate entities. By "disentangling" these factors and introducing an enhanced decoding mechanism, DeBERTa achieved a historic milestone: becoming the first model to surpass human performance on the grueling SuperGLUE benchmark.

What Problem Does This Paper Address?

In the world of Natural Language Processing (NLP), models like BERT and RoBERTa revolutionized how computers understand text. However, they had a subtle architectural flaw: they represented each word as a single vector that was simply the sum of its content (the meaning of the word) and its absolute position (where it sits in the sentence).

The authors argue that the relationship between two words depends on their relative distance just as much as their meaning. For example, the words "deep" and "learning" have a much stronger dependency when they are next to each other than when they appear in different sentences. Standard models struggle to capture these nuances efficiently. Furthermore, while relative positions are great for understanding context, absolute positions are often necessary for the final "fill-in-the-blank" task (Masked Language Modeling) used during training.

Methods

The researchers at Microsoft introduced three primary innovations to solve these issues:

  1. Disentangled Attention: Instead of one vector per word, DeBERTa uses two. One represents the content, and the other represents the relative position. When the model calculates "attention" (how much one word should focus on another), it sums up the interactions between content-to-content, content-to-position, and position-to-content. This allows the model to understand, for instance, that a "subject" usually appears at a certain relative distance from a "verb."
  2. Enhanced Mask Decoder (EMD): The model uses relative positions throughout its many layers to understand general context. However, right at the end—when it needs to predict a missing word—it pulls in absolute position information. This helps the model distinguish between identical words in different parts of a sentence that might play different syntactic roles.
  3. Scale-invariant Fine-Tuning (SiFT): To make the model more robust during the final stages of training (fine-tuning), the authors used a virtual adversarial training method. It adds tiny, "adversarial" noise to the word embeddings. By normalizing these embeddings first, they ensured the training remained stable even as they scaled the model up to billions of parameters.

Key Insights and Ideas

  • Efficiency over Brute Force: One of the most striking findings was that a DeBERTa model trained on only half the data of RoBERTa-Large still outperformed it across almost all tasks. This suggests that architectural improvements can be more impactful than simply throwing more data at a model.
  • The "Aha" of Position-to-Content: Most previous "relative position" models only looked at how content influenced position. DeBERTa showed that the reverse—how a position influences content—is equally vital for understanding the structure of a sentence.
  • Surpassing Humans: The 1.5-billion parameter version of DeBERTa (DeBERTa-v2) achieved a macro-average score of 89.9 on SuperGLUE, edging out the human baseline of 89.8. This marked a significant "Sputnik moment" for the NLP community.

Key Results

DeBERTa was evaluated on industry-standard benchmarks including GLUE, SuperGLUE, SQuAD, and RACE, showing dominant performance across the board.

Performance of large models on the GLUE benchmark.
  • GLUE Improvements: On the GLUE benchmark, DeBERTa-Large achieved an impressive average score of 90.00, consistently beating out strong baselines like BERT, RoBERTa, XLNet, and ELECTRA.
  • SuperGLUE: DeBERTa-v2 sat atop the leaderboard, outperforming massive models like T5 (which has 11 billion parameters) despite being significantly smaller and more energy-efficient.
Performance comparison on MNLI, SQuAD, and RACE datasets.
  • Question Answering & Reading Comprehension: Compared to RoBERTa-Large, DeBERTa saw a +0.9% boost on MNLI, +2.3% on SQuAD v2.0, and a massive +3.6% on RACE.
  • Generation: In text generation tasks, DeBERTa reduced perplexity (a measure of uncertainty) from 21.6 to 19.5 on the Wikitext-103 dataset.

Limitations and Future Work

While DeBERTa is a powerhouse, the authors acknowledge several areas for growth:

  • Computational Overhead: The disentangled attention mechanism increases the computational cost of the attention layers by about 30%. While they introduced optimizations to mitigate this, it remains more complex than standard BERT.
  • Compositional Generalization: Despite beating the human baseline on benchmarks, the authors note that the model still lacks "human-level intelligence." It struggles with compositional generalization—the ability to take known components and combine them to solve entirely new, unfamiliar tasks.
  • Future Directions: The team suggests exploring how to incorporate more explicit symbolic or compositional structures into the neural network to move closer to true natural language understanding.

Summary updated

Abstract

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 understand(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, outperforming the human baseline by a decent margin (90.3 versus 89.8). The pre-trained DeBERTa models and the source code were released at: https://github.com/microsoft/DeBERTa.
BibTeX
@inproceedings{he2021deberta,
  author = {Pengcheng He and Xiaodong Liu and Jianfeng Gao and Weizhu Chen},
  title = {{DEBERTA: DECODING-ENHANCED BERT WITH DISENTANGLED ATTENTION}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=XPZIaotutsD},
}
Figure