Elamur Research

SpanBERT: Improving Pre-training by Representing and Predicting Spans

Paper · 2019 · Mandar Joshi, Danqi Chen, Yinhan Liu et al.

Summary

A reader looking for an answer in a passage frequently needs to recognize a stretch of words as a unit. The same is true when a reader decides that a description and a name refer to the same person. SpanBERT asks whether the training that precedes these tasks can give an encoder more practice with such units. Its starting point is the masked prediction task in BERT. BERT selects individual tokens for prediction, and a token may be just part of a word. The pieces left visible can make the missing piece easy to guess. SpanBERT selects adjacent complete words, so a prediction more often calls for evidence from the text around the selected stretch. Its most direct applications are extractive question answering and document-level coreference resolution.

SpanBERT adds a second route for making each prediction. Ordinary masked prediction uses the encoder’s output at the selected position. The added span boundary objective uses the outputs immediately before and after the selected interval, plus a learned vector that specifies which position inside it to predict. Both predictions are scored against the original token, and both contribute to training. The authors also change where the surrounding text comes from. Each example is an uninterrupted passage from a document, up to 512 tokens long. This replaces the paired segments used for BERT’s next sentence prediction task and allows the authors to dispense with that task.

The authors build on a tuned BERT reproduction and also test a version of it that already uses continuous passages. The comparison retains the BERT-large encoder configuration and the BooksCorpus and English Wikipedia training material. A single SpanBERT system reaches 94.6% F1 on the SQuAD 1.1 test set and 88.7% F1 on the SQuAD 2.0 test set. Its gains extend across the additional extractive reading datasets evaluated through MRQA. On the OntoNotes coreference test set, SpanBERT reaches 79.6% on the benchmark’s average F1 measure, against the previous best of 73.0%. It also improves on the tuned BERT reproduction on TACRED relation extraction and makes gains on parts of GLUE.

The results give different parts of the training recipe different weight. A large share of the improvement on TACRED appears as soon as the authors switch to continuous passages and remove next sentence prediction. For the MRQA datasets, the larger share comes when they add span masking and the boundary objective. Coreference gives the clearest reason to distinguish those last changes. Masking stretches on its own can lose to selecting individual sub-word pieces in the masking comparison, while adding boundary prediction yields a sizable gain in the auxiliary-objective comparison. The paper’s evidence concerns both the content an encoder learns to recover and the positions from which it learns to make that content accessible.

Deep dive: SpanBERT: Improving Pre-training by Representing and Predicting Spans

SpanBERT trains BERT to recover missing stretches of text from their surroundings, improving answer selection and the linking of mentions across documents. · about 78 minutes to read

The problem and its context

An answer occupies an interval

Consider a question about which team won a championship. A passage might name the winner, but selecting the name requires deciding what sort of expression qualifies as an answer and where that expression stops. In the authors’ example, the question describes the winner as an NFL team and the answer names the Denver Broncos. The relation between the description in the question and the name in the passage matters. So does the completeness of the extracted answer. An output containing only the first word of the name falls short even if it points to the right location.

There is a corresponding question about how to prepare an encoder for this decision using ordinary writing. Give it a sentence in which only Denver has been suppressed and the presence of Broncos may be a strong clue. Suppress the complete name and that clue disappears. The remainder of the sentence may still indicate that the missing material names a team, or even narrow down which team is likely. How much can be inferred varies from passage to passage. The example gives the authors a concrete way to distinguish guessing a component of a visible expression from using the expression’s surroundings to infer its content.

The term span has a straightforward meaning here. A span consists of consecutive positions in the text. A team name is an intuitive example because its words form a recognizable unit, but an interval used in pretraining can start or finish in less convenient places. It can include part of a phrase along with words that belong with the next phrase. The endpoints supply a way to refer to the interval even in such cases. The proposed masking scheme needs word boundaries and an ordering of words. A grammatical label for each interval is unnecessary.

Other tasks assign spans different roles. In coreference, a name and a later description can be candidates for a link because both may refer to the same entity. The choice concerns two expressions and what they refer to in context. In relation extraction, the subject and object expressions are supplied, and the system must decide what the sentence says about their relationship. These tasks put different demands on the encoder. The recurring feature is that downstream evidence can be attached to a region containing several tokens, and the identity of any single token may give only part of that evidence.

Answer selection makes the issue particularly visible because the output can be specified by the start and end of a passage interval. Mention linking illustrates another use of endpoint information. The coreference system in the paper compares representations of possible mentions. Since those mentions can vary in length, each needs a representation the scoring function can accept regardless of how many tokens were involved. Earlier span-based systems discussed by the authors use endpoints to help construct such representations. They give SpanBERT a concrete reason to ask what information the contextual outputs at particular positions carry.

What masked prediction teaches

The framework the authors inherit already provides a way to extract training targets from unlabeled documents. Start with an intact sequence and remember the tokens at selected positions. Alter the sequence, run an encoder over it, and use the remembered tokens as the correct answers. Each document supplies its own supervision. After pretraining, a system can learn a task’s particular output using labeled examples, a stage known as fine-tuning.

BERT’s encoder belongs to the architecture introduced in Attention Is All You Need. It produces an output vector for each input position. Such a vector is contextual: it comes from processing the sequence, so the same written word in a different passage can have a different output. SpanBERT retains this per-position interface. Its changes concern the material that reaches the encoder, the prediction targets that material supplies, and which output vectors a prediction can use. The interface comes from the Transformer.

One reason to distinguish the text from the encoder’s sequence of positions is that the encoder uses WordPiece. A written word can occupy several positions, with a token assigned to each piece. A corruption scheme working at the token level can therefore select a position inside a word while leaving other positions of the same word untouched. That makes a partially revealed word a possible source of evidence about its own missing piece. Grouping positions by written word changes the evidence before the encoder starts any computation. This distinction comes from subword tokenization.

The masked language modeling objective, abbreviated MLM, is the ordinary masked-token prediction task in the paper. A prediction uses the contextual output at the position whose original token is being sought. Though that position might now contain a mask marker, the output vector can reflect words elsewhere in the sequence. This gives BERT a mechanism for inferring missing content from context. The fact that the prediction is read at the selected position tells us where the loss is attached, while the encoder’s contextual computation determines what evidence that output can draw upon.

There are two aspects of this training task to keep distinct. The selection rule chooses the positions whose original identities will be scored. The replacement rule decides what token the encoder will actually see at each selected position. Some selected positions keep their original token. Some show a random replacement. Others show a special marker. Through all of these cases the correct answer is the original identity. The term masked in discussions of the objective frequently refers to selection for prediction, including positions given an unchanged input.

SpanBERT’s proposal starts with this separation. When a span is chosen, the grouping affects which positions are selected together. Applying the replacement decision to the whole span then affects which clues are visible together. Finally, the auxiliary objective changes the outputs from which the original identities must be recoverable. One can hide adjacent words and still use only the standard MLM readout. One can also ask for predictions through a pair of surrounding outputs. The authors’ design makes those distinct interventions, with separate roles in the learning problem.

Why the location of a prediction matters

Suppose the selected positions all show mask symbols. The encoder still returns an output for each of those positions, and the MLM predictor has a specific place to look for each original token. A target near the beginning of the interval gets a prediction from its own output. So does a target near the end. This setup gives the encoder room to produce a different representation at every missing position. Their supervision need place no direct demand on a pair of outputs to support predictions for all of them.

A downstream task may make a different kind of access practical. An answer head scores possible starts and ends. A mention scorer can use a pair of endpoint vectors even when the number of tokens between them varies. The authors ask whether pretraining could give convenient positions like these a more active role. If many predictions for an interval all have to be made through the same two contextual vectors, the learning signal gives those vectors a reason to carry evidence relevant to the stretch as a whole.

There is an important detail in how the paper makes this idea concrete. The auxiliary predictor uses the immediate neighbors outside a selected interval. Those are the positions available at its edges when the inside has been corrupted. A later task can instead read the first and last positions of a visible answer or mention. The two tasks share the idea of making use of representations at a span’s edges. They give those representations different exact positions and different jobs. The pretraining task is a way to shape the encoder before the supervised task assigns its own jobs.

Asking the same boundary pair to support predictions throughout a span also creates a small design problem. The predictor needs a way to tell which slot to recover on a given invocation. SpanBERT achieves that with a relative position input. This preserves the shared contextual evidence for the interval while allowing the prediction to change with the requested slot. The intended result is an encoder whose outputs are useful for recovering content across a span and which still receives the familiar supervision at each selected position.

The second BERT objective changes the examples

Next sentence prediction, abbreviated NSP, gives the original BERT setup another use for raw documents. It creates a training pair by taking a segment from the corpus and choosing a second segment. The second can be its actual continuation, or it can come from elsewhere in the corpus. This choice generates the label. The encoder receives the combined input with separator and classification markers. The classification output is trained to distinguish the continuation from the unrelated sample.

The two segments play roles in masked prediction as well. Both are present when the encoder computes its outputs, so the content of the second segment can enter the context for recovering a token in the first. The token allowance for the input also has to accommodate both. For a true continuation, the two parts preserve a connection to the source document. A segment sampled elsewhere instead uses some of that allowance for text that does not continue the passage.

SpanBERT makes the construction of these examples a subject of investigation. The authors consider spending the available positions on a single contiguous stretch, keeping its document order and letting a document boundary end it early. This supplies a different setting for masked prediction. It also removes the contrast between continuations and other samples that supplies the NSP labels, so the authors leave out NSP when they use this construction. The choice changes both the context used by token prediction and the set of losses used to train the encoder.

The paper offers two motivations for that combined change. One concerns distance. A single longer stretch can include useful in-document evidence that would fall outside a shorter segment. The other concerns the relevance of the material already inside the encoder’s input. Even if evidence can technically reach a position, conditioning on an unrelated part of another document could make a prediction harder in an unhelpful way. These are distinct possibilities. The same move to continuous passages makes room for more related text and dispenses with the deliberately sampled unrelated partner.

Other ways to learn from absent text

The paper sets the proposal alongside the development of contextual representations from raw text. That work uses pretraining to obtain an initial encoder or representation before learning a specialized task. The authors point to differences in the training problem itself as a major source of variation across approaches, alongside differences in architecture and data. One of the earlier examples they cite is Deep Contextualized Word Representations.

The related work already includes examples where several words are selected together. One ERNIE approach chooses phrases and entity mentions for Chinese pretraining. Its choices depend on the sort of units identified in the text. MASS takes out a sentence fragment and asks an encoder–decoder system to reconstruct it from the remainder, with generation as its intended use. For SpanBERT, the comparison separates questions that might otherwise be conflated. A procedure for choosing a multiword region leaves open what produces its reconstruction and how the resulting encoder will later be used.

The authors also discuss insertion and multiple prediction directions. Kermit fills gaps by learning to insert missing items. UniLM brings together objectives for predicting in particular directions or from a source sequence towards a target sequence. The direction matters because it determines which tokens are available when a prediction is made. SpanBERT’s objective instead gives a predictor a pair of contextual outputs and a requested position in a missing region. The stated reconstruction uses that input for each target, making the interface for extracting information from the encoder central to the design.

The paper describes a second ERNIE project that brings structured knowledge into contextual representations, with entity-oriented and relation-oriented tasks in mind. It also describes XLM as pursuing cross-lingual training for tasks that include translation and cross-lingual classification. These approaches illustrate why the design of pretraining can be tied to very different downstream needs. SpanBERT keeps its focus on English text and on spans as a way to organize prediction and representation.

The authors identify a closer parallel in pair2vec, which trains representations of word-pair relationships and later inserts the representations into downstream attention. SpanBERT is concerned with outputs that come from encoding the actual passage in which two boundary positions occur. The same position pair serves as context for recovering material between them, and the encoder continues to compute contextual representations after task adaptation. The comparison helps explain why the authors view the pair as carrying information about an interval in a specific passage.

Among concurrent projects, RoBERTa examines BERT implementation choices, training settings, and the amount of source text. The paper points to that study for discussion of changes such as refreshing masks and altering the way input examples are formed. XLNet also includes span masking, with spans described as 1-5 tokens long. The authors describe it as using autoregressive prediction for the selected tokens, together with Transformer-XL and much more training text. These projects give useful context for SpanBERT’s choice to focus on the objective with a common corpus and encoder configuration. RoBERTa · XLNet

