[Paper Review] Impact of Pretraining Term Frequencies on Few-Shot Reasoning
The paper shows that few-shot numerical reasoning by GPT-based models heavily depends on how frequently test terms appear in pretraining data, highlighting limited generalization beyond pretraining statistics.
Pretrained Language Models (LMs) have demonstrated ability to perform numerical reasoning by extrapolating from a few examples in few-shot settings. However, the extent to which this extrapolation relies on robust reasoning is unclear. In this paper, we investigate how well these models reason with terms that are less frequent in the pretraining data. In particular, we examine the correlations between the model performance on test instances and the frequency of terms from those instances in the pretraining data. We measure the strength of this correlation for a number of GPT-based language models (pretrained on the Pile dataset) on various numerical deduction tasks (e.g., arithmetic and unit conversion). Our results consistently demonstrate that models are more accurate on instances whose terms are more prevalent, in some cases above $70\%$ (absolute) more accurate on the top 10\% frequent terms in comparison to the bottom 10\%. Overall, although LMs exhibit strong performance at few-shot numerical reasoning tasks, our results raise the question of how much models actually generalize beyond pretraining data, and we encourage researchers to take the pretraining data into account when interpreting evaluation results.
Motivation & Objective
- Assess whether language models’ few-shot numerical reasoning generalizes beyond terms frequent in pretraining data.
- Quantify how accuracy correlates with term frequency in pretraining data across arithmetic and unit-conversion tasks.
- Develop a metric (performance gap) to measure reliance on pretraining term frequencies in reasoning tasks.
- Analyze how model size and shot count affect the frequency-driven performance gap.
Proposed method
- Define frequencies of test terms in the pretraining corpus (unigrams, bigrams, and term+y co-occurrences).
- Construct numerical reasoning datasets (arithmetic, operation inference, time-unit conversion) rendered as natural-language prompts.
- Compute performance gap Delta between top- and bottom- 10% frequency groups for various term-frequency definitions.
- Evaluate multiple EleutherAI GPT models (GPT-J-6B, GPT-Neo-1.3B, GPT-Neo-2.7B) under few-shot prompts (k=0,2,4,8,16).
- Analyze results across tasks and term-frequency definitions to assess robustness of reasoning versus memorization.
Experimental results
Research questions
- RQ1How does pretraining term frequency correlate with few-shot numerical reasoning accuracy?
- RQ2Does the accuracy gap persist across different model sizes and shot counts?
- RQ3To what extent do unigram term frequencies (single numbers) affect reasoning performance?
- RQ4Can we distinguish genuine reasoning from pattern-matching biased by pretraining data in few-shot prompts?
Key findings
- Model accuracy strongly correlates with the frequency of instance terms in pretraining data, with large gaps between high- and low-frequency terms (sometimes >70% in top vs bottom 10%).
- Arithmetic tasks show large performance gaps, especially for multiplication, indicating reliance on pretraining statistics rather than robust reasoning.
- Operation inference and time-unit conversion tasks also exhibit significant frequency-driven gaps, even as overall accuracy improves with more shots.
- Smaller models show the same trend but with smaller gaps, suggesting size amplifies dependence on pretraining data.
- The results suggest that many few-shot reasoning evaluations may reflect memorization or pattern-matching rather than true generalizable reasoning.
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.