A State-Transition Framework for Efficient LLM Reasoning

Liang Zhang, Yu Zhao, Longyue Wang, Tianqi Shi, Weihua Luo, Kaifu Zhang, Jinsong Su

Introduction

Recent breakthroughs in Large Language Models (LLMs), such as OpenAI's o1 and DeepSeek-R1, have demonstrated that scaling "test-time compute"—allowing a model to think longer via extensive Chain-of-Thought (CoT) reasoning—dramatically improves performance on complex tasks. However, this extended reasoning comes at a massive computational cost. Standard Transformer models suffer from quadratic computational complexity and linear memory growth (due to the KV-cache) as the reasoning sequence lengthens.

Existing solutions often attempt to compress CoT sequences by summarizing or pruning tokens. Unfortunately, these methods frequently discard critical reasoning steps, leading to logical "short-circuits" and degraded performance. The core challenge is maintaining the full reasoning capacity of long CoT while making the computation efficient enough for practical, large-scale use.

To address this, researchers have proposed a novel framework that models LLM reasoning as a state-transition process rather than simple token-by-token generation, achieving significant speedups without sacrificing accuracy.

Modeling Reasoning as State Transitions

Instead of forcing the model to attend to every single previously generated token, the proposed framework maintains a dynamic "reasoning state."

Comparison of traditional token-based reasoning with the proposed state-based reasoning framework.

As illustrated above, the model segments the reasoning process. Tokens in the current step retrieve historical information directly from a fixed-size state matrix. This fundamental shift reduces the complexity of historical attention from quadratic to linear, effectively solving the KV-cache bottleneck for long sequences.

The Mixed Attention Module (MAM)

The core architectural innovation enabling this shift is the Mixed Attention Module (MAM), which replaces the standard attention layer in the Transformer block. MAM bifurcates the attention mechanism to handle different types of context:

  • Softmax Attention (SA): This standard attention mechanism is retained exclusively for "local" context—specifically, the initial query prompt and the current reasoning step being generated. This preserves the high-precision, token-level dependencies required for fluent linguistic generation.
  • Linear Attention (LA): This mechanism is introduced to capture "historical" reasoning. It compresses the logical conclusions of all previous reasoning steps into a fixed-size reasoning state matrix ($S_t$).
The Mixed Attention Module (MAM) architecture, detailing the combination of Linear and Softmax attention.

By combining these two approaches, MAM exploits a key insight: while a model needs full linguistic detail for the current sentence to stay fluent, it only needs the logical conclusion of previous steps to continue reasoning effectively.

State-Based Reasoning Strategy

Long reasoning chains often suffer from "over-thinking," where a model produces noisy, irrelevant steps that derail the final answer—a phenomenon akin to a "drunken walk."

To combat this, the framework treats the state update as a gradient descent process. By applying a momentum method, the system accumulates a "global reasoning direction." If a specific reasoning step begins to deviate too far into noise, this global direction acts as a mathematical anchor, correcting the trajectory and keeping the model on the right logical path.

Training with Knowledge Distillation

To train this hybrid architecture, the model is fine-tuned using a combination of standard autoregressive loss and Knowledge Distillation (KD). The KD loss ensures the new MAM-based model mimics the reasoning behavior of a powerful "base" model that uses full softmax attention. This effectively teaches the linear attention module how to identify and store the most critical information in its state matrix. Training data utilized 95K high-quality, long-CoT samples extracted from the OpenR1-Math-220K dataset.

Key Results and Performance

Evaluated across seven rigorous benchmarks—including mathematical (GSM8K, MATH-500, AIME), scientific (GPQA Diamond), and coding (HumanEval) tasks—the framework demonstrated remarkable improvements on Qwen-2.5 (1.5B and 7B) models:

  • Unprecedented Efficiency: On the AIME24 benchmark, the model achieved a 16-18% speedup. For extremely long sequences (up to 32K tokens), the speedup exceeded 40%. Crucially, memory usage remained nearly constant, whereas the base model's memory grew linearly.
  • Enhanced Accuracy: Unlike traditional compression methods that trade accuracy for speed, this framework actually improved performance. The Qwen2.5-1.5B version improved by an average of 4.7 points across all benchmarks compared to the base model.
  • Robustness Against Drift: The momentum-based state correction strategy alone contributed to a ~3.5 point average improvement, validating the hypothesis that guiding the "direction" of reasoning effectively mitigates over-thinking.

Limitations and Future Directions

While highly effective, the framework does have limitations. It relies on the ability to segment CoT into distinct "reasoning steps" (currently achieved using high-entropy transition tokens), which may be challenging for highly unstructured reasoning. Additionally, unlike plug-and-play KV-cache compression, this method requires fine-tuning the Linear Attention submodules, though efficient LoRA training mitigates this burden.

Future work may explore unsupervised methods to estimate "process rewards" directly from the model states, potentially unlocking new avenues for Reinforcement Learning (RL) in reasoning models.

Summary updated

BibTeX
@inproceedings{zhang2026state,
  author = {Liang Zhang and Yu Zhao and Longyue Wang and Tianqi Shi and Weihua Luo and Kaifu Zhang and Jinsong Su},
  title = {{A State-Transition Framework for Efficient LLM Reasoning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=Zz8ikW4uWG},
}
Figure