Papers › DeBERTa: Decoding-enhanced BERT with Disentangled Attention

DeBERTa: Decoding-enhanced BERT with Disentangled Attention

5 Jun 2020ICLR 2021 1arXiv:2006.03654archive 2025-07-28

Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen

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).

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2006.03654")

Code

Syntology Ran 4 of 13 code samples harvested from 3 repositories linked to this paper; 9 have no recorded run. Of those that ran: 2 ran · honoured contract; 1 ran · violated contract; 1 ran · fixture could not drive it.

By repository: named in the paper: 8 samples from 1 repository, 2 ran; community (archive-listed): 4 samples from 2 repositories, 1 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

14 repositories listed; official and paper-mentioned ones first.

microsoft/DeBERTa officialmentioned in papermentioned on GitHubpytorchMIT report
huggingface/transformers mentioned in papermentioned on GitHubpytorch report
JONGWE1/Paddle-DeBERTa mentioned on GitHubpaddle report
Jason-J-Choi/DeBERTa_TxtClassifier mentioned on GitHubpytorch report
huberemanuel/DeBERTa mentioned on GitHubpytorch report
neuralmind-ai/coliee mentioned on GitHub report
osu-nlp-group/mind2web mentioned on GitHubpytorch report
pwc-1/Paper-8 mindspore report
pwc-1/Paper-8 mindspore report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 4 ran; 2 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
1ran · violated contract
1ran · fixture could not drive it
9unverified

Licence: 3 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

p2c_dynamic_expand huggingface/transformers/src/transformers/models/deberta/modeling_deberta.py named in the paper ran · honoured contract Apache-2.0 (permissive) · ae6281c3878be6f2 · report
uneven_size_corrected huggingface/transformers/src/transformers/models/deberta/modeling_deberta.py named in the paper ran · violated contract Apache-2.0 (permissive) · e2a1ad92582b1c32 · report
DisentangledSelfAttention huggingface/transformers/src/transformers/models/deberta/modeling_deberta.py named in the paper unverified Apache-2.0 (permissive) · 19acc433093c6b7f · report
build_relative_position huggingface/transformers/src/transformers/models/deberta/modeling_deberta.py named in the paper unverified Apache-2.0 (permissive) · 329f69a2123fce0a · report
build_rpos huggingface/transformers/src/transformers/models/deberta/modeling_deberta.py named in the paper unverified Apache-2.0 (permissive) · ae7fe256df7fb4a0 · report
compute_attention_span huggingface/transformers/src/transformers/models/deberta/modeling_deberta.py named in the paper unverified Apache-2.0 (permissive) · f396ca17c8d05eb5 · report
pos_dynamic_expand huggingface/transformers/src/transformers/models/deberta/modeling_deberta.py named in the paper unverified Apache-2.0 (permissive) · 39afa351a5c3eb0f · report
scaled_size_sqrt huggingface/transformers/src/transformers/models/deberta/modeling_deberta.py named in the paper unverified Apache-2.0 (permissive) · 3baad94f5c62f90f · report
build_relative_position huberemanuel/DeBERTa/DeBERTa/deberta/disentangled_attention.py community (archive-listed) ran · honoured contract MIT (permissive) · 13eb8311c1ce7813 · report
DisentangledSelfAttention huberemanuel/DeBERTa/DeBERTa/deberta/disentangled_attention.py community (archive-listed) unverified MIT (permissive) · 11b6e1335dfd930b · report
DisentangledSelfAttention Jason-J-Choi/DeBERTa_TxtClassifier/DeBERTa/DeBERTa/deberta/disentangled_attention.py community (archive-listed) unverified no licence file found · pointer only · d58dca4065cc811b · report
build_relative_position Jason-J-Choi/DeBERTa_TxtClassifier/DeBERTa/DeBERTa/deberta/disentangled_attention.py community (archive-listed) unverified no licence file found · pointer only · f786b01bf4a40368 · report
c2p_dynamic_expand identical code first harvested elsewhere ran · fixture could not drive it licence of this copy not recorded · ea37553c09194184 · report