That choice shapes the comparison the paper needs. Improving the code or optimization used to train BERT can produce a different starting point for evaluating a proposed objective. Changing the structure of the examples can matter even if token prediction stays the same. Adding a span-based auxiliary loss introduces a further change. The authors give these choices separate reference points so the reported performance can address more specific questions than a single comparison to the original release.

The method, step by step

Follow a selected stretch through training

The paper’s illustration starts with a sentence explaining what the Super Bowl was. A short description of the game appears between the preceding verb and the following infinitive marker. In the illustrated training example, the words of the description give way to mask symbols. What remains visible includes the wider sentence and the words immediately on either side of the masks. The altered passage goes through the encoder in a single operation, yielding an output at every position.

Consider one of the missing tokens, football. The ordinary token predictor reads the encoder output at the position where that word originally appeared. The auxiliary predictor receives the output at was and the output at to. Those are the immediate neighbors of the selected stretch, and their vectors were computed from the same altered passage. The auxiliary predictor also receives a learned position vector telling it which slot to recover. The output associated with football is the input to the ordinary prediction route. The surrounding positions and the slot vector are the inputs to the auxiliary route.

The process repeats for the other selected slots. Within this interval the auxiliary predictor keeps using the pair associated with was and to. It receives a different relative position vector for each slot. The original text supplies the correct token for every prediction. The fact that both routes are scored lets the encoder retain the ordinary token-level learning signal while receiving another signal through the flanking outputs.

This example follows the branch of the replacement procedure that displays explicit masks. Other branches give the encoder random replacement tokens or leave the interval as it was. Calling a token a target refers to the selection decision made before that branch is chosen. In all the branches, the scorer has the original token identity available. The predictor’s job is to give that identity a high probability from the representations it is allowed to read.

How SpanBERT prepares and scores a training example

The steps in order.

How SpanBERT prepares and scores a training exampleStep 1: Draw a batch of continuous document blocks1. Draw a batch of continuous document blocksStep 2: Sample span lengths and whole-word starts2. Sample span lengths and whole-word startsStep 3: Choose one replacement treatment per span3. Choose one replacement treatment per spanStep 4: Encode the resulting token sequence4. Encode the resulting token sequenceStep 5: Score original tokens from their own outputs5. Score original tokens from their own outputsStep 6: Score original tokens from neighbors and relative positions6. Score original tokens from neighbors and relative positionsStep 7: Add both losses for each selected token7. Add both losses for each selected token

From source documents to encoder positions

The pretraining corpus consists of BooksCorpus and English Wikipedia. The authors use cased WordPiece tokens and the BERT-large encoder configuration in their reimplementation. They describe dividing the corpus into continuous blocks, each containing up to 512 tokens. A document boundary can leave a block shorter. The training procedure draws a batch of blocks uniformly at random and runs the selection and replacement procedure within each block.

The continuity requirement applies inside a block. Adjacent positions represent neighbors from the source text in the same order. A block can include material from more than one sentence, and a long document can contribute more than one block. The role of the token limit is to bound the input the encoder processes for an example. The role of a document boundary is to stop that input from being completed with arbitrary text from another source.

Write the original token sequence as follows.

X = (x₁, x₂, …, xₙ)

Here X is an ordered sequence of length n, and x₁ and x₂ name its initial token identities. The ellipsis stands for intervening positions through the final token xₙ. More broadly, xᵢ denotes the token at index i. Parentheses enclose the sequence and commas preserve the distinction between entries. The index counts encoder tokens, so a word that has been split can occupy several positions.

The encoder follows the correspondence between input positions and contextual outputs expressed in the paper’s notation.

enc(x₁, x₂, …, xₙ) = (𝐱₁, 𝐱₂, …, 𝐱ₙ)

The function enc is the Transformer encoder. The plain x symbols denote the tokens supplied to it, while the bold 𝐱 symbols are its vector outputs at the corresponding positions. The ellipses cover the sequence through position n on each side. In the training procedure the encoder’s actual arguments have undergone the replacement operation. The loss retains the identities from the original sequence, which is why the paper can discuss predicting xᵢ using the contextual vector 𝐱ᵢ even when the visible token at i has changed.

The paper denotes selection of targets with this relation.

Y ⊆ X

Here Y denotes the selected target tokens, X denotes the original input, and ⊆ indicates selection from among its entries. Position still matters when the written identities repeat. If the same token occurs in several places, selecting one occurrence specifies a particular location for prediction and a particular pair of neighbors if the occurrence belongs to a chosen span.

Choose an extent, then choose a start

For each block, the procedure repeatedly proposes intervals until it has used the masking budget. The budget is 15% of the tokens. The extent of an individual proposal is counted in whole words, which gives the procedure two units to work with. A draw determines how many neighboring words to include. The WordPiece representation of those words determines how many token positions the selection occupies. The budget and the span length describe different aspects of this process.

The paper expresses the length draw as follows.

ℓ ∼ Geo(p)

The symbol ℓ is the sampled length in words. The symbol ∼ indicates a draw from the named distribution, Geo, and p is the parameter of that geometric distribution. In the authors’ setup the distribution favors shorter lengths, so short stretches appear more often while longer ones are still possible. The authors report testing p values of 0.1, 0.2, and 0.4 in preliminary trials and choosing 0.2.

The chosen length is limited to 10 words, the value the paper denotes by ℓₘₐₓ. The authors give 3.8 words as the mean length. These describe the extent of selected intervals. The proportion of the entire token sequence assigned to prediction is still governed by the separate 15% budget. A run of words with several pieces apiece uses more positions than a run of the same word length in which every word occupies a single token.

Once the procedure has drawn a length, it samples a start uniformly at a word beginning. It includes all the pieces belonging to the words in the chosen run. Whole-word selection therefore keeps a span from starting partway through a WordPiece sequence for a word or ending partway through one. Completing a masked piece from the visible remainder of the same selected word is precisely the sort of clue that group selection can remove.

Uniform choice of a start is a property of this sampling stage. The resulting intervals can still vary in which kinds of expressions they contain, since the text itself varies and the sampled length has its own distribution. A phrase may be selected in full, fall partly inside an interval, or appear in the surrounding evidence. The method uses the same procedure for all of these possibilities. Entity identity and phrase type supply no additional conditions on the start.

The point of combining a bias towards short lengths with uniformly chosen starts is to generate a range of examples with a simple rule. Selected regions sometimes resemble the expressions a downstream task will handle. They also include ordinary combinations that an entity tagger or phrase extractor might never nominate. Both can give the encoder practice in recovering neighboring words together. The method can draw that supervision directly from plain text.

Decide what the encoder will see

SpanBERT uses BERT’s replacement proportions. The 80% branch displays [MASK] symbols, the 10% random branch supplies sampled tokens, and the remaining 10% leaves the original tokens in place. The decision about which branch to use is made for the span as a unit. Its positions therefore receive the same kind of treatment, with that treatment applied to each corresponding token position.

In the explicit-mask branch, the position count is preserved. A missing stretch appears as a run of placeholders, so the encoder still has an output location for each selected token. This fits the ordinary MLM head, which needs a corresponding output for the target. It also gives the encoder contextual evidence about the extent of the gap. The boundary predictor can benefit from that evidence through the vectors computed on either side of it.

Random replacement gives the encoder visible token identities at the selected locations. The correct answers are the identities from before replacement. In the unchanged branch, the visible identities and correct answers coincide. In either case the positions still count towards selection and contribute losses. Thus the design combines a change in the normal pattern of visible clues with a separate restriction on the direct inputs of the auxiliary head.

In the original BERT description, random replacement is described using a unigram distribution, and the replacement choice is made at individual positions. The SpanBERT account emphasizes the switch in the unit of the choice. For example, a multiword interval in the explicit-mask branch is masked as a group. The procedure avoids mixing mask symbols with deliberately preserved pieces of that same span through independent branch choices at each position.

The authors generate different masks at each epoch. The input block can therefore be presented with different targets on different passes. They contrast this with BERT’s preprocessing, which samples 10 versions of the mask pattern per sequence. In the revised implementation, the work of creating target sets stays part of the training pipeline and the text block itself remains the constant source of the correct answers.

Make a prediction with the boundary pair

Let s and e denote the token indices at the start and end of a selected interval. For a given target at index i within it, there is a contextual output immediately to the left and another immediately to the right. The span boundary objective, abbreviated SBO, defines its target representation with these two outputs and a position embedding.

𝐲ᵢ = f(𝐱ₛ₋₁, 𝐱ₑ₊₁, 𝐩ᵢ₋ₛ₊₁)

The vector 𝐲ᵢ is the representation the SBO predictor uses for the token at index i. The function f combines three vector inputs. The left boundary output 𝐱ₛ₋₁ comes from the encoder position immediately before s, and the right boundary output 𝐱ₑ₊₁ comes from the position immediately following e. The symbol 𝐩 denotes a learned position embedding, with the subscript i − s + 1 giving the target’s offset from the left boundary. Subtraction and addition in the subscripts identify positions and offsets, while the commas separate inputs to f.

For the first token in the selected interval, the relative index is the first position after the left neighbor. As i advances, the index points to successive positions within the interval. It counts token positions, like i and s. This is why a whole-word span of a given sampled length can require a different number of auxiliary predictions when it has more WordPiece units. The masking sampler deals in words and the reconstruction objective deals in original tokens.

A relative vector serves a different purpose from the contextual outputs. The outputs contain evidence from the input passage. The vector 𝐩 specifies the location within the gap to which the prediction should apply. Each application of f takes both kinds of input. This gives the network a way to make different predictions for different positions from the very same contextual pair.

The word boundary is literal in the expression. The two indices identify positions just beyond the selected region. The SBO head reads those positions’ outputs directly. Since these are contextual vectors, their computation can reflect text farther away than the immediate neighbors. They can also reflect what the encoder sees at the selected positions, including unchanged tokens in the branch where the input retains them. The information restriction is on the head’s direct access to encoder outputs.

The architecture of f begins by joining the three vectors.

𝐡₀ = [𝐱ₛ₋₁ ; 𝐱ₑ₊₁ ; 𝐩ᵢ₋ₛ₊₁]

The symbol 𝐡₀ denotes the input to the feed-forward network. The square brackets and separating marks mean concatenation, placing the components one after another in a larger vector. The first component is the output on the left of the span, the second is the output on the right, and the third represents the offset for the target at i. The indices s and e still mark the span’s endpoints, so the first two components stay fixed across target slots of the same interval.

The network applies the first learned transformation to that concatenation.

𝐡₁ = LayerNorm(GeLU(𝐖₁ 𝐡₀))

The matrix 𝐖₁ contains the first layer’s learned weights and the product 𝐖₁ 𝐡₀ applies that matrix to the concatenated input. GeLU is the activation function applied to the result of the matrix operation. LayerNorm applies normalization across the features of the vector and returns the intermediate representation 𝐡₁. The paper uses the method Layer Normalization.

The next layer converts this intermediate representation into the vector used for target prediction.

𝐲ᵢ = LayerNorm(GeLU(𝐖₂ 𝐡₁))

The matrix 𝐖₂ supplies the next learned weights, and 𝐡₁ is the preceding layer’s output. The matrix operation is again followed by GeLU and then LayerNorm. The result 𝐲ᵢ is the vector for the target position i, ready for vocabulary scoring. The position embeddings supplied to the first layer have 200 dimensions in the authors’ implementation.

There is a shared computation pattern across the targets. Each slot goes through the same learned transformations, and the embeddings used to indicate relative positions provide the slot-specific input. The equations specify a prediction for each token from its own 𝐲ᵢ. They require no earlier recovered interior token to be passed in as an additional argument when predicting a later slot. The order information that the auxiliary head is explicitly given comes from the position embedding.

Charge both predictors for every selected token

The authors use the same kind of token classification loss for the SBO output that they use for MLM. Each prediction is scored against the correct vocabulary item. The target embeddings are reused from the input embedding table for both routes, linking the output scoring to the learned representations of token identities on the input side. The paper then adds the losses for each selected token.

