Organizations: Henan University · China Construction Seventh Engineering Division · Henan Natural Resources and Environment Testing Co. · National University of Defense Technology
Standard autoregressive large language models attend to the growing history of generated tokens, making the key-value (KV) cache a central memory and throughput bottleneck in long-chain reasoning and multi-branch sampling. Yet an important class of reasoning problems is naturally first-order Markovian: the next step depends on a sufficient representation of the current state, rather than on the raw sequence of all earlier steps. We develop a unified design paradigm for Markovian-reasoning specialized large language models. At the cache level, the Markovian state interface transforms history-dependent KV storage into constant-size state transfer with respect to the number of reasoning steps. At the learning level, we reformulate long-chain prediction as independently trainable one-step transition objectives, with explicit state bottlenecks, distillation, invariance, and drift-consistency losses. At the architectural level, we introduce a dual-loop Transformer: an outer loop advances the reasoning state, while an inner recurrent-depth loop allocates adaptive computation to each transition through shared weights and explicit memory tokens or recurrent matrix states. We connect this architecture to a three-region cache, step-relative positions, truncated backpropagation, branch-aware checkpoints, and a transition-centric evaluation protocol. The organizing principle is simple: the optimal reasoning system need not remember everything; it must carry forward exactly what the future needs. This principle opens a path toward specialized reasoning engines whose memory footprint is decoupled from reasoning-chain length.
Figures & tables
Strategy
Cache in k
Retention principle
Full autoregressive KV
O(k)
Preserve all generated tokens
StreamingLLM / sliding window
O(W)
Fixed window with attention sinks
H2O / SnapKV
O(B)
Attention-based token selection
CacheGen
Compressed O(k)
Encode/transmit stored KV
Recurrent state / SSM
O(1)
Update a fixed latent state
Markovian structural pruning
O(1)
Preserve only sufficient step state
Table 1: Cache strategies and their organizing principles. W and B are fixed cache budgets; k is the number of reasoning steps.
Region
Content
Lifetime
Static
System / Q tokens and sinks
Entire chain
State
m memory tokens or recurrence tensor zi
Replaced at each step
Within-step
Current step’s causally generated KV
Released at step boundary
Table 2: A three-region KV-cache discipline.
Figure 1: Structural KV-cache compression for a Markovian reasoning chain. Conventional autoregressive attention retains the entire sequence of previous reasoning steps. In contrast, a Markovian state-rolling interface retains the fixed context Q , the latest sufficient state zt , and the bounded current-step KV workspace, which is released after each transition. With a fixed-size sufficient-state interface and bounded step length, cross-step memory does not grow with the number of completed steps k .
Dimension
General-purpose LLM
Markovian specialized model
Attention
Global causal sequence
Local causal step + state interface
Training example
Long document / complete CoT
State–action–next-state triplet
Supervision
Joint next-token loss
Transition + state compression
Position
Global sequence coordinates
Reset step-relative coordinates
Gradient path
Long-sequence activations
Independent transitions / truncated recurrence
Parallelism
Sequence-aware TP/PP/CP
Strong data-parallel scaling
Table 3: The pretraining paradigm changes when the primitive is a state transition.
Figure 2: Dual-loop Transformer architecture with transition-centric pretraining. The outer loop advances the reduced state (qt,Mt) across reasoning steps and releases step-local KV, while the inner loop repeatedly applies a shared Transformer core for Rt computation iterations. The transition training objectives shape the same shared core to support state evolution and compact cross-step memory.
Backbone
Task
Full KV
State KV
Full acc.
State acc.
Qwen3-8B
Addition
333.54
8.16
10/12
8/12
Qwen3-8B
Modulo 10
336.23
8.44
10/12
7/12
Qwen2.5-Coder-14B-Instruct
Addition
447.91
14.06
12/12
12/12
Qwen2.5-Coder-14B-Instruct
Modulo 10
451.50
14.44
12/12
12/12
Mistral-7B-Instruct-v0.3
Addition
296.35
7.00
11/12
12/12
Mistral-7B-Instruct-v0.3
Modulo 10
298.88
7.38
5/12
11/12
Table 4: Controlled 128-step probe, 12 paired cases per task and model. Cache entries are mean measured KV tensor sizes (MiB); accuracy is number correct out of 12. Full retains all earlier transition text and State carries only the current value.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Route
Mechanism
Precision and engineering cost
A: Zero-training approximation
Step-wise rolling of sinks, static prompt, and current state under unchanged weights
Approximate; divergence probes and fallback
B: Training-aligned masking
Block-level causal mask, step-end state token, local position convention, SFT
Exact computation graph; training pipeline changes
C: Architecture replacement
Fixed-size SSM or linear-attention recurrence
Native bounded state; exact historical retrieval is not its goal
Appendix
Table 5: Implementation routes for Markovian cache pruning.
Dimension
Token/segment memory (RMT, RATE)
Recurrent depth (MoR, Ouro)
Recurrence meaning
Carry state between segments
Reapply one stack to hidden states
State carrier
Learnable memory tokens
Updated hidden representations
Cross-step KV
Memory-token KV
Cleared at step boundaries
Single-step compute
One stack application
Multiple shared-weight applications
Characteristic risk
Memory capacity bottleneck
Cache/position errors or loop collapse
Appendix
Table 6: Two complementary recurrent Transformer traditions.
Stage
Implementation
Acceptance signal
0
Audit remote historical dependence
Distant history is dispensable
1
Training-free rolling KV with KL probes
Bounded distribution drift
2
Block-causal mask, state tokens, multi-objective tuning
Stable transition accuracy
3
Distillation into a native recurrent-state core
Long-horizon extrapolation
4
Counterfactual, memory, TPOT, drift validation
Accuracy and resource targets met
Appendix
Table 7: Recommended implementation roadmap, preserving the original manuscript’s five-stage validation logic.
Backbone
Task
Full KV
State KV
Factor
Full ms
State ms
Qwen3-8B
Addition
333.54
8.16
40.89 ×
352.9
147.9
Qwen3-8B
Modulo 10
336.23
8.44
39.85 ×
382.1
75.3
Qwen2.5-Coder-14B
Addition
447.91
14.06
31.85 ×
533.8
154.9
Qwen2.5-Coder-14B
Modulo 10
451.50
14.44
31.27 ×
467.4
78.6
Mistral-7B
Addition
296.35
7.00
42.34 ×
1592.6
813.0
Mistral-7B
Modulo 10
298.88
7.38
40.52 ×
1842.4
764.5
Appendix
Table 8: Measured 128-step KV and generation-time comparison; 12 paired cases per row. Full and State KV are mean MiB; times are median ms. Accuracy appears in Table 4 .
Symbol
Meaning
Q
Fixed task condition / retained prompt
qt,st
Reduced state and action / reasoning segment at step t
zt,Mt
Compressed state, memory tokens, or recurrent tensor