1.33x, not 3x: I rebuilt DeepCrossAttention at toy scale
DeepCrossAttention reached loss 2.2 in 150 steps while the plain transformer needed 200 — a 1.33x speedup, not the 3x in the paper. After 600 steps both models landed at the same loss, 1.86, and DCA cost 51% more compute per step. At toy scale, the routing helps early and then stops mattering.
The claim
Google's blog post this week — "Supercharging transformer residual connections," November 27 — presents DeepCrossAttention (DCA), from the ICML 2025 paper by Heddes et al. The idea is simple to state and, the authors argue, fixes a real weakness: a standard residual connection just adds a layer's output to its input, so after dozens of layers the early, high-resolution features get diluted. DCA replaces the fixed addition with dynamic routing — each layer computes input-dependent weights and mixes the outputs of all previous layers, with depth-wise cross-attention letting the queries, keys, and values in each block independently combine layer outputs.
The numbers in the paper's abstract: same model quality up to 3x faster, adding about 0.2% parameters. The blog post goes further: up to five times fewer training steps on C4 and LM1B, and to reach perplexity under 14 on LM1B, a standard transformer needed 42 layers where DCA needed 30 — a 29% cut in depth and parameters. (Note the discrepancy: 3x in the peer-reviewed abstract, 5x in the blog. I am quoting both; they are not the same number.)
That is a big claim about a small mechanism, and the mechanism is implementable in an afternoon. So I rebuilt it at toy scale and measured what survives.
What I built
Two identical 6-layer, pre-norm, character-level transformers trained on tiny Shakespeare (1,115,394 characters, 65-symbol vocabulary), same seed, same data order, same schedule: d_model 128, 4 heads, sequence length 64, batch 32, AdamW at lr 3e-3 with cosine decay, 600 steps each — about 1.23 million tokens per model. The only difference is the residual path.
The baseline is a standard residual transformer. The DCA model gives each block three independent depth-wise mixes — one each for the attention query, key, and value, matching the paper's split-Q/K/V design. Each mix scores every previous layer output per token (a low-rank query projection against a learned per-layer key, plus a bias), softmaxes over depth, and returns the weighted sum. I initialized the depth bias to concentrate on the most recent layer, so at step zero the DCA model behaves like a standard residual network, the way the paper describes. The routing modules add 53,118 parameters — 4.37% of the model at this size, versus the paper's 0.2% at full scale, where a 128-wide toy model makes the routing look proportionally bigger than it is.
Validation loss was measured every 50 steps on 10 fixed batches from the held-out 10% of the text.
The scoreboard
| baseline | DCA | |
|---|---|---|
| Parameters | 1,214,785 | 1,267,903 (+4.37%) |
| Steps to val loss 2.2 | 200 | 150 |
| Steps to val loss 2.0 | 300 | 300 |
| Steps to val loss 1.8 | never | never |
| Best val loss (600 steps) | 1.8349 @ step 550 | 1.8334 @ step 550 |
| Final val loss @ 600 | 1.8619 | 1.8564 |
| Seconds per step | 0.785 | 1.188 |
| Wall time to loss 2.2 | 157 s | 178 s |
step baseline DCA 1 3.6222 3.5487 50 2.5061 2.5009 100 2.3584 2.3313 150 2.2031 2.1703 200 2.1099 2.0906 250 2.0651 2.0598 300 1.9875 1.9752 350 1.9605 1.9572 400 1.9333 1.9295 450 1.8777 1.8646 500 1.8546 1.8497 550 1.8349 1.8334 600 1.8619 1.8564 Three things stand out. First, DCA is ahead at every single checkpoint — the edge is consistent, not a fluke of one eval. Second, the edge is small and it shrinks: 0.033 nats at step 150, 0.013 at step 300, 0.0015 at the best point. Third, the wall-clock row is the one that matters for the "3x faster" claim, and DCA loses it: it reaches loss 2.2 in fewer steps but more seconds (178 vs 157), because each step costs 51% more. At this scale the routing modules are pure overhead in wall time; they only pay for themselves if the step savings are large, and here they are not.
Why the paper's 3x doesn't show up here
The honest answer is that my experiment is missing the conditions that make dilution a problem. The paper's headline results come from 30–42 layer models trained on LM1B and C4. Mine has 6 layers. With six layers, there is not much history to dilute — the earliest layer is five additions away from the top, not forty-one. DCA's routing is a fix for deep networks, and I tested it on a shallow one. The early-phase edge (fewer steps to 2.2) is consistent with routing helping while the model is still sorting out which layers matter, and the vanishing edge at the end is consistent with a 6-layer model having no dilution left to fix once it converges.
There is also a measurement subtlety worth stating: eval noise between adjacent checkpoints is about ±0.02 — the baseline went from 1.8349 at step 550 to 1.8619 at step 600 on the same fixed eval batches. So the final-loss difference of 0.0055 is noise, and the best-loss difference of 0.0015 is definitely noise. The only differences I would defend are the steps-to-2.2 gap (50 steps, larger than the noise) and the per-step cost (measured over 600 steps each, not noisy at all).
What I would do next
The natural follow-up is depth: same experiment at 12, 24, and 36 layers, where dilution has room to bite, and a look at what the routing weights actually learn — I did not save checkpoints, so I cannot show whether the mixes learned to favor early layers or just stayed near the most-recent layer. That is a real limitation of this run. The other follow-up is the paper's retrofit claim: DCA initialized onto a pretrained transformer cut perplexity by 0.19 on LM1B versus 0.02 for continued standard training. That one is cheap to test and I have not tested it.
Caveats, stated plainly
This is a reimplementation of the mechanism, not the authors' code — low-rank depth mixes, my own initialization, my own toy setup. One seed, one run per model, no error bars. Character-level Shakespeare is not LM1B, and 600 steps is not a training run. The 3x-versus-5x gap between the paper and the blog is theirs, not mine, and I am not resolving it. What I can say from my own numbers: at 6 layers, DCA buys you 25% fewer steps to an early loss threshold, nothing at the end, and a slower wall clock.
Sources
- Google Research blog, "Supercharging transformer residual connections," November 27, 2026: https://research.google/blog/supercharging-transformer-residual-connections/
- Heddes et al., "DeepCrossAttention: Supercharging Transformer Residual Connections," ICML 2025, arXiv:2502.06785: https://arxiv.org/abs/2502.06785
- tiny Shakespeare corpus (karpathy/char-rnn): https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt
- All training numbers are my own runs on November 28, 2026: PyTorch 2.15 CPU, 4 threads, 6-layer d=128 transformers, 600 steps each.