ℒ(xᵢ) = ℒ_MLM(xᵢ) + ℒ_SBO(xᵢ)

The symbol ℒ is the combined loss at the token xᵢ, which is the original identity found at selected position i. The subscript MLM identifies the usual masked-token loss, and SBO identifies the span boundary loss. The plus sign means an ordinary sum. Each selected position contributes a term from its own encoder output and a term from the auxiliary readout for its slot.

The paper also writes the expression in terms of the predicted probabilities.

ℒ(xᵢ) = −log P(xᵢ | 𝐱ᵢ) − log P(xᵢ | 𝐲ᵢ)

Here P assigns probability to the correct token xᵢ under the input to the corresponding predictor. The vertical bar indicates conditioning on that input. The bold vector 𝐱ᵢ is the contextual output at position i, and 𝐲ᵢ is the boundary-conditioned vector calculated for the same position. The function log is the logarithm, and each negative sign makes a lower assigned probability yield a larger loss. This is the cross-entropy for prediction with a single correct token on each route.

The two readings of the original token illustrate the organization of the supervision. On the ordinary route, the loss reaches the encoder through the output at the prediction site. On the auxiliary route, the loss depends on outputs beside the span and enters the encoder through those outputs. Those vectors share the computations of the encoder with the rest of the sequence. Giving them a direct role in reconstructing the interior changes the pressure on the encoder while preserving its standard output at every position.

In the illustration, the loss expression for football is a specific instance of this sum. Its MLM term uses the vector for the position that showed the placeholder for football. Its SBO term starts with the contextual vectors for was and to, and a relative position vector indicating the slot of football. Repeating this over the selected stretch lets the flanking vectors contribute to the recovery of all the selected words, one token prediction at a time.

Train the encoder on batches of blocks

The authors implement BERT and the span-based changes with fairseq. Their revised pipeline dispenses with BERT’s special handling of shorter sequences. BERT’s procedure, as described in the paper, sometimes samples a short sequence with probability 0.1. It also uses sequence length 128 for 90% of the steps before increasing the length. The authors’ implementation normally takes up to 512 tokens, stopping early when it reaches a document boundary. This preprocessing revision is part of how they obtain a stronger BERT reference.

The final SpanBERT procedure uses only single continuous segments and omits NSP. Each batch supplies independently chosen text blocks. Each block in turn supplies spans for the token objectives. The batch specification in the paper is 256 sequences with the maximum length of 512 tokens. The authors note that it amounts to approximately 390 sequences on average in practice, because documents can supply sequences shorter than the maximum. The distinction matters when reading the batch size as an implementation setting rather than an exact count of full-length passages per update.

The training run lasts 2.4M steps. The learning rate warms up during the first 10,000 steps until it reaches 1e-4 and then follows a linear decay. AdamW uses a first beta coefficient of 0.9 and a second of 0.999. These coefficients control the optimizer’s running estimates based on gradients. The authors set epsilon, the small constant used in the optimizer’s update, to 1e-8. Their description identifies the longer run and the changed epsilon as differences from the BERT optimization they reproduce. Adam

The weight decay setting is 0.1, applied in decoupled form. The authors retain dropout of 0.1 on layers and attention weights, along with the GeLU activation. They report 15 days of pretraining on 32 Volta V100 GPUs. The reported cost describes their run with its particular implementation. The controls for comparison concern the training corpus and the BERT-large configuration, with differences in preprocessing and optimization explicitly part of the baseline design. Decoupled Weight Decay Regularization

The paper makes the SpanBERT code and pretrained checkpoints available through its official repository. For task adaptation it uses the HuggingFace codebase. The downstream comparisons apply the same fine-tuning procedure to the proposed method and its baselines for each task. The resulting differences can therefore be examined with the encoder’s pretraining varied within a common supervised setup. Transformers

Turn an encoded question and passage into an answer

For extractive QA, the passage and question are parts of a single supervised input, even though the pretraining method has dispensed with constructing pairs for NSP. The passage provides the candidate answer positions and the question provides the criterion for choosing among them. The paper uses the following ordering.

X = [CLS] p₁ p₂ … pₗ [SEP] q₁ q₂ … qₗ′ [SEP]

Here X is the assembled input. The p entries are passage tokens through position l of the passage, and the q entries are question tokens through position l′ of the question. The ellipses indicate the intervening passage and question entries. The primed length l′ distinguishes the question length from l. In this formula p denotes passage tokens, whereas the bold 𝐩 in the SBO equations denotes a position embedding. The bracketed items are special tokens: [CLS] opens the sequence, and [SEP] marks the end of the passage and the end of the question.

The encoder processes this combined sequence so that the representations used for choosing passage positions can depend on the question. A linear classifier scores positions as possible answer beginnings and a separate linear classifier scores them as possible endings. The authors train these classifiers independently. Choosing endpoints allows the answer to be an interval of varying length without changing the overall form of the prediction.

SQuAD 2.0 requires the system to decide when the passage lacks an answer. In that case the authors use [CLS] as both the start and the end. This assigns the no-answer decision a place in the existing output scheme. They use this convention when building training targets and when producing predictions for evaluation. It gives the same answer head a choice between a span of passage text and the special outcome.

For QA adaptation the maximum sequence length is 512, and the authors specify a sliding window of size 128 when the input is longer. The learning rates they consider are 5e-6, 1e-5, 2e-5, 3e-5, and 5e-5. They choose between batch sizes of 16 and 32 and train for 4 epochs. The same answer-head design is used across the QA datasets, so the comparisons vary the pretraining while giving the question and passage the same route through the encoder.

Give the coreference system span representations

In coreference, the goal is to place document expressions that denote the same entity into a single group. The implementation used by the authors builds on a higher-order coreference system. The encoder replaces the recurrent encoder in that framework. Documents are split into non-overlapping chunks for encoding, and the authors use the variant in which each chunk is encoded independently. The document is still the unit for the grouping task. The encoder outputs available to that task are built chunk by chunk. BERT for Coreference Resolution

For a mention candidate x, the system scores the possible antecedents. An antecedent is an expression that the current mention could be linked back to. The equation in the paper turns the scores into a distribution.

P(y) = exp(s(x, y)) / ∑[y′ ∈ Y] exp(s(x, y′))

The symbol P(y) gives the probability assigned to candidate y for the fixed mention x. The function s gives the score for a pair of spans, while exp exponentiates that score. The slash denotes division by the sum of exponentiated scores for all candidates, with ∑ denoting summation and y′ ∈ Y indicating that the running candidate y′ is drawn from the set Y. This use of Y is local to the coreference problem. It contains the candidate antecedents.

The total pair score includes evidence for each expression considered individually and evidence for the pairing.

s(x, y) = sₘ(x) + sₘ(y) + s꜀(x, y)

Here s(x, y) is the total score for mention x and candidate y. The two terms with subscript m score x and y as mentions individually. The term with subscript c measures their compatibility for coreference. Each plus sign adds one contribution to the score used in the distribution.

A feed-forward network assigns a mention score to a candidate’s representation.

sₘ(x) = FFNNₘ(𝐠ₓ)

The vector 𝐠ₓ is the representation of the span x, and FFNNₘ denotes the feed-forward network for mention scoring. Its output is sₘ(x), with the subscript indicating the same mention component used for y in the pair equation. The network has one hidden layer.

The compatibility component has its own inputs and network.

s꜀(x, y) = FFNN꜀(𝐠ₓ, 𝐠ᵧ, φ(x, y))

The vectors 𝐠ₓ and 𝐠ᵧ represent the two candidate spans. The function φ supplies features about the pair, for example speaker and genre information. The function FFNN꜀ is the compatibility network, also with one hidden layer, and s꜀(x, y) is the resulting pair contribution to the score.

Each span vector joins the contextual outputs at its endpoints with an attention summary computed over the token outputs within the mention. Attention here supplies a fixed-size summary of a variable-length interior. This gives the scorer several ways to gain information about a span. It can obtain evidence from the endpoints through their contextual outputs, draw on the internal summary, and use the external features supplied to the pair network. SpanBERT changes the preparation of the contextual outputs that feed this existing arrangement.

The fine-tuning setup considers chunk lengths of 128, 256, 384, and 512. The encoder learning rate is chosen from 1e-5 and 2e-5. The task-specific part has its own choices of 1e-4, 2e-4, and 3e-4. The authors fine-tune for 20 epochs, with batch size 1 measured in documents. A document can therefore be the unit used in training the coreference decisions while being processed as several separate chunks by the Transformer.

Classify relations and sentences

For TACRED the sentence already identifies a subject span and an object span. The task is to choose a relation category. The 42 possibilities include no_relation, so a designated pair need not express one of the target relationships. In the authors’ input scheme the entity mentions are replaced with markers that identify their role and named-entity type. In the paper’s example, the marker for the subject identifies a person and the marker for the object identifies a location. The wording around them still conveys the nature of the statement. This is a form of information extraction.

The task’s replacement markers play a different role from the span corruption used for pretraining. They mark which expressions have been designated as arguments and carry type information for the classification task. The supervised predictor reads the contextual output at [CLS] and applies a linear classifier to it. Its target is the relation label. The encoder trained with SBO supplies the representations, while the classification architecture determines how they are read for this task.

For GLUE the authors likewise use [CLS] with a linear task head. They follow the single-task protocol described for BERT. Each task provides its own supervision, including labels or similarity judgments for sentences and pairs of sentences. This gives the experiments a comparatively simple task interface and a way to examine whether the encoder’s pretraining is useful when a task requires an overall judgment about the input. GLUE

The TACRED and GLUE input limit for fine-tuning is 128 tokens. Their learning-rate choices are 5e-6, 1e-5, 2e-5, 3e-5, and 5e-5, with candidate batch sizes of 16 and 32. The authors use 10 epochs for these tasks except CoLA, for which they follow BERT’s 4-epoch choice. They report that the longer run produces severe overfitting on CoLA. In this setting, overfitting is the reason to limit the amount of supervised training on that particular task. The same exception applies to the competing pretrained encoders.

Experiments and results

The reference systems answer different questions

The released Google BERT checkpoint anchors the comparison with the original system. The authors’ reimplementation, called Our BERT, gives them a reference trained with their revised preprocessing and optimization. It still uses BERT’s paired input procedure with NSP. A further reference, Our BERT-1seq, uses continuous full-length segments and omits NSP. SpanBERT builds on this last setup with grouped span masking and boundary prediction.

These comparisons give the results a natural order of interpretation. The distance from Google BERT to Our BERT reflects changes that can be made when reimplementing and tuning the original approach. The distance from Our BERT to Our BERT-1seq measures a change to a particular combination of example construction and training objective. The distance from Our BERT-1seq to SpanBERT tests the additional contribution of organizing the corruption around intervals and making their boundary outputs support recovery. The latter comparison changes both span-related components together.

The common data and encoder configuration are important when considering those differences. An improvement on the authors’ references can be obtained within the same BooksCorpus and English Wikipedia training material and the same BERT-large encoder basis. The differences with the released checkpoint also include the authors’ implementation choices. The paper’s account of the results is stronger for having a tuned reference before the single-segment training change and another after it.

The supervised evaluations place the encoders in several kinds of decision system. The reading tasks ask for positions in a passage. Coreference evaluates clusters assembled from links among mentions. TACRED predicts a relation type for supplied arguments. GLUE largely requires judgments about complete sentences or pairs of sentences. Each group makes a somewhat different demand on whatever representations the encoder has acquired. As a result, a useful way to read the results is to see both which tasks improve and which stage of the comparison supplies that improvement.

SQuAD measures answer selection and abstention

The authors first evaluate on SQuAD 1.1 and SQuAD 2.0. For SQuAD 1.1, a question is answered by extracting a passage interval. In SQuAD 2.0, some questions also require deciding that the passage supplies no answer. The usual start and end decisions apply to answerable questions; the special [CLS] choice handles cases where selecting passage text would be an error. SQuAD 1.1 · SQuAD 2.0

