Test-Time Self-Adaptive Small Language Models for Question Answering

Soyeong Jeong, Jinheon Baek, Sukmin Cho, Sung Ju Hwang, Jong C. ParkEMNLP 2023 · DOI

TL;DR

This paper introduces T-SAS, a novel test-time self-adaptive method for smaller language models (LMs) that improves their performance on question-answering tasks without requiring any labeled data. By stochastically generating multiple answers and then filtering out low-quality ones, T-SAS significantly boosts accuracy and robustness, making LMs more stable and adaptable to specific tasks.

What Problem Does This Paper Address?

Large language models (LMs) have demonstrated impressive capabilities in various tasks, including question answering (QA). However, when faced with specific downstream tasks, their performance can be suboptimal due to limitations in transferring and adapting their vast general knowledge. While fine-tuning with labeled data is a common solution, obtaining such data is often infeasible. Furthermore, smaller LMs, which are more accessible, struggle to adapt to new tasks with only unlabeled data. This paper tackles the challenge of enabling smaller LMs to self-adapt to target QA tasks using only unlabeled test data, aiming to bridge the gap between general knowledge and task-specific performance.

Methods

The core of the proposed T-SAS method lies in its test-time self-adaptation strategy, which operates without any labeled data. The process involves two key steps:

  1. Stochastic Self-Ensemble: Instead of relying on a single generated answer, T-SAS generates multiple candidate answers for a given question and its associated document. This is achieved by leveraging Monte Carlo (MC) dropout during the inference phase. MC dropout randomly masks weights, effectively creating diverse "views" of the model's knowledge and leading to a richer set of potential answers.
  2. Filtering: To mitigate noise and inaccuracies from the self-generated answers, T-SAS employs a filtering strategy. This involves identifying and discarding low-quality samples. The paper proposes a method to filter out potentially incorrect answers based on their agreement within the self-ensemble. Specifically, answers with a vote count below a certain threshold are removed, ensuring that the pseudo-labels used for adaptation are more reliable.

The adapted LM is then trained on these high-quality self-generated pseudo-labels, allowing it to improve its performance on the target task during test-time.

Datasets

The paper evaluates T-SAS on three standard question-answering datasets augmented with external documents:

  • Natural Questions (NQ): Composed of questions sourced from Google Search.
  • TriviaQA (TQA): A large-scale, distantly supervised challenge dataset for reading comprehension, collected from the web.
  • SQuAD v1.1 (SQD): Constructed by annotators writing questions based on provided passages.

The experiments also include evaluations on specific domains like SciQ (science) and cpgQA (clinical), as well as on the T0-3B model, to assess domain adaptability and generalizability across different LM architectures.

Key Insights and Ideas

  • Smaller LMs Can Self-Adapt: A significant finding is that even smaller LMs, often overlooked for their limited capacity, can achieve substantial performance gains through self-adaptation at test-time, provided the right strategies are employed.
  • Unlabeled Data is Sufficient: The paper demonstrates that high-quality self-generated pseudo-labels, derived from unlabeled test data, can be effectively used for adaptation, alleviating the need for costly labeled datasets.
  • Diversity is Key, but Noise is a Problem: While generating diverse answers (via MC dropout) is crucial for exploring different perspectives, simply ensembling them isn't enough. The filtering step is essential to remove unreliable answers and prevent performance degradation.
  • Filtering is Crucial for Smaller LMs: The effectiveness of filtering is highlighted, especially for smaller LMs. Unlike large LMs where filtering might be less critical, smaller models benefit significantly from removing noisy self-generated labels.
  • Robustness to Prompts: T-SAS shows improved robustness to variations in prompts, a common issue with LMs, making them more stable in real-world scenarios.

Key Results

  • Significant Performance Gains: T-SAS consistently outperforms various baselines, including "Naïve LMs" (without self-adaptation) and "Self-Adaptive w/ Greedy" (using a single best guess), across multiple QA datasets and LM sizes (FLAN-Small, FLAN-Large, FLAN-XL, FLAN-XXL). For instance, on NQ with FLAN-Large, T-SAS achieved an EM score of 63.90 and an F1 score of 74.20, significantly higher than the Naïve LM (53.76 EM, 65.34 F1).
  • Improved Accuracy and Robustness: The method demonstrates substantial improvements in Exact Match (EM) and F1 scores, indicating better accuracy. It also shows higher robustness across diverse prompts, as visualized in Figure 3.
  • Effectiveness Across LM Sizes: T-SAS shows consistent improvements on both much smaller (FLAN-Small, 80M) and larger (FLAN-XXL, 11B) models, as shown in Table 4.
  • Outperforms Larger Models in Some Cases: In a case study comparing T-SAS with a much larger zero-shot LM (GPT-3), T-SAS achieved comparable or even better performance on some metrics, underscoring its efficiency.

Limitations and Future Work

  • Reliance on External Documents: The current T-SAS method assumes the availability of gold external documents containing the answers. In real-world scenarios, these documents might need to be retrieved, necessitating the integration of retrieval modules.
  • Potential Bias in LMs: The paper acknowledges that underlying LMs might contain biases. Future work could involve developing specific filtering strategies to mitigate these biases, ensuring safer and more reliable self-adaptive models.
  • Integration of Retrieval: The authors suggest that integrating retrieval modules with T-SAS is a promising avenue for future research to address scenarios where external documents are not readily available.
  • Bias Mitigation: Further exploration into mitigating potential biases within the underlying LMs is recommended for enhanced safety and reliability.

Summary updated

BibTeX
@misc{jeong2023test,
  author = {Soyeong Jeong and Jinheon Baek and Sukmin Cho and Sung Ju Hwang and Jong C. Park},
  title = {{Test-Time Self-Adaptive Small Language Models for Question Answering}},
  year = {2023},
  eprint = {2310.13307},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.13307},
}
Figure