Key takeaways
- Attention residuals, from Moonshot AI's Kimi Team, let each transformer layer take a softmax-weighted mix of all earlier layer outputs instead of an equal-weight sum.
- Block AttnRes groups layers into about 8 blocks to save memory and, in the paper's scaling tests, matched the loss of a baseline trained with 1.25 times the compute.
- In a 48B-parameter Kimi Linear experiment trained on 1.4 trillion tokens, AttnRes matched or beat the baseline on all 15 listed benchmarks, including GPQA-Diamond at 44.4 against 36.9.
Attention residuals (AttnRes) are a replacement for the residual connection in a transformer, proposed by Moonshot AI's Kimi Team in a technical report posted to arXiv on March 16, 2026. Instead of adding every earlier layer's output into one running sum with equal weight, each layer uses softmax attention to choose how much to take from each earlier layer. In the team's tests, a cheaper variant called Block AttnRes reached the same loss as a standard model trained with 1.25 times the compute.
The idea is getting fresh attention because Google Research published a post on November 23 about its own related method, DeepCrossAttention, and named attention residuals as one of the approaches in the same family.
The problem: every layer gets the same blurry sum
A residual connection adds a layer's output to its input and passes the result on. It is what lets gradients flow through networks with dozens or hundreds of layers. But unroll it and something else shows up: the input to any layer is the token embedding plus the outputs of all earlier layers, each with a weight of exactly 1.
The Kimi Team argues this fixed sum causes three problems. A layer can't pick out what one specific earlier layer produced, because it only sees the mixture. Information that gets drowned in the sum can't be recovered later. And in the common PreNorm setup, which normalizes each layer's input but not the running sum, the sum grows roughly in proportion to depth. Deeper layers then have to produce ever larger outputs to make a difference, which the paper says can destabilize training.
The authors compare this to recurrent neural networks, which squeezed a whole sentence into one state that was updated word by word. Transformers fixed that by letting each word attend to every earlier word. AttnRes applies the same move to depth: each layer attends to every earlier layer.
How attention residuals work
Each layer gets one learned vector, which the paper calls a pseudo-query. Before the layer runs, that vector is compared with the token embedding and with each earlier layer's output (after RMSNorm, a normalization step that stops large outputs from dominating). A softmax turns the scores into weights that add up to 1, and the layer's input is the weighted sum. Attention and MLP sublayers each count as a layer here.
That is the whole addition: one vector and one RMSNorm per layer, a negligible share of the parameters. The pseudo-queries start at zero, so at the beginning of training every earlier layer gets equal weight. The paper says this was needed to avoid unstable training.
The catch is memory. In ordinary training the earlier outputs are kept for backpropagation anyway, so the full version costs almost nothing extra. Large models are trained differently, with activation recomputation and pipeline parallelism, which splits the layers across machines. Then every layer output has to be stored and sent between machines, and that cost grows with depth.
Block AttnRes trades a little quality for memory
Block AttnRes groups the layers into blocks. Inside a block, outputs are summed the normal way. Across blocks, each layer attends only to one summary per finished block, plus the embedding and the current block's partial sum. With about 8 blocks, the paper reports that most of the full version's gain survives, and only eight stored states per token are needed.
The team also built infrastructure around it, including caching block summaries so machines don't resend them. It reports under 4% end-to-end training overhead with pipeline parallelism and under 2% inference latency overhead on typical workloads. For long prompts, storing block summaries for a 128,000-token sequence with 8 blocks would take 15 GB; sharding across devices cuts that to about 1.9 GB per device, and chunked prefill to under 0.3 GB.
Results: 1.25x compute and big gains on GPQA
The scaling experiments trained five model sizes, from 194 million to 528 million activated parameters. At the largest size, validation loss was 1.719 for the standard baseline, 1.693 for Block AttnRes and 1.692 for full AttnRes. The authors used hyperparameters tuned for the baseline, which they say favors the baseline.
The main test used the Kimi Linear architecture with 48 billion total and 3 billion active parameters, 54 layers grouped into blocks of 6, trained on 1.4 trillion tokens. Against an identical model with ordinary residuals, the AttnRes model matched or beat it on all 15 benchmarks the paper lists:
| Benchmark | Baseline | AttnRes |
|---|---|---|
| GPQA-Diamond | 36.9 | 44.4 |
| Math | 53.5 | 57.1 |
| HumanEval | 59.1 | 62.2 |
| C-Eval | 79.6 | 82.5 |
| MMLU | 73.5 | 74.6 |
| MMLU-Pro | 52.2 | 52.2 |
In a smaller ablation, full AttnRes reached a loss of 1.737 against 1.766 for the baseline, 1.767 for DenseFormer (fixed learned weights over earlier layers) and 1.747 for mHC, a stabilized form of hyper-connections. Swapping softmax for sigmoid hurt (1.741). The paper says Block AttnRes matches mHC while reading far less memory per layer: 5.5 times the hidden size against 34 times for mHC with four streams.
When the team plotted the learned weights, most layers still leaned hardest on the layer right before them. But the embedding kept real weight all the way up, and some layers reached back to early layers, which amounts to skip connections the model learned on its own.
Limits and what isn't known
The gains in loss are small in absolute terms, about 0.02 to 0.03, and every comparison is the Kimi Team's own run against its own baseline. The scaling models are small by current standards. The 48B model is an experiment, and the paper doesn't say AttnRes is in any released Kimi model.
Full AttnRes, the best version, is too memory-hungry for large-scale training on today's hardware, the authors write. Block AttnRes is the compromise. They also found AttnRes prefers deeper, narrower networks under a fixed budget, but note that deeper models are slower at inference.
The GitHub repository has the paper and PyTorch-style pseudocode, but no full training code or weights as of November 28, 2026.
How it compares with Google's DeepCrossAttention
Google's DeepCrossAttention, an ICML 2025 paper, also lets each layer attend over the outputs of earlier layers, with weights that depend on the input. Google's November 23 post says attention residuals share its core principle of replacing fixed addition with selective retrieval. The post also says Thinking Machines' Inkling 2 model adopted the AttnRes design together with DeepCrossAttention's query, key and value split. Thinking Machines' own model card for Inkling 2 Small doesn't mention it.
If Google's account is right, AttnRes has already moved from a paper into at least one production model. It is a different idea from a looped transformer, which reuses the same layers several times; AttnRes keeps the layers and changes how they read from each other. The next thing to watch is whether Moonshot ships it in a Kimi model or releases weights trained with it.
Frequently asked questions
What is Block AttnRes?
Block AttnRes is the memory-saving version of attention residuals. Layers are grouped into blocks that are summed normally inside, and each layer attends only to one summary per earlier block plus the embedding. About 8 blocks keep most of the full version's gain.
Does Kimi use attention residuals?
The Kimi Team tested AttnRes in a 48B-parameter model built on the Kimi Linear architecture and trained on 1.4 trillion tokens. The paper does not say that any released Kimi model uses it.
Is the attention residuals code open source?
Moonshot's GitHub repository has the paper and PyTorch-style pseudocode for Block AttnRes. As of November 28, 2026 it has no full training code or model weights.
How are attention residuals different from hyper-connections?
Hyper-connections widen the residual path into several parallel streams mixed by learned matrices, while AttnRes lets each layer attend directly to earlier layer outputs. In the paper's ablation, full AttnRes reached a lower loss than mHC, 1.737 against 1.747.
Sources
- Attention Residuals (arXiv 2603.15031)Kimi Team, Moonshot AI
- MoonshotAI/Attention-ResidualsMoonshot AI
- Supercharging transformer residual connectionsGoogle Research
- Inkling 2 Small model cardThinking Machines Lab