The paper reports F1, which for answer selection reflects agreement between the predicted text and an accepted answer through their overlap. This lets an output that retrieves only part of an answer, or includes additional words, receive a different outcome from an exact match. The head itself predicts endpoints, so both endpoints affect the text that enters this scoring procedure. SQuAD 2.0 brings the decision to use the no-answer outcome into the same evaluation.

On the SQuAD 1.1 test set, SpanBERT obtains 94.6% F1 with a single system. The authors report a gain of 2.0% F1 over their tuned BERT reproduction and 3.3% F1 over Google BERT on that test set. They describe the result against their reproduction as an error reduction of over 27%. This is the authors’ way of expressing how much of the remaining benchmark error is removed at an already high starting score.

On the SQuAD 2.0 test set, the single-system result is 88.7% F1. The reported increases are 2.8% F1 against Our BERT and 5.4% F1 against the released Google BERT. The result covers the full task under the paper’s answer and no-answer convention. The reported overall F1 comparison establishes an improvement for that task, with the contributions of answer localization and abstention left undivided in these numbers.

The paper also reports that the SQuAD 1.1 test result stands 3.4% F1 above the human comparison used for that benchmark. The quantity being compared is the benchmark score on extracted answers. This measure is sensitive to what words a participant selects and how those words align with accepted answers. The finding speaks to performance under that evaluation, whose main subject is the text returned in response to each question.

The contrast between the two BERT references matters for both datasets. The comparison to Google BERT captures the full distance from the released checkpoint to the authors’ final recipe. The tuned reproduction already benefits from their changes to ordinary BERT training. Its gap with SpanBERT therefore shows that the final recipe improves answer selection after the authors have invested in the starting point. The SQuAD comparisons in the paper’s results narrative report the changes relative to those named references, allowing those separate interpretations without inferring absolute scores for the references.

MRQA takes the same question format across different sources

The additional extractive evaluation uses MRQA versions of NewsQA and SearchQA, alongside adapted versions of other reading datasets. Those datasets vary in source domain and how their questions and contexts were collected. The use of a common answer architecture means the scientific comparison can move across these sources while keeping the basic question to the encoder the same: identify the interval in a passage that best answers the question.

The authors also use the MRQA adaptations of Natural Questions and TriviaQA. The paper includes HotpotQA in the same evaluation. What these names refer to in the result is the standardized MRQA task format. The shared format limits contexts to 800 tokens and includes answerable questions. The QA implementation’s own input limit still applies when those questions and contexts are assembled into encoder inputs.

The evaluation split is part of the experimental design. The shared task lacks a public test set, so the authors split the available development set into halves. They assign one half to development and the other to testing. The F1 results therefore refer to the authors’ test halves of the MRQA versions. This lets them use separate examples for the decisions made during development and for their reported comparisons, with the same partition used for the methods being compared.

The pattern across the MRQA test halves is consistent. The final SpanBERT recipe improves F1 over the tuned BERT reproduction on every dataset examined, with an average gain of 2.9% F1. In the individual comparisons to that reference, the paper gives a gain of 2.0% F1 for Natural Questions and 4.6% F1 for TriviaQA as the ends of the reported range. These figures describe the effect of the final recipe relative to Our BERT on the specified reading datasets.

The intermediate baseline provides a way to examine the average more closely. Moving from Our BERT to Our BERT-1seq yields an average increase of +1.1% F1 on the MRQA test halves. Adding span masking and SBO to the single-sequence setup yields a further +1.8% F1 on average. Thus the text arrangement and the span-oriented changes each account for part of the improvement in the sequence of experiments. The larger reported increment here is associated with the span additions.

Two named dataset comparisons illustrate the size of that final increment. On the TriviaQA test half the span changes yield +3.2% F1 over the single-sequence reference. On the HotpotQA test half they yield +2.7% F1 over that reference. The TriviaQA increase of 4.6% F1 uses the earlier Our BERT reference instead. The measurements describe successive stages of comparison, which is why the same final TriviaQA system can be associated with each reported increase.

The result across these datasets widens the evidence beyond the SQuAD question format as originally collected. Its scope still follows the extractive setup. Each adapted dataset supplies answerable questions and evaluation of a text interval. The reading systems are individually fine-tuned with supervision. The recurring improvement therefore shows that SpanBERT provides useful preparation across several supervised extractive tasks with a shared prediction architecture and different source distributions.

The CoNLL-2012 OntoNotes task evaluates document-level coreference. The output concerns clusters of referring expressions, instead of a single extracted answer. A mention’s representation must support decisions about links to other mentions, using the scoring framework described in the method. The experiment varies the pretrained encoder within that framework.

The benchmark reports an average of the F1 scores from MUC, B³, and CEAFφ₄. These are component measurements of the coreference output. The paper’s headline result is the average on the test set. The same average is the basis for its comparisons with the BERT baselines and its comparison with the previous best. Reading the reported figure as the benchmark average keeps it distinct from any of the individual component scores.

Against Google BERT, the authors’ reproduction improves the test average by 1.2% F1. Moving to the single-segment reference yields another reported gain of 0.5% F1 on that average. SpanBERT reaches 79.6% average F1 on the OntoNotes test set. The earlier best result cited in the paper is 73.0%, giving the authors’ reported absolute margin of 6.6% F1. That margin compares complete results on the benchmark, while the internal baseline steps trace particular changes to the pretraining setup.

OntoNotes test coreference, average F1 across MUC, B³, and CEAFφ₄

SpanBERT raises the benchmark average above the earlier best result.

OntoNotes test coreference, average F1 across MUC, B³, and CEAFφ₄Previous best: 73.0Previous best73.0SpanBERT (this paper): 79.6SpanBERT (this paper)79.6
The numbers
System or settingaverage F1 %
Previous best73.0
SpanBERT (this paper)79.6

This result is a different test of span representations from question answering. The link decision concerns whether two candidate expressions refer to the same entity. The scoring architecture can use the contextual endpoints, a summary from within each expression, and features about the pair. An improvement in the resulting clusters shows that the revised pretraining is useful inside this larger system. The complete score incorporates the work of that system as well as the learning done by the encoder.

The setup also clarifies what document-level describes in the result. The task evaluates links and clusters for documents. The pretrained Transformer is used to encode chunks independently before its outputs are passed to the mention-linking framework. The OntoNotes score is therefore evidence about the usefulness of the learned contextual representations within that arrangement. It measures the performance of the resulting clustering decisions, for which direct joint encoding of an entire document is unnecessary in the authors’ implementation.

TACRED favors the change in input construction

On TACRED, the argument spans are supplied and the system predicts a label from the sentence. The replacement of entity mentions with role and type markers keeps the marked arguments visible to the classifier in a controlled form. The test therefore concerns classifying the relationship described around the designated arguments. Its F1 measure puts precision and recall together: the system must find the relations present while avoiding incorrect assignments.

The final SpanBERT system improves by 3.3% F1 over Our BERT on the TACRED test set. The authors report +2.6% F1 from the switch to their single-sequence training setup. The addition of span masking and the boundary objective yields the remaining reported comparison of 0.7% F1 beyond that setup. They attribute much of this last improvement to greater recall.

Compared with the MRQA average, the stages contribute in a different order of importance. TACRED gets the larger reported increment at the stage that changes example construction and removes NSP. The span-oriented additions still give a further improvement. Since the downstream classifier reads [CLS], this last comparison also shows that the effects of the span-based preparation can be available to a classification head that reads a designated sequence output.

The paper also compares with BERT_EM and BERT_EM+MTB from work on relation learning. SpanBERT performs better than BERT_EM and is 0.7 point behind BERT_EM+MTB on TACRED test F1. The authors specify that the latter uses an additional matching-the-blanks stage on entity-linked English Wikipedia text. SpanBERT’s preparation in this comparison uses raw text. The ranking places the result alongside strong relation extraction systems, with different intermediate training inputs and objectives for the strongest comparator.

The recall observation is specific to the incremental span comparison. It gives some information about how the final F1 score changes under this extraction protocol. The reported result aggregates across relation decisions, including the need to recognize the absence of a listed relation. It does not break out which relations account for the extra correct predictions. The measured gain is consequently at the level of the benchmark’s precision and recall behavior.

GLUE shows gains concentrated in particular tasks

GLUE broadens the tests to tasks whose labels concern an entire sentence or a pair. CoLA assesses linguistic acceptability and SST-2 assesses sentiment. The pair similarity tasks include MRPC, which judges paraphrases from news; QQP, which judges whether two questions are paraphrases; and STS-B, which assigns graded similarity. These correspond to different forms of text classification and semantic similarity.

The inference group includes MNLI, QNLI, and RTE among the tasks compared. These tasks call for judgments about how the inputs are related rather than the return of a substring. QNLI is derived from SQuAD, which gives it a connection to the reading tests even though the supervised output takes a different form. The paper also discusses WNLI as part of the benchmark and follows the cited convention for omitting it from the individual comparisons. MNLI

The metrics differ across the displayed test comparisons. MRPC and QQP each have F1 and accuracy, allowing a reader to see both the overall proportion of correct decisions and the F1 behavior of the classification. STS-B uses Pearson and Spearman correlation measures for its graded scores. MNLI reports accuracies for matched and mismatched data. The paper’s results caption identifies accuracy for the remaining displayed tasks. In the benchmark average, WNLI contributes the fixed majority-class value of 65.1% accuracy. That convention gives each system the same contribution from WNLI.

Across much of GLUE the differences are modest. The authors report a substantial CoLA improvement when moving to single-sequence training without NSP, with smaller gains associated with that move on MRPC and MNLI. The continued use of a simple supervised readout is relevant to the comparison. These effects appear in the authors’ single-task protocol, which keeps the basis of fine-tuning consistent across the pretrained alternatives.

The paper highlights +1.3% on QNLI test accuracy and +6.9% on RTE test accuracy as the main additional SpanBERT gains in its GLUE discussion. RTE accounts for most of the increase in the average. The two tasks therefore deserve attention individually when interpreting that average. A good overall result can be composed of a sizable improvement on a particular inference task, a smaller one on another task, and relatively little movement across much of the rest of the benchmark.

The accuracy ties on MRPC and QQP have a similarly specific meaning. On those test comparisons, SpanBERT is on par with Our BERT-1seq in accuracy, while doing better than the other baselines on that measure. Those tasks are also reported with F1, so the accuracy tie should be read at the level of the identified metric. On SST-2 the paper records a result in the other direction: Google BERT leads SpanBERT by 0.4% test accuracy.

How the results vary across the suite

The authors count 17 benchmarks in their overall comparison. SpanBERT surpasses all the baselines on 14 tasks. The two parity cases they identify by accuracy are MRPC and QQP, with SST-2 the case favoring Google BERT. The count gives a sense of the breadth of the reported improvements. The task-specific comparisons show more about their character, since a gain in passage-answer F1, a gain in coreference average F1, and a gain in sentence accuracy concern different outputs.

The reading experiments offer the most consistent pattern for the parts of the recipe tied directly to spans. The SQuAD test gains persist over the tuned BERT reproduction, and the MRQA comparisons show improvement across varying datasets under the common extractive procedure. The MRQA breakdown also places the larger average increase at the final stage, when span masking and SBO are added. TACRED gives an informative counterpoint within the same experimental design, since its main gain occurs at the preceding stage.

OntoNotes tests another span-oriented application and supplies the highest coreference result reported in the paper’s comparison. The method’s effect there is observed through a system that uses a span’s endpoint outputs and its interior, together with features for deciding which mentions to link. This complements the reading results, where the outputs are simply answer boundaries and, in SQuAD 2.0, the special no-answer choice. The two applications can benefit from the same preparation while making different uses of the contextual vectors it produces.

Across the suite, the strongest conclusion about continuous examples belongs to the exact change the authors tested: exchanging BERT’s paired segments and NSP for single-segment training. The strongest conclusion about the final span additions comes from comparison with the reference that had already made that exchange. These distinct results explain why the complete method can help across task types even when the size and source of the gain vary. SpanBERT’s clearest improvements occur where a supervised system has to select or connect stretches of text, with further benefits on some tasks that use an overall classification of the input.

What the ablations show

Which parts of the recipe can be tested separately?

