Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

DeBERTa: Decoding-enhanced BERT with Disentangled Attention

  • Problem BERT adds position to each word's input vector, so a token's content and position cannot be weighted separately in attention, and absolute positions are not available where masked words are predicted.
  • Method Each token gets separate content and relative-position vectors, so each attention score splits into content and position terms. Absolute positions are added only in a decoder before the masked-token softmax, and SiFT normalizes word embeddings before adversarial perturbation during fine-tuning.
  • Results DeBERTa large averages 90.00 on the GLUE development set, above RoBERTa-Large at 88.82. The single DeBERTa1.5B model with SiFT reaches a SuperGLUE test macro-average of 89.9, against 89.8 for the human baseline.

Where position enters BERT-style attention

In BERT, each input word is a single vector formed by adding its word embedding and its position embedding. Self-attention has no built-in sense of word order, so existing models add a positional bias, usually an absolute position embedding or a relative position embedding. Relative position encodings in earlier work usually enter the attention through only the content-to-content and content-to-position terms.

Masked-word prediction also needs absolute positions, because two words with similar local contexts can play different syntactic roles. DeBERTa answers this with two architectural changes: a disentangled attention mechanism in the Transformer layers and an enhanced mask decoder that adds absolute positions only at the output.

Splitting attention into four content and position terms

Each token at position i has a content vector H_i and a position vector P_{i|j} that describes its position relative to token j, so the two roles are held in separate vectors. The score between tokens i and j is the sum of four products, written as follows. \[ A_{i,j}=H_iH_j^\top+H_iP_{j|i}^\top+P_{i|j}H_j^\top+P_{i|j}P_{j|i}^\top \] The four products are content-to-content, content-to-position, position-to-content and position-to-position.

The position-to-position product is dropped, because with relative position embeddings it adds little information.

The relative distance δ(i,j) is 0 when i−j is at most −k, 2k−1 when i−j is at least k, and i−j+k otherwise, so it takes values in the range from 0 up to 2k. Content vectors are projected into query, key and value matrices Q^c, K^c and V^c, while the relative position matrix P is projected into relative query and key matrices Q^r and K^r. The matrix P is shared across all layers and stays fixed during forward propagation.

The attention score combines the three terms, with the content-to-position term reading K^r at δ(i,j) and the position-to-content term reading Q^r at δ(j,i). \[ \tilde A_{i,j}=Q^c_iK^{c\top}_j+Q^c_iK^{r\top}_{\delta(i,j)}+K^c_jQ^{r\top}_{\delta(j,i)} \] The position-to-content term uses δ(j,i) because it asks how the key at j relates to the query at position i, so the relative distance runs from j to i.

The scores are scaled by a factor of 1/√(3d) before the softmax, which the authors say matters for stabilizing training, especially for large PLMs. \[ H^o=\operatorname{softmax}\left(\frac{\tilde A}{\sqrt{3d}}\right)V^c \]

Reusing one relative table across queries

Storing a relative position embedding for every token would need space that grows as O(N²d) for a sequence of length N. Because δ(i,j) takes only 2k values, all relative embeddings come from a single matrix K^r of size 2k by d, which every query can reuse. Algorithm 1 multiplies each query by K^r transposed and reads the entries back with δ as the index, and it computes the position-to-content scores by multiplying each key by Q^r transposed and indexing the same way.

Pre-training sets the maximum relative distance k to 512. Storing K^r and Q^r reduces the space complexity to O(kd).

Absolute positions at the decoder

In masked language modeling, about 15% of tokens are chosen at random and the model predicts them from the corrupted sequence. Among the chosen tokens, BERT keeps 10% unchanged, replaces 10% with random tokens and replaces the rest with the mask token.

In the sentence about a new store and a new mall, both masked words follow "new" at the same relative offset, so relative information alone cannot tell which one is the subject. Syntactic roles depend heavily on where words sit in the sentence, so absolute positions supply information that the relative terms do not.

BERT places absolute positions in the input layer, whereas DeBERTa adds them after all Transformer layers and before the softmax that predicts masked tokens. This keeps relative positions in every Transformer layer and uses absolute positions only as complementary information when decoding the masked words. The authors conjecture that adding absolute positions early, as BERT does, could hinder the model from learning relative-position information.

In their empirical comparison, the decoder placement works much better than the input-layer placement. The decoder also leaves room for other information besides position, which the authors leave to future work.

Perturbing normalized embeddings in SiFT

Virtual adversarial training regularizes a model so that its output distribution on an input matches its output distribution on a small adversarial perturbation of that input. For NLP tasks the perturbation is applied to word embeddings rather than to the word sequence. Embedding norms differ across words and models, and the spread grows for models with billions of parameters, which makes adversarial training less stable.

SiFT normalizes each word embedding into a stochastic vector before applying the perturbation, an idea inspired by layer normalization. The authors report that this normalization substantially improves the performance of fine-tuned models, and that the gain is larger for larger DeBERTa models.

Large-model results on GLUE and NLU benchmarks

Large models follow BERT's pre-training setting but use the BPE vocabulary of Radford et al. (2019) and Liu et al. (2019c). Pre-training data are Wikipedia (12GB), BookCorpus (6GB), OPENWEBTEXT (38GB) and STORIES (31GB), about 78G after deduplication.

