DeBERTa (Decoding-enhanced BERT with disentangled attention) is a language model that improves on BERT and RoBERTa by keeping the "content" and "position" of each word in separate vectors and computing attention weights separately for content-to-content and content-position combinations. It was proposed by He et al. at Microsoft in 2020 and presented at ICLR 2021.
BERT adds the word embedding and the position embedding at the input layer into a single vector and uses it in all layers. DeBERTa introduces two improvements here:
- Disentangled attention: content vectors and relative position vectors are kept separate, and the attention weight is computed as the sum of three parts: "content β content," "content β position," and "position β content." This is because the relationship between two words depends not only on the words themselves but also on how far apart they are. For example, "deep" and "learning" are much more strongly related when they are next to each other than when they appear in different sentences.
- Enhanced mask decoder (EMD): the encoder uses only relative positions, and the absolute position in the sentence is added only in the decoder, right before predicting the masked words.
For fine-tuning, the paper also proposes SiFT, a virtual adversarial training method that normalizes the embeddings before adding small perturbations.
In the paper, with about half of RoBERTa-Large's training data (78GB vs. 160GB), DeBERTa outperforms it across a wide range of tasks: 91.1% accuracy on MNLI (RoBERTa: 90.2%), 90.7 F1 on SQuAD v2.0 (88.4), and 86.8% accuracy on RACE (83.2%). A version scaled up to 1.5 billion parameters reached a macro average of 89.9 on SuperGLUE, surpassing the human score (89.8) for the first time.