The full SpanBERT result leaves a question about what happens if the authors change only the text chosen for prediction. Would the same examples be useful if every prediction still came from the output at its own position? The masking study addresses this question within a version of BERT that retains paired segments and next sentence prediction. Each alternative changes the rule used to select targets. The alternatives range from independently chosen WordPiece tokens to stretches proposed by linguistic analysis. Geometric sampling, the rule used in SpanBERT, enters this study as a way to choose spans. The boundary loss belongs to another comparison.

The second study starts with the selection question already settled. Every condition uses masked-token prediction over random spans. The authors can then ask what changes when they switch from paired segments with NSP to continuous passages, and what changes when they add the boundary loss to the continuous-passage setup. This gives the added loss a closer comparator than Our BERT-1seq does in the main results. Our BERT-1seq has yet to receive the span masking scheme, while the reference in the auxiliary-objective study already receives it.

The authors use checkpoints from 1.2M steps for these studies to save time and resources. In the masking study, they report development-set scores. The reading tasks use F1, and the table identifies accuracy for MNLI and QNLI. Each score measures performance after adapting the pretrained encoder to a supervised task. The question being asked is which preparation yields better decisions on development examples. How accurately the pretraining head guesses a word, or how much it lowers its own loss, would answer a different question.

These conditions make the comparisons easier to interpret. In the masking study, the paired text and the continuation objective provide a common background against which one selection rule can be compared with another. In the auxiliary-objective study, the common background is geometric span masking. The two studies have different purposes, so a result obtained under one set of conditions can help explain a result under the other without supplying an interchangeable score. The authors explicitly caution that the masking comparison and main evaluation differ in both training setup and use of development data.

From a word piece to a stretch of words

The sub-word baseline selects random WordPiece positions, following the original BERT masking scheme. This gives the study a reference in which the selection event can occur inside a written word. Imagine a word the tokenizer represents with a stem and a suffix. Selecting the position of the suffix for prediction may leave the stem available as context. Selecting the stem may leave the suffix. These are useful prediction problems if the aim is to learn which pieces of words occur together. A downstream decision about a passage or a candidate mention can require information beyond what this kind of clue supplies.

Whole-word masking moves the selection event to the surface word. Once a word is picked, its pieces all belong to the target set. Around 15% of the subtokens are selected in this condition. As a result, a split word gives the predictor several targets linked by their membership in the same word. The procedure does not need to identify an entity or recognize a phrase to apply that grouping. It needs to determine which pieces belong to each word.

The whole-word and sub-word conditions give the authors a way to ask about the importance of segmentation inside a word. A further step is needed to ask about segmentation across words. If the sampler picks several separate words, the material between them can remain available. Geometric spans can take that intervening material into the same selection. The span sampler therefore changes which neighboring clues are likely to be present together, even though the target budget is expressed in the same token units as before.

The distinction is easy to see with a name whose words each occupy multiple pieces. Whole-word selection can mark everything belonging to one word and leave the rest of the name. Selecting both words as one interval can take away that remaining clue in the masking branch. In other examples, a geometric span can include a name and part of the surrounding description, or it can cover ordinary words with no name in sight. A choice to act on complete words says where a target may start and end. A choice to use geometric spans also says how nearby words enter the selection together.

This is why the inclusion of whole-word masking is useful even though geometric spans sometimes contain just one word. It provides a reference where grouping stops at word boundaries for every draw. A favorable result for geometric spans in the masking study is evidence for the overall procedure that samples runs of words. The reported comparisons give no universal marginal effect for extending a span by another word. A longer selection changes which clues survive, how many pieces take up the budget, and how much room is left for other targets in the same block.

What linguistic guidance contributes in this comparison

The named-entity condition gives some selections a different starting point. The authors run spaCy’s entity recognizer over the training corpus and collect the non-numerical mentions it identifies. The sampler chooses from those candidates 50% of the time. In the other 50%, it draws a random whole word. The target budget is 15% of subtokens. This recipe can expose the encoder to a complete name as a prediction target while continuing to assign supervision to text that the recognizer does not select.

This mixture matters when considering the result. The study asks whether making detected mentions available as a preferred source of targets improves the recipe. It does so with the particular recognizer, candidate restriction, and frequency of use chosen by the authors. An expression can be a correct name and still make an awkward reconstruction target if its surrounding sentence gives little basis for guessing precisely which name occurred. Conversely, a useful target for learning the passage’s structure can be a stretch of ordinary words. The downstream comparison measures the consequences of the selection rule across many training examples, with no need to presume that a recognizable name always produces a stronger prediction exercise.

Noun-phrase masking supplies another type of candidate. The authors obtain the phrases using spaCy’s parser and again use the proposed linguistic spans at 50% of selections, with random whole words supplying the other branch. The intervention changes which stretches are likely to receive supervision. A nominal expression can be selected because it has a particular grammatical role in the analysis, even if it contains no proper name. Conversely, a useful stretch that crosses the parser’s phrase boundaries can enter the geometric condition without being nominated by the phrase extractor.

The geometric rule gives the study a reference that depends on word extent and position alone. It favors shorter lengths and uses random starts. A linguistically selected span and a geometrically selected one can coincide by chance. They can also differ in extent, in the words they tend to include, and in their position within an expression. The comparison consequently tests working alternatives for constructing prediction examples. A more specific experiment would be required to find out what happens when the linguistic and random alternatives choose stretches with matched lengths and otherwise comparable surroundings.

The authors report that the linguistic schemes are often competitive with geometric spans, with results that depend on the downstream dataset. Noun-phrase selection matches geometric masking in development F1 on NewsQA, while on the TriviaQA development split its reported difference from geometric masking is -1.1% F1. The examples are informative together. A procedure that can match the random rule in one reading setting may yield weaker preparation for another reading setting even when both later tasks use the same kind of answer head. The ablation gives the authors a reason to use the simpler sampler without claiming that pretraining can never benefit from linguistic guidance.

There is also a distinction between using a recognizer to assign training labels and using it to decide where to ask a question. In this experiment, the recognizer or parser nominates text for selection. The correct answer remains the original token at each position. The encoder receives no requirement to reproduce a tag or recover a parse. Any benefit from the added analysis has to come through a change in the reconstruction problems supplied during training. This helps explain why the result bears specifically on guided masking, while leaving the value of entity identity or syntactic structure in other training tasks open.

The selection process and the test of transfer also involve different kinds of text. The linguistic candidates are collected in the pretraining corpus. Their utility is assessed through performance on supervised development examples, whose evidence needs are determined by the answer, inference, or mention-linking task. A phrase that makes sense to select in raw text does not automatically help the encoder make the decisions those tasks require. The performance comparison closes that gap empirically for the tested recipes. In most of the reported masking comparisons the authors favor geometric spans, and coreference supplies a distinct exception.

Coreference exposes the difference between masking and learning from boundaries

In the paired-segment masking study, the coreference development result favors randomly selected sub-word tokens over the span-based alternatives. That ordering is particularly informative because a mention in the downstream task is itself a span. It shows that a resemblance between the granularity of the pretraining target and the granularity of the task’s output is insufficient to predict which preparation will work better. A rule can supply multiword prediction targets and still provide less useful features to the mention-linking system in this setup.

To see what the masking experiment leaves open, consider the ordinary loss applied to a selected multiword interval. There is a contextual output at each selected position. The scorer can compare each of those outputs with its corresponding original token. Even when the corrupted stretch demands contextual inference, the representations subject to this direct prediction demand are distributed over the positions in the stretch. The span selection rule defines a shared gap, but the standard readout can handle the prediction sites individually.

In coreference, the downstream decision involves the relationship between the representations of candidate mentions. These representations have to make the content of a mention available for scoring with another expression. The same content can matter differently depending on how the two expressions are used. A name has to be recognized as a plausible mention before its compatibility with a later description can help. The selection-only experiment can show what changes when tokens are grouped into targets, while leaving the pretraining readout itself as it was. It therefore leaves room for the direct demand introduced by boundary prediction.

The auxiliary-objective experiment supplies the comparison that addresses this possibility. With geometric selection and the single-segment setup already in use, the authors add SBO. They report +2.7% F1 for coreference against the span-masking condition without SBO, using the 1.2M-step checkpoints. This is the key controlled result for the boundary objective. The kind of target and the passage arrangement are already shared, so the added loss is responsible for the experimental contrast. The paper highlights this gain in its ablation discussion separately from the final OntoNotes test comparison.

The two coreference findings answer different questions. Under paired training with NSP, switching to geometric spans while leaving the prediction arrangement otherwise in place can hurt the development result relative to sub-word selection. Under the continuous-passage setup, requiring the surrounding outputs to carry reconstruction information can improve the result relative to doing ordinary masked prediction on the same kind of spans. Neither comparison, taken alone, tells us how the sub-word and geometric alternatives would rank in every training configuration. Together, they give the paper a concrete reason to treat the choice of target and the choice of readout as separate parts of the design.

There is a plausible link to the eventual mention scorer. SBO supplies a learning signal through a pair of positions, with each member of the pair contextualized by the altered passage. The mention scorer can access contextual vectors near the extremes of a visible expression. Training the first computation can help prepare the second even though their precise interfaces differ. The ablation measures the benefit to the final mention-linking decisions. It does not observe how the mention scorer allocates credit among its endpoint outputs, interior summary, and features about the pair.

Another possibility is that boundary prediction changes the usefulness of contextual representations more generally. The encoder computes its sequence of outputs with shared parameters, so a loss that arrives through specified positions can affect computation at other positions once those parameters are updated. A better coreference result is consistent with more informative endpoint vectors and with improvements elsewhere in the representation supplied to the scorer. The ablation separates the added training requirement from the case that lacks it. The route from the updated encoder to the changed cluster decisions remains a question about the learned computation.

What changes when the passage stays continuous?

The comparison with random spans also gives the authors another test of the move to single-sequence training. Their main baseline comparison makes that move while retaining ordinary token selection. In the auxiliary-objective study, the reconstruction targets already occupy runs of adjacent words. The change to continuous passages still tends to help. This extends the evidence for the altered input setup beyond the original BERT target-selection rule.

That result has a concrete interpretation for the information available to a predictor. If the target is a span, the context outside it can be especially important because the masking procedure can suppress several neighboring words simultaneously. A continuous segment provides one sequence of surrounding text within the implementation’s length limit. A paired input can supply useful material in both segments when they continue each other, but it can also spend part of the token allowance on a separately sampled segment. The ablation shows that the practical advantage of the continuous setup recurs in this new prediction environment.

Several quantities change at once in this step. The model of the learning problem changes because the continuation judgment is removed. The sample shown to the encoder changes because the short partners are replaced with a continuous stretch. And the opportunities for conditioning on text from another source change with that sample construction. The main and ablation comparisons share this bundle. The recurrence is evidence that the bundle is useful under both target-selection procedures. It cannot say which altered quantity must be present for the benefit to occur.

The comparison also helps explain the apparent disagreement with BERT’s evaluation of NSP. As SpanBERT recounts it, the earlier study removed the continuation loss while retaining the way the two segments were sampled. That asks whether an encoder already receiving those inputs benefits from being trained to judge their relationship. SpanBERT’s comparison asks whether there is an advantage to using the paired-input and continuation-loss arrangement at all when continuous text is available. The answer to the latter question can favor continuous text even if the loss is helpful inside a fixed paired-input pipeline.

The authors suggest that single-sequence training might better support longer-range features. This explanation concerns dependencies that can be included inside coherent context when the encoder’s allowance goes to one passage. Their other suggestion concerns interference from text with no connection to the prediction. One effect could occur even on examples whose paired segments would both have been genuine continuations, depending on how the samples are formed. The other depends on the use of unrelated material. The comparisons show how downstream performance responds to the observed change. Distinguishing the mechanisms would require varying properties of the context that these runs alter together.

What the added prediction task establishes

With continuous passages and random spans supplied to all the conditions needed for its comparison, SBO adds a specific demand at pretraining time. The correct identity is already the target of ordinary masked prediction. SBO asks for the same identity to be recoverable through the exterior outputs and the slot embedding. The improvement in the auxiliary-objective study is therefore evidence that it can matter which outputs a training prediction reads, even when the corruption scheme and the prediction labels are held fixed.

