Can Computation from Earlier Problems Help LLMs Solve New Ones?
Jipei He, Wenhui Tan, Xiaoyi Yu, Enver Sangineto, Fiorenzo Parascandolo, Rita Cucchiara, Ruihua Song
Abstract
Large language models often solve independent problems in the same conversation. Can computation from earlier problems help them solve new ones? Preliminary experiments show that retained history can raise or lower later-turn accuracy, even within the same domain. To trace this effect, we hold each problem fixed and vary its preceding history. The resulting changes in the model's internal states contain a recurring, problem-dependent component. To improve reasoning with retained history, we introduce STAIR (Stale-Token Attention for Inter-query Reuse). It captures attention keys and values from earlier response generation in a read-only bank. STAIR learns to reflect current query vectors to redirect attention over this bank during prompt processing. The backbone and stored entries remain fixed; only 12,288 parameters are trained. Across three Qwen models and four reasoning benchmarks, STAIR improves average later-turn accuracy by up to 11.67 percentage points over the unmodified model with history. The math-trained Qwen3.5-9B controller also improves code generation on HumanEval+ without further training.
Create a lesson
Metadata
- Categories
- cs.AI, cs.CL, cs.LG
- Comments
- 42 pages, 8 figures. v2: Expanded experiments and analyses; revised presentation
Related papers
GaokaoMathGen: Chinese Gaokao Mathematics Finale Problem Generation Controlled by Latent Reasoning Structures
Shared title terminologycs.AIQian Chen, Kun Zhu, Zhongyi Wang et al.
Stranded Compute in AI Inference Workloads: Recovering Value Through Demand Aggregation
Shared title terminologycs.AISam Kingsley
When Does Overriding the Majority Vote Help?
Shared title terminologycs.AITerry Ma, Aidan Zhang
Decoupling Solving from Abstention: Single-Rollout Conformal Risk Control for Hard-Budget LLM Reasoning
Shared title terminologycs.AIQianyi Chen, Bo Li
AI-Assisted Auto-formalization for Trustworthy Scientific Computing: Case Studies and Lessons Learned
Shared title terminologycs.AIMohit Tekriwal, Het Mankad, Naifeng Zhang et al.
Self-Evolving Evaluation Environments for Computer-Use Agents
Shared title terminologycs.AIWenhao Wang, Panrong Tong, Quyu Kong et al.