Papers › SpanBERT: Improving Pre-training by Representing and Predicting Spans

SpanBERT: Improving Pre-training by Representing and Predicting Spans

24 Jul 2019TACL 2020 1arXiv:1907.10529archive 2025-07-28

Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S. Weld, Luke Zettlemoyer, Omer Levy

We present SpanBERT, a pre-training method that is designed to better represent and predict spans of text. Our approach extends BERT by (1) masking contiguous random spans, rather than random tokens, and (2) training the span boundary representations to predict the entire content of the masked span, without relying on the individual token representations within it. SpanBERT consistently outperforms BERT and our better-tuned baselines, with substantial gains on span selection tasks such as question answering and coreference resolution. In particular, with the same training data and model size as BERT-large, our single model obtains 94.6% and 88.7% F1 on SQuAD 1.1 and 2.0, respectively. We also achieve a new state of the art on the OntoNotes coreference resolution task (79.6% F1), strong performance on the TACRED relation extraction benchmark, and even show gains on GLUE.

PaperPDFConference PDFCodeCode Syntology ran

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

Syntology 15 code samples: 14 from 2 repositories linked to this paper, 1 identical to code harvested from another paper's repository. Across all 15: 9 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 0 honoured, 0 violated, 5 with no contract checked; 4 where Syntology's instrument failed) · 6 unverified. Where Syntology's instrument failed: 4 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 3 samples from 1 repository, 2 ran (0 with no instrument failure; 2 where Syntology's instrument failed); community (archive-listed): 11 samples from 1 repository, 7 ran (5 with no instrument failure; 2 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 1 of its repositories that Syntology harvested for other papers:

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

facebookresearch/SpanBERT officialmentioned in papermentioned on GitHubpytorchSyntology: 3 samples, 2 ran (2 instrument-failed) · 1 unverified report
UnknownGenie/altered-BERT-KPE mentioned on GitHubpytorchSyntology: not harvested report
amore-upf/masked-coreference mentioned on GitHubtfApache-2.0Syntology: 11 samples, 7 ran (2 instrument-failed) · 4 unverified report
mandarjoshi90/coref mentioned on GitHubtfApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Incorporating Constituent Syntax for Coreference Resolution (arXiv:2202.10710; that paper's own run record: 13 ran (of which 2 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 0 violated, 10 with no contract checked; 3 where Syntology's instrument failed) · 5 unverified); nothing checks that they implement this paper's method. report
wooseok-AI/Korean_e2e_CR_BERT mentioned on GitHubtfSyntology: not harvested report
zixinzeng-jennifer/spanbert_trans mentioned on GitHubpytorchNOASSERTIONSyntology: not harvested 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

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

4ran · our draft was wrong
5ran
6unverified

Licence: 6 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. For 2 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 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. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

facebookresearch/SpanBERT official repository 3 samples, 2 ran (2 instrument-failed) · 1 unverified
convert_examples_to_features in 134 papers code/run_tacred.py ran · our draft was wrong licence not identified · pointer only · 3860f4e19d89be73 · report fixture: signature examples:list/1/Example, label2id:dict/0/?, max_seq_length:int/0/int, tokenizer:SimpleTokenizer/0/?, special_tokens:dict/0/?, mode:str/0/str · returned list · level recorded 2026-09-22
convert_token code/run_tacred.py ran · our draft was wrong fingerprinted licence not identified · pointer only · 1731b0e57e413f9d · report fixture: signature token:str/0/str · returned str · level recorded 2026-09-22
convert_examples_to_features in 134 papers code/run_squad.py unverified licence not identified · pointer only · da5d9e9f738be2ba · report
amore-upf/masked-coreference community (archive-listed) 11 samples, 7 ran (2 instrument-failed) · 4 unverified
b_cubed in 12 papers metrics.py ran Apache-2.0 (permissive) · 599218961a8155ee · report fixture: signature clusters:list/1/list, mention_to_gold:dict/0/?, selected_mentions:NoneType/0/? · returned tuple · level recorded 2026-09-24
f1 in 57 papers metrics.py ran Apache-2.0 (permissive) here; the stored copy is pointer only · 5dc251a1bb16c94f · report fixture: signature p_num:int/0/int, p_den:int/0/int, r_num:int/0/int, r_den:int/0/int, beta:int/0/int · returned float · level recorded 2026-09-25
get_activation in 218 papers bert/modeling.py ran · our draft was wrong Apache-2.0 (permissive) · 5681f7dd9b6e3679 · report fixture: signature activation_string:str/0/str · returned function · level recorded 2026-09-22
get_doc_key in 9 papers conll.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · f300a33fe05fc609 · report fixture: signature doc_id:str/0/str, part:int/0/int · returned str · level recorded 2026-09-25
get_sentence_map minimize.py ran Apache-2.0 (permissive) · de32dc1a0c359c0d · report fixture: signature segments:list/1/list, sentence_end:list/1/int · returned list · level recorded 2026-09-24
normalize_word in 22 papers minimize.py ran fingerprinted Apache-2.0 (permissive) · 3b625164c1147fcf · report fixture: signature word:str/0/str, language:str/0/str · returned str · level recorded 2026-09-25
official_conll_eval in 8 papers conll.py ran Apache-2.0 (permissive) · 5712dc7b00cdd758 · report fixture: signature gold_path:str/0/str, predicted_path:str/0/str, metric:str/0/str, official_stdout:bool/0/bool · returned dict · level recorded 2026-09-25
evaluate_conll in 8 papers conll.py unverified Apache-2.0 (permissive) · ea92f536bea4cbd4 · report
gelu in 308 papers
census: 43 implementations from 74 papers, 6 distinct outputs on one shared input
bert/modeling.py unverified Apache-2.0 (permissive) · ecab128238ebf253 · report
get_assignment_map_from_checkpoint in 32 papers bert/modeling.py unverified Apache-2.0 (permissive) here; the stored copy is pointer only · 50958618b65e514e · report
read_doc_keys evaluate.py unverified Apache-2.0 (permissive) · edcb69a1bdf0f631 · report
Repository not located 1 sample, 0 ran · 1 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.
simple_accuracy in 66 papers repository not located unverified licence of this copy not recorded · 3c241ecfe3749a6d · report

