Quantifying Generalization Complexity for Large Language Models

Zhenting Qi, Hongyin Luo, Xuliang Huang, Zhuokai Zhao, Yibo Jiang, Xiangjun Fan, Himabindu Lakkaraju, James R. Glass

TL;DR

Researchers have introduced SCYLLA, a dynamic evaluation framework that uses algorithmic complexity to disentangle a Large Language Model's (LLM) ability to generalize from its tendency to memorize. Their experiments reveal a "generalization valley"—a specific level of task complexity where models rely most heavily on memorized patterns. Crucially, the study demonstrates that while scaling models up doesn't eliminate memorization, it pushes the "breaking point" of generalization toward much harder problems.

The Problem: Memorization vs. Reasoning

Are LLMs actually reasoning, or are they just "stochastic parrots" reciting patterns from their massive training sets? This remains the central debate in AI evaluation. Current benchmarks suffer from two major flaws:

  1. Data Contamination: Because benchmarks are static and public, they often leak into the training data of newer models, turning a "reasoning" test into a "memory" test.
  2. Confounding Variables: Many benchmarks increase difficulty by simply making the input longer (e.g., more numbers to add). This conflates a model's context window limits with its actual logical reasoning depth.

To address this, the authors created a "knowledge-light" benchmark where tasks are categorized by their intrinsic algorithmic complexity (using Big O notation) rather than just input length.

Methodology: The SCYLLA Framework

The authors propose SCYLLA, a framework built on four core pillars:

  • Scalable Inherent Complexity: Tasks are grouped by time complexity, ranging from $O(N)$ to $O(2^N)$. This allows researchers to see exactly where a model’s logic breaks down.
  • Dynamic Generation: To avoid contamination, the framework generates unique test instances on the fly.
  • ID vs. OOD Disentanglement: This is the framework's "secret sauce." For any given task, the model is prompted to generate its own test cases. These are labeled In-Distribution (ID) (data the model is "familiar" with). Researchers then sample data from a "universal set" that the model didn't generate, labeling it Out-of-Distribution (OOD).
  • Anchor and Probe Tasks: "Anchor" tasks have a fixed complexity, while "Probe" tasks can be solved with multiple algorithms of varying efficiency, revealing which "strategy" a model prefers.
Categorization of SCYLLA benchmark tasks by their algorithmic time complexity.

The SCYLLA benchmark consists of 20 algorithmic tasks evaluated across 28 models, including the Qwen family (1.8B to 110B), LLaMA (3.2-3B to 3.1-405B), Gemma, Claude 3, and GPT-4o/o1-mini.

Key Insights: The Generalization Valley

By measuring the performance gap between ID and OOD data, the researchers uncovered a non-monotonic relationship between task complexity and generalization.

  • The Generalization Valley: On very easy tasks, models generalize perfectly. On nearly impossible tasks, they fail at both ID and OOD data. The "valley" is the middle ground where a model performs well on ID data but fails on OOD data—indicating the model is "faking it" via memorization.
  • Critical Complexity: The peak of this valley (the widest gap between ID and OOD performance) is the "Critical Complexity" point. It represents the upper bound of a model's true reasoning capability.
  • Scaling Shifts the Valley: As models get larger, the Critical Complexity shifts to the right. For example, a small model might start relying on memory at $O(N)$ complexity, whereas larger models maintain generalization until much harder tasks.
The Generalization Valley shifts to the right as model size increases from Llama3.1-70B to 405B, pushing the critical complexity peak (star) to harder tasks.

Key Results & Model Comparisons

  • Open-Source Progress: Llama-3.1-405B emerged as the strongest open-source model, showing robust generalization up to $O(N^4)$ tasks, nearly matching proprietary models.
  • Model Size vs. Logic: In the Qwen family, moving from 1.8B to 110B parameters didn't just increase accuracy; it fundamentally changed the Critical Complexity from $O(N)$ to $O(N^3)$.
  • The "o1-mini" Outlier: OpenAI’s o1-mini showed exceptional results with an almost flat generalization curve. It achieved near-perfect generalization even on $O(2^N)$ tasks, suggesting its extended inference-time reasoning allows it to bypass the typical memorization traps that plague standard LLMs.
  • Domain Fine-tuning: Models fine-tuned for Math or Code showed better generalization on simpler tasks but didn't necessarily push the Critical Complexity boundary further than their base models on high-complexity tasks.

Limitations and Future Work

While SCYLLA provides a rigorous lens for evaluating reasoning, it focuses strictly on algorithmic and mathematical logic. It does not measure generalization in linguistic nuance, cultural context, or creative writing. Additionally, relying on a model to generate its own ID data is an approximation, especially for closed-source models where training data is a black box.

Future work will likely explore how "inference-time compute" (like the hidden reasoning steps in OpenAI's o1) specifically impacts the shift in critical complexity, potentially unlocking new paradigms for LLM generalization.

Summary updated

BibTeX
@inproceedings{qi2025quantifying,
  author = {Zhenting Qi and Hongyin Luo and Xuliang Huang and Zhuokai Zhao and Yibo Jiang and Xiangjun Fan and Himabindu Lakkaraju and James R. Glass},
  title = {{Quantifying Generalization Complexity for Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=jpSLXoRKnH},
}
Figure