- Introduced by
- Lewis, P.; Alberti, C. et al. (multiple independent groups ~2019)
- Year
- 2019
- Type
- Self-supervised NLP training paradigm
- Family
- Deep learning / NLP / CV
What does it do?
Self-supervised Question Answering (SSQA) trains question answering models on synthetic question-answer pairs generated automatically from unlabeled text.
Lewis et al. (2019) convert candidate answers into cloze questions and translate them into natural questions, while Alberti et al. (2019) combine question generation, answer extraction and roundtrip-consistency filtering. The training data is produced by the procedure itself rather than by human annotators, although the published reproducible setting of Alberti et al. relies on labeled extractive data for its generator and extractor.
The intuition behind the method
Imagine a large collection of documents with no annotations showing which passages answer which questions. SSQA treats the text itself as the source of supervision: it selects an answer span from a passage, generates a question for that span, and uses the resulting question, answer and passage triples to train a reader model. Roundtrip consistency acts as a quality filter: a QA model must recover the original answer from the generated question, and pairs that fail this check are discarded.
History
Two ACL 2019 papers are the basis of the approach in the cited literature. Lewis, Denoyer and Riedel introduced unsupervised extractive QA through cloze translation, motivated by the time and cost of building QA data for limited domains and languages. Alberti et al. introduced synthetic QA corpus generation with roundtrip-consistency filtering. Alberti et al. build their models on pretrained BERT.
When to use it
Choose SSQA when you need an extractive question answering system but lack labeled question-answer pairs, for example for a language, a specialised domain or an internal document collection where annotation is costly and a large unlabeled corpus is available. It can also supplement a small labeled dataset with additional training pairs. Avoid it when large, well-matched annotated data already exists, since supervised training is the standard alternative. It is a poor fit when the corpus is small, because the generated pairs may lack variety, and when the target questions differ strongly from generated ones and no real, human-written evaluation set can be built. The cited works address extractive QA; for free-text answers the generation approach needs separate checking.
Limitations and considerations
- Generated questions may differ in style from real user questions, so the reader can fit the synthetic distribution rather than the target one.
- Errors in the cloze-to-question step or the answer-extraction step propagate into the training data, so the quality of these generators bounds the quality of the pairs.
- The reproducible setting in Alberti et al. fine-tunes the generation and extraction models on labeled extractive subsets of SQuAD2 and NQ, so that variant is not free of labeled data.
- The roundtrip filter is itself a QA model, so its errors shape the training set: a weak filter can discard valid pairs, and the filtering step adds computation.
- Specialised vocabulary or syntax may require a question generator adapted to the domain; the reported evaluations cover SQuAD and NQ rather than specialised domains.
- The cited works report strong results on SQuAD and NQ under specific setups, so the gap to supervised training should be measured on the target data rather than assumed.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Lewis et al. derive training triples from unlabeled text, so their setting needs no human-written questions or answers. The labeled-data dependency of the Alberti et al. reproducible setting is discussed under limitations.
- Lewis et al. report 56.4 F1 on SQuAD v1 without using the SQuAD training data, which indicates that a reader trained only on synthetic pairs can answer human questions to a useful degree.
- Roundtrip consistency gives a concrete, checkable filter: a generated pair is kept only if a QA model recovers its answer. Alberti et al. combine this filter with question generation and answer extraction in a pipeline that yields improvements on SQuAD2 and NQ.
- In the Lewis et al. setting, answer candidates come from simple sources such as noun phrases and named entities, so the answer-selection stage does not depend on a labeled answer-extraction dataset.
- The reader can be any pretrained transformer; Alberti et al. build their pipeline on a publicly available BERT model.
Applications
- Building extractive QA for low-resource languages or domains where no labeled QA dataset exists.
- Adapting a reader to a specialised document collection as an alternative or complement to manual annotation.
- Adding synthetic question-answer pairs to a small labeled dataset before supervised fine-tuning.
- Pretraining a reader on synthetic corpora before target-task training, the strategy reported by Alberti et al.
How it works
How it works
Passages are drawn from a large collection of unlabeled documents. Lewis et al. sample random context paragraphs from such a corpus, so the choice of source text affects the topics and style of the generated pairs. Documents are typically divided into paragraph-length passages before answer selection, since the cited pipelines operate on paragraph contexts.
The cited pipelines use different approaches. Lewis et al. first turn each candidate answer into a fill-in-the-blank cloze question and then translate the cloze into a natural question, either with an unsupervised neural machine translation model trained on non-aligned sets of cloze and natural questions, or with a rule-based method. Alberti et al. generate questions with a model that, in their reproducible setting, is a publicly available BERT model fine-tuned on the extractive subsets of SQuAD2 and NQ; they also describe a stronger variant with full sequence-to-sequence pretraining for question generation.
Answer candidates are selected from each passage. Lewis et al. use random noun phrases or named entity mentions as answers. Alberti et al. use a separate answer extraction model, which in their reproducible setting is also fine-tuned on labeled extractive data from SQuAD2 and NQ. The goal is to obtain answer spans around which a coherent question can be formed.
Each generated question is answered by a QA model over its source passage. If the predicted span matches the answer used to create the question, the triple is kept; otherwise it is discarded. Alberti et al. introduce this filter to enforce roundtrip consistency. The matching criterion is an implementation choice (for example exact match or token-level overlap, possibly with a threshold), so it should be selected and reported explicitly. The filter removes ill-formed or ambiguous pairs, but a weak filtering model can also discard valid ones.
The filtered synthetic corpus is used to train a reader. Lewis et al. train a QA model on synthetic data alone, without the SQuAD training data, and describe the reader as a modern QA model. Alberti et al. pretrain on the synthetic corpora before the target-task training stage and build their pipeline on pretrained BERT. The standard extractive reader predicts a start and an end position over the passage tokens and is trained with cross-entropy over these two positions. Learning rate, batch size and number of epochs are configuration choices that vary between implementations and should be set and reported for the target task.
A trained reader receives a question and a passage and predicts an answer span. The cited works report results on extractive benchmarks: Lewis et al. report 56.4 F1 on SQuAD v1 without using SQuAD training data, and Alberti et al. report improvements on SQuAD2 and a new state-of-the-art on Natural Questions when synthetic corpora are used for pretraining. These figures depend on the specific setup and should not be compared with other systems without checking the protocol.
Common pitfalls
- Using a very small or noisy corpus — low-quality source documents produce low-quality synthetic QA pairs regardless of filtering.
- Skipping roundtrip consistency filtering and training directly on all generated pairs, which can introduce label noise.
- Evaluating only on the synthetic validation set and not on a real held-out human-annotated benchmark.
- Treating synthetic answer spans as exhaustive — many valid answers in a passage may not be captured by heuristic extraction.
- Ignoring the mismatch between synthetic question style and the target deployment questions, leading to poor real-world performance.
Frequently asked questions
Does self-supervised QA require any labeled data at all?
It depends on the variant. Lewis et al. train on synthetic data without using the SQuAD training data. In the reproducible setting described by Alberti et al., the question generation and answer extraction models are fine-tuned on labeled extractive subsets of SQuAD2 and NQ. Pretrained backbones are also trained beforehand, which should be considered before describing a pipeline as label-free.
How does roundtrip consistency improve quality?
A QA model is applied to each generated question and its passage. If it predicts the answer used to create the question, the triple is kept; otherwise it is discarded. This removes pairs whose question does not lead back to its answer, although it can also remove valid pairs when the filtering model is weak.
Can SSQA match supervised models?
The cited results depend strongly on setup. Lewis et al. report 56.4 F1 on SQuAD v1 without using SQuAD training data and state that their approach outperforms early supervised models. Alberti et al. report improvements on SQuAD2 and a new state-of-the-art on NQ when synthetic corpora are used for pretraining. The reported comparisons are with early supervised models, so evaluate against current supervised baselines on your own benchmark.
What kind of QA does SSQA support: extractive or generative?
The cited works address extractive QA, where the answer is a span of the passage. Lewis et al. target extractive QA, and Alberti et al. evaluate on extractive subsets of SQuAD2 and NQ. Free-text generative variants are not covered by the cited sources, so their suitability should be checked separately.
How large does the unlabeled corpus need to be?
Lewis et al. draw passages from a large document collection, and larger, more varied corpora usually yield more diverse synthetic pairs. No minimum corpus size is given, so check pair diversity and accuracy on a held-out set before relying on a particular corpus.
Related methods
Sources
Lewis, P., Denoyer, L., & Riedel, S. (2019). Unsupervised Question Answering by Cloze Translation. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (ACL 2019), pp. 4896–4910.
Open DOI referenceAlberti, C., Andor, D., Pitler, E., Devlin, J., & Collins, M. (2019). Synthetic QA Corpora Generation with Roundtrip Consistency. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (ACL 2019), pp. 6168–6173.
Open DOI reference