[Paper Review] Task Contamination: Language Models May Not Be Few-Shot Anymore
This paper investigates task contamination in large language models (LLMs), demonstrating that zero-shot and few-shot performance gains are often due to exposure to task examples during pre-training, not true few-shot generalization. Using model evaluation across time-ordered datasets, training data inspection, example extraction, and membership inference, the authors show that models perform significantly better on pre-training era datasets, with strong correlation between extractable training examples and performance gains—especially in GPT-3 series models.
Large language models (LLMs) offer impressive performance in various zero-shot and few-shot tasks. However, their success in zero-shot and few-shot settings may be affected by task contamination, a potential limitation that has not been thoroughly examined. This paper investigates how zero-shot and few-shot performance of LLMs has changed chronologically over time. Utilizing GPT-3 series models and several other recent open-sourced LLMs, and controlling for dataset difficulty, we find that on datasets released before the LLM training data creation date, LLMs perform surprisingly better than on datasets released after. This strongly indicates that, for many LLMs, there exists task contamination on zero-shot and few-shot evaluation for datasets released prior to the LLMs' training data creation date. Additionally, we utilize training data inspection, task example extraction, and a membership inference attack, which reveal further evidence of task contamination. Importantly, we find that for classification tasks with no possibility of task contamination, LLMs rarely demonstrate statistically significant improvements over simple majority baselines, in both zero and few-shot settings.
Motivation & Objective
- To investigate whether the strong zero-shot and few-shot performance of LLMs is due to task contamination from pre-training data.
- To systematically analyze the chronological impact of dataset release dates relative to LLM pre-training data collection dates.
- To provide empirical evidence of task contamination using multiple methods: training data inspection, task example extraction, and membership inference attacks.
- To evaluate whether LLMs genuinely generalize in few-shot settings or merely recall pre-trained examples.
- To advocate for transparency in model training data and caution against overestimating few-shot capabilities due to contamination.
Proposed method
- Chronological evaluation of 12 LLMs (including GPT-3 series and open-source models) on 17 tasks, comparing performance on datasets released before vs. after the model’s pre-training data collection date.
- Training data inspection to search for exact or near-duplicate task examples in pre-training corpora.
- Task example extraction from instruction-tuned models to identify whether training examples were memorized and retrievable.
- Membership inference attack on the Spider semantic parsing task to test whether model predictions correlate with presence of training examples in pre-training data.
- Statistical analysis of performance gains over majority baseline, with significance testing at 99% confidence level.
- Correlation analysis between number of extractable training examples and model accuracy on downstream tasks.

Experimental results
Research questions
- RQ1To what extent does task contamination in pre-training data explain the high zero-shot and few-shot performance of LLMs?
- RQ2How does the performance of LLMs on datasets released before vs. after the model’s pre-training data collection date compare?
- RQ3Can task examples be extracted from instruction-tuned LLMs, and does the number of extractable examples correlate with model performance?
- RQ4Do LLMs show statistically significant improvements over majority baselines on classification tasks with no possibility of task contamination?
- RQ5Is there a measurable link between the number of extractable training examples and the model’s accuracy on downstream tasks?
Key findings
- LLMs perform significantly better on datasets released before their pre-training data collection date than on post-dated datasets, indicating task contamination.
- For classification tasks with no possibility of task contamination, LLMs rarely show statistically significant improvements over simple majority baselines in zero- or few-shot settings.
- There is a strong correlation (R = .88) between the number of extractable training examples and model accuracy on the Spider semantic parsing task.
- The number of extractable training examples from GPT-3 series models increased from davinci to GPT-3.5-turbo, closely tracking the rise in zero-shot performance on the same tasks.
- Training data inspection and example extraction provide consistent evidence of task contamination across multiple models, including closed-source GPT-3 and open-source models like LLaMA and Vicuna.
- Membership inference attacks confirm that model performance on certain tasks is strongly influenced by pre-training exposure to task examples, not generalization ability.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.