Task Contamination: Language Models May Not Be Few-Shot Anymore

Changmao Li, Jeffrey Flanigan

Abstract

Recent advancements in Large Language Models (LLMs) have highlighted their remarkable zero-shot and few-shot capabilities. However, this paper demonstrates that such performance is frequently inflated by "task contamination"—the presence of task-specific examples in the pre-training data. By evaluating models on datasets released after their training cutoffs, the authors find that LLMs often fail to significantly outperform simple majority baselines on truly novel tasks.

Introduction

The ability of models like GPT-3 to perform tasks with minimal prompting has been hailed as a breakthrough in general intelligence. Yet, the massive scale of internet-based pre-training corpora introduces a significant risk of data contamination. While previous studies have addressed test data contamination (exposure to specific test instances), this research investigates task contamination: the inclusion of the task's general format and examples within the training set. If a model has already processed thousands of sentiment analysis examples during training, its "zero-shot" performance on a new sentiment dataset may simply be the retrieval of learned patterns rather than emergent reasoning.

Methodology

To detect and quantify task contamination across 12 prominent models (including the GPT-3 series, LLaMA, and BLOOM), the authors employed four primary techniques:

  1. Chronological Analysis: Comparing performance on "pre-collection" datasets (released before the model's training data cutoff) versus "post-collection" datasets (released after).
  2. Training Data Inspection: Manually auditing the instruction-tuning data of open-source models for task-specific patterns.
  3. Task Data Extraction: Prompting models to generate training examples for specific tasks. High-fidelity generation of existing dataset examples serves as evidence of prior exposure.
  4. Membership Inference: Checking if models can reproduce exact strings from benchmarks like Spider (text-to-SQL), indicating direct memorization.
Comparison of model performance on datasets released before vs. after training data collection.

Key Findings

The study reveals a stark contrast in model performance based on the age of the evaluation dataset.

The Majority Baseline Reality Check

On datasets released after a model's training cutoff, LLMs rarely show statistically significant improvements over a "majority baseline"—the accuracy achieved by always predicting the most frequent label. This suggests that the perceived "reasoning" in few-shot settings is often a byproduct of memorized task structures.

Performance Inflation and Extraction

In the GPT-3 series, improvements from the original davinci to GPT-3.5-turbo on older datasets correlated strongly with the models' ability to extract training examples for those tasks. This implies that "gains" in performance may stem from increased data exposure rather than architectural or algorithmic improvements.

Detailed breakdown of performance and task extraction capabilities across GPT-3 and Open LLM series on pre- and post-collection datasets.

Instruction Tuning Risks

Instruction-tuned models like Alpaca and Vicuna showed clear evidence of task contamination within their tuning sets. This contamination directly boosted their benchmark scores compared to their base models (e.g., LLaMA), further complicating the evaluation of their general capabilities.

Conclusion

The findings of this paper suggest that the "few-shot" capabilities of current LLMs are significantly over-estimated due to task contamination. The authors call for a more skeptical approach to benchmark results and urge the AI community to adopt more rigorous contamination auditing. Future progress in measuring true few-shot learning will require a continuous stream of novel, un-crawled benchmarks and greater transparency regarding training data.

Summary updated

BibTeX
@inproceedings{li2024task,
  author = {Changmao Li and Jeffrey Flanigan},
  title = {{Task Contamination: Language Models May Not Be Few-Shot Anymore}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i16.29808},
}
Figure