---
title: "Self-Supervised Test-Time Learning for Reading Comprehension"
description: "Self-supervised test-time learning adapts a reading comprehension system to each passage using questions and answers generated from…"
canonical: "https://research.elamur.ai/free/en/papers/banerjee-2021-self-supervised-test-time-learning/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/banerjee-2021-self-supervised-test-time-learning/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Self-Supervised Test-Time Learning for Reading Comprehension

# Self-Supervised Test-Time Learning for Reading Comprehension

Paper · 2021 · Pratyay Banerjee, Tejas Gokhale and Chitta Baral

**Authors:** [Pratyay Banerjee](https://md.research.elamur.ai/free/en/authors/pratyay-banerjee/), [Tejas Gokhale](https://md.research.elamur.ai/free/en/authors/tejas-gokhale/) and [Chitta Baral](https://md.research.elamur.ai/free/en/authors/chitta-baral/) · **Year:** 2021 · **Venue:** Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **8** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/banerjee-2021-self-supervised-test-time-learning/cited-by/) · Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.naacl-main.95/)
- [PDF](https://aclanthology.org/2021.naacl-main.95.pdf)
- [DOI 10.18653/v1/2021.naacl-main.95](https://doi.org/10.18653/v1/2021.naacl-main.95)

## Summary

The answer to a reading comprehension question can change when the passage changes. A news story may name the person who held an office when it was written, while a later story names a successor. In extractive [question answering](https://md.research.elamur.ai/free/en/concepts/question-answering/), the system has to select the answer from the particular passage it receives. Pratyay Banerjee, Tejas Gokhale, and Chitta Baral investigate whether the passage can also supply the material the system needs to practice before it answers. Their method, self-supervised test-time learning, generates practice questions and answers automatically from the incoming text, updates the system on those examples, and then answers human-written questions about the passage.

A synthetic exercise begins with an answer the procedure can locate in the text. For example, it can select a place name, hide it, and turn the remaining sentence into a question about a location. Other generators use templates, grammatical structure, or questions about who took part in an event and what role they played. Because the procedure chose the answer, it can mark where that answer begins and ends. The standard version starts the adaptation afresh for every passage. The strongest version retrieves related Wikipedia paragraphs to make more practice material and carries the trained answering component forward as new passages arrive. It also starts from weights that have already been trained on synthetic question–answer pairs.

On the [SQuAD](https://md.research.elamur.ai/free/en/papers/rajpurkar-2016-squad-100-000-questions-machine/) 1.1 development split, the best BERT-Large configuration reaches 69.8 exact match and 80.4 F1, compared with 62.5 exact match and 72.6 F1 for the strongest previous unsupervised comparison. Exact match requires the full answer to agree with the reference, while F1 gives credit for overlap. On the [NewsQA](https://md.research.elamur.ai/free/en/papers/trischler-2017-newsqa-machine-comprehension-dataset/) development split, the corresponding scores are 38.9 exact match and 53.2 F1, against 33.6 and 46.3. The smaller DistilBERT backbone also benefits, reaching 68.9 F1 on SQuAD 1.1 development and 46.4 F1 on NewsQA development. The few-shot experiment adds real training questions and reaches 81.6% F1 on SQuAD with 100 labeled examples.

Those gains come with a substantial cost at prediction time. The strongest BERT-Large configuration takes ∼5 minutes per passage, and the best DistilBERT variant averages 1.6 minutes per passage. The wording and answer selection used to create practice questions also shape what the system learns. In a review of wrong answers, the authors find a preference for named entities, reflecting the kinds of answers several generators supply. The experiments establish that local synthetic practice can improve extractive reading comprehension on the benchmarks studied. The broader question of how well the same procedure handles changing knowledge in a live stream remains open.

## Deep dive: Self-Supervised Test-Time Learning for Reading Comprehension

Self-supervised test-time learning adapts a reading comprehension system to each passage using questions and answers generated from that passage. · about 35 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### The answer belongs to the passage

Reading comprehension connects a question to a particular text. In the extractive setting, an answer is a continuous stretch of that text. A question might ask for a place, a person, or a phrase describing a condition. Some questions can be answered by finding a sentence that closely echoes the wording of the question. Others require working out which participant or event the question refers to before selecting a span. In either case, the passage sets the terms of the answer.

The paper illustrates this dependence through questions about public office. The title of an office can remain constant over time, even as the person occupying it changes. A fictional account can give the same office to another person entirely. The surface form of the question alone leaves these possibilities open. A reader has to locate what the supplied account says, including the time or setting that makes its answer appropriate. An association learned from another source can be relevant background and still point to the wrong passage span.

Reference collections change as well. The authors describe Wikipedia as a source whose contributors add newly established facts and remove information that has become obsolete. Historical news articles keep reporting what happened at the time. A system trained on a fixed collection can therefore encounter text that differs from its training material in facts, subject matter, or the language used to express them. For extractive comprehension, the incoming passage contains evidence about which of those differences matters for the current question.

The paper also connects these changes to [language change](https://md.research.elamur.ai/free/en/topics/language-change/) more broadly. The words people use, the structures they prefer, and the meanings attached to existing expressions can change. These observations motivate a procedure that can revise some of its behavior when it encounters new text. The immediate research question is narrower. Given a target passage and human-written questions about it, how much can an extractive reader gain by practicing on automatically generated exercises tied to that passage?

#### The cost and reach of supervised training

In a supervised reading comprehension dataset, a training item provides a passage, a question, and an answer. The answer gives the learner a direct signal about which span to recover. Building a large collection of such items involves writing or collecting questions, identifying acceptable answers, and checking the resulting examples. The authors point out that filtering matters because details of how examples were written can leave cues that a system can exploit. A benchmark score can then reflect familiarity with the collection procedure as well as the ability to use the passage.

The paper cites failures under changes of domain, adversarial examples, and skewed data as reasons to question how far a supervised score will generalize. Its examples include systems trained on Wikipedia that perform worse in other settings, such as [Natural Questions](https://md.research.elamur.ai/free/en/papers/kwiatkowski-2019-natural-questions-benchmark-question-answering/) or biomedical question answering. It also cites work showing that substituting synonyms can hurt performance on language tasks. A question with the same meaning can look different enough to strain a system that learned to rely on recurring word choices. Each of these problems concerns a different kind of change. Together they motivate closer attention to the specific text and question used at evaluation time. [Generating Natural Language Adversarial Examples](https://md.research.elamur.ai/free/en/papers/alzantot-2018-generating-natural-language-adversarial-examples/)

Earlier work had already established several ways to test extractive reading. The paper describes SQuAD as a Wikipedia-based benchmark, NewsQA as a benchmark about news articles, and [TriviaQA](https://md.research.elamur.ai/free/en/papers/joshi-2017-triviaqa-large-scale-distantly-supervised/) as a resource organized around trivia facts. It cites [HotpotQA](https://md.research.elamur.ai/free/en/papers/yang-2018-hotpotqa-dataset-diverse-explainable-multi/) for questions that require more involved reasoning to locate the answer. This range helps explain why a method developed around a particular source or pattern of questioning might face difficulty elsewhere. Banerjee and colleagues use SQuAD and NewsQA to ask whether the same local training procedure can help on benchmark passages with different origins.

The authors also point to the burden of annotating a new domain or language. A corpus can contain many passages without containing useful questions paired with dependable answer spans. If an automatic process can turn passages into imperfect but informative exercises, it can supply a training signal in settings where a large collection of human-authored examples is impractical. Training on those exercises raises a further question about timing. They can be collected into a fixed dataset well ahead of evaluation, or they can be created for the texts that the reader is about to see.

#### From synthetic corpora to local practice

Unsupervised extractive question answering had already taken the first of those routes. Prior methods generate question–answer pairs from text, then train a reader over a large collection of the resulting examples. The underlying idea is to obtain the training target from the text itself. If a procedure identifies a phrase in a sentence and constructs a question for which that phrase is the answer, it can associate the question with the phrase's position without asking an annotator to mark it. Several of the question generators used by Banerjee and colleagues come from that line of work.

The paper builds on that strategy by changing the unit of adaptation. Rather than asking a single training stage to prepare the reader for all future passages, the standard procedure makes a fresh training set for each incoming passage. The topic of that passage, the people and places it names, and the facts it states can therefore affect the practice that precedes an answer. The paper treats each passage as potentially coming from a distinct distribution, meaning that the regularities useful for answering questions about it can differ from those useful for the previous passage. The variants with retrieval and online updates investigate how far related information or past training can still help.

General text pretraining supplies another part of the background. The paper describes self-supervised objectives that use the original text to supply an answer to a manufactured task. Masking part of an input and recovering it is one such objective. The related work also discusses prediction from different combinations of nearby tokens and detecting tokens that have been replaced. These objectives can teach a system useful features of text before it is trained to answer questions. The current paper uses a different exercise during passage adaptation. The generated examples already have the form of the task it will be evaluated on, including a question and the positions of an answer. [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) · [XLNet](https://md.research.elamur.ai/free/en/papers/yang-2019-xlnet-generalized-autoregressive-pretraining-language/)

Earlier domain adaptation studies offer another point of comparison. The authors cite work that continues pretraining on unlabeled documents from a new domain, using an objective such as masked token prediction. That procedure gives a pretrained system experience with the language of a target collection. Here, the current passage supplies the immediate adaptation material, and predicting answer spans supplies the learning objective. The scope can be as small as one passage, even though the strongest variant widens it with retrieval. [Don't Stop Pretraining](https://md.research.elamur.ai/free/en/papers/gururangan-2020-don-t-stop-pretraining-adapt/)

The paper also draws inspiration from image processing. In single-image super-resolution, recurring patches within an image provide examples for learning how to increase its resolution. In earlier test-time training for image classification, identifying rotations provides a learning signal when a new image arrives. The shared principle is that an input at evaluation can itself supply training material. Extractive reading comprehension makes a particular use of that principle. Since an answer can be marked inside the supplied passage, the procedure can turn that passage into practice for the same kind of decision it will make for the human question.

### The method, step by step

#### What happens when a passage arrives

Consider a passage with several sentences about a historical group. It mentions a place associated with the group's origins and describes a change in its identity over time. The procedure can locate the place name, select it as a practice answer, and transform the sentence to ask where the group came from. It can also use a grammatical construction to ask about what changed. Each question comes with an answer that can be found at a known location in the passage. The paper's examples about the Normans illustrate how a single passage can supply exercises about different parts of its content.

The reader then practices finding the spans selected by the generators. For each exercise, it receives the training question and the associated passage, and its predictions about the beginning and end of the answer are compared with the known positions. The update is a form of [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) because it adapts weights from an existing initialization to a more specific task and body of text. In the main unsupervised experiments, the exercises are generated without using the human-written questions or their answers. After the updates, the reader is given the actual evaluation question and the original passage.

The distinction between constructing an exercise and answering one makes the source of supervision clear. The generator works backward from an answer it already chose. The reader has to work forward from a question to a span. At evaluation, the question comes from a person and may ask for a kind of answer the generator would rarely select. The procedure depends on enough of the structure learned from synthetic exercises transferring to these human-written questions.

From an incoming passage to an extracted answer The steps in order.

#### How the passage supplies practice questions

The generators use [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/), [dependency parsing](https://md.research.elamur.ai/free/en/concepts/dependency-parsing/), and [semantic role labeling](https://md.research.elamur.ai/free/en/concepts/semantic-role-labeling/). Named entity recognition finds mentions that can serve as answers, such as the names of people and places. The authors use spaCy for this part. Dependency parsing describes how words in a sentence are grammatically connected. The paper names the Berkeley Neural Parser in its generation pipeline. Semantic role labeling identifies participants and other arguments associated with a predicate, such as what changed or who performed an action. These sources of information support question generators with different assumptions about what is worth asking.

A cloze exercise hides a selected expression in a statement. In the paper's example, the place name Denmark is removed from a sentence about the ancestors of the Normans. A category marker for a location takes its place. The procedure still knows that Denmark is the target span, and the rest of the statement gives the reader words that can help recover it. The paper also uses cloze translation. This applies rules from earlier work to turn a statement with a marked gap into a question that reads more like a direct request for information.

Template-based generation divides the sentence around a candidate answer. One fragment contains what precedes the answer, and another contains what follows it. A rule selects a question word appropriate to the answer and rearranges the fragments. In the template described in the paper, the question word is followed by the fragment that originally came after the answer, then by the fragment that originally came before it. The selected answer remains attached to the exercise as its label. These rules offer a way to vary how a question is presented while preserving the link to a known span.

Dependency-based generation also transforms a cloze into a question, using grammatical connections to decide the output order. The answer node's right children are retained and its left children are pruned. At a node whose child has the answer in its subtree, the relevant child is moved into the first position among that node's children. The reconstructed tree is then read in an in-order traversal, and a rule maps the category marker to a question word. The answer-containing branch can thus influence the order of words beyond the answer's immediate position in the original sentence. The generator still relies on a rule-based reconstruction, so how well the result reads can depend on the source structure and the parse.

Question–answer semantic role labeling, abbreviated QA-SRL, supplies exercises organized around predicates and their arguments. A question can ask what evolved or where a group descended from, with the corresponding text span serving as the answer. The paper's examples illustrate a tradeoff. The generator can ask about an argument whose answer is a description and can also select a short part of a phrase where a more natural question might invite a longer answer. Its questions frequently use generic references to people or things. This creates exercises beyond the named-entity pattern and can leave the person or event underspecified in the question wording.

The four forms of generation change what the reader will repeatedly see as a plausible question and what it will be rewarded for selecting. A typed location mask, a rearranged question, and a role-based prompt can all train the same span objective. They create different relationships between the words in the question and the target answer. Mixing examples from them is part of the method. The curriculum experiments test whether the order of that mixture also matters.

#### How the reader learns answer boundaries

The paper describes evaluation data as a collection of triples. Each triple consists of a context passage, a human-authored question, and the reference answer. The notation identifies which pieces belong to the same evaluation item.

```
Dₜₑₛₜ = {(cᵢ, qᵢ, aᵢ) | i = 1, …, n}
```

Here `Dₜₑₛₜ` denotes the evaluation dataset. The index `i` identifies an item, `n` is the number of items, and the range from `1` through `n` covers the collection. The braces collect the triples that satisfy the index range after the vertical bar. Within a triple, `cᵢ` is the passage, `qᵢ` is the human-written question, and `aᵢ` is its reference answer. Several questions can concern the same passage. The method can reuse adaptation to that passage when answering them.

The reader separates the weights that make text representations from the weights that turn those representations into predictions of answer boundaries.

```
θ = (θ_f, θ_h)
```

Here `θ` represents the full set of weights used for answering. The subscript `f` identifies the feature extractor, whose weights are `θ_f`. The subscript `h` identifies the answering head, whose weights are `θ_h`. The feature extractor represents the passage and question for use by the head. The head assigns scores to candidate positions for the start and end of an answer. This distinction matters because some variants give the head a fresh initialization, while the online procedure can start it from the weights learned on the preceding passage.

For a passage, the generator produces a collection of synthetic question–answer pairs.

```
{(q̂ᵢⱼ, âᵢⱼ) | j = 1, …, M}
```

The hat indicates an automatically generated quantity. The symbol `q̂ᵢⱼ` is synthetic question `j` for passage `i`, and `âᵢⱼ` is the corresponding synthetic answer. The index `j` ranges from `1` to `M`, where `M` is the number of generated pairs for the passage. The braces gather those pairs, and the vertical bar introduces the range. Selecting the answer from the passage gives the generator the positions used as training labels.

The passage-level objective is to minimize the sum of the answer losses over these exercises.

```
minimize over θ   ∑ⱼ₌₁ᴹ ℒₐₙₛ(cᵢ, q̂ᵢⱼ, θ)
```

The summation sign `∑` adds the contributions indexed by `j` from `1` to `M`. The term `ℒₐₙₛ` is the answer loss for a generated question and its passage, evaluated using weights `θ`. The passage in the single-context case is `cᵢ`, and the question is `q̂ᵢⱼ`. The reference positions for the accompanying `âᵢⱼ` enter through the loss below. In the neighbor setting, each generated question is paired with the passage from which it was constructed, so the optimization can include exercises tied to different passages in the retrieved group. Minimizing over `θ` means updating the weights to reduce the penalties the exercises assign to the predictions.

There is a penalty for each boundary of the answer.

```
ℒₐₙₛ = CE(ŷₛₜₐᵣₜ, âₛₜₐᵣₜ) + CE(ŷₛₜₒₚ, âₛₜₒₚ)
```

`CE` stands for cross-entropy. In this setting it penalizes the prediction according to the probability it assigns to the labeled position. The quantities `ŷₛₜₐᵣₜ` and `ŷₛₜₒₚ` denote the predictions over possible start and stop positions during training. The quantities `âₛₜₐᵣₜ` and `âₛₜₒₚ` are the known positions of the generated answer's first and last tokens. The plus sign combines the start and stop penalties. For instance, a prediction can place the beginning of a named entity correctly yet stop before its final word. Separate boundary losses supply a signal for the mistaken ending as well as for the correctly located beginning.

After adaptation, the reader predicts answer boundaries for the human question.

```
[yₛₜₐᵣₜ, yₛₜₒₚ] = g(c, q)
```

The function `g` is the question-answering reader with its adapted weights. The argument `c` is the target passage and `q` is the human question. The brackets enclose the returned positions, `yₛₜₐᵣₜ` for the start and `yₛₜₒₚ` for the stop. The answer is the text between those predicted boundaries. The retrieved passages, if used, supply practice exercises. The passage passed to `g` for the evaluation question is the one the question is about.

#### What changes across adaptation settings

Single-context learning uses the current passage as the whole source of local exercises. In the default setup the feature extractor is initialized from pretrained BERT for the BERT-Large reader, and the answering head starts from random weights. The next passage starts its own adaptation. The same procedure can also begin from a checkpoint that has been prepared using synthetic question answering. This setting asks how far the exercises derivable from one passage can prepare a reader for questions about it.

K-neighbor learning expands the practice material. The procedure indexes paragraphs from a Wikipedia dump in Elasticsearch and uses the incoming context as the basis of the search. It first removes frequent stop words from the passage to form a query. The retrieval system returns the top `K` similar paragraphs, where `K` determines the size of the retrieved group. The experiment caps the number of retrieved contexts at 500. The generators can then create question–answer pairs from these related paragraphs, applying the same span supervision to each question and the passage that gave rise to it.

The aim of this expansion is to provide more varied examples within the vicinity of the current topic. Several passages may describe the same kinds of events or mention similar kinds of entities. Each presents its own wording and answer spans. Practicing on such examples can broaden the available question patterns while maintaining a connection to the target passage. The search procedure uses the passage as the query, so it can build this pool before seeing the wording of the human question. Similarity is a criterion for collecting exercises. The final span is still selected from the target passage.

Curriculum learning changes the order in which the reader encounters synthetic questions. The authors group questions by generation method and try sequences intended to present examples of increasing complexity. The reported order comparisons use QA-SRL questions, template questions, and dependency-based questions. One ordering puts the short role questions first, then the templates, then the dependency-based rewrites. Other orderings move the role questions later. The experiment also uses random shuffling as a comparison. The point of keeping the number of examples equal in the curriculum setup is to make the arrangement of practice examples the variable of interest.

Online learning changes which weights are retained when another passage arrives. In the standard independent variant, the answering head begins each passage from its prescribed initial state. The online variant initializes the head for the current passage from the head learned on the preceding one. The authors also report that keeping the optimizer state across passages is important for the online setup. In this way, subsequent local updates build on a history of answering exercises. Online updating and retrieval can be combined, so the continuation from the previous passage and the group of exercises selected for the current one can both influence the answer.

#### Initialization and training controls

The experiments use BERT-Large with whole-word masking in its preparation and a smaller [DistilBERT](https://md.research.elamur.ai/free/en/papers/sanh-2019-distilbert-distilled-version-bert-smaller/) backbone. Both use transformer encoders to represent the input. BERT-Large has 345 million trainable parameters, while DistilBERT has 66 million parameters. DistilBERT was produced through distillation, which trains a smaller system to reproduce behavior learned by a larger one. Including it lets the authors examine whether passage-level practice still helps when the feature extractor has fewer adjustable weights.

The default initialization supplies a general-purpose pretrained feature extractor and a randomly initialized answering head for independent passage adaptation. The alternative initialization gives both the feature extractor and the head additional training on 100K synthetic question–answer pairs made from Wikipedia contexts. This stage uses the same general kind of generated task as passage adaptation. By the time an evaluation passage arrives, the reader can already have practice associating questions with answer boundaries. Its local updates then use exercises linked to the current passage or its retrieved group.

The study caps generation at 4000 questions per context and caps test-time training at 1500 steps. It describes the step count as dependent on the selected batch size, with the tested batch sizes in [16, 64]. A batch is the group of examples processed in an update. Different variants reach their strongest results well below the step ceiling, and the best online setting discussed in the results uses a shuffled pool averaging 3000 pairs per context and trains for 100 steps. For curriculum variants the authors specify an equal allocation of 1000 generated pairs per context.

The optimization uses [Adam](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/), with learning rates explored from 1e-5 to 5e-5. The learning rate governs the scale of updates. The maximum sequence length is 384, chosen from the 99th percentile of the combined lengths of passages and questions, with the stated aim of controlling memory and training overhead. Long documents are divided into windows with a stride of 128. The stride determines how far the next window starts from the preceding one, allowing the reader to process successive parts of a document within the sequence budget.

The paper reports running the experiments on two Nvidia RTX-8000 GPUs. It describes using ten percent of the training data for three hyper-parameter trials per variant, then training with three random seeds and reporting mean exact match and F1. These controls belong to the research evaluation. For a particular human question in the main unsupervised task, the passage supplies the local exercise material, and the reference answer is used to score the resulting prediction.

### Experiments and results

#### What the comparisons measure

The authors evaluate on SQuAD 1.1 and NewsQA. Both benchmarks ask readers to extract spans in response to human-written questions, while the passages come from different kinds of documents. SQuAD uses Wikipedia text, and NewsQA uses news articles. The test-time procedure needs the actual evaluation passages to produce its local training sets. Because the SQuAD 1.1 test split is hidden, the paper reports development results for its own method on that benchmark. It reports both development and test results for NewsQA.

Exact match, abbreviated EM, rewards agreement with the reference answer as a whole. F1 uses the overlap between the prediction and the reference, so an answer that includes the right name and additional words can receive some credit even if it misses exact match. The paper describes both scores as macro measures. The two numbers answer complementary questions about performance. A reader can improve at locating the relevant part of a passage while still struggling to mark the precise extent of the expected answer. Where the paper reports an EM and an F1 for the same setting, both help locate the remaining difficulty.

The main unsupervised comparisons include BERT-Large readers trained on synthetic data from Dhingra and colleagues, Lewis and colleagues, Li and colleagues, and Fabbri and colleagues. The paper also trains readers on its own combined synthetic corpus, which adds QA-SRL exercises to the set of question-generation strategies. It runs corresponding synthetic-data comparisons with DistilBERT where reported. These baselines ask how much the result depends on how the exercises are made, on the reader's size, and on organizing training around the incoming passage.

There is also a baseline called “All test contexts.” This setting trains on the collection of test contexts together using synthetic question–answer pairs. It is an important comparison because both the pooled procedure and the local procedures have access to evaluation text for self-supervision. Comparing them helps assess the value of grouping practice around each target passage once access to evaluation passages is part of the protocol. The supervised results provide a different point of reference. They show how readers trained with human-authored data score on the same benchmarks.

#### Results on SQuAD 1.1

On the SQuAD 1.1 development split, the strongest previous unsupervised BERT-Large result in the paper is Li and colleagues' 62.5 EM and 72.6 F1. The best test-time BERT-Large configuration reports 69.8 EM and 80.4 F1. That configuration combines a synthetic question-answering initialization, retrieved neighbors, and online updates. The fact that both metrics rise establishes that the gain includes more complete matches to the annotated answer as well as more overlap with it.

BERT-Large unsupervised methods on SQuAD 1.1 development F1 The strongest test-time configuration leads the synthetic-corpus comparisons.

**The numbers**

| System or setting | F1 |
| --- | --- |
| Dhingra et al. | 35.8 |
| Lewis et al. | 55.6 |
| Fabbri et al. | 56.8 |
| Authors’ combined synthetic corpus | 59.1 |
| Li et al. | 72.6 |
| BERT-Large K-neighbor Online TTL (this paper) | 80.4 |

The authors’ combined synthetic corpus scores 49.4 EM and 59.1 F1 with BERT-Large on the same development split. It exceeds some earlier sources of synthetic exercises while falling behind the Li and colleagues comparison. This matters when interpreting the best passage-adapted result. Providing a mixture of generators in a corpus is one change. Selecting and using exercises for the passage arriving at test time is another. The combined corpus result gives a baseline for what those generators support when used outside the strongest passage-level procedure.

The smaller DistilBERT reader reaches 58.1 EM and 68.9 F1 with the best test-time procedure on SQuAD 1.1 development. With Li and colleagues' synthetic data, its development scores are 42.6 EM and 48.3 F1. With the authors’ combined synthetic data they are 38.9 EM and 46.8 F1. The test-time result puts the smaller reader within reach of the previous BERT-Large unsupervised comparison on this dataset, while the best adapted BERT-Large remains ahead. The comparison supports the authors' claim that the approach can help a reader with fewer parameters.

Supervised scores put the SQuAD development result in perspective. FastQAExt scores 70.3 EM and 78.5 F1, and R-NET scores 71.1 EM and 79.5 F1. The best adapted BERT-Large has higher F1 than either of those supervised systems, while its EM is lower than both. Supervised BERT-Large scores 84.2 EM and 91.1 F1 on development, and supervised DistilBERT scores 77.7 EM and 85.8 F1. The result is competitive with some supervised systems under these comparisons. Stronger supervised results leave substantial room for improvement, including on the same backbones.

The paper gives conflicting assignments of the reported SQuAD gains to EM and F1 in its overview and results discussion. The labeled score pairs in its comparison table are the clearest basis for reading the benchmark result. Those pairs also make the evaluation split explicit. The prior Li and colleagues score for the hidden SQuAD test split belongs to a separate column, while the strongest test-time SQuAD result is reported on development.

#### Results on NewsQA

On the NewsQA development split, the best adapted BERT-Large configuration scores 38.9 EM and 53.2 F1. Li and colleagues' previous best unsupervised BERT-Large comparison scores 33.6 EM and 46.3 F1. On the NewsQA test split, the adapted BERT-Large scores 38.2 EM and 52.6 F1, while the Li and colleagues comparison scores 32.1 EM and 45.1 F1. Thus NewsQA provides a test-split result as well as the development result used in the variant comparisons.

BERT-Large unsupervised methods on NewsQA development F1 Passage-level adaptation gives the highest F1 among the reported unsupervised comparisons.

**The numbers**

| System or setting | F1 |
| --- | --- |
| Dhingra et al. | 27.6 |
| Lewis et al. | 28.5 |
| Fabbri et al. | 29.4 |
| Authors’ combined synthetic corpus | 37.6 |
| Li et al. | 46.3 |
| BERT-Large K-neighbor Online TTL (this paper) | 53.2 |

The best adapted DistilBERT scores 32.6 EM and 46.4 F1 on NewsQA development. Its test result is 30.5 EM and 45.2 F1. With Li and colleagues' synthetic data, DistilBERT scores 25.4 EM and 36.2 F1 on development and 27.1 EM and 35.4 F1 on test. The adapted smaller reader also reaches nearly the same NewsQA F1 as the previous BERT-Large unsupervised comparison on both splits. The associated EM scores differ, which is a reason to attach any claim of competitiveness to a specific metric.

The comparison with supervised training on NewsQA again depends on the reader. Supervised FastQAExt scores 43.7 EM and 56.1 F1 on development and 42.8 EM and 56.1 F1 on test. Supervised DistilBERT records 57.2 EM and 64.8 F1 on development and 56.1 EM and 63.5 F1 on test. The adapted BERT-Large approaches the FastQAExt F1 values more closely than it approaches the supervised DistilBERT results. The benchmark supports an improvement over the unsupervised comparisons even though the strongest reported supervised F1 values are higher.

The scores also clarify what transfers across the benchmarks. A method that works on Wikipedia passages could benefit from the fact that the synthetic initialization and the retrieval index draw on Wikipedia. The NewsQA results show that the same setup also improves on the compared unsupervised readers when the target passages are news articles. They measure adaptation in these two benchmark settings, each with its own human-written questions and answer criteria. The experiments do not establish a common difficulty scale across the benchmarks, so their raw scores are best read within each dataset.

#### Adding a small set of human questions

The paper also investigates [few-shot learning](https://md.research.elamur.ai/free/en/concepts/few-shot-learning/), where some human-authored training pairs are available. The question is whether passage adaptation remains helpful when the reader can use a small amount of the ordinary labeled material. This is a separate condition from the unsupervised results. The real training questions give the reader examples of how benchmark questions and answers are written, in addition to the synthetic practice associated with incoming passages.

In the SQuAD experiment, online test-time learning achieves 81.6% F1 with 100 labeled training examples. The paper presents this result as evidence that the method can reduce how many in-domain human-authored samples are needed to achieve a given level of performance. The comparison with the previous best unsupervised method also follows the systems as they receive increasing amounts of labeled data. The paper reports an advantage for online test-time learning along that comparison.

As more labeled examples are supplied, the methods in the few-shot comparison approach similar performance. They share a BERT-Large backbone. The pattern suggests that local synthetic practice is especially valuable in the part of the experiment where the supply of human questions is limited. With a larger pool of such questions, the readers can learn more of the benchmark's conventions through labeled training. The reported curve concerns SQuAD, so it gives a concrete result for that benchmark instead of a general estimate of how many annotations passage adaptation can replace.

### What the ablations show

#### Why the surrounding passages matter

The development comparisons cross several choices, including the backbone, initialization, and amount of context used for practice. The single-context and K-neighbor runs offer a direct way to examine what happens when retrieval expands the training group. For BERT-Large with the synthetic initialization, single-context adaptation scores 59.8 F1 on SQuAD 1.1 development and K-neighbor adaptation scores 78.3. On NewsQA development the corresponding values are 37.5 and 50.7. The runs in these pairs use the same backbone and initialization. They change where the procedure gets its local exercises.

DistilBERT shows the same direction of change. With synthetic initialization, the independent single-context and K-neighbor settings score 49.4 and 64.3 F1 on SQuAD 1.1 development. On NewsQA development they score 34.6 and 43.5. One passage supplies only the answer candidates and constructions it contains. Related paragraphs offer other ways of expressing similar subject matter and increase the available synthetic practice. The comparison measures their combined contribution. The paper offers the increased quantity of relevant examples as an explanation, while the comparisons leave the effect of quantity and the effect of similarity intertwined.

A second contrast uses all test contexts together. With synthetic initialization, BERT-Large trained in that pooled setting reaches 68.2 F1 on SQuAD 1.1 development and 43.5 F1 on NewsQA development. The independent K-neighbor procedure reaches 78.3 and 50.7 on those splits. For DistilBERT the pooled F1 scores are 47.4 and 38.7, compared with 64.3 and 43.5 for independent K-neighbor adaptation. The pattern supports the benefit of organizing training around a target passage and related text. Pooled training differs in the mixture of practice and in how it allocates updates across passages, so these results describe the effect of the training arrangements as a whole.

The authors use passages about the Normans to explain why this organization might help. Separate passages can mention different people as leaders because each relates to a different event or period. A question about leadership needs its answer from the passage at hand. Pooling exercises about the same broad subject can supply variety, but adaptation centered on the target passage can also reinforce the particular facts and phrasing that the human question will refer to. Retrieved paragraphs extend the practice pool while the question at evaluation remains tied to its designated passage.

The retrieval analysis varies `K` and finds that development F1 tends to improve as more neighbors are included, up to around 500 in the reported experiments. The pattern appears on both benchmarks and with both backbones. The authors hypothesize that there is a point beyond which the reader gains little from more synthetic pairs and may adapt too closely to quirks of their generation. The ceiling used in the setup and the observed approach to a limit give a sense of scale for these runs. They leave the best neighborhood size for a different index or dataset open.

#### What the initial weights contribute

The initialization comparison asks whether earlier synthetic QA training prepares the reader for more effective updates on each evaluation passage. Under the default initialization, independent K-neighbor BERT-Large scores 66.2 F1 on SQuAD 1.1 development and 41.6 F1 on NewsQA development. With synthetic QA initialization, the same variant reaches 78.3 and 50.7. The effect also appears in the online version. BERT-Large K-neighbor Online goes from 68.7 to 80.4 F1 on SQuAD 1.1 development and from 46.3 to 53.2 F1 on NewsQA development.

BERT-Large adaptation variants on SQuAD 1.1 development F1 after synthetic QA initialization Retrieved neighbors improve on single-passage practice, and the online neighbor setting has the highest F1.

**The numbers**

| System or setting | F1 |
| --- | --- |
| Single-Context | 59.8 |
| Single-Context Online | 61.8 |
| All test contexts | 68.2 |
| K-neighbor | 78.3 |
| Curriculum | 79.7 |
| K-neighbor Online (this paper) | 80.4 |

The initialization experiment changes the feature extractor and the answering head together. The results establish the value of the joint preparation in these runs. The design leaves the contributions of the two components individually unresolved. Training curves also show faster convergence with the synthetic starting weights. This is important for interpreting best scores alongside latency. Local training can use fewer steps when the initial reader is already accustomed to synthetic span extraction.

The paper studies initialization corpora with 50k, 100k, and 200k synthetic question–answer pairs and reports the strongest performance from 100k. This identifies the best of the corpus sizes the authors tried in this procedure. It also shows why the size of a synthetic corpus should be distinguished from the usefulness of its exercises. Increasing the count in that sweep did not produce a steady increase in the downstream result. The authors also observe that a synthetically prepared DistilBERT can perform comparably to BERT-Large without that preparation in the analyses of training steps and pair counts.

#### What carries over from one passage to the next

The online comparison examines whether retaining the answering head helps subsequent passages. On NewsQA development with synthetic initialization, BERT-Large single-context adaptation reaches 37.5 F1, while the single-context online setting reaches 39.1. With retrieved neighbors, the independent and online values are 50.7 and 53.2. On SQuAD 1.1 development, DistilBERT with the same kind of initialization scores 49.4 F1 in single-context adaptation and 55.6 in the online counterpart. With neighbors, its independent and online scores are 64.3 and 68.9. The online advantage therefore appears for both sources of local practice in these comparisons.

Online updates also change the number of steps needed to reach the strongest reported performance. The authors describe a best online setup that reaches its best result within 100 training steps at a batch size of 48. In their discussion of that comparison, the base procedure takes around 300 to 500 steps. This is consistent with an answering head arriving at a new passage already able to use patterns learned in earlier exercises. Part of the measured effect can also involve the carried optimizer state, which the authors describe as important to the online procedure.

Reusing weights introduces sensitivity to the order in which the passages arrive. The authors examine different random orders and report a deviation of ±1.6% in F1. They interpret this as a minor effect for the orders they tried. The observation describes the tested random sequences. A stream arranged by topic, time, or source could make the preceding passage more or less informative than it was in those sequences.

The paper finds that batch size and learning rate matter for online adaptation. Resuming at the learning rate from the last epoch of synthetic QA pretraining gives the strongest reported online F1, and the procedure uses no weight decay. For base test-time learning the reported best setting uses a fixed learning rate of 3e-5 and batch sizes of 32-48. The authors also propose that statistics accumulated during synthetic QA training could account for some of the improvement. That explanation is presented as a hypothesis alongside the measured effects of initialization and optimization.

#### What order and amount of practice help

The curriculum study compares structured orders of synthetic questions with a shuffled set. The reported orders differ in where they place QA-SRL, template-based, and dependency-based questions. With synthetic initialization, BERT-Large K-neighbor Online reaches 80.4 F1 on SQuAD 1.1 development when shuffled and 79.7 when role questions come first, templates next, and dependency-based questions last. Starting with templates and ending with dependency-based questions yields 77.6. Putting the role questions last yields 75.3.

NewsQA development shows a similar ordering for those initialized BERT-Large runs. The shuffled version records 53.2 F1. The curriculum beginning with QA-SRL records 52.8, and the version ending with QA-SRL records 47.2. The pattern also appears with synthetically initialized DistilBERT. On NewsQA development, its shuffled score is 46.4 F1, the curriculum with role questions first reaches 45.8, and the curriculum with role questions last reaches 39.2. The shuffle performs well with the strongest initialization, while the position of the role questions gives a more specific pattern across the compared curricula.

There is an exception to a universal preference for shuffling. With default initialization, BERT-Large on NewsQA development scores 46.3 F1 when shuffled and 46.7 with QA-SRL, templates, and dependency-based questions in that order. The authors suggest that ending the curriculum with the shorter, vaguer role questions may steer the reader too far toward that style of exercise. This would account for the weak role-last results if earlier exposure to more natural questions becomes less influential by the end. The scores establish the ordering effect for the tested schedules. The proposed mechanism remains an interpretation of that effect.

The separate training-budget analyses vary the number of updates and the number of generated questions. Across the variants discussed there, those initialized on synthetic QA reach their top development performance within 150 training steps, while default initialization needs 200−300 steps. The strongest F1 values in the question-count analysis occur around 3k synthetic pairs. These observations concern different comparisons from the specific online run at a batch size of 48. Together they show that the benefit depends on the starting weights, the amount of practice available, and how the procedure turns that practice into updates.

#### Which mistakes the generators help explain

The authors manually inspect 100 wrong answers from the SQuAD validation split. One recurring pattern is the selection of a named entity even when the question asks for another kind of expression. In an example about changing European Union law, the human question asks which of two descriptions applies to the difficulty of making a change. The adapted DistilBERT selects the name of the institution, while the reference is the comparative adjective indicating greater difficulty. The reader locates words connected to the topic of the question but chooses a span of the wrong type.

That result fits the way several generators select answers. An exercise that begins by finding a named entity repeatedly teaches the answering head to look for entities. QA-SRL broadens the available answer types, yet its generic wording can differ substantially from the wording of a human question. The study therefore provides evidence of a mismatch between synthetic practice and evaluation. It leaves open how much of the error rate a richer generation scheme would resolve.

Other errors concern how much text to extract. The paper illustrates predictions that give an institution without a qualifying phrase, a description of a person with different boundaries from the annotation, or a fuller version of a name recorded more briefly in the reference. In one example about blocking legislation, the missing qualification changes which part of an institution has the relevant power. In the example about Desmond Tutu, the longer prediction can refer to the same person as the shorter reference. Exact match treats boundary disagreements as failures in both cases, while their implications for comprehension differ. The examples explain why viewing a predicted span alongside the question can add information to the benchmark scores.

### Limitations

#### Limits the authors identify

The largest immediate cost is the extra work between receiving a passage and returning its answers. In the best online BERT-Large configuration, 100 training steps at a batch size of 48 lead to ∼5 minutes of inference time per context. The datasets have an average of 6−7 questions per context, so a passage update can serve several questions. The best DistilBERT variant averages 1.6 minutes per context with mixed-precision training and storage of intermediate weights in RAM through tmpfs. These times describe the experimental configurations and include the effect of choices made to make local training more tractable.

The paper gives ∼ 10K samples/sec as a conventional inference figure on an Nvidia V100 16GB. The units and hardware differ from those in the passage adaptation timings, so the figures support a broad distinction in operating cost instead of a controlled throughput comparison. The authors propose that more capable hardware and more efficient encoders could reduce adaptation time. They name Linformer and [Big Bird](https://md.research.elamur.ai/free/en/papers/zaheer-2020-big-bird-transformers-longer-sequences/) as possibilities. The measured times concern the evaluated backbones. They leave the speed and accuracy of those proposed alternatives unmeasured.

The authors identify the coverage of the question generators as another limit. Named entities are easy for several procedures to select, and the error inspection finds that the reader favors them. Role-based generation can offer answer phrases of other types, while its questions can be vague and conspicuously synthetic. The resulting training set may give the reader limited practice with the particular combinations of answer type and question wording that human authors use. The authors identify generating a broader range of both as a direction for improvement.

The paper's ethical discussion emphasizes that a passage can contain false, biased, or propagandistic claims. A system trained to extract answers from it can reproduce those claims in its answers. The authors suggest that giving an independently adapted reader a fact-checked passage could help limit some reliance on associations inherited from earlier corpora. This is a proposal about where bias might enter and how the passage could make its source more traceable. The reported experiments measure answer agreement and overlap. The degree of bias reduction under that proposal remains unmeasured.

#### Limits of what the evaluation establishes

The motivation includes changing facts, shifts in domain, and changes in language over time. The experiments evaluate benchmark passages from SQuAD and NewsQA, including a study of random passage orders for the online method. A benchmark item can test whether the reader selects the span licensed by a particular passage. Testing adaptation to a changing stream would also require specifying what changes, how quickly it changes, and how earlier updates affect answers to later text. The benchmark results give evidence for adapting to individual inputs under the studied protocol. They leave robustness to a timed sequence of revisions or a sustained change in language open.

The unsupervised label concerns the use of human-written question–answer annotations for training in the main comparison. The pipeline draws on pretrained feature extractors, tools that analyze text, earlier question generation rules, and a Wikipedia index when retrieval is enabled. Its strongest configuration also uses a separate synthetic QA pretraining stage. These resources matter when assessing how the procedure would transfer to a language or domain where suitable analyzers or related passages are scarce. The reported scores give an assessment of the method with those resources in place.

Because self-supervision is built from the evaluation passages, the protocol also depends on access to the text before the human question is answered. That is compatible with a reading task in which a passage is part of the input. It changes what counts as the cost of serving a new passage. Access to the text, generation of practice pairs, and parameter updates are part of the evaluation procedure. The pooled baseline makes one comparison under that access assumption. The performance of a system constrained to use fixed weights at prediction time belongs to a different operating condition.

The standard variant starts its passage-level updates afresh, while the best variant uses related external passages and carries forward its answering head. The largest headline gains therefore come from a procedure in which evidence from the current passage is combined with practice from a wider neighborhood and the state left by earlier updates. The single-context results measure the narrower case directly. This distinction matters for applications with independent passages, restrictions on retrieval, or a need to reproduce an answer without replaying an earlier stream.

Finally, the choice of an extractive task defines what success can look like. The returned answer is a span from the passage, and the benchmarks score it against human-labeled text. Such scores can reveal improvements in locating and delimiting the expected answer. They do not directly measure verification of a claim or the reasoning used to reach the span. Even within extraction, examples in the error analysis show that a boundary disagreement can range from a meaningful omission to a fuller phrase for the same referent. Claims about the system's comprehension are strongest when tied to the measured answer-selection task.

### What came after

[Entity-Based Knowledge Conflicts in Question Answering](https://md.research.elamur.ai/free/en/papers/longpre-2021-entity-based-knowledge-conflicts-question/) cites this paper and takes up the related problem of conflicting knowledge about entities in question answering. The connection is clearest in situations where the answer expected from a supplied passage differs from an association learned previously. Banerjee and colleagues approach that tension by adapting the reader on exercises derived from the incoming text. The citation establishes a connection between the studies. Whether the later study used those exercises or evaluated the same adaptation procedure is unspecified.

[Harnessing Test-time Adaptation for NLU tasks Involving Dialects of English](https://md.research.elamur.ai/free/en/papers/nguyen-2025-harnessing-test-time-adaptation-nlu/) also cites the paper and studies test-time adaptation for [natural language understanding](https://md.research.elamur.ai/free/en/concepts/natural-language-understanding/) tasks involving dialects of English. The point of contact is the timing of adaptation. Banerjee and colleagues use the arrival of a new passage as an opportunity to learn before answering. The later work considers test-time adaptation in a setting where the linguistic variety of the input is part of the problem. The connection establishes a shared research direction, while the later work's adaptation objective, tasks, and results cannot be inferred from the citation and title alone.

## Cite

Cite as Pratyay Banerjee, Tejas Gokhale and Chitta Baral. 2021. Self-Supervised Test-Time Learning for Reading Comprehension. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2021.naacl-main.95](https://doi.org/10.18653/v1/2021.naacl-main.95)

```bibtex
@inproceedings{banerjee2021self,
  title = {{Self-Supervised Test-Time Learning for Reading Comprehension}},
  author = {Pratyay Banerjee, Tejas Gokhale and Chitta Baral},
  booktitle = {Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.95},
  url = {https://doi.org/10.18653/v1/2021.naacl-main.95}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
