Semi-supervised Question Answering

Machine Learning
Introduced by
Multiple (Chapelle et al.; Zhu; Clark et al. for NLP applications)
Year
2006–2020
Type
Semi-supervised learning applied to extractive/generative QA
Family
Deep learning / NLP / CV

What does it do?

Semi-supervised question answering (QA) trains a model on a small labeled set of question-answer pairs, uses it to generate pseudo-labels on a larger unlabeled corpus, and retrains iteratively.

The self-training loop can increase the effective training data without manually annotating every example. Whether it helps depends on the quality of the seed model and on the domain, so gains should be checked on a held-out labeled set.

The intuition behind the method

Annotating question-answer pairs at scale is expensive. Semi-supervised QA uses unannotated text by letting a model trained on a small seed set answer questions on unlabeled passages and treating those answers as provisional labels. Confident predictions are added to the training data and the model is retrained. This resembles studying a few solved examples, attempting new problems, and checking the results against an answer key, except that the model writes its own provisional key, so its errors can also be reinforced.

History

Semi-supervised learning has been a core machine learning topic since the 2000s. Its use in question answering became practical once pre-trained transformers made seed models strong enough to produce usable pseudo-labels.

When to use it

Use semi-supervised QA when labeled question-answer triples are scarce but a large unlabeled corpus from the same domain is available, as in biomedical, legal, or technical literature where annotation is costly. It is also suited to low-resource languages and niche domains where pre-trained QA models transfer poorly. Do not use it when labeled data is already plentiful, because the added gain is likely small relative to the extra complexity and compute. Avoid it when no domain-relevant unlabeled text exists, and when the seed model's confidence is consistently low, since pseudo-labels from a weak model can add more noise than signal. Threshold tuning and early stopping both require a labeled held-out development set, and a separate clean test set is preferable for final reporting. These labels come out of the same scarce labeled budget, so that budget must cover them. Without a labeled development set, the self-training loop cannot be validated.

Limitations and considerations

  • Quality of pseudo-labels is bounded by the seed model; a weak seed produces noisy labels that can degrade performance.
  • Requires access to a large, domain-relevant unlabeled corpus — not always available.
  • Multiple retraining rounds are computationally expensive, especially with large transformer models.
  • Confidence threshold is a sensitive hyperparameter: too high filters useful data; too low admits noise.
  • Model can develop confirmation bias, becoming increasingly confident in its own errors over rounds.
  • Self-training assumes that the unlabeled passages come from the same distribution as the labeled data and that the seed model is reasonably calibrated. Under strong domain shift or miscalibration, confident pseudo-labels can be systematically wrong, and self-training may then degrade performance rather than improve it.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Can enlarge the effective training set without annotating every example, provided a usable seed model exists.
  • Draws on unlabeled domain text, which is often available even when labeled QA data is not.
  • Confidence filtering removes low-confidence pseudo-labels before they enter training, which limits noise.
  • The seed model can be any pre-trained transformer encoder with a span-prediction head, such as BERT, RoBERTa, or ELECTRA.
  • Iterative rounds can improve label quality as well as the model, provided development-set monitoring detects stalls.
  • Covers extractive (span) and generative QA, since pseudo-labels can be spans or generated strings.

Applications

  • Low-resource domain QA (biomedical, legal, technical) where labeled triples are scarce.
  • Open-domain QA over large knowledge bases with only a small annotated seed set.
  • Reading comprehension in low-resource languages lacking large annotated corpora.
  • Periodic retraining of a deployed QA system on unlabeled production questions and passages, with confidence filtering.

How it works

How it works

1

A base QA model, typically a pre-trained transformer such as BERT or RoBERTa with a span-extraction or generative head, is fine-tuned on the small labeled set of (question, context, answer) triples. This gives the system an initial ability to answer questions on in-domain text.

2

The seed model is applied to a large pool of unlabeled passages. For extractive QA, the model predicts start and end token positions; for generative QA, it generates answer strings. These predictions serve as provisional (pseudo) labels for the unlabeled examples.

3

Pseudo-labeled examples are ranked by model confidence, typically the softmax probability of the predicted span or the beam-search score of the generated answer. Only examples exceeding a confidence threshold are retained, reducing noise injected into the next training round.

4

The model is retrained on the union of the original labeled data and the accepted pseudo-labeled examples. This is typically repeated for several rounds: each round can improve label quality, which can in turn improve the pseudo-labels in the next round. This feedback loop is known as self-training or bootstrapping.

5

Model quality is tracked on a held-out labeled development set using standard QA metrics: Exact Match (EM) and F1 for extractive tasks, or ROUGE/BLEU for generative tasks. Training stops when development-set performance plateaus or declines (early stopping), and the same rule is used to decide when to stop adding self-training rounds.

Common pitfalls

  • Using a confidence threshold calibrated on a different domain — recalibrate on your domain's development set.
  • Ignoring label noise accumulation across rounds without a denoising or re-weighting strategy.
  • Evaluating only on the pseudo-labeled set rather than a clean held-out labeled set.
  • Failing to monitor for confirmation bias by tracking both precision and recall across self-training rounds.
  • Mixing pseudo-labeled and labeled data without up-weighting the gold-labeled examples in loss computation.

Frequently asked questions

How many labeled examples do I need to start?

There is no universal minimum number of labeled examples. The practical test is whether the seed model reaches reasonable development-set performance; if it does not, its pseudo-labels are unlikely to be reliable, and more labeled data or a stronger pre-trained backbone is the better next step.

What confidence threshold should I use?

There is no universal value, so tune it on your development set. Use one consistent definition of the threshold, such as a softmax probability or a beam-search score, rather than mixing percentile ranks with probabilities. Relax the threshold across rounds only if development-set metrics keep improving, and monitor dev-set F1 at each round rather than relying on a fixed threshold.

How many self-training rounds are sufficient?

No fixed number of rounds applies across tasks. Stop when development-set EM or F1 plateaus or declines, following the same early-stopping rule used in the evaluation step.

Can I combine this with data augmentation?

It can be combined with self-training. Question generation models can produce additional (question, passage) pairs from unlabeled text. Generated questions can be noisy, so they should pass the same confidence filtering and be validated on the development set before they are added to training.

Is this the same as transfer learning or fine-tuning?

No. Transfer learning reuses representations from a pre-trained model on a labeled target dataset. Semi-supervised QA additionally exploits unlabeled target-domain text through iterative pseudo-labeling, which makes it a distinct strategy for low-label regimes.

Related methods

Sources

  1. Clark, K., Luong, M.-T., Le, Q. V., & Manning, C. D. (2020). ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators. In Proceedings of ICLR 2020.

    Open publication reference
  2. Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov, R., & Le, Q. V. (2019). XLNet: Generalized Autoregressive Pretraining for Language Understanding. In Advances in Neural Information Processing Systems (NeurIPS 2019).

    Open publication reference