Tasks

Common Sense ReasoningCoreference ResolutionLinguistic AcceptabilityMath Word Problem SolvingNamed Entity Recognition (NER)Natural Language InferenceNatural Language UnderstandingQuestion AnsweringReading ComprehensionSemantic Textual SimilaritySentence CompletionSentiment AnalysisWord Sense Disambiguation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Common Sense Reasoning ReCoRD DeBERTa-1.5B EM 94.1 #3 of 45 Archive leaderboard report
Common Sense Reasoning ReCoRD DeBERTa-1.5B F1 94.5 #3 of 45 Archive leaderboard report
Common Sense Reasoning SWAG DeBERTalarge Test 90.8 #1 of 5 Archive leaderboard report
Coreference Resolution Winograd Schema Challenge DeBERTa-1.5B Accuracy 95.9 #6 of 82 Archive leaderboard report
Linguistic Acceptability CoLA Dev DeBERTa (large) Accuracy 69.5 #3 of 6 Archive leaderboard report
Math Word Problem Solving ParaMAWPS DeBERTa Accuracy (%) 74.1 #2 of 6 Archive leaderboard report
Natural Language Inference CommitmentBank DeBERTa-1.5B Accuracy 97.2 #6 of 20 Archive leaderboard report
Natural Language Inference CommitmentBank DeBERTa-1.5B F1 94.9 #6 of 20 Archive leaderboard report
Natural Language Inference MultiNLI DeBERTa (large) Matched 91.1 #7 of 67 Archive leaderboard report
Natural Language Inference MultiNLI DeBERTa (large) Mismatched 91.1 #7 of 67 Archive leaderboard report
Natural Language Inference QNLI DeBERTa (large) Accuracy 95.3% #10 of 43 Archive leaderboard report
Natural Language Inference RTE DeBERTa-1.5B Accuracy 93.2% #5 of 90 Archive leaderboard report
Natural Language Inference WNLI DeBERTa Accuracy 94.5 #2 of 23 Archive leaderboard report
Question Answering BoolQ DeBERTa-1.5B Accuracy 90.4 #9 of 65 Archive leaderboard report
Question Answering COPA DeBERTa-Ensemble Accuracy 98.4 #5 of 60 Archive leaderboard report
Question Answering COPA DeBERTa-1.5B Accuracy 96.8 #7 of 60 Archive leaderboard report
Question Answering MultiRC DeBERTa-1.5B EM 63.7 #4 of 30 Archive leaderboard report
Question Answering MultiRC DeBERTa-1.5B F1 88.2 #4 of 30 Archive leaderboard report
Question Answering Quora Question Pairs DeBERTa (large) Accuracy 92.3% #2 of 19 Archive leaderboard report
Question Answering SQuAD2.0 DeBERTalarge EM 88.0 #73 of 286 Archive leaderboard report
Question Answering SQuAD2.0 DeBERTalarge F1 90.7 #73 of 286 Archive leaderboard report
Reading Comprehension RACE DeBERTalarge Accuracy 86.8 #5 of 24 Archive leaderboard report
Semantic Textual Similarity STS Benchmark DeBERTa (large) Accuracy 92.5 #64 of 66 Archive leaderboard report
Sentence Completion HellaSwag DeBERTa++ Accuracy 93 #11 of 89 Archive leaderboard report
Sentiment Analysis SST-2 Binary classification DeBERTa (large) Accuracy 96.5 #14 of 87 Archive leaderboard report
Word Sense Disambiguation Words in Context DeBERTa-Ensemble Accuracy 77.5 #4 of 37 Archive leaderboard report
Word Sense Disambiguation Words in Context DeBERTa-1.5B Accuracy 76.4 #9 of 37 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: DeBERTa

AdafactorAdamAttentionAttention DropoutBERTBPEDeBERTaDense ConnectionsDropoutGated Linear UnitInverse Square Root ScheduleLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionRoBERTaSentencePieceSoftmaxT5Weight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections