Long-context recall in hybrid language models

Attention Amnesia in Hybrid LLMs

When CoT Fine-Tuning Breaks Long-Range Recall,
and How to Fix It

Xinyu Zhou*, Boyu Zhu*, Yi Xu, Zhiwei Li, Yingfa Chen, Huiming Wang†, Zhijiang Guo†

LARK, HKUST(GZ) · UCL · Mistral AI · Tsinghua University · SUTD  |  EMNLP 2026

Fine-tuning teaches a hybrid model to reason.
It also teaches it to forget.

01 / The problem

Reasoning improves. Recall collapses.

Hybrid language models replace most softmax-attention layers with linear-attention ones and keep only a handful of full-attention layers. Those few retained layers carry the model’s global recall — the ability to find a fact that appeared a hundred thousand tokens ago.

Chain-of-thought supervised fine-tuning is the standard way to make such a model reason. It works: MATH500 accuracy on HypeNet-5B rises from 4.7 to 49.3. But measured on needle-in-a-haystack retrieval, the same fine-tuning is quietly destructive. HypeNet-9B falls from 67.2% to 9.4% on NIAH-Single-2 at a 256K context.

HypeNet-2B · pre-train vs. CoT-SFTNIAH accuracy, 32K–256K
Two line charts. On NIAH-Single-2 and NIAH-Single-3, the CoT-SFT model tracks the pre-trained model at 32K but falls away as context grows, losing about 40 and 23 points at the longest contexts.
The loss grows with task difficulty and with context length. The models still read; they stop retrieving. (Paper Fig. 1.)
The post-training objective can overwrite the routing learned during pre-training.

02 / The cause

Local gradients, distant memories.

Let g(τ) be the average absolute loss gradient on attention logits — over positions, retained softmax layers and heads — for pairs of tokens τ apart. Under a stationary, reversible ergodic CoT-Markov model with bounded output gradients, it obeys an exponentially decaying bound:

g(τ)≤C′e−τ/W=C′ρτ

The fitted decay window is short in absolute terms: W ≈ 41 tokens for the CoT post-SFT model, against ≈ 48 for the pre-SFT one. A signal that vanishes within tens of tokens cannot supervise routing that has to reach across hundreds of thousands.

HypeNet-2B · exponential fitsToken autocorrelation and attention-gradient magnitude
Two log-scale scatter plots with fitted lines. Token autocorrelation decays with distance for both CoT and general text; attention-gradient magnitude decays with distance for both the post-SFT and pre-SFT models.
Both the token autocorrelation of the training data and the measured attention-gradient magnitudes are well fitted by exponential decay. (Paper Fig. 3.)

03 / The method

Put the routing back.

Q and K decide where attention goes. V and O decide what it does with the tokens it attends to. If fine-tuning damages routing while improving processing, the two can be separated after the fact — the useful half of the update is kept, and the harmful half is reverted.

QK-RestoreRestore pre-SFT routing · keep post-SFT adaptation
Schematic: in the post-SFT hybrid model, the query and key projections of the retained softmax-attention layers are replaced with their pre-SFT values while the value projection and the rest of the network stay post-SFT. A bar chart shows math reasoning retained and long-context recall restored.
Only Q and K in the retained softmax-attention layers are restored; every other weight stays post-SFT. (Paper Fig. 2; panel C is schematic.)
  1. Start from the post-SFT checkpoint.
  2. Copy WQ and WK from the pre-SFT checkpoint into every retained softmax-attention layer.
  3. Keep WV, WO, the linear-attention layers and the FFNs unchanged.
0training steps
0extra data
1matched pre-SFT checkpoint

The same rule is applied to every retained softmax layer and head — there is no per-layer or per-head selection, and no hyperparameter to tune.

04 / The evidence

Recall comes back.
Reasoning mostly stays.

We evaluate four distilled hybrid models — Jet-Nemotron-2B and HypeNet-2B/5B/9B — on needle-in-a-haystack retrieval from 32K to 256K tokens, and on MATH500, GSM8K and AIME24 for reasoning. CoT-SFT uses Miromind.

