{"slug": "attention-latent-feedback", "title": "Attention Latent Feedback", "summary": "A new architecture called Attention Latent Feedback (ALF) lowers held-out loss by 0.022–0.024 nats versus the standard residual and lifts domain-balanced accuracy across 17 downstream tasks from 45.1% to 47.0% on a 4.0B-parameter mixture-of-experts model, at roughly 1.1% extra decoding FLOPs per token. ALF lets every sublayer attend to the outputs of the previous token from its own depth upward, rather than only reading the previous token's final state, and trains in two parallel passes while decoding in one pass per token using cached previous-token states. On MoE-1.6B, ALF matches a 1.38× larger baseline token budget, and a fixed nearest-window variant retains 89%–94% of the gain at linear read cost.", "body_md": "Attention Latent Feedback and downstream accuracy.(a) Each sublayer uses attention (orange) to weight previous-position outputs from its own depth upward and\nmix them with the current stream, while the projected top state enters the embedding sum.\n(b) Domain-balanced accuracy on seventeen tasks for MoE-4.0B on a zoomed axis, comparing ALF with the\nFull-bandwidth Transformer (FBT).\n\nTL;DR\n\nWhen a language model decodes token $t$, every layer of token $t-1$ has already finished. Self-attention still\nconnects positions only at the same depth, so a shallow layer of the new token never sees the deeper states of the\nprevious one. Attention Latent Feedback (ALF) lets every sublayer attend to the outputs of the\nprevious token from its own depth upward and mix them into its input. It trains in two parallel passes, decodes in\none pass per token, and lowers held-out loss at every scale we train, ahead of feeding back only\nthe final state.\n\n0.022–0.024nats lower held-out loss than the standard residual\n\n45.1→47.0domain-balanced accuracy (%) over 17 tasks, MoE-4.0B\n\n1.38×baseline tokens needed to match its loss\n\n~1.1%extra decoding FLOPs per token\n\nAbstract\n\nDuring autoregressive decoding, the deeper representations of the previous token have already been computed, yet\nshallow layers at the current token cannot read them directly because standard self-attention connects positions\nonly at the same depth. We introduce Attention Latent Feedback (ALF), an architecture that allows every sublayer to\nattend to the outputs of the deeper layers at the previous position. Training unrolls this cross-position\nrecurrence into two parallel passes, whereas decoding remains single-pass using cached previous-token states.\nAcross mixture-of-experts models with up to 4.0B parameters, ALF lowers held-out loss by 0.022–0.024 nats\nover the standard residual with about 1.1% decoding FLOP overhead, and consistently outperforms prior final-state\nfeedback across all three scales on both standard and attention residual backbones. On MoE-1.6B, ALF matches a\n1.38× larger baseline token budget, and on MoE-4.0B it lifts average accuracy across seventeen downstream\nbenchmarks from 45.1% to 47.0%. Analysis further reveals that intermediate and nearby deeper layers drive most of\nthis benefit, allowing a fixed nearest-window variant to retain 89%–94% of the gain at linear read cost while\nlearned attention widens its margin with scale.\n\nWhy read more than the final state\n\nEarlier latent feedback hands the next token a single vector: the final state. That state is trained to produce the\nnext-token prediction, and the next position already receives that token as an embedding, so it can expose little of\nthe computation underneath.\n\nTo test this, we swept the source block of an additive input feedback path on MoE-1.6B and MoE-2.6B, holding the\nbackbone, parameter count, FLOPs, checkpoint and data order fixed. In both models the best source is a deep\nintermediate block, block 7 of 8 and block 8 of 10, which lowers held-out loss by 0.0044 and 0.0041\nnats relative to the final block. The shallowest sources are far worse, 0.0125 and 0.0067 nats above it.\n\nIntermediate layers therefore carry signal that final-state feedback leaves unused, and the useful depth shifts\nwith the model. ALF removes the need to pick one source at all: every sublayer attends over the whole depth of the\nprevious token and weights it per token and per depth, so the useful layers are discovered during training rather\nthan chosen in advance (Finding 4).\n\nBlog post: Don't feed back the last block, with the full sweep, the\nper-domain breakdown and what the depth trend looks like across sizes.\n\nThe final block is not the best feedback source. Held-out loss at the third evaluation pass,\nrelative to reading the final block, as one block's state is projected and added to the next token's input.\nEach point is one run.\n\nWhere the residual stream flows\n\nWatch one decoding step of a small three-block model. Compare no feedback, the Full-bandwidth Transformer (FBT),\nwhich feeds back only the final state, and ALF, on a standard residual stream or on Attention Residuals, where the\ncurrent stream is itself an attention over depth.\n\nBackbone\n\nStandard residualAttention residual\n\nFeedback\n\nNone+ FBT+ ALF\n\nPauseReplay\n\nSwipe the diagram sideways to see both positions.\n\nToken t − 1\n\ncurrent stream (residual)$\\alpha$: attention residual over the token's own outputsfeedback from token $t-1$mixture at share $\\rho$self-attention, same depth only\n\nSchematic of decoding with cached states of token $t-1$. Line widths of the feedback sketch the learned pattern\nof the depth weights, which concentrate on each sublayer's own depth and the few just above it (Finding 4); the\nwidths of the $\\alpha$ arcs are illustrative as well.\n\nHow ALF works\n\nEach sublayer $l$ draws on two streams. The current stream $x_{t,l}$ is the input\nthat the backbone already gives it, and the sublayer feedback carries the outputs of\nposition $t-1$ at depths $i\\ge l$, which position $t$ has not computed yet.\n\nThe mixed input $h_{t,l}$ replaces $x_{t,l}$ as the input of sublayer $l$. The second equation adds the projected final state of token $t-1$ to the token embedding.\n\nSublayer feedback\n\nAttention over depth\n\nEvery output $v_{t-1,i}$ of the previous position passes once through a low-rank map $M_i=I+U_iD_i$ of rank 64.\nA learned query per sublayer scores the mapped outputs with a softmax over depth ($\\beta$), and a learned share\n$\\rho_l$ mixes the result into the current stream.\n\nInput injection\n\nThe final state, at the embedding\n\nFollowing Recycler, a learned projection $W_E$ of the previous final state $z_{t-1}$ is added to the token\nembedding. It carries the accumulated representation that produced the previous prediction, which the individual\nsublayer outputs do not.\n\nTraining and decoding\n\nTwo passes in training, one in decoding\n\nTraining runs a plain pass and then a feedback pass that reads the first pass shifted by one position, both in\nparallel over the sequence, during the last 25% of steps. Decoding caches the $2L$ sublayer outputs and the\ntop-layer state of the previous token, so each new token takes a single pass.\n\nFrom final-state feedback to attention over depth.(a) FBT feeds the final state of position $t-1$ back into the input of position $t$ through a gate $g$.\n(b) In ALF, every sublayer at position $t$ attends over the mapped outputs of position $t-1$ from its own\ndepth upward (orange) and mixes them with the current stream (blue), while the input injection adds the projected\nfinal state to the embedding.\nTraining in two parallel passes, decoding in one pass per token.(a) Pass 1 is the plain backbone; pass 2 reads its outputs one position back, and both losses train the\nmodel. (b) During decoding, the previous token's states are already cached, so the feedback is exact.\n\nFive findings\n\nMixture-of-experts models at three scales (MoE-1.6B, MoE-2.6B and MoE-4.0B) trained under the Marin recipe. FBT and\nALF branch from the same checkpoint at 75% of training and see the same data with the same two-pass schedule, with\nFBT running the recipe that gives it its stronger held-out loss.\n\nFinding 1\n\nALF lowers loss at every scale and stays ahead of final-state feedback\n\nOn the standard residual, ALF lowers held-out loss by 0.024 nats on MoE-1.6B, and the gain holds at 0.023 and\n0.022 nats on the two larger models. FBT also improves on the backbone, yet ALF stays at least 0.008 nats below it\nat every scale, and on MoE-1.6B it leads FBT in all six validation domains, from code and mathematics to web text.\n\nThe loss gains carry over to downstream tasks. On MoE-4.0B, ALF raises the domain-balanced accuracy over\nseventeen tasks from 45.1% to 47.0%, with the largest gains over the backbone in mathematics and\nreading comprehension. It also leads FBT in all four domains, by the widest margins in reading\ncomprehension and commonsense reasoning.\n\nAccuracy gain over the standard residual+ FBT+ ALF\n\nKnowledge\n\n+0.6\n\n+0.8\n\nReading comprehension\n\n+1.5\n\n+2.6\n\nCommonsense\n\n+0.1\n\n+1.1\n\nMathematics\n\n+2.6\n\n+3.1\n\nAll domains\n\n+1.2\n\n+1.9\n\nMoE-4.0B, accuracy points over the standard residual (45.1% on average).\n\nModel\n\nMoE-1.6B\n\nMoE-2.6B\n\nMoE-4.0B\n\nStandard residual\n\nBackbone\n\n2.0577\n\n1.9400\n\n1.8456\n\n+ FBT\n\n2.0447\n\n1.9261\n\n1.8322\n\n+ ALF\n\n2.0333\n\n1.9170\n\n1.8238\n\nAttention residual\n\nBackbone\n\n2.0424\n\n1.9244\n\n1.8312\n\n+ FBT\n\n2.0336\n\n1.9144\n\n1.8227\n\n+ ALF\n\n2.0193\n\n1.9020\n\n1.8097\n\nHeld-out loss in nats per token, averaged over six Dolma 3 domains at the final checkpoint, with\nthree parallel evaluation passes for FBT and ALF.\nFinding 2\n\nThe gain carries over to attention residuals, and the sublayer feedback does most of the work\n\nAttention Residuals (AttnRes) already let each layer weight the earlier layers of its own position. ALF still\nlowers their loss by margins close to those on the standard residual and widens its lead over FBT to at least\n0.012 nats. On MoE-4.0B, it raises AttnRes's downstream accuracy by 1.7 points.\n\nTesting each path alone on MoE-1.6B explains why. The sublayer feedback gives nearly the same gain on both\nbackbones and keeps 96% of ALF's gain on AttnRes, whereas the input injection alone keeps 49% there.\nOnce a backbone links every layer to its token input, reads at every sublayer carry almost all of the\nremaining benefit.\n\nMoE-1.6B, loss gain\n\nStandard\n\nAttention res.\n\n+ Injection\n\n0.0189\n\n0.0113\n\n+ Sublayer feedback\n\n0.0224\n\n0.0222\n\n+ ALF (both)\n\n0.0244\n\n0.0231\n\nReduction in held-out loss (nats) over each backbone when only one path is trained, and with both.\n\nALF complements attention residuals on MoE-4.0B.(a) Average accuracy against reference-answer perplexity for both backbones.\n(b) Accuracy gain over the attention residual in each domain.\nFinding 3\n\nAt a fixed model size, ALF reaches the same loss with fewer tokens and less compute\n\nWe trained the standard residual on MoE-1.6B at several token budgets and fitted a power law to its loss. To\nmatch ALF, it needs 1.38× as many training tokens, so ALF saves 27% of the data. The second training pass\nover the last quarter raises ALF's training FLOPs to 1.25× the backbone, which the token savings more than\ncover: at equal loss, ALF still needs 1.10× less compute.\n\nAcross the three sizes, FBT needs 1.07× the training FLOPs of ALF to reach each ALF model's loss. When model\nsize and unique tokens can both grow freely, spending the extra 25% on a larger single-pass backbone is\ncomparably efficient, so ALF pays off most where training tokens or model size are the binding constraint.\nAt decoding time its extra forward FLOPs are small, while reading the cached outputs at every sublayer raises\nper-token memory traffic over final-state feedback, which is the main deployment tradeoff.\n\nMoE-1.6B, matched loss\n\nBaseline tokens1.38×\n\nALF tokens1×\n\nBaseline compute1.38×\n\nALF compute1.25×\n\nIn units of ALF's token budget and of the backbone's compute on it. ALF's second pass costs 1.25×, and 1.38 / 1.25 ≈ 1.10.\n\nToken efficiency on MoE-1.6B. The standard residual needs 1.38× the tokens to reach ALF's loss, against 1.18× for FBT.Compute against FBT across scales. Loss against total training FLOPs, including each method's two-pass overhead.\n\nFinding 4\n\nSublayers read the nearby deeper layers of the previous token\n\nThe learned depth weights form the same narrow diagonal band at all three sizes: most of the weight falls on a\nsublayer's own depth and the next three deeper sublayers of the previous position. On MoE-4.0B, readers in the lower\nhalf put 31% of their weight on the two nearest eligible outputs, where a uniform read would put 11%. Interventions on\nthe trained model agree. Keeping only the most useful middle block retains 40% of the sublayer feedback's\ncontribution, while the top quarter of blocks together retains 21%. Intermediate layers of the previous\ntoken carry the strongest signal, and the final state alone leaves it out.\n\nWhat the sublayer feedback reads. Learned attention maps over depth at the final checkpoints of\nthe three models on the standard residual. Each column gives one sublayer's mean weights over the outputs of the\nprevious position, and hatching marks sources outside its range. The dashed diagonal marks the lower boundary of\neach sublayer's current and next three deeper sublayers, where most of the weight concentrates.\n\nWhy read more than the final state asks the matching question for a single\ninjected vector: which one block to read when only one is read. Both point at intermediate depths.\n\nFinding 5\n\nA fixed window of four nearby outputs keeps most of the gain at linear read cost\n\nThe diagonal band suggests a cheaper variant. We replace the softmax over depth with an equal-weight average of\neach sublayer's own output and the next three deeper ones, keeping the maps, shares and input injection. This\nremoves every depth query and cuts the cross-layer reads per token from quadratic to linear in depth.\n\nThe fixed window keeps 89% to 94% of ALF's loss reduction over the standard residual and stays ahead of FBT at\nevery scale. Its gap to learned attention grows with depth, from 0.0013 nats on MoE-1.6B to 0.0024 nats on\nMoE-4.0B, so learned attention earns a growing share of the gain as models deepen.\n\nFixed nearest-four window\n\nMoE-1.6B94%\n\nMoE-2.6B92%\n\nMoE-4.0B89%\n\nShare of ALF's loss reduction kept. The window cuts cross-layer reads by 57%, 65% and 70% at the three sizes.", "url": "https://wpnews.pro/news/attention-latent-feedback", "canonical_source": "https://xjxyys.github.io/attention-latent-feedback/", "published_at": "2026-11-24 17:28:40+00:00", "updated_at": "2026-11-24 17:42:19.014115+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "large-language-models", "ai-research", "natural-language-processing"], "entities": ["Attention Latent Feedback", "ALF", "MoE-4.0B", "MoE-1.6B", "MoE-2.6B", "Full-bandwidth Transformer"], "also_reported_by": [], "takeaway": "ALF's gain comes mostly from intermediate and nearby deeper layers of the previous token, so a fixed nearest-window variant keeps 89%–94% of the benefit at linear read cost while costing about 1.1% extra decoding FLOPs.", "recommendation": {"advice": "Feed back intermediate rather than final previous-token states: on MoE-1.6B and MoE-2.6B, blocks 7 of 8 and 8 of 10 beat the final block by 0.0044 and 0.0041 nats.", "playbook": "inference-serving", "playbook_url": "https://wpnews.pro/playbooks/inference-serving"}, "alternates": {"html": "https://wpnews.pro/news/attention-latent-feedback", "markdown": "https://wpnews.pro/news/attention-latent-feedback.md", "text": "https://wpnews.pro/news/attention-latent-feedback.txt", "jsonld": "https://wpnews.pro/news/attention-latent-feedback.jsonld"}}