On the GLUE development set, DeBERTa large averages 90.00, above RoBERTa-Large at 88.82, XLNet-Large at 89.15 and ELECTRA-Large at 89.46. These comparisons are not matched on data: RoBERTa, XLNet and ELECTRA use 160G of training data, while DeBERTa uses 78G. DeBERTa runs one million steps with 2K samples per step, about two billion samples, roughly half the four billion of RoBERTa and XLNet.

DeBERTa outperforms XLNet on six of the eight GLUE tasks, with gains of 1.1% on MRPC, 2.4% on RTE and 1.5% on CoLA over XLNet.

With a model trained on half the training data of RoBERTa-Large, DeBERTa is reported at +0.9% on MNLI (90.2% vs. 91.1%), +2.3% on SQuAD v2.0 (88.4% vs. 90.7%) and +3.6% on RACE (83.2% vs. 86.8%).

Megatron 1.3B is about three times larger than DeBERTa, and DeBERTa outperforms it on three of the four benchmarks. ALBERT-xxlarge is included as a larger reference, with a hidden dimension four times DeBERTa's and about four times the computation cost.

Base-size comparison and component ablation

DeBERTa base uses the same 78G data, while RoBERTa and XLNet base are trained on 160G of text.

On MNLI-m, DeBERTa base reaches 88.8 against 87.6 for RoBERTa base (+1.2%) and 86.8 for XLNet base (+2%).

The ablation uses a lighter setting: Wikipedia and BookCorpus for 1M steps with batch size 256, about 7 days on a DGX-2 with 16 V100 GPUs. Three variants are tested: -EMD (no enhanced mask decoder), -C2P (no content-to-position term) and -P2C (no position-to-content term). The authors note that -P2C is close to XLNet plus EMD, since XLNet also uses relative position bias.

RoBERTa-ReImp, the re-pre-trained RoBERTa base in this setting, performs similarly to RoBERTa, which the authors use to check the setup.

DeBERTa base scores 86.3/86.2 on MNLI-m/mm, 92.1/86.1 on SQuAD v1.1, 82.5/79.3 on SQuAD v2.0 and 71.7 on RACE. Removing the enhanced mask decoder gives 70.3 on RACE and 81.3/78.0 on SQuAD v2.0, and removing the content-to-position term gives 69.3 on RACE and 81.3/78.3 on SQuAD v2.0. Removing the position-to-content term gives 69.6 on RACE and 80.8/77.6 on SQuAD v2.0, and removing both the enhanced mask decoder and content-to-position gives 68.1 on RACE.

Relative to the full model, removing the enhanced mask decoder costs 1.4% on RACE (71.7% vs. 70.3%), 0.3% on SQuAD v1.1 and 1.2% on SQuAD v2.0 (82.5% vs. 81.3%), with 0.2% on MNLI-m and 0.1% on MNLI-mm. In these base runs, removing either relative term lowers scores on every benchmark, and removing two components lowers them further.

Scaling to 1.5B parameters and SuperGLUE

DeBERTa1.5B has 48 layers, a hidden size of 1,536 and 24 attention heads, and it is trained on 160G of data with a new 128K vocabulary. The projection matrices of the relative position embeddings are shared with the content projection matrices in all attention layers, which reduces the number of parameters. The authors cite a base-model ablation in Table 13, which they say shows the sharing reduces model size while keeping performance.

A convolution layer sits beside the first Transformer layer to capture n-gram knowledge of sub-word encodings, and its output is summed before the next Transformer layer.

SuperGLUE test scores come from the evaluation server, and the results were obtained on January 6, 2021. DeBERTa1.5B+SiFT scores 89.9 macro-average, against 89.8 for the human baseline and 89.3 for T5 with 11B parameters. The authors attribute the single-model result to scaling DeBERTa to a larger model, as of December 29, 2020. The DeBERTaEnsemble reaches 90.3 and sits atop the SuperGLUE leaderboard as of January 6, 2021.

The authors also argue that the 1.5B model is more energy efficient to train and maintain than T5 with 11 billion parameters, and easier to compress and deploy.

Limitations

The ablation numbers come from the base setting, with Wikipedia and BookCorpus for 1M steps at batch size 256, and are not large-model results. SiFT was applied only to DeBERTa1.5B on SuperGLUE tasks, and the authors plan a more comprehensive study of SiFT in future work.

The authors state that DeBERTa is by no means at human-level natural language understanding, despite its SuperGLUE result. They point to compositional generalization as the missing capability and leave explicit compositional structure in DeBERTa to future work.

The large-model GLUE and MNLI comparisons use different data budgets, with 78G for DeBERTa and 160G for RoBERTa, XLNet and ELECTRA. The authors note that the T5 results they cite are test results that are not comparable with other models. The EMD versus input-layer comparison is described as much better for EMD, with no numbers given for that comparison in this text.

Perplexity on Wikitext-103 falls from 21.6 to 19.5 with DeBERTa, and no setup for that NLG evaluation is described in this text.

Paper info

Authors
Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen
Venue
arXiv · Preprint
First published
2020-6-5
Added
2026-10-20
Updated
2021-10-6
Version
v6
arXiv
2006.03654
Category
cs.CL · cs.LG
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen (2020). DeBERTa: Decoding-enhanced BERT with Disentangled Attention. arXiv:2006.03654v6. https://arxiv.org/abs/2006.03654v6

BibTeX
@misc{he2020deberta,
  title = {{DeBERTa: Decoding-enhanced BERT with Disentangled Attention}},
  author = {Pengcheng He and Xiaodong Liu and Jianfeng Gao and Weizhu Chen},
  year = {2020},
  eprint = {2006.03654},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.03654v6}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up