The paper reports that adding SBO generally helps in the auxiliary-objective experiments and that the comparisons reveal no apparent adverse effect of the kind the authors associate with the paired NSP setup. The coreference result is the largest example they emphasize in that discussion. This finding is about the tested additions to random-span MLM. The study supplies no estimate of the effect of requiring boundary reconstruction across every alternative selection scheme, and the discussion of SBO gives no basis for assigning its benefit to one choice within the auxiliary network, such as the dimensionality of the relative position embedding.

The comparison leaves a narrower question about the source of the gain. The addition changes both the availability of a boundary-conditioned predictor and the amount of prediction supervision assigned to each chosen token. A comparison with an additional head using some other readout could test whether the particular boundary restriction is more useful than that other way of adding a loss. The paper tests its actual proposal against MLM alone. That supports the added objective as implemented and explains why a gain from the full recipe cannot be treated as a gain from masking alone.

The preliminary length trials have a more limited role in the evidence. The authors report choosing the best setting among the candidate values they tried. Those trials tell the reader that the choice was informed by comparison. The detailed masking ablation answers a different question by varying the kind of selection procedure. It can support the use of geometric spans alongside a chosen length setting, without establishing how a change to that setting would interact with linguistic guidance, input length, or the added loss.

The strongest empirical statements are therefore local to the interventions. A random word-span rule compares favorably with the tested mixtures based on linguistic candidates. The continuous-passage arrangement tends to help even when the targets are already spans. The auxiliary loss adds measurable value to that arrangement, with a clear coreference gain. This is enough to explain why the final recipe includes all of those choices. It also identifies which parts of the explanation depend on comparisons and which parts remain hypotheses about how the encoder uses the signal.

Limitations

Qualifications the authors give about the comparisons

The paper states that its masking ablation uses development sets, paired segments and NSP, with the shorter pretraining schedule used throughout the ablations. Those settings give the study a common basis for comparing different masking rules. The qualifications bear on how far the resulting rankings can travel. An alternative can fare better under a common early checkpoint because its useful representations emerge earlier, and the full training run could favor a different ordering. The paper gives the observed comparison at 1.2M steps and does not trace each alternative through an equivalent final evaluation.

There is a similar condition on the task coverage. The masking study reports a selection of development evaluations. A procedure that fares well in those comparisons earns support for that setting. The evidence across the full suite belongs to the final recipe and its main references. For instance, the final TACRED comparison gives information about the joint addition of span masking and SBO to the authors’ single-sequence BERT. It supplies no parallel TACRED result for every kind of linguistic selection considered in the masking study.

The authors also distinguish their results on the MRQA adaptations from results one could obtain on the original collections under other protocols. The study uses the shared task’s standardized question and context format. Its main comparisons are evaluated on held-out portions of the public development material because the shared task supplies no public test set. The experiment gives a test of transfer across different datasets within that construction. A numerical comparison across studies depends on which partition was used and which examples remained after the task conversion.

The distinction with the strongest TACRED competitor is explicitly stated. The competing matching-the-blanks approach includes intermediate preparation on entity-linked text. SpanBERT’s pretraining uses raw text. Scoring the resulting systems on the same test task is enough to establish their relative results as run. A controlled comparison of the two learning procedures would also have to account for the data and annotation entering at the intermediate stage. The authors mark this difference because it changes what can be learned from the ordering.

In GLUE, the authors follow a cited convention for WNLI, omitting it from the comparative task results while assigning every system the majority-class score in the average. That is a stated choice about comparability. The average still reflects the included fixed contribution and the improvements on the other tasks. A reader looking for evidence about more than the average needs the individual comparisons because the contributions to the change are uneven. The authors specifically identify RTE as the main source of the aggregate movement.

Finally, the explanation for the success of continuous passages is expressly conjectural. The authors see possible value in longer stretches of connected context and possible harm in conditioning on unrelated text. Their studies demonstrate the change in performance when adopting a different sampling and objective arrangement. They do not separately estimate a cost of unrelated text, a gain per additional portion of coherent context, or an isolated effect of removing the continuation loss. This is a limit the authors signal in presenting the explanation as a hypothesis.

Limits apparent from the design of the comparisons

The strongest resource control concerns what text the encoders train on and the architecture and size of the BERT-large basis. This supports the paper’s account of progress through the design of pretraining. A more demanding test of efficiency would require a different kind of control. The cost of training can depend on the length of examples, the number of updates, the way tokens are batched and the extra work supplied by the auxiliary head. The comparison with the released checkpoint includes changes in schedules and preprocessing. The controlled comparison with the authors’ references still evaluates complete recipes that ask for different work during pretraining.

The paper gives the time and hardware for its own run. Those figures establish the scale of the implementation, while questions about the marginal cost of SBO or how it changes time to achieve a particular downstream score remain open. The loss requires an additional prediction computation, even though the downstream tasks read the adapted encoder through their own heads. The experiments give downstream performance for the specified runs. They do not supply a matched accounting of training time, memory use, or other costs from which to infer a gain in efficiency.

There are related limits to the control for supervision. The pretraining text is unannotated in the main SpanBERT recipe, and its target identities come from that text. The tasks used to measure success nonetheless supply supervision during fine-tuning. For instance, QA adaptation trains the classifiers that turn contextual outputs into start and end decisions. Coreference adaptation trains mention and compatibility scoring. The results show how useful the starting representations are in these supervised arrangements. They leave open how much of the task could be performed with a frozen encoder or with fewer labeled examples.

The fine-tuning choices are shared as a search procedure across methods. An available range of chunk lengths or learning rates can accommodate encoders that adapt differently. This is appropriate for comparing the systems as usable starting points. It also means the reported endpoint reflects the interaction of the starting encoder with training for the task. A fixed-probe experiment designed to compare the information already accessible in particular vectors would put a different restriction on that interaction.

Attribution within SpanBERT is also limited by the comparisons that are available. The main one against BERT-1seq changes both the grouping of prediction targets and the requirement to predict through exterior positions. The development experiments give controlled evidence about individual aspects in their own settings. Reading those results as a decomposition of the entire final test gain would require assuming that the effect of one aspect transfers unchanged when the other settings change. The coreference masking result provides a reason to take such interactions seriously. It shows directly that the simple prediction that spans should always favor a span-oriented task can fail.

The span masking tests do not establish that the preference for randomness arose from the absence of linguistic guidance itself. A guided procedure can produce different lengths, different kinds of starts and a different balance between named material and ordinary material. The mixed procedures include an additional choice about how frequently to use their proposed spans. The authors’ comparison validates geometric selection as a practical alternative to the mixtures tested. An experiment matching more of these properties could ask a narrower question about what information the recognizer or parser contributes.

Even the mask-construction description leaves a few choices that matter for an exact reconstruction of the sampler. The paper specifies length in words, an overall budget in pieces, a uniform choice of a word-aligned start, and the treatment of selected spans. The reported procedure leaves details such as how every possible overlap between proposed spans is handled and what to do when a final whole-word proposal would cross the remaining token budget implicit. The definition of SBO also assumes an exterior position on either side. If a selected span reaches a sequence edge, applying the formula requires a convention about available boundary positions or eligible intervals. These details concern the determination of training examples. They do not supply a scientific explanation for the results on their own.

What the boundary loss reveals about representations

The boundary hypothesis is easiest to understand as a claim about access. Training asks for an original token to have high probability when predicted through a particular pair of vectors and an embedding for its position. Improved downstream performance shows that this training can be useful. The paper gives no separate measurement of which kinds of content become more accessible through the vectors, or how reliably a reader with a different prediction head could obtain that content.

The reconstruction procedure itself places an upper limit on what one should infer from its form. Each slot is scored as a token prediction. Its loss encourages a high probability for the identity observed in the training text. A pair of representations can support several successful slot predictions. This gives no independent indication of whether the encoder represented those words as a coherent grammatical unit, stored a more general description of the interval, or used correlations that happened to predict individual identities. All of these patterns can help the token objective. The reported loss and downstream comparisons do not distinguish among them.

The passage frequently leaves gaps whose exact content cannot be identified from context alone. A sentence may strongly suggest that a particular sort of name or description is missing while allowing several plausible completions. In that case the original text still supplies a unique recorded target for scoring. This is a feature of the self-supervised problem, where the original identity is readily available and alternative plausible answers are not annotated. It makes the task suitable for supplying a great deal of supervision, with the consequence that prediction success and semantic sufficiency need not coincide.

The role of the flanking outputs also deserves a precise interpretation. The loss can only read the chosen boundary vectors and the slot embedding through its direct inputs. The vectors themselves can draw on the entire altered passage within the encoder’s window. They can contain information from replacement positions, including original tokens whenever the selected span is left visible. Success under this restriction shows that the required information can reach the auxiliary head through those outputs. It does not establish that the two neighboring word identities, by themselves, determine what was in the span.

A downstream endpoint presents a further difference. It can be the first or last token of the visible expression, whereas the auxiliary readout operates from outside the selected interval. The common idea is that a small number of contextual vectors can make a variable-length region accessible. The success of that idea in the complete system is measured through supervised task results. The paper does not hold all other parts of the downstream span representation fixed while allowing access only to endpoints. In coreference, the attention summary over the mention and the engineered pair features can both contribute. In QA, independently trained classifiers score the start and end. Those heads offer their own ways to exploit an encoder whose computation has changed.

This limits strong claims about where a downstream gain comes from. The auxiliary loss enters through specified outputs at training time. The encoder’s shared computation can change the features available at many positions when a task is fine-tuned. Both mechanisms would be compatible with the reported gains. A study aimed specifically at localizing the benefit would need measurements suited to distinguishing them. The boundary ablation settles whether the added objective is useful in the tested setting while leaving the causal account inside the encoder less fully determined.

The movement from a document to a training window

The finite token allowance matters in interpreting the context hypothesis. As used in pretraining, a continuous passage can preserve relations across sentence boundaries if the relevant text lies inside its block. A document may contain information beyond that block. The selection scheme places no special requirement on the division to keep every relevant dependency within an example. This leaves a difference between having coherent surroundings for a prediction and observing all of the document evidence that might clarify it.

The document-level description of coreference applies to the cluster decisions. A chunk boundary is still a boundary for computation by the Transformer in the independent version used by the paper. The output for a mention can incorporate evidence from its own chunk. The task framework can compare it with representations produced in other chunks, without having computed either one in a single joint pass through the entire document. Thus improvement on this benchmark can coexist with a limit on where contextual token vectors are formed.

The experiments do not identify which distances between mentions account for the higher coreference result. Better local descriptions of mentions might help the scorer compare them across longer distances. Better use of nearby evidence might mainly improve short-distance decisions. Both are compatible with a higher average over the benchmark. The result does not include a breakdown by distance or by whether the mentions cross encoder chunk boundaries, so it cannot distinguish these possible sources of improvement.

The reading task also has a windowing procedure for inputs above its length limit. The standardized MRQA setup puts its own bound on contexts before they enter that procedure. The final F1 reflects the extraction system with those choices in effect. One cannot infer from the score alone how well the method would handle passages in which all useful evidence is spread over distant parts of a much longer document, or questions for which the task supplies no answer span. SQuAD 2.0 tests a no-answer decision in its own setup. The answerable MRQA partitions test transfer across different sources with an interval expected.

These limits concern the scope of the lesson about coherent context. The paper compares the way an available training window is populated. It shows that a continuous segment can serve the tested objectives and tasks better than the particular paired alternative. It leaves open the effects of other example constructions in which several segments have a verified relationship, or in which a different objective makes the relationship itself useful supervision. Each such construction would give selected targets a different information environment.

Breadth across tasks and uncertainty within a task

The training sources and the evaluation suite support a conclusion about English and the BERT-large setup used in the paper. A whole word is an intuitive selection unit here, but its correspondence to the encoder’s pieces matters for the actual examples. A different segmentation regime could make the same word-based length setting cover systematically different numbers of target positions. If even the definition of a word boundary changes, the start rule changes with it. The paper provides evidence for the chosen setup, with no experiment on whether the same settings transfer across languages.

