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 ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

No sample from the archive's official repository (microsoft/DeBERTa) is linked to this paper; the 12 samples below come from 3 repositories the archive does not mark official, and 1 more is identical to code Syntology harvested from another paper's repository. Syntology harvested code from microsoft/DeBERTa for another paper.

microsoft/DeBERTa: Syntology's graph links these samples to DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with... (arXiv:2111.09543; that paper's own run record: 6 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method.

Syntology 13 code samples: 12 from 3 repositories linked to this paper, 1 identical to code harvested from another paper's repository. Across all 13: 4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 2 honoured, 1 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 9 unverified. Where Syntology's instrument failed: 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: named in the paper: 8 samples from 1 repository, 2 ran (2 with no instrument failure; 0 where Syntology's instrument failed); community (archive-listed): 4 samples from 2 repositories, 1 ran (1 with no instrument failure; 0 where Syntology's instrument failed); 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.

No sample is linked to this paper from 4 of its repositories that Syntology harvested for other papers:

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

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

microsoft/DeBERTa officialmentioned in papermentioned on GitHubpytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with... (arXiv:2111.09543; that paper's own run record: 6 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified); nothing checks that they implement this paper's method. report
huggingface/transformers mentioned in papermentioned on GitHubpytorchSyntology: 8 samples, 2 ran (0 instrument-failed) · 6 unverified report
JONGWE1/Paddle-DeBERTa mentioned on GitHubpaddleSyntology: not harvested report
Jason-J-Choi/DeBERTa_TxtClassifier mentioned on GitHubpytorchSyntology: 2 samples, 0 ran · 2 unverified report
huberemanuel/DeBERTa mentioned on GitHubpytorchSyntology: 2 samples, 1 ran (0 instrument-failed) · 1 unverified report
neuralmind-ai/coliee mentioned on GitHubSyntology: not harvested report
osu-nlp-group/mind2web mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Mind2Web: Towards a Generalist Agent for the Web (arXiv:2306.06070; that paper's own run record: 0 ran · 1 unverified); nothing checks that they implement this paper's method. report
2024-MindSpore-1/Code2 mindsporeSyntology: not harvested report
2024-MindSpore-1/Code2 mindsporeSyntology: not harvested report
Mind23-2/MindCode-161 mindsporeSyntology: not harvested report
MindCode-4/code-3 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to MathOdyssey: Benchmarking Mathematical Problem-Solving Skills in Large Language Models... (arXiv:2406.18321; that paper's own run record: 5 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
MindCode-4/code-3 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to MathOdyssey: Benchmarking Mathematical Problem-Solving Skills in Large Language Models... (arXiv:2406.18321; that paper's own run record: 5 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
pwc-1/Paper-8 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to MathOdyssey: Benchmarking Mathematical Problem-Solving Skills in Large Language Models... (arXiv:2406.18321; that paper's own run record: 5 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
pwc-1/Paper-8 mindsporeSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to MathOdyssey: Benchmarking Mathematical Problem-Solving Skills in Large Language Models... (arXiv:2406.18321; that paper's own run record: 5 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

13 samples harvested: 4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 2 honoured, 1 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 9 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · honoured contract
1ran · violated contract
1ran; the contract check could not run
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; the list below is grouped by repository, each group headed by its name and what it is to the paper. 1 sample is listed last, in a group without a repository. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

huggingface/transformers named in the paper 8 samples, 2 ran (0 instrument-failed) · 6 unverified
p2c_dynamic_expand src/transformers/models/deberta/modeling_deberta.py ran · honoured contract Apache-2.0 (permissive) · ae6281c3878be6f2 · report fixture: returned Tensor · level recorded 2026-09-22
uneven_size_corrected src/transformers/models/deberta/modeling_deberta.py ran · violated contract Apache-2.0 (permissive) · e2a1ad92582b1c32 · report fixture: returned Tensor · level recorded 2026-09-22
DisentangledSelfAttention src/transformers/models/deberta/modeling_deberta.py unverified Apache-2.0 (permissive) · 19acc433093c6b7f · report
build_relative_position in 17 papers src/transformers/models/deberta/modeling_deberta.py unverified Apache-2.0 (permissive) · 329f69a2123fce0a · report
build_rpos src/transformers/models/deberta/modeling_deberta.py unverified Apache-2.0 (permissive) · ae7fe256df7fb4a0 · report
compute_attention_span src/transformers/models/deberta/modeling_deberta.py unverified Apache-2.0 (permissive) · f396ca17c8d05eb5 · report
pos_dynamic_expand src/transformers/models/deberta/modeling_deberta.py unverified Apache-2.0 (permissive) · 39afa351a5c3eb0f · report
scaled_size_sqrt src/transformers/models/deberta/modeling_deberta.py unverified Apache-2.0 (permissive) · 3baad94f5c62f90f · report
Jason-J-Choi/DeBERTa_TxtClassifier community (archive-listed) 2 samples, 0 ran · 2 unverified
DisentangledSelfAttention DeBERTa/DeBERTa/deberta/disentangled_attention.py unverified no licence file found · pointer only · d58dca4065cc811b · report
build_relative_position in 17 papers DeBERTa/DeBERTa/deberta/disentangled_attention.py unverified no licence file found · pointer only · f786b01bf4a40368 · report
huberemanuel/DeBERTa community (archive-listed) 2 samples, 1 ran (0 instrument-failed) · 1 unverified
build_relative_position in 17 papers DeBERTa/deberta/disentangled_attention.py ran · honoured contract MIT (permissive) · 13eb8311c1ce7813 · report fixture: signature query_size:int/0/int, key_size:int/0/int, device:device/0/? · returned Tensor · level recorded 2026-09-22
DisentangledSelfAttention DeBERTa/deberta/disentangled_attention.py unverified MIT (permissive) · 11b6e1335dfd930b · report
Repository not located 1 sample, 1 ran (1 instrument-failed) · 0 unverified
1 sample is identical to code Syntology harvested from another paper's repository; this paper's own copy was not located, so no repository is named and no licence is recorded.
c2p_dynamic_expand in 9 papers repository not located ran; the contract check could not run (RAISES) · metamorphic tier: invariant licence of this copy not recorded · ea37553c09194184 · report fixture: returned Tensor · level recorded 2026-09-22

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.

3 assemblies on this paper: 3 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).

3 sibling assemblies for disentangled attention mechanism (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for disentangled attention mechanism (graph method: disentangled attention mechanism). 9 bricks; individually on a fixture: 3 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 1 honoured, 1 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 6 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. DisentangledSelfAttention entry · level 0 · unverified · 19acc433093c6b7f
  2. build_relative_position helper · level 0 · unverified · 329f69a2123fce0a
  3. build_rpos helper · level 0 · unverified · ae7fe256df7fb4a0
  4. c2p_dynamic_expand helper · level 1 · ran; the contract check could not run (RAISES) · ea37553c09194184
  5. compute_attention_span helper · level 0 · unverified · f396ca17c8d05eb5
  6. p2c_dynamic_expand helper · level 1 · ran · honoured contract · ae6281c3878be6f2
  7. scaled_size_sqrt helper · level 0 · unverified · 3baad94f5c62f90f
  8. uneven_size_corrected helper · level 1 · ran · violated contract · e2a1ad92582b1c32
  9. pos_dynamic_expand helper · level 0 · unverified · 39afa351a5c3eb0f

harvested Assembly for disentangled attention mechanism (graph method: disentangled attention mechanism). 5 bricks; individually on a fixture: 3 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 2 honoured, 0 violated, 0 with no contract checked; 1 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. DisentangledSelfAttention entry · level 0 · unverified · 11b6e1335dfd930b
  2. build_relative_position helper · level 1 · ran · honoured contract · 13eb8311c1ce7813
  3. c2p_dynamic_expand helper · level 1 · ran; the contract check could not run (RAISES) · ea37553c09194184
  4. p2c_dynamic_expand helper · level 1 · ran · honoured contract · ae6281c3878be6f2
  5. pos_dynamic_expand helper · level 0 · unverified · 39afa351a5c3eb0f

harvested Assembly for disentangled attention mechanism (graph method: disentangled attention mechanism). 3 bricks; individually on a fixture: 0 ran · 3 unverified. The assembly has not been run end-to-end.

one of 3 siblings

  1. DisentangledSelfAttention entry · level 0 · unverified · d58dca4065cc811b
  2. build_relative_position helper · level 0 · unverified · f786b01bf4a40368
  3. make_log_bucket_position helper · level 0 · unverified · 29371b9c270911e1

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2006.03654") returns these assemblies with each brick's role and wiring (how to connect).

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