Abstract
The impressive performance of recent language models across a wide range of tasks suggests that they possess a degree of abstract reasoning skills. Are these skills general and transferable, or specialized to specific tasks seen during pretraining? To disentangle these effects, we propose an evaluation framework based on “counterfactual” task variants that deviate from the default assumptions underlying standard tasks. Across a suite of 11 tasks, we observe nontrivial performance on the counterfactual variants, but nevertheless find that performance substantially and consistently degrades compared to the default conditions. This suggests that while current LMs may possess abstract task-solving skills to an extent, they often also rely on narrow, non-transferable procedures for task-solving. These results motivate a more careful interpretation of language model performance that teases apart these aspects.
Introduction
The rapid advancement of Large Language Models (LLMs) like GPT-4 has sparked a debate: do these models truly understand the underlying logic of the tasks they perform, or are they simply "reciting" procedures memorized from their vast training corpora? While LLMs excel at standard benchmarks, these benchmarks are often "contaminated," containing problems similar to those seen during pretraining.
To address this, we introduce a framework of counterfactual tasks. These tasks require the same abstract reasoning as standard problems but alter the "world model" or default assumptions—for instance, performing arithmetic in base-9 instead of base-10, or using 1-based indexing in Python. If a model possesses true abstract reasoning, it should adapt to these rule changes with minimal performance loss.
Methodology and Task Suite
We evaluated four state-of-the-art models—GPT-4, GPT-3.5, Claude, and PaLM-2—across 11 domains including mathematics, programming, logic, and spatial reasoning. For each task, we defined:
- Default World ($w_{default}$): The standard task conditions (e.g., base-10 addition).
- Counterfactual World ($w_{cf}$): A variant with a specific rule change (e.g., base-9 addition).
- Counterfactual Comprehension Check (CCC): A control task to verify the model understands the new rules in isolation.
The tasks spanned diverse areas:
- Arithmetic: 2-digit addition in bases 8, 9, 11, and 16.
- Programming: Modified HumanEval for code generation and execution under 1-based indexing.
- Logic: FOLIO dataset variants with premises violating common sense (e.g., "All corgis are reptiles").
- Spatial & Creative: Swapped axes in coordinate identification, rotated drawing code, and altered musical tunings or chess piece positions.
Key Results and Insights
Our findings reveal a consistent and substantial performance gap between default and counterfactual conditions across all models and tasks.
The "Default" Gravity Well
Models exhibit a strong bias toward the most common version of a task. Even when a model passes the CCC—proving it "knows" the new rules—it often reverts to default behavior during multi-step reasoning. For example, GPT-4's accuracy on 2-digit addition plummeted from 100% in base-10 to 38.6% in base-9 when using 0-shot Chain-of-Thought (CoT).
Commonness vs. Proximity
Interestingly, performance is not purely a function of mathematical "closeness" to the default. Models performed better in base-16 (hexadecimal) than in base-9. This suggests that frequency in training data is a primary driver of performance; base-16 is common in technical text, whereas base-9 is rare.
The Brittle Nature of LLM Reasoning
The massive performance gap suggests that LLMs do not learn abstract functions (like "addition") but rather specific, non-transferable procedures tied to surface-level patterns. In some spatial tasks, more capable models like GPT-4 showed the largest relative drops, suggesting that their superior ability to memorize the default world makes them more resistant to rule changes.
Discussion and Limitations
While few-shot prompting helped bridge the gap, it did not eliminate it. Even with 16 examples, base-9 performance remained significantly lower than 0-shot base-10 performance.
One limitation is the inherent difficulty of ensuring counterfactual tasks aren't intrinsically harder. However, high CCC scores indicate that the failure lies in applying the rules during complex reasoning, not in understanding the rules themselves. Furthermore, some "counterfactuals" (like base-16) may already exist in training data, potentially masking the true extent of the degradation.
These results suggest that for LLMs to achieve robust abstract reasoning, they may need to be grounded in physical environments or integrated with symbolic systems that are less dependent on surface-level text patterns.
Summary updated