Variation across the English benchmarks partly offsets a different concern, namely that a gain might be peculiar to one source of questions and passages. The MRQA results show benefits across several adapted collections. They do so with individual supervised adaptation and a shared output format. This is a meaningful test of transfer within extractive reading. It does not measure free-form generation, question answering without a supplied passage, or advantages in any other setting where the output cannot be evaluated as a chosen region of text.

Some of the reported differences also admit only a limited interpretation because they are aggregate scores. The SQuAD comparison with human performance uses the benchmark answer score. The same measure can favor the system overall while giving little detail about which kinds of questions it answers well or when a human and a system choose differently worded intervals. On TACRED the authors identify recall as a source of an incremental gain. The paper’s discussion leaves the distribution of that gain across relation categories unresolved. On GLUE the authors document uneven improvement across tasks. The aggregate supplies no replacement for that per-task evidence.

The report does not give uncertainty intervals or a systematic estimate of variation over independently repeated pretraining runs. The same applies to the question of how much of a small downstream difference would persist after repeating the fine-tuning. The observations remain useful as comparisons under the reported conditions. The lack of repeated-run estimates makes it harder to assign much significance to a narrow lead or to establish that a parity result would recur exactly. A broad pattern across reading datasets and the controlled coreference response to SBO are different kinds of evidence from a small margin on an individual classification task.

The study’s design leaves a tradeoff between control and breadth that is intrinsic to its central question. Holding the encoder family and corpus steady gives a clearer test of a change in training. It also means the tested results cannot tell us how that change behaves at other capacities or with different amounts and kinds of source text. The appendix’s concrete settings make the tested comparison intelligible. They do not establish that the geometric parameter, length limit, or auxiliary network will have the same value under a different resource constraint. The demonstrated contribution is a way to improve representations under the specified conditions, with transfer of the full recipe beyond them still an empirical question.

What came after

Optimization, task software, and a coreference framework

The closest documented connections involve work the authors were already using or discussing. RoBERTa is described as concurrent research that treats BERT pretraining as an experiment worth reproducing carefully. Its subject includes training hyper-parameters and the amount of data available for pretraining. SpanBERT directs readers to that study for the effects of implementation choices involving masks and sequence handling. That relationship helps situate its tuned BERT reproduction. There is a body of work on how well the existing prediction objective can perform when the surrounding training process is improved, and SpanBERT uses that question as the starting point for evaluating a new objective.

The relevance runs through the experimental comparison as much as through any particular objective. If one is studying the benefits of extra training text or different preprocessing, the performance of the starting configuration needs its own examination. The same applies when studying whether a new auxiliary loss improves representation quality. RoBERTa’s stated investigation concerns the quality and sensitivity of BERT’s preparation under changes to the broader process. SpanBERT’s controlled comparisons put their emphasis on what gets predicted and where the information must be readable. The paper identifies these as concurrent inquiries, so the documented connection is a shared concern with the strength of the BERT reference.

The cited BERT for Coreference Resolution provides a direct technical connection. Its independent encoding option supplies the framework in which SpanBERT evaluates the usefulness of a different pretrained encoder for mention linking. It is important to get the direction right: SpanBERT draws on the earlier coreference implementation described in its methods. The contribution of the pairing is that a span-oriented training objective can be studied in an architecture whose mention representation already has meaningful locations for contextual endpoint information. That gives the coreference experiment a more precise interpretation than merely trying a new encoder on whatever task software happened to be available.

The HuggingFace code discussed in Transformers supplies another documented connection. SpanBERT uses that codebase as the foundation of its fine-tuning implementation. The relationship concerns the interface between a pretrained encoder and task-specific training. The same adaptation code can host different checkpoints and thereby support a comparison in which answer heads or sentence classifiers play the same role. The paper establishes this use of the codebase, while the software publication’s scope is broader than SpanBERT’s objective. Its inclusion among the citing works documents a relationship with the infrastructure for using these techniques.

These examples give context for reading the later citations. A work can be technically connected to SpanBERT through a common implementation or evaluation framework, or intellectually connected through the study of a training decision. Several citing papers specify such a decision in their titles, particularly the size of a missing unit or the form of the reconstruction task. Where the relationship is documented at that level, it allows a comparison of research questions. A claim that a particular project took over the boundary network would require evidence about that project’s procedure.

The unit selected for prediction

The connection to Chinese whole-word masking is especially close to the distinction inside the masking ablation. The work names the whole word as the unit of masking for Chinese BERT. SpanBERT also treats a word’s pieces as a group and directly compares this decision with independently drawing pieces. The Chinese work’s stated scope brings that decision into another language setting. The cited topic alone establishes no result about geometric spans or loss design, but it does identify a concrete choice that both lines of research consider important enough to make explicit: what counts as a complete selected item.

A comparison of these choices begins with the language and segmentation setting. SpanBERT’s intervals are generated by taking runs of words as determined in its English training procedure. An investigation of whole-word masking for Chinese gives word membership an explicit role inside a different pretraining setting. This relationship is narrower than saying that the Chinese study verifies SpanBERT’s results outside English. It follows one component of the design, the grouping of pieces within a word, into a question whose empirical answer depends on the language and training pipeline being studied.

PEGASUS identifies gap sentences as its pretraining material for abstractive summarization. That places the selection decision at sentence scale. SpanBERT generates runs of adjacent words to train an encoder whose representations can be useful when a downstream task needs to select a region or score a mention. The PEGASUS title makes its downstream purpose different: learning for a summarization task that produces text. The common issue is how the unit made absent during training relates to the demands of the task that follows.

Moving the unit to sentence scale also changes the question a comparison should ask. In SpanBERT’s analysis, withholding a word piece, an isolated word, and a run of words can leave different amounts of evidence available nearby. When the selected material consists of gap sentences, the absence concerns a larger unit of the original text. The PEGASUS title establishes the use of those units and its summarization aim. It does not specify what evidence a decoder obtains from the gap’s immediate surroundings. The relationship to SpanBERT is therefore about the choice and purpose of the absent unit, with the exact reconstruction path left to the separate studies.

The topic of reconstructing missing information also appears outside text. HuBERT names masked prediction of hidden units as a means of learning speech representations. The choice of a prediction unit persists when the kind of input changes. In SpanBERT the original text supplies identities in the WordPiece vocabulary and the masking sampler uses complete words to group them. A speech method framed around hidden units has its own representation and target question. The stated relationship places both in the study of supervision from incomplete observations, without identifying the units used in speech with written words.

LayoutLMv3 brings the choice of what to mask into a document setting with both text and images. Its stated approach is unified masking across those inputs. SpanBERT’s explicit units are positions in one ordered token sequence. The later work’s scope gives the selection decision a wider domain: a document can supply evidence in more than one form. This connection belongs to pretraining for vision and language, with text and image masking as the link established by the citation’s description. It leaves the role of boundary representations in that setting open.

Together these lines of work identify meaningful changes in the object being withheld. A word, a sentence, a hidden speech unit and material in a document with images impose different conditions on prediction. SpanBERT contributes a measured example of why it is worth varying this choice inside an otherwise comparable training setup. Its particular outcome for geometric spans and linguistic candidates remains tied to its own test. The citing projects show how the selection question recurs when the relevant learning units and eventual tasks change.

The prediction made from a gap

BART gives denoising a sequence-to-sequence form, with generation, translation, and comprehension named as applications. Denoising and SpanBERT share the broad premise that changes to the input can manufacture useful training targets. The sequence-to-sequence framing puts an output sequence at the center of the learning problem. SpanBERT’s particular contribution is to ask whether a restricted readout of the encoder’s contextual outputs can recover each selected token. This gives the two studies a relationship through the use of corruption while preserving the distinction between a sequence-level generation problem and a token prediction read through a boundary pair.

The downstream ambitions associated with BART help clarify the value of making that distinction. SpanBERT evaluates representations through supervised answer extraction, mention linking and classification. An encoder that is good at these decisions could be useful in other work, but its performance on them leaves questions about generating text open. The BART title puts text generation among the intended uses of a denoising pretraining task. It carries the broader idea of learning from altered inputs into a setting where success can concern the production of a whole response, with no inference needed about the use of SpanBERT’s specific loss.

The infilling connection is more direct in GLM, whose stated method is autoregressive blank infilling. Autoregressive prediction makes the growing output part of the evidence for what to produce next. In SpanBERT’s SBO, the relative slot and the same contextual pair specify each prediction, and the objective does not explicitly feed the earlier predicted interior content into the later slots. The existence of a blank therefore leaves a consequential design choice open. A learner can be asked to form a sequence conditional on earlier output, or each target can be scored from a shared context using its slot. The cited work identifies the former as a pretraining direction. SpanBERT supplies an example and evaluation of the latter through its boundary loss.

An additional related direction appears in MPNet, which names masking and permutation as parts of its pretraining approach for language understanding. The named permutation draws attention to the order dimension in prediction. In SpanBERT, a relative position specifies which original token is the target, and the position of that token in the document stays defined by the original sequence. The fact that a target occupies a certain slot is distinct from the order in which the learner is allowed to use predictions as evidence. MPNet’s stated focus places this broader question of prediction arrangement alongside the question of selecting text to withhold. The citation establishes that scope without specifying an implementation relationship between the two objectives.

Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer brings the output representation into the study of transfer. Its organizing idea is a common text-to-text format. SpanBERT’s study changes the encoder’s preparation while keeping distinct supervised interfaces for different tasks. A transfer study organized around text inputs and text outputs asks what can be shared across those interfaces as well. This is a relationship between two decisions about the stage at which systems are made more uniform. SpanBERT shares a pretrained encoder across tasks, while the cited work’s title also identifies the textual form of task inputs and outputs as part of its common framework. The available relationship supports that comparison without attributing a particular span masking or readout procedure to the transfer study.

These directions develop the questions around missing-text prediction in different ways. Some specify a type of corruption, some specify the order or form of reconstruction, and some specify a common output interface for transfer. A method that withholds text has to make choices about all of these, even if its experiment varies only some of them. SpanBERT provides a clear formulation of one combination, including a readout restriction that can be tested independently of whether a region was selected. Other citing works identify different parts of the prediction problem as the object of study.

More context and different adaptation questions

Big Bird names longer sequences as its focus. This follows a dimension made salient by the move to continuous passages. SpanBERT varies the material placed inside the encoder’s allowance. Work on longer sequences addresses how much material can reach the encoder in one input. These choices can matter together, because a longer coherent input is only useful for a prediction if relevant evidence becomes available inside it. The citation gives a connection at the level of input length. It supplies no finding about how SpanBERT’s auxiliary objective behaves at longer lengths.

The distinction has particular force for coreference. In SpanBERT’s evaluation, the link scorer compares representations that may have been created in separate chunks. Lengthening the encoder input could change which expressions are represented jointly. Choosing continuous text could change how much related material occupies the space already available. The cited scope of Big Bird concerns the former capacity question. SpanBERT studies the latter construction question and measures its consequences within a bounded setup. Each makes an aspect of what the encoder sees an explicit research problem.

Other citing work examines the contribution of pretraining from the side of task adaptation. BitFit identifies parameter-efficient fine-tuning as its subject. SpanBERT changes the learning signal before task adaptation and then compares the resulting encoders using the tasks’ shared fine-tuning procedures. A study of parameter-efficient adaptation asks how a pretrained system can be used while changing a smaller portion of its parameters. The two decisions concern different stages, and the citation supplies no measured interaction between them. It places SpanBERT’s focus on the quality of initialization alongside a question about how to exploit that initialization economically.

The survey of prompting methods documents another kind of adaptation question. SpanBERT evaluates its preparation using task-specific supervised readouts, through which an answer interval or classification label is scored. A survey organized around prompting examines methods in which the formulation of an input helps elicit a task prediction from a pretrained system. The relevant connection is the interface between the prediction problem used during pretraining and the form of a requested downstream decision. SpanBERT’s results show why the design of that earlier problem deserves attention. The survey’s scope shows a wider range of ways to use pretrained prediction behavior than SpanBERT’s evaluation requires.

