Does QA-based intermediate training help fine-tuning language models for text classification?

Shiwei Zhang, Xiuzhen Zhang

Introduction

In the standard NLP pipeline, a pre-trained language model (LM) is fine-tuned directly on a specific downstream task. Recently, researchers have explored an "intermediate" stage: training the model on a data-rich, complex task—such as SQuAD for question answering—before moving to the final target task. This approach, known as STILTs (Supplementary Training on Intermediate Labeled-data Tasks), is often hypothesized to teach models high-level reasoning skills that transfer universally.

However, most previous studies focused on a single model (usually BERT) and a limited set of tasks. This paper investigates whether QA-based intermediate training actually provides consistent benefits across different language model architectures and diverse text classification tasks.

Methods

The researchers employed a three-stage training pipeline to evaluate the impact of intermediate training:

  1. Pre-training: Utilizing standard off-the-shelf LMs.
  2. Intermediate Training: Fine-tuning the LM on SQuAD-2.0, where the model must extract answers from text or determine if a question is unanswerable.
  3. Target Fine-tuning: Transitioning the "SQuAD-tuned" model to the final text classification task by replacing the span classification head with a standard sequence classification head.
The three-stage training pipeline: Pre-training, Intermediate Training on SQuAD-2.0, and final Fine-tuning.

To ensure architectural robustness, the study tested four models: ELECTRA and RoBERTa (base models), alongside MobileBERT and SqueezeBERT (compact models designed for efficiency).

Datasets and Experimental Setup

The study utilized a comprehensive suite of 16 target tasks, categorized into single-sequence tasks (e.g., sentiment analysis, topic classification) and sequence-pair tasks (e.g., Natural Language Inference, semantic similarity, and QA-related classification). The intermediate task remained SQuAD-2.0 across all experiments.

Key Insights and Ideas

  • Task Similarity Trumps "Reasoning": The most significant finding is that intermediate training on SQuAD-2.0 only consistently improved performance on tasks that were "QA-like" (e.g., QNLI, WIKIQA). For general tasks like sentiment analysis or topic classification, the benefits were marginal or non-existent.
  • The [CLS] Token Hypothesis: The authors suggest that SQuAD-2.0 helps QA-related tasks because it trains the [CLS] token to identify if an answer exists in the text. This specific skill transfers well to tasks asking "does this sentence answer this question?" but offers little for tasks like emotion detection.
  • Model Sensitivity: Transferability varies by architecture. For instance, while RoBERTa and MobileBERT saw slight gains on sentiment analysis (SST2), ELECTRA's performance dropped, suggesting that internal representation dynamics affect how knowledge is transferred.
  • Data-Poor Task Struggles: Contrary to expectations, intermediate training did not consistently "save" models on small datasets (like IRONY or EMOTION). In many cases, the extra training stage actually led to worse results on these smaller datasets.

Key Results

The results highlight a clear divide between task types. All four models showed consistent, significant improvements on QA-related tasks such as QNLI, WIKIQA, and BOOLQ. For example, MobileBERT's performance on WIKIQA jumped from 40.18% to 52.60% after intermediate training.

Performance comparison across sequence-pair tasks. Bold values with (+) indicate improvements from intermediate training (T).

Conversely, results were mixed or negative for other tasks. On the AGNEWS topic classification task, three out of four models saw a performance decrease. Similarly, on the QQP (Quora Question Pairs) dataset, intermediate training led to a performance drop across all models, suggesting that the extractive nature of SQuAD might interfere with the comparative nature of semantic similarity tasks.

Conclusion

The authors conclude that "task similarity" is a much more reliable predictor of transfer success than the perceived "complexity" of the intermediate task. While QA-based intermediate training is highly effective for QA-related classification, it is not a universal performance booster for general text classification. Future work should focus on developing metrics to quantify task similarity before committing computational resources to intermediate training stages.

Summary updated

BibTeX
@inproceedings{zhang2021does,
  author = {Shiwei Zhang and Xiuzhen Zhang},
  title = {{Does QA-based intermediate training help fine-tuning language models for text classification?}},
  booktitle = {ALTA},
  year = {2021},
}
Figure