Abstract
As Large Language Models (LLMs) scale in parameter count and training data, a central debate has emerged: are their reasoning abilities truly "emergent" symbolic capabilities, or are they sophisticated pattern-matching artifacts? This study investigates this question by evaluating the Llama 2 family of models on synthetic benchmarks designed to test compositional generalization. By controlling the depth of nested mathematical and logical operations, we identify a "complexity wall" where even the largest fine-tuned models fail to maintain accuracy as structural depth increases.
Introduction
The AI community is currently divided on the nature of symbolic reasoning in LLMs. While these models demonstrate impressive performance on general benchmarks, it remains unclear if they can reliably compose simple operations into complex, multi-step solutions. Most existing evaluations fail to distinguish between a model's ability to execute a single operation (e.g., basic addition) and its ability to handle deep recursion or nested logic. This paper addresses this gap by utilizing synthetic datasets with controlled "nesting levels" to pinpoint exactly where the logical capabilities of the Llama 2 architecture begin to degrade.
Methodology
To provide a comprehensive assessment, the researchers evaluated three distinct variants of the Llama 2 architecture across three scales (7B, 13B, and 70B parameters):
- Llama 2 Chat: The standard instruction-tuned general-purpose model.
- MAmmoTH: A model fine-tuned specifically for general mathematical reasoning.
- MetaMath: A variant fine-tuned on the specialized MetaMathQA dataset, designed to enhance mathematical logic.
All models were tested using zero-shot prompting. To isolate the models' ability to track logical sequences rather than their capacity for large-number arithmetic, a "modulo 100" rule was applied to intermediate steps. This forced the models to accurately track the sequence of operations and intermediate results within a fixed numerical range.
Benchmarking Symbolic Reasoning
The study utilized two primary synthetic benchmarks, segmented by nesting levels (1 to 4) to measure compositional complexity:
- Modified ListOps: This dataset requires models to parse nested functional expressions, such as
MAX(3, MIN(1, 2), SM(5, 4)). The researchers updated the original ListOps format to a more explicit functional notation to better align with common patterns found in pre-training data. - Arithmetic Expressions: This benchmark consists of nested addition, subtraction, and multiplication operations using two-digit integers.
By splitting these datasets by nesting depth, the authors could observe the transition from successful execution to failure as the structural complexity of the problem increased.
Results and Discussion
The "Nesting Wall"
The most significant finding is the existence of a "complexity wall." While models showed high proficiency on simple formulas (1–2 levels of nesting), performance plummeted when faced with 4 levels of nesting. This suggests that LLMs currently struggle with compositional generalization—the ability to apply learned rules to increasingly complex or recursive structures.
Fine-tuning vs. Scaling
The data indicates that while scaling from 7B to 70B parameters consistently improves performance, fine-tuning on domain-specific data is often more impactful. For instance, the 70B MetaMath model outperformed the base 70B Llama 2 model by approximately 17% on ListOps. However, even this specialized fine-tuning could not overcome the complexity wall; on the most difficult arithmetic problems (4 levels of nesting), the performance gains from scaling were nearly non-existent.
Algorithmic Weaknesses
Surprisingly, even the largest models exhibited fundamental weaknesses in executing basic algorithmic rules. The models struggled with "sum modulo 10" or "modulo 100" operations, particularly when negative numbers were involved. This indicates that while the models may "know" mathematical facts, they lack the robust algorithmic execution required for consistent symbolic reasoning.
Conclusion
The findings suggest that current LLM architectures, specifically within the Llama 2 family, have not yet mastered deep symbolic recursion. While scaling and fine-tuning provide incremental benefits on simpler tasks, they do not currently solve the problem of compositional complexity. Future research should move beyond simply increasing parameter counts and instead focus on developing neural architectures better suited for systematic composition and reliable algorithmic execution. Until these structural limitations are addressed, the "reasoning" observed in LLMs may remain limited to low-complexity patterns rather than true symbolic logic.
Summary updated