Across this citing work, the most direct continuities are at the level of identifiable design choices. Whole-word masking follows the question of grouping pieces. Infilling and denoising follow the question of how to recover missing text. Work on longer sequences concerns how much context is available, while work on adaptation examines how to put pretrained representations to use. SpanBERT’s distinctive evidence remains the comparison inside its own recipe: after selecting random spans, the authors can obtain further benefit by changing the positions through which the encoder is asked to make their contents accessible.

 Institutions

 Fields, topics and concepts

Appears in

Mentioned in articles aboutSeattle

Cite

Cite as Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S. Weld, Luke Zettlemoyer and Omer Levy. 2019. SpanBERT: Improving Pre-training by Representing and Predicting Spans. arXiv:1907.10529.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1907.10529 · arXiv 1907.10529

@misc{joshi2019spanbert,
  title = {{SpanBERT: Improving Pre-training by Representing and Predicting Spans}},
  author = {Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S. Weld, Luke Zettlemoyer and Omer Levy},
  year = {2019},
  doi = {10.48550/arxiv.1907.10529},
  eprint = {1907.10529},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1907.10529}
}

References

54 references, from the paper's own bibliography.

  1. Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. 2016. Layer normalization. arXiv preprint arXiv:1607.06450. OpenAlex ↗ · Scholar ↗
  2. Roy Bar-Haim, Ido Dagan, Bill Dolan, Lisa Ferro, Danilo Giampiccolo, Bernardo Magnini, and Idan Szpektor. 2006. The second PASCAL recognising textual entailment challenge. In Proceedings of the second PASCAL challenges workshop on recognising textual entailment, pages 6–4. OpenAlex ↗ · Scholar ↗
  3. Daniel Cer, Mona Diab, Eneko Agirre, Iñigo Lopez-Gazpio, and Lucia Specia. 2017. Semeval-2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation. In International Workshop on Semantic Evaluation (SemEval), pages 1–14, Vancouver, Canada. our card
  4. William Chan, Nikita Kitaev, Kelvin Guu, Mitchell Stern, and Jakob Uszkoreit. 2019. KERMIT: Generative insertion-based modeling for sequences. arXiv preprint arXiv:1906.01604. OpenAlex ↗ · Scholar ↗
  5. Ido Dagan, Oren Glickman, and Bernardo Magnini. 2005. The PASCAL recognising textual entailment challenge. In Machine Learning Challenges Workshop, pages 177–190. Springer. OpenAlex ↗ · Scholar ↗
  6. Andrew M Dai and Quoc V Le. 2015. Semi-supervised sequence learning. In Advances in Neural Information Processing Systems (NIPS), pages 3079–3087. our card
  7. Zihang Dai, Zhilin Yang, Yiming Yang, William W Cohen, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. 2019. Transformer-XL: Attentive language models beyond a fixed-length context. In Association for Computational Linguistics (ACL). OpenAlex ↗ · Scholar ↗
  8. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In North American Association for Computational Linguistics (NAACL). our card
  9. William B Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the International Workshop on Paraphrasing. our card
  10. Li Dong, Nan Yang, Wenhui Wang, Furu Wei, Xiaodong Liu, Yu Wang, Jianfeng Gao, Ming Zhou, and Hsiao-Wuen Hon. 2019. Unified language model pre-training for natural language understanding and generation. In Advances in Neural Information Processing Systems (NIPS). our card
  11. Matthew Dunn, Levent Sagun, Mike Higgins, V Ugur Guney, Volkan Cirik, and Kyunghyun Cho. 2017. SearchQA: A new Q&A dataset augmented with context from a search engine. arXiv preprint arXiv:1704.05179. our card
  12. Adam Fisch, Alon Talmor, Robin Jia, Minjoon Seo, Eunsol Choi, and Danqi Chen. 2019. MRQA 2019 shared task: Evaluating generalization in reading comprehension. In Proceedings of 2nd Machine Reading for Reading Comprehension (MRQA) Workshop at EMNLP. our card
  13. Danilo Giampiccolo, Bernardo Magnini, Ido Dagan, and Bill Dolan. 2007. The third PASCAL recognizing textual entailment challenge. In Proceedings of the ACL-PASCAL workshop on textual entailment and paraphrasing, pages 1–9. our card
  14. Luheng He, Kenton Lee, Omer Levy, and Luke Zettlemoyer. 2018. Jointly predicting predicates and arguments in neural semantic role labeling. In Association for Computational Linguistics (ACL), pages 364–369. our card
  15. Dan Hendrycks and Kevin Gimpel. 2016. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415. OpenAlex ↗ · Scholar ↗
  16. Jeremy Howard and Sebastian Ruder. 2018. Universal language model fine-tuning for text classification. arXiv preprint arXiv:1801.06146. OpenAlex ↗ · Scholar ↗
  17. Mandar Joshi, Eunsol Choi, Omer Levy, Daniel Weld, and Luke Zettlemoyer. 2019a. pair2vec: Compositional word-pair embeddings for cross-sentence inference. In North American Association for Computational Linguistics (NAACL), pages 3597–3608. OpenAlex ↗ · Scholar ↗
  18. Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. 2017. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Association for Computational Linguistics (ACL), pages 1601–1611. our card
  19. Mandar Joshi, Omer Levy, Daniel S. Weld, Luke Zettlemoyer, and Omer Levy. 2019b. BERT for coreference resolution: Baselines and analysis. In Empirical Methods in Natural Language Processing (EMNLP). our card
  20. Diederik Kingma and Jimmy Ba. 2015. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR). our card
  21. Ryan Kiros, Yukun Zhu, Ruslan R. Salakhutdinov, Richard S. Zemel, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. 2015. Skip-thought vectors. In Advances in Neural Information Processing Systems (NIPS). OpenAlex ↗ · Scholar ↗
  22. Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Matthew Kelcey, Jacob Devlin, Kenton Lee, Kristina N. Toutanova, Llion Jones, Ming-Wei Chang, Andrew Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural questions: a benchmark for question answering research. Transactions of the Association of Computational Linguistics (TACL). our card
  23. Guillaume Lample and Alexis Conneau. 2019. Cross-lingual language model pretraining. Advances in Neural Information Processing Systems (NIPS). OpenAlex ↗ · Scholar ↗
  24. Kenton Lee, Luheng He, Mike Lewis, and Luke Zettlemoyer. 2017. End-to-end neural coreference resolution. In Empirical Methods in Natural Language Processing (EMNLP), pages 188–197. our card
  25. Kenton Lee, Luheng He, and Luke Zettlemoyer. 2018. Higher-order coreference resolution with coarse-to-fine inference. In North American Association for Computational Linguistics (NAACL), pages 687–692. our card
  26. Kenton Lee, Shimi Salant, Tom Kwiatkowski, Ankur Parikh, Dipanjan Das, and Jonathan Berant. 2016. Learning recurrent span representations for extractive question answering. arXiv preprint arXiv:1611.01436. OpenAlex ↗ · Scholar ↗
  27. Hector J Levesque, Ernest Davis, and Leora Morgenstern. 2011. The Winograd schema challenge. In AAAI Spring Symposium: Logical Formalizations of Commonsense Reasoning, volume 46, page 47. OpenAlex ↗ · Scholar ↗
  28. Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. 2019a. Multi-task deep neural networks for natural language understanding. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics (ACL). our card
  29. Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019b. RoBERTa: A robustly optimized BERT pretraining approach. arxiv preprint arXiv:1907.11692. our card
  30. Lajanugen Logeswaran and Honglak Lee. 2018. An efficient framework for learning sentence representations. arxiv preprint arXiv:1803.02893. our card
  31. Ilya Loshchilov and Frank Hutter. 2019. Decoupled weight decay regularization. In International Conference on Learning Representations (ICLR). our card
  32. Oren Melamud, Jacob Goldberger, and Ido Dagan. 2016. context2vec: Learning generic context embedding with bidirectional LSTM. In Computational Natural Language Learning (CoNLL), pages 51–61. our card
  33. Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019. fairseq: A fast, extensible toolkit for sequence modeling. In North American Association for Computational Linguistics (NAACL), pages 48–53. our card
  34. Matthew Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word representations. In North American Association for Computational Linguistics (NAACL), pages 2227–2237. our card
  35. Sameer Pradhan, Alessandro Moschitti, Nianwen Xue, Olga Uryupina, and Yuchen Zhang. 2012. CoNLL-2012 shared task: Modeling multilingual unrestricted coreference in ontonotes. In Joint Conference on EMNLP and CoNLL-Shared Task, pages 1–40. our card
  36. Ofir Press and Lior Wolf. 2017. Using the output embedding to improve language models. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers, pages 157–163. Association for Computational Linguistics (ACL). our card
  37. Alec Radford, Karthik Narasimhan, Time Salimans, and Ilya Sutskever. 2018. Improving language understanding with unsupervised learning. Technical report, Technical report, OpenAI. OpenAlex ↗ · Scholar ↗
  38. Pranav Rajpurkar, Robin Jia, and Percy Liang. 2018. Know what you don't know: Unanswerable questions for SQuAD. In Association for Computational Linguistics (ACL), pages 784–789. our card
  39. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. SQuAD: 100,000+ questions for machine comprehension of text. In Empirical Methods in Natural Language Processing (EMNLP), pages 2383–2392. our card
  40. Livio Baldini Soares, Nicholas Arthur FitzGerald, Jeffrey Ling, and Tom Kwiatkowski. 2019. Matching the blanks: Distributional similarity for relation learning. In Association for Computational Linguistics (ACL), pages 2895–2905. our card
  41. Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In Empirical Methods in Natural Language Processing (EMNLP), pages 1631–1642. our card
  42. Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and Tie-Yan Liu. 2019. MASS: Masked sequence to sequence pre-training for language generation. In International Conference on Machine Learning (ICML), pages 5926–5936. our card
  43. Mitchell Stern, Noam Shazeer, and Jakob Uszkoreit. 2018. Blockwise parallel decoding for deep autoregressive models. In Advances in Neural Information Processing Systems (NIPS). OpenAlex ↗ · Scholar ↗
  44. Yu Stephanie Sun, Shuohuan Wang, Yukun Li, Shikun Feng, Xuyi Chen, Han Zhang, Xinlun Tian, Danxiang Zhu, Hao Tian, and Hua Wu. 2019. ERNIE: Enhanced representation through knowledge integration. arXiv preprint arXiv:1904.09223. our card
  45. Adam Trischler, Tong Wang, Xingdi Yuan, Justin Harris, Alessandro Sordoni, Philip Bachman, and Kaheer Suleman. 2017. NewsQA: A machine comprehension dataset. In 2nd Workshop on Representation Learning for NLP, pages 191–200. our card
  46. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems (NIPS). our card
  47. Alex Wang, Amapreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. 2019. Glue: A multi-task benchmark and analysis platform for natural language understanding. In International Conference on Learning Representations (ICLR). our card
  48. Alex Warstadt, Amanpreet Singh, and Samuel R. Bowman. 2018. Neural network acceptability judgments. arXiv preprint arXiv:1805.12471. OpenAlex ↗ · Scholar ↗
  49. Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In North American Association for Computational Linguistics (NAACL), pages 1112–1122. our card
  50. Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, R'emi Louf, Morgan Funtowicz, and Jamie Brew. 2019. HuggingFace's Transformers: State-of-the-art natural language processing. arXiv preprint arXiv:1910.03771. our card
  51. Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. 2019. XLNet: Generalized autoregressive pretraining for language understanding. In Advances in Neural Information Processing Systems (NeurIPS). our card
  52. Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D Manning. 2018. HotpotQA: A dataset for diverse, explainable multi-hop question answering. In Empirical Methods in Natural Language Processing (EMNLP), pages 2369–2380. our card
  53. Yuhao Zhang, Victor Zhong, Danqi Chen, Gabor Angeli, and Christopher D. Manning. 2017. Position-aware attention and supervised data improve slot filling. In Empirical Methods in Natural Language Processing (EMNLP), pages 35–45. OpenAlex ↗ · Scholar ↗
  54. Zhengyan Zhang, Xu Han, Zhiyuan Liu, Xin Jiang, Maosong Sun, and Qun Liu. 2019. ERNIE: Enhanced language representation with informative entities. In Association for Computational Linguistics (ACL), pages 1441–1451. OpenAlex ↗ · Scholar ↗

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/joshi-2019-spanbert-improving-pre-training-representing/