Can a language model learn from struggling?
Productive struggle is the process of grappling with difficult tasks and persevering through obstacles to learn better. It's built on Vygotsky's Zone of Proximal Development (ZPD): a "sweet spot" where a challenge exceeds a student's current ability, but not so far that it causes frustration.
With Devika Sivakumar, I sought to model productive struggle in LLMs. Specifically, can artificial constraints that compress reasoning persist beyond the constraint itself, making the LLM more computationally efficient? Using token limits as the constraint, we found that they can, but within a narrower window than expected. With Claude Haiku 4.5, a hard 150-token cap led to 4% fewer tokens on new, unconstrained problems with no loss in accuracy.
Prior work like Minimo, SPICE and curriculum learning targets difficulty at training time, shaping model weights over thousands of gradient steps. Our work zooms into whether a single window of constrained, in-context experience can shift reasoning behavior without any weight updates at all.
Group A solves math problems in a constrained environment (i.e. a 50-token limit), then that conversation history is passed forward as it solves new problems with a 1,000-token limit. Group B, the control, is unconstrained throughout. The models have no knowledge of the limit beforehand; their outputs are simply truncated when they reach it.
Experiment design
To ensure the models hadn't seen a problem before, we skipped the GSM8K benchmark and used Claude Sonnet to generate multi-step math word problems with fictional scenarios, whole numbers and a single unambiguous answer:
"A space trader visits Planet Zorkon and buys 6 crates of moon crystals for 45 credits each. She then sells 4 of the crates for 72 credits each. How many credits does she have after paying for the crystals and selling 4 crates?"
We used a 3x3 factorial design: three difficulty levels (Easy = 1-2 steps, Normal = 3-4, Hard = 5-6) crossed with three token limits (50, 150, 300). We started with Claude Haiku, then repeated the design with Llama 3.1 8B, an open-weight model from an entirely different family, to avoid a confound with the model that generated the problems.
We found a positive transfer effect: less token usage with accuracy held at 100%. The 150-token constraint produced the most positive transfer across all difficulties. The 50-token constraint truncates too severely and hurts reasoning on Hard problems, while 300 tokens essentially acts as "no constraint" since every problem is solved in fewer than 220 tokens.
Tokens saved on the second batch (Group B minus Group A)
Due to computational costs, we only ran Llama 3.1 8B on Easy and Normal problems. It saved up to 41 tokens per problem, but with a concerning drop in accuracy, down to 0% after a 50-token history. We assume a smaller, more literal model applies what it learned from truncated responses too directly, where Haiku infers what was meant and works around the noise.
Tokens saved on the second batch (Group B minus Group A)
Llama 3.1 8B accuracy on the second batch, by difficulty and token limit
| Easy | Normal | |||||
|---|---|---|---|---|---|---|
| 50 | 150 | 300 | 50 | 150 | 300 | |
| Group A | 0% | 93% | 100% | 7% | 36% | 93% |
| Group B | 100% | 100% | 80% | 100% | 100% | 100% |
Productive struggle can be induced in LLMs, but within a narrower window. A 150-token limit on hard problems was Haiku's optimal zone: tight enough to force reasoning compression without the output degrading into noise. It strikes a parallel with the ZPD, though unlike humans, the model has no metacognitive awareness of the constraint. The Llama results flag that the effect is model-dependent.
With only 13 problems per condition, the next step is to scale to 30+, run Hard problems on Llama, and see whether the transfer effect holds in other reasoning domains (i.e. spatial, logic, proof).