Tasks

Coreference ResolutionLinguistic AcceptabilityNatural Language InferenceOpen-Domain Question AnsweringParaphrase IdentificationQuestion AnsweringRelation ClassificationRelation ExtractionSemantic Textual SimilaritySentiment Analysis

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Coreference Resolution OntoNotes SpanBERT F1 79.6 #11 of 26 Archive leaderboard report
Linguistic Acceptability CoLA SpanBERT Accuracy 64.3% #25 of 43 Archive leaderboard report
Natural Language Inference MultiNLI SpanBERT Matched 88.1 #16 of 67 Archive leaderboard report
Natural Language Inference QNLI SpanBERT Accuracy 94.3% #17 of 43 Archive leaderboard report
Natural Language Inference RTE SpanBERT Accuracy 79.0% #40 of 90 Archive leaderboard report
Open-Domain Question Answering SearchQA SpanBERT F1 84.8 #14 of 14 Archive leaderboard report
Paraphrase Identification Quora Question Pairs SpanBERT Accuracy 89.5 #13 of 31 Archive leaderboard report
Paraphrase Identification Quora Question Pairs SpanBERT F1 71.9 #13 of 31 Archive leaderboard report
Question Answering NaturalQA SpanBERT F1 82.5 #3 of 4 Archive leaderboard report
Question Answering NewsQA SpanBERT F1 73.6 #16 of 18 Archive leaderboard report
Question Answering SQuAD1.1 SpanBERT (single model) EM 88.8 #13 of 213 Archive leaderboard report
Question Answering SQuAD1.1 SpanBERT (single model) F1 94.6 #13 of 213 Archive leaderboard report
Question Answering SQuAD1.1 SpanBERT (single model) Hardware Burden 586G #13 of 213 Archive leaderboard report
Question Answering SQuAD2.0 SpanBERT EM 85.7 #120 of 286 Archive leaderboard report
Question Answering SQuAD2.0 SpanBERT F1 88.7 #120 of 286 Archive leaderboard report
Question Answering SQuAD2.0 dev SpanBERT F1 86.8 #6 of 13 Archive leaderboard report
Question Answering TriviaQA SpanBERT F1 83.6 #48 of 56 Archive leaderboard report
Relation Classification TACRED SpanBERT F1 70.8 #7 of 17 Archive leaderboard report
Relation Extraction Re-TACRED SpanBERT F1 85.3 #5 of 9 Archive leaderboard report
Relation Extraction TACRED SpanBERT-large F1 70.8 #22 of 40 Archive leaderboard report
Semantic Textual Similarity MRPC SpanBERT Accuracy 90.9% #8 of 45 Archive leaderboard report
Semantic Textual Similarity STS Benchmark SpanBERT Pearson Correlation 0.899 #21 of 66 Archive leaderboard report
Sentiment Analysis SST-2 Binary classification SpanBERT Accuracy 94.8 #29 of 87 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

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionSoftmaxWeight 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