+23.2ptsNIAH-Single-3 at 128K
HypeNet-2B, over CoT-SFT
+19.8ptsNIAH-Single-3 at 256K
HypeNet-9B, over CoT-SFT
−0.6ptsMATH500 Avg@16
HypeNet-5B, the cost
After CoT-SFT · accuracy (%)NIAH-Single-1 omitted: saturated at ≥ 97.2 everywhere
MethodNIAH-Single-2NIAH-Single-3MATH500GSM8KAIME24
32K64K128K256K32K64K128K256KAvg@16Maj@16Avg@16Maj@16Avg@16Maj@16
Jet-Nemotron-2B
Pre-SFT95.691.061.022.257.248.073.640.637.564.052.684.30.83.3
+ CoT-SFT57.828.421.011.634.433.667.227.849.470.671.988.01.53.3
QK-Restore ours64.634.022.07.641.87.4↑39.05.4↑64.42.8↓34.06.2↑49.069.471.288.61.96.7
HypeNet-2B
Pre-SFT75.894.088.056.248.834.830.423.44.725.42.220.00.00.0
+ CoT-SFT82.281.848.441.847.432.67.610.634.455.240.868.10.00.0
QK-Restore ours97.691.283.240.856.28.8↑52.820.2↑30.823.2↑30.219.6↑33.756.641.269.00.23.3
HypeNet-5B
Pre-SFT99.499.897.093.495.094.287.275.24.733.84.139.50.00.0
+ CoT-SFT98.810091.483.696.696.690.665.449.367.061.381.40.60.0
QK-Restore ours99.810096.885.497.00.4↑96.40.2↓90.20.4↓76.411.0↑48.768.460.981.80.43.3
HypeNet-9B
Pre-SFT64.295.872.467.253.095.083.852.017.657.615.362.40.86.7
+ CoT-SFT89.064.217.49.498.290.047.822.839.869.562.387.81.210.0
QK-Restore ours92.610044.019.698.60.4↑97.07.0↑66.418.6↑42.619.8↑37.668.459.388.40.63.3

Bold marks the best value within each model block. Superscripts on NIAH-Single-3 give the change against CoT-SFT. Avg@16 is the mean over 16 samples; Maj@16 the majority vote. (Paper Table 1.)

The damage is not a property of fine-tuning in general. Swap the chain-of-thought data for Tulu-3 instruction tuning, holding the models and contexts fixed, and recall improves instead of collapsing — so the chain-of-thought objective is the cause. QK-Restore tracks the fine-tuned model closely here too, ahead at the longest context on both models, and never worse on instruction following.

Non-CoT control · Tulu-3 · accuracy (%)Same models, same contexts
MethodNIAH-Single-2NIAH-Single-3IFEval
32K64K128K256K32K64K128K256K
HypeNet-5B
Pre-SFT99.499.897.093.495.094.287.275.212.0
+ Tulu-3 SFT99.810099.693.698.697.285.483.826.6
QK-Restore ours99.610099.893.497.495.285.485.226.6
HypeNet-9B
Pre-SFT64.295.872.467.253.095.083.852.014.0
+ Tulu-3 SFT86.497.888.278.496.296.895.886.827.2
QK-Restore ours88.297.492.878.696.097.495.288.229.0

(Paper Table 2.)

Finally, why both projections? Restoring Q alone or K alone recovers less than restoring them together. Restoring V instead — the component that processes rather than routes — is clearly worse, which is what the routing account predicts. Freezing Q and K during fine-tuning also trails the post-hoc transplant.

HypeNet-2B ablation · accuracy (%)What to restore
VariantNIAH-Single-2NIAH-Single-3MATH500
Avg@16
64K128K64K128K
QK-Restore ours91.283.252.830.833.7
QK-Pro (Procrustes)94.079.051.826.034.2
Q only78.479.050.824.434.2
K only90.471.646.213.234.2
V only57.236.624.015.232.1
Q/K frozen during SFT90.676.449.423.633.1

QK-Pro enforces the pre-SFT rotation while staying as close as possible to the post-SFT weights: it gains 0.5 points on MATH500 but loses 4.8 points of NIAH-Single-3 recall at 128K. (Paper Table 4.)

05 / Discussion

Adapt the processing. Preserve the routing.

Hybrid architectures concentrate a specific capability — long-range retrieval — in a small set of weights, and chain-of-thought fine-tuning does not know to leave them alone. Because the damage is localized, the repair can be localized too, and it costs nothing to apply.

Two caveats are worth stating plainly. QK-Restore needs the matched pre-SFT checkpoint, so it is available to whoever trained the model, not to a downstream user of the weights alone. And the repair is not free everywhere: on HypeNet-9B it gives up 2.2 points of MATH500 Avg@16 and 3.0 on GSM8K, against 0.6 and 0.4 on HypeNet-5B.

The broader question this leaves open is whether routing can be protected during fine-tuning rather than restored after it. Our frozen-Q/K ablation suggests the naive version of that is not enough.

A model that learns to think
should not have to forget where it read.

Citation

@article{zhou2026attention,
  title={Attention Amnesia in Hybrid LLMs: When CoT Fine-Tuning Breaks Long-Range Recall, and How to Fix It},
  author={Zhou, Xinyu and Zhu, Boyu and Xu, Yi and Li, Zhiwei and Chen, Yingfa and Wang, Huiming and Guo, Zhijiang},
  journal={arXiv preprint arXiv:2606.11052},
  year={2026}
}