Back

Parallax: Parameterized Local Linear Attention

6.08.2026
Yifei Zuo,  Dhruv Pai,  Zhichen Zeng,  Alec Dewulf,  Shuming Hu,  Zhaoran Wang

TL;DR

  • Softmax attention is the local constant kernel regressor and suffers from boundary bias → it can't extrapolate outside the convex hull of value vectors.
  • Local Linear Attention (LLA) upgrades the local constant to a local linear fit, with provably better bias-variance - but a per-token linear solve makes it numerically fragile and hard to scale.
  • Parallax keeps the local-linear principle but parametrizes the solve directly → a single additive correction on top of Softmax. oiPLX=oiSAΣKV(i)ρi\boldsymbol o_i^{\textsf{PLX}} = \boldsymbol o_i^{\textsf{SA}} - \boldsymbol\Sigma_{KV}^{(i)} \boldsymbol\rho_i
  • It slots into FlashAttention with one extra branch and no extra I/O, roughly doubles arithmetic intensity, and matches or beats FA2/FA3.
  • Parallax improves perplexity and downstream accuracy under both parameter-matched and compute-matched controls → a Pareto improvement.
  • Parallax's advantage is unlocked by Muon. To our knowledge, the first empirical demonstration of strong architecture–optimizer codesign for an attention mechanism.
  • Open source release: Paper · Code

Outline

  1. Introduction — Attention as test-time regression, boundary bias
  2. Parallax & Local Linear Attention — From LLA to a learned additive correction
  3. Hardware-aligned Implementation — One extra branch, no extra I/O, doubled arithmetic intensity
  4. Empirical Results — Synthetic benchmarks, 0.6B/1.7B pretraining, mechanistic analysis
  5. Muon Unlocks Parallax's Capacity — Architecture–optimizer codesign
  6. Inflection — Future directions

1: Introduction

Attention is a test-time regressor

Attention is a retrieval mechanism. Given a query token, the model has a context of key-value pairs and returns a weighted combination of values, where the weights reflect how well each key matches the query. In softmax attention, those weights are always non-negative and sum to one, so the output is always a convex combination of the value vectors in context. You can concentrate weight on one value or spread it across many, but the output stays inside the convex hull of what's there.

This is nonparametric regression over the KV pairs [3]. Each forward pass fits a function to the context → keys are inputs, values are labels, the query is the test point. Different attention designs correspond to different choices of what function class to fit.

MechanismHypothesis SpaceHow it's Solved
Linear AttentionGlobal affine F={Wx+b}\mathcal F = \lbrace \boldsymbol W \boldsymbol x + \boldsymbol b \rbraceContext-independent
MesaNetGlobal affine F={Wx+b}\mathcal F = \lbrace \boldsymbol W \boldsymbol x + \boldsymbol b \rbraceOptimal ridge regression
DeltaNetGlobal affine F={Wx+b}\mathcal F = \lbrace \boldsymbol W \boldsymbol x + \boldsymbol b \rbraceOne step of SGD
Softmax AttentionLocal constant F(qi)={c}\mathcal F(\boldsymbol q_i) = \lbrace \boldsymbol c \rbraceNadaraya–Watson
LLALocal affine F(qi)={b+W(xqi)}\mathcal F(\boldsymbol q_i) = \lbrace \boldsymbol b + \boldsymbol W(\boldsymbol x - \boldsymbol q_i) \rbraceOptimal local ridge regression

Softmax attention [4] is the Nadaraya–Watson estimator [5] [6]. At each query, it fits a constant to the nearby data by taking a kernel-weighted average of the values. The hypothesis space contains only constant functions, with one built fresh for each query.

Linear attention [7] sits at the other extreme. It fits a single global linear function to all the data, which means the same WW must serve every query. These design choices, particularly the choice of hypothesis space, fundamentally impact the associative memory capacity of each mechanism.

Limitations of Linear & Softmax Attention

The two dominant attention families sit at opposite ends of the regression spectrum, and each has a characteristic failure mode.

Linear attention fits a single global affine function f(x)=Wx+bf(x)=Wx+b to the entire context. The same function must serve every query, which means it cannot adapt its prediction based on where in the context the query is looking. If the true relationship between keys and values varies across the sequence, or is nonlinear, the global fit must be wrong somewhere. This is misspecification error whereby the hypothesis class is too restrictive to faithfully perform query-dependent retrieval.

Softmax attention avoids misspecification by building a fresh local estimate at each query but the local constant fit has its own problem. Because the output is a convex combination of the values in the context window, it can only interpolate between them and it cannot extrapolate outside the data it has already seen.

This is boundary bias [2], a known property of the Nadaraya–Watson estimator. When the query sits near the edge of the key distribution, where keys are dense on one side and sparse on the other, the kernel-weighted average is systematically biased inward. The error is not a consequence of finite data or insufficient training, but structural and inherent to local constant regression.

-10-505100128256384512640768896102405.304.813.63position
Ground truthSoftmax AttentionLLAMesaNet
h kernel bandwidth48.0
5AFFECTS · SOFTMAX ATTN · LLA1000
λ ridge regularization0.100
10⁻⁴AFFECTS · LLA · MESANET10²

2: Parallax & Local Linear Attention

Local linear attention (LLA) [2] addresses the global-linear misspecification and local-constant boundary-bias failures by fitting a local linear function at each query instead of a local constant. As a result, it has strictly smaller integrated MSE than both Softmax and Linear Attention (Appendix A). We provide three perspectives on LLA:

Canonical Formulation

LLA fits a local linear estimator F(qi)={b+W(xqi)}\mathcal F(\boldsymbol q_i) = \{\boldsymbol b + \boldsymbol W(\boldsymbol x - \boldsymbol q_i)\} with the softmax kernel weight wij=exp(qikj/h)w_{ij} = \exp(\boldsymbol q_i^\top \boldsymbol k_j / h) and ridge regularization λWF2\lambda \|\boldsymbol W\|_F^2. Let zij=kjqi\boldsymbol z_{ij} = \boldsymbol k_j - \boldsymbol q_i, ωi=jiwij\omega_i = \sum_{j\le i} w_{ij}, μi=jiwijzij\boldsymbol\mu_i = \sum_{j\le i} w_{ij} \boldsymbol z_{ij}, and Σi=jiwijzijzij+λI\boldsymbol\Sigma_i = \sum_{j\le i} w_{ij} \boldsymbol z_{ij} \boldsymbol z_{ij}^\top + \lambda \boldsymbol I. The prediction at qi\boldsymbol q_i is:

oiLLA=f^LL(qi)=jiwij(1zijρi)ωiμiρivj,ρi=Σi1μi.\boldsymbol o_i^{\textsf{LLA}} = \hat f_{\text{LL}}(\boldsymbol q_i) = \sum_{j \le i} \frac{w_{ij}(1 - \boldsymbol z_{ij}^{\top} \boldsymbol\rho_i^{\star})}{\omega_i - \boldsymbol\mu_i^{\top} \boldsymbol\rho_i^{\star}}\, \boldsymbol v_j,\quad \boldsymbol\rho_i^{\star} = \boldsymbol\Sigma_i^{-1} \boldsymbol\mu_i.

LLA is a query-centered second-order correction to softmax attention that leverages the geometry of key vectors around the query. It produces a better prediction when the keys are not uniformly distributed under the softmax weighting, e.g. at the boundaries.

Generalization of MesaNet & Attention

LLA can also be read as constructing query-dependent states through the kernel, in contrast to the global states in MesaNet [8]. LLA can degenerate to both mechanisms by tuning λ\lambda and hh:

oiLLAλoiSA=softmax(qikj/h)vj,\boldsymbol o_i^{\textsf{LLA}} \xrightarrow{\lambda \to \infty} \boldsymbol o_i^{\textsf{SA}} = \mathrm{softmax}(\boldsymbol q_i^{\top} \boldsymbol k_j / h)\, \boldsymbol v_j, oiLLAdrop intercepthoiMesa=(jivjkj)(jikjkj+λI)1qi.\boldsymbol o_i^{\textsf{LLA}} \xrightarrow[\text{drop intercept}]{h \to \infty} \boldsymbol o_i^{\textsf{Mesa}} = \Bigl(\sum_{j \le i} \boldsymbol v_j \boldsymbol k_j^{\top}\Bigr)\Bigl(\sum_{j \le i} \boldsymbol k_j \boldsymbol k_j^{\top} + \lambda \boldsymbol I\Bigr)^{-1}\boldsymbol q_i.

Additive Correction to Softmax

The most useful formulation rewrites LLA as softmax attention plus a correction term. Write pi=softmax(Kiqi/h)\boldsymbol p_i = \mathrm{softmax}(\boldsymbol K_i \boldsymbol q_i / h), tij=ρizijt_{ij} = \boldsymbol\rho_i^{\star\top} \boldsymbol z_{ij}, and tˉi=Epi[tij]\bar t_i = \mathbb E_{\boldsymbol p_i}[t_{ij}]. Then

oiLLA=oiSA(1+ηi)ΣKV(i)ρi,ρi=Σi1μi,\boldsymbol o_i^{\textsf{LLA}} = \boldsymbol o_i^{\textsf{SA}} - (1 + \eta_i)\, \boldsymbol\Sigma_{KV}^{(i)} \boldsymbol\rho_i^{\star},\quad \boldsymbol\rho_i^{\star} = \boldsymbol\Sigma_i^{-1}\boldsymbol\mu_i,

where ΣKV(i)=Epi[(vjvˉi)(kjkˉi)]\boldsymbol\Sigma_{KV}^{(i)} = \mathbb E_{\boldsymbol p_i}[(\boldsymbol v_j - \bar{\boldsymbol v}_i)(\boldsymbol k_j - \bar{\boldsymbol k}_i)^\top] is the softmax-weighted KV-covariance and ηi=tˉi/(1tˉi)\eta_i = \bar t_i / (1 - \bar t_i) is the boundary amplification factor.

The quantity ηi\eta_i is non-negative and measures the Mahalanobis distance from the query to the key center under pi\boldsymbol p_i. Intuitively, if ηi0\eta_i \approx 0, the query is close to the weighted key center and the correction becomes pure covariance; if ηi1\eta_i \gg 1, the query is close to the weighted key boundary and the correction is amplified to compensate for the boundary bias. The full derivation can be found in Appendix B.

Difficulties in Scaling LLA

LLA has the right theoretical properties but is difficult to use at scale. The exact forward requires solving a linear system Σix=μi\boldsymbol\Sigma_i\boldsymbol{x} = \boldsymbol{\mu}_i independently at every query position, typically with a parallel conjugate gradient (CG) solver. Three problems follow.

  • Intensive I/O. The CG iteration requires TLdTLd memory accesses in the forward pass (where TT is the iteration number), dominating the 2Ld2Ld memory access of Softmax Attention.
  • Regularization–expressiveness tradeoff. Large ridge regularization coefficient λ\lambda ensures Σi0\boldsymbol\Sigma_i \succ 0 but drives ρi0\boldsymbol\rho_i^\star \to \boldsymbol 0, collapsing LLA back to Softmax. Small λ\lambda preserves the correction but risks ill-conditioning and instability. We find it nontrivial to balance the tradeoff in practical pretraining settings.
  • Low-precision incompatibility. The stability of CG is sensitive to the precision format, while modern hardware and computation primitives are increasingly shaped around reduced precision.

Parallax

Parallax keeps the local-linear principle and removes the solve in favor of learned parametrization.

Parallax eliminates the per-query solve of ρi\boldsymbol\rho_i^\star by learning a direct mapping from the layer input. Let xi\boldsymbol x_i be the input to the layer, and we parameterize

ρi=WRxi\boldsymbol\rho_i = \boldsymbol W_R \boldsymbol x_i

where WRRdqk×d\boldsymbol W_R \in \mathbb R^{d_{\text{qk}} \times d} is a learnable projection matrix.

Parallax additionally sets ηi=0\eta_i = 0 to remove the boundary amplification, yielding the forward equation

Definition: Parallax AttentionoiPLX=oiSAΣKV(i)ρi,ρi=WRxi.\boldsymbol o_i^{\textsf{PLX}} = \boldsymbol o_i^{\textsf{SA}} - \boldsymbol\Sigma_{KV}^{(i)} \boldsymbol\rho_i,\quad \boldsymbol\rho_i = \boldsymbol W_R \boldsymbol x_i.

Empirically, we find removing ηi\eta_i is necessary to avoid collapse. Because ρi=WRxi\boldsymbol\rho_i = \boldsymbol W_R \boldsymbol x_i is no longer the constrained solution of the exact LLA, the denominator can approach zero or flip sign, causing η\eta to explode.

Parallax in one line: the softmax output minus a learned projection of the local KV covariance.

Perspectives on Parallax

Wide bandwidth limit. Taking hh \to \infty makes the kernel weight wij=exp(qikj/h)1w_{ij} = \exp(\boldsymbol q_i^\top \boldsymbol k_j / h) \to 1 uniformly over all jj. The local softmax-weighted statistics become global running averages, and the three nonparametric mechanisms reduce to the affine variants:

oiSAhvˉi,ρi=0(Value Averaging),oiPLXhvˉiS~iρi,ρi=WRxi(Affine Linear Attention),oiLLAhvˉiS~iρi,ρi=H~i1q~i(Affine MesaNet).\begin{aligned} \boldsymbol o_i^{\textsf{SA}} &\xrightarrow{h \to \infty} \bar{\boldsymbol v}_i, & \boldsymbol\rho_i &= \boldsymbol 0 && \text{(Value Averaging)}, \\ \boldsymbol o_i^{\textsf{PLX}} &\xrightarrow{h \to \infty} \bar{\boldsymbol v}_i - \tilde{\boldsymbol S}_i \boldsymbol\rho_i, & \boldsymbol\rho_i &= \boldsymbol W_R \boldsymbol x_i && \text{(Affine Linear Attention)}, \\ \boldsymbol o_i^{\textsf{LLA}} &\xrightarrow{h \to \infty} \bar{\boldsymbol v}_i - \tilde{\boldsymbol S}_i \boldsymbol\rho_i^\star, & \boldsymbol\rho_i^\star &= \tilde{\boldsymbol H}_i^{-1} \tilde{\boldsymbol q}_i && \text{(Affine MesaNet)}. \end{aligned}

All three share the output template (OLS regression with intercept) and differ only in the probe. Softmax uses a zero probe (returning just the optimal intercept), Parallax uses a learned probe, and LLA solves for the optimal one. Standard linear attention and MesaNet are the same template with the intercept dropped, which collapses the centered moments to their raw counterparts.

-2-1012f(x)Global mean (h → ∞)

This framing also clarifies the dual role of the query across the family. In softmax attention qiq_i shapes the kernel weights and defines where attention concentrates. In the linear attention family, what is conventionally called the query is actually the probe → a directional readout from the recurrent state. In MesaNet and LLA the probe is fully determined by other statistics, while in Parallax it is learned.

Strong regularization limit. As λ\lambda \to \infty or ρi0\|\boldsymbol\rho_i\| \to 0, the probe is suppressed and the intercept dominates the output. Both Parallax and LLA degenerate identically to Softmax Attention. The same parametrization axis explains the relationship between Parallax and LLA, just as MesaNet differs from Linear Attention by probe preconditioning.

3: Hardware-aligned Implementation

One extra branch, no extra I/O

The Parallax forward has the form

oiPLX=oiSAΣKV(i)ρi\boldsymbol{o}_i^{\textsf{PLX}} = \boldsymbol{o}_i^{\textsf{SA}} - \boldsymbol{\Sigma}_{KV}^{(i)} \boldsymbol{\rho}_i

which involves the softmax output and a softmax-weighted covariance. Both terms depend on the same KV pairs and the question is whether we can compute them together in a single streaming pass, without materializing the full attention matrix which is the same constraint FlashAttention [13] solves for standard softmax.

The answer is yes. We can expand the Parallax forward into a form that streams over KV blocks:

oiPLX=(jipijvj)(1+jipijkjρi)ji(pijkjρi)vj,\boldsymbol o_i^{\textsf{PLX}} = \Bigl(\sum_{j\le i} p_{ij} \boldsymbol v_j\Bigr) \cdot \Bigl(1 + \sum_{j\le i} p_{ij}\, \boldsymbol k_j^\top \boldsymbol\rho_i\Bigr) - \sum_{j\le i} \bigl(p_{ij}\, \boldsymbol k_j^\top \boldsymbol\rho_i\bigr) \boldsymbol v_j,

This decomposes into two parallel branches that process the same KV tiles. The softmax branch maintains the usual FA running state (mr,d1,O1)(\mathbf m_r, \mathbf d_1, \mathbf O_1), and the covariance branch maintains (d2,O2)(\mathbf d_2, \mathbf O_2). In each loop, the covariance branch uses the same Kc,Vc\mathbf K_c, \mathbf V_c to compute the unnormalized scores S2=RrKc\mathbf S_2 = \mathbf R_r \mathbf K_c^\top, fuses them with the softmax weights as P2=P1S2\mathbf P_2 = \mathbf P_1 \odot \mathbf S_2, and then accumulates O2=P2Vc\mathbf O_2 = \mathbf P_2 \mathbf V_c alongside O1\mathbf O_1. The final output combines the two running sums.

Parallax Forward Kernelpurple = Parallax additions (no extra I/O)
Require: Q_r, R_r, K, V, L, s
State: (m_r, d₁, d₂, O₁, O₂)
for c = 1 to ⌈L / B_c⌉:
S₁ ← Q_r · K_c^T · s # masked
m ← max(m_r, rowmax(S₁))
α ← exp2(m_r − m)
P₁ ← exp2(S₁ − m)
m_r ← m
S₂ ← R_r · K_c^T
P₂ ← P₁ ⊙ S₂
d₁ ← α·d₁ + rowsum(P₁)
d₂ ← α·d₂ + rowsum(P₂)
O₁ ← α·O₁ + P₁ · V_c
O₂ ← α·O₂ + P₂ · V_c
end
O_r ← (O₁/d₁)·(1 + d₂/d₁) − O₂/d₁

Both branches share the online maximum mr\mathbf m_r, the rescaling factor α\boldsymbol\alpha, and the Kc,Vc\mathbf K_c, \mathbf V_c tiles. Therefore Parallax does not require extra I/O in each iteration and, as a result, roughly doubles the arithmetic intensity over standard FA.

Optimized Decode Kernel

We prototype the Parallax decode kernel in CuTeDSL [16] on NVIDIA Hopper GPUs. The design exploits the structural property that the two branches share the same KV stream, so on I/O-bound decode workloads it consumes essentially no additional HBM traffic. We report further kernel optimizations in Appendix C.

Profiling. We profile the prototype kernel against FA2 [14] and FA3 [15] on H200 GPUs at BF16 precision. Because Parallax doubles the arithmetic intensity, FA cannot be matched on both FLOPs and HBM traffic simultaneously. We therefore report two settings:

  • Compute-matched setting. Parallax uses dh=64d_h = 64 such that it matches the FLOPs of FA at dh=128d_h = 128.
  • I/O-matched setting. Both kernels use dh=128d_h = 128 and Parallax doubles the compute of FA with the same HBM traffic.

The prototype Parallax kernel matches or outperforms FA across all configurations in both settings.

Loading...
Figure 1. Decode kernel latency ratio (PLX / FA2) on H200. Green cells indicate Parallax is faster. The prototype kernel matches or outperforms FA across all configurations in both settings.

4: Empirical Results

We empirically validate Parallax on both synthetic and language modeling benchmarks. We compare Parallax against Softmax Attention (Attn, Transformer) [4], Mamba [12], Gated DeltaNet (GDN) [10], MesaNet (Mesa) [8], and Kimi DeltaAttention (KDA) [11].

Synthetic: MAD benchmark

We evaluate Parallax on the MAD-Benchmark [20], which consists of six synthetic tasks designed to evaluate the core ability of sequence mixers. All models follow a two-layer architecture with sequence mixer and MLP blocks interleaved. Different from prior work, all models are trained with the Muon optimizer [17].

0.000.250.500.751.00CMP0.950.921.00ICRFCR0.940.911.00NCRMEM0.990.950.940.95SCAccuracy
Figure 2. MAD benchmark accuracy across six synthetic tasks. Parallax attains the highest overall average (0.716), with gains concentrated on recall-oriented tasks (ICR, FCR, NCR, SC).

Parallax consistently improves on the recall-oriented tasks (ICR, FCR, NCR, SC) while remaining competitive on the compression and memorization tasks (CMP, MEM), and attains the highest overall accuracy.

To further showcase the advantage of Parallax under more challenging recall conditions, we synthesize an additional set of harder tasks by scaling up the KV pairs and the sequence length on ICR, NCR, and SC, with vocabulary size and context length stressed up to 512 and 2048 respectively. Parallax retains accuracy as the difficulty grows, whereas other baselines degrade dramatically, most visibly on SC at the longest context lengths.

Context Recall0.00.51.0256-512512-10241024-2048Vocab-CtxNoisy Recall0.00.51.0128-512256-1024512-2048Vocab-CtxSelective Copy0.00.51.0128-512256-1024512-2048Vocab-Ctx
Figure 3. MAD-challenge recall accuracy as vocabulary size and context length scale up. Parallax retains accuracy as difficulty grows, whereas baselines degrade dramatically on Selective Copy at long contexts.

Small-Scale Pretraining

We adopt the Qwen-3 architecture [21] (which applies RMSNorm [27] to q\boldsymbol q and k\boldsymbol k vectors) as implemented in TorchTitan [22], and additionally apply RMSNorm to ρ\boldsymbol\rho in each Parallax layer.

At the 0.6B scale we also include KDA, GDN, and two controlled experiment baselines:

  • Parameter-matched Transformer (Transformer). Parallax introduces extra parameters from the WR\boldsymbol W_R projection. Transformer adds the same number of parameters to the Transformer baseline by increasing the query head count in GQA [23], which maintains KV size.
  • Compute-matched Parallax (Parallax). Since Parallax doubles the arithmetic intensity compared to FA, Parallax halves the head dimension to strictly match the attention layer compute. The reduced parameter count is rebalanced by increasing the FFN dimension to match the total parameter count of the standard Parallax.
WSD + Muon, 0.6B
50.052.054.056.058.0Parallax (RoPE-ρ)55.99Parallax†55.79Parallax (no RoPE)55.54Transformer†54.90Transformer54.54Gated DeltaNet53.67Kimi DeltaAttn52.73Downstream Accuracy (%)higher is better →
WSD + Muon, 1.7B
58.059.561.062.564.0Parallax (RoPE-ρ)62.45Parallax (no RoPE)61.69Transformer61.43Downstream Accuracy (%)higher is better →
AdamW baselines, 0.6B
48.049.551.052.554.0PLX (WSD+AdamW)52.68Attn (WSD+AdamW)52.61PLX (Cos+AdamW)51.45Attn (Cos+AdamW)52.34Downstream Accuracy (%)higher is better →
Figure 4. Pretraining results. Under Muon, Parallax opens a large gap over the Transformer at both 0.6B and 1.7B; under AdamW, the advantage largely disappears. Toggle between metrics.

Parallax achieves Pareto improvement over vanilla Softmax Attention.

  • Does the gain come from extra parameters? Transformer with matched parameters closes only a small fraction of the gap to Parallax, confirming that the improvement is not simply from additional parameters in query-like projections.
  • Does the gain require extra attention compute? Parallax with matched attention compute significantly outperforms baseline Transformer and Transformer, ruling out the added compute as a necessary condition.

These results provide strong evidence that the gain is driven by the mechanism itself.

The training perplexity curves under different optimizers and schedulers show that the Muon [17]-model curves exhibit a substantial gap between Parallax and the Transformer, consistent with the downstream evaluation. However, the advantage shrinks markedly or even disappears under AdamW [19]. The performance difference indicates a strong optimizer-architecture interaction, which the next section analyzes.

Loading...
Figure 5. 0.6B pretraining loss curves. Under Muon + WSD, Parallax opens a substantial and persistent gap over the Transformer baseline. The gap shrinks or disappears under AdamW, revealing a strong optimizer–architecture interaction.

Mechanistic Analysis

Attention Sinks

Though Parallax attention weights sijs_{ij} sum to 1, unlike softmax attention they can go negative and exceed 1 in magnitude. There are three concrete consequences:

  1. Score range. Negative weights let the model actively subtract irrelevant value components rather than just de-emphasize them. Under Muon, extreme weights reach ±40\pm 40 in the deepest layers, which is consistent with the COR growth.
  2. Attention sink. Softmax Attention notoriously dumps mass on the first token in the attention sink phenomenon [25]. Parallax substantially reduces this in both the base softmax pijp_{ij} and the combined weights sijs_{ij} — the correction branch appears to absorb the routing role the sink was serving.
  3. Entropy. Parallax's base softmax is consistently more diffuse than a standard Transformer's. The softmax handles broad aggregation; the correction branch handles fine-grained discrimination.
Loading...
Figure 6. Attention score patterns across layers. Left: Parallax score range grows with depth (±40 under Muon). Center: Parallax reduces the attention sink. Right: Parallax's base softmax is more diffuse (higher entropy).

5: Muon [17] Unlocks Parallax's Capacity

Probe Sensitivity

In Parallax, the probe ρi=WRxi\rho_i = \boldsymbol W_R \boldsymbol x_i is learned instead of solved as in standard LLA. Only the probe's component aligned with the optimal ρi\boldsymbol\rho_i^\star contributes to the correction and the rest is noise. If the probe is misaligned or norm-suppressed, the covariance term collapses and Parallax degenerates to Softmax Attention. We found probe-collapse is a strong function of the choice of optimizer and spectral dynamics.

To measure collapse, we track three quantities per layer:

  • the correction-to-output ratio (COR) which is how large the correction is relative to the softmax output
  • KV correlation (Corr)
  • Covariance-probe alignment (CPA)
CORi=ΣKV(i)ρioiSA,CPAi=ΣKV(i)ρiρiΣKV(i)2\texttt{COR}_i = \frac{\|\boldsymbol\Sigma_{KV}^{(i)} \boldsymbol\rho_i\|}{\|\boldsymbol o_i^{\textsf{SA}}\|}, \qquad \texttt{CPA}_i = \frac{\|\boldsymbol\Sigma_{KV}^{(i)} \boldsymbol\rho_i\|}{\|\boldsymbol\rho_i\|\,\|\boldsymbol\Sigma_{KV}^{(i)}\|_2}

Diagnostics

COR grows with depth under both optimizers. Muon reaches above 8 in the deepest layers, AdamW stays below 4. Muon also produces higher CorrF\|\texttt{Corr}\|_F and higher CPA, and the probe under Muon is both larger and better-aimed.

Interestingly, random initialization has uniformly high COR. Training suppresses the correction in early layers and amplifies it in deep ones, which barely recovers initialization level under AdamW and exceeds it under Muon.

Loading...
Figure 7. Per-layer diagnostics under different optimizers. Muon produces higher COR, larger correlation norms, better CPA alignment, and larger ρ norms, indicating the correction branch is actively used.

Is AdamW simply using a different scale convention, or does it genuinely fail to use the correction branch? To test this, we add a learnable sigmoid gate ρi=σ(wgxi)WRxi\rho_i = \sigma(\boldsymbol w_g^\top \boldsymbol x_i) \cdot \boldsymbol W_R \boldsymbol x_i. Under Muon, the gate opens and converges to the same loss as the ungated run, but under AdamW, it stabilizes at 0.26 and matches Transformer performance. AdamW learns to suppress the correction, independent of scaling.

Muon produces higher stable rank on the probe-related matrices (WR\boldsymbol W_R, WRK\boldsymbol W_{RK}), but the architecture and optimizer effects are separable.

Optimizer effect. WQ\boldsymbol W_Q, WK\boldsymbol W_K, and WQK\boldsymbol W_{QK} are identical between Parallax and Transformer under every optimizer, and the attention scoring structure is purely optimizer-determined. WR\boldsymbol W_R is the outlier as it has the largest optimizer sensitivity of any projection, larger than WQ\boldsymbol W_Q or WK\boldsymbol W_K. WRK\boldsymbol W_{RK} inherits this sensitivity and enjoys high rank under Muon but not under AdamW. CPA is higher under Muon since a high-rank RK circuit gives ρ\boldsymbol\rho more directions to align with.

Architecture effect. WV\boldsymbol W_V, WO\boldsymbol W_O, and WOV\boldsymbol W_{OV} are consistently higher rank under Parallax than Transformer, across all optimizers. The correction branch enriches the value pathway regardless of how the probe is trained.

050100150200optimizer-determinedarchitecture effectprobe (PLX only)optimizer-determinedarchitecture effectprobe (PLX only)W_Q116.097.4W_K105.8106.4W_V145.5199.8W_O186.6182.0W_R134.0W_QK22.325.5W_OV24.834.1W_RK29.1TransformerParallax
Figure 8. Stable rank of projection matrices (averaged across heads/layers). Blue = optimizer-determined (same across architectures), violet = architecture effect (Parallax consistently higher), amber = Parallax-only probe matrices.

Architecture-Optimizer Codesign

Muon's benefit to Parallax is a clear example of architecture-optimizer codesign. To validate generality, we run modded-NanoGPT experiments with four optimizers (Muon, Aurora, NorMuon, SOAP), each paired with Parallax (+Parallax, solid) and standard attention (dashed). Across all four optimizers, Parallax reaches lower val loss at matched step count. The Parallax benefit is not Muon-specific, though the magnitude varies between different optimizers.

Loading...
Figure 9. NanoGPT val loss vs wall-clock time across four optimizers. Solid = Parallax, dashed = standard attention. Parallax improves convergence under every optimizer tested.

The recipe-design space remains largely unexplored. Muon with warmup-stable-decay scheduling is likely suboptimal, and these preliminary NanoGPT results suggest that more advanced optimizers may further amplify Parallax's advantage.

6: Inflection

Three things excite us about this work.

1. Principled Improvement upon Softmax Attention. LLA is a provably principled improvement upon softmax attention's local constant estimator, correcting the structural boundary-bias pathology. Parallax inherits the local-linear correction principle and empirically realizes its advantages in pretraining, manifesting in strong gains across synthetic and real-world settings.

2. Architecture-optimizer Codesign. The clearest finding in this paper is that Muon counterfactually unlocks Parallax through stable optimization of WRW_R. This is, to our knowledge, the first empirical demonstration of strong architecture-optimizer codesign for an attention mechanism. It definitely won't be the last.

3. Parallax can be up-trained from Softmax. With WR=0W_R = 0, Parallax is exactly Softmax Attention. Any pretrained Transformer converts to Parallax by adding one weight matrix and fine-tuning or running continued pretraining.

4. Hardware Efficiency. Parallax doubles arithmetic intensity without extra I/O. The Hopper decode kernel already matches or beats FA2/FA3.

Future Work

The most pressing open question is why Muon unlocks WRW_R and AdamW fails. We have some empirical anatomy, but not a strong theoretical justification.

At scale, the doubled arithmetic intensity opens new recipes for trading head dimension against head count against FFN width, and this path is uncharted. Parallax is also structurally compatible with MLA, sliding window, and block-sparse attention.

Finally, the affine structure here applies to the whole family of sequence mixers. DeltaNet [9] [10], MesaNet [8], and Linear Attention [7] all drop the intercept by construction, and could benefit from the Parallax construction.

Open Source

We release the kernel and a detailed technical report.

Cite this work

@article{zuo2026parallax,
  title   = {Parallax: Parameterized Local Linear Attention for Language Modeling},
  author  = {Zuo, Yifei and Pai, Dhruv and Zeng, Zhichen and Dewulf, Alec
             and Hu, Shuming and Wang, Zhaoran},
  year    = {2026},
  url     = {https://arxiv.org/abs/2605.29157}
}

Appendix

A: Bias-variance Benefit of LLA

Theorem (Bias-variance separation). Let (Xi,Yi)i=1n(X_i, Y_i)_{i=1}^n be i.i.d. with XiRdX_i \in \mathbb R^d supported on a bounded C2C^2 domain DD and Yi=f(Xi)+εiRdyY_i = f(X_i) + \varepsilon_i \in \mathbb R^{d_y}, E[εiXi]=0\mathbb E[\varepsilon_i \mid X_i] = 0. Let f^GL\hat f_{\text{GL}}, f^NW\hat f_{\text{NW}}, and f^LL\hat f_{\text{LL}} denote the Global Linear, Nadaraya–Watson (Local Constant), and Local Linear estimators with optimal bandwidths, respectively. Under standard regularity conditions, denoting R(f^):=E ⁣Df^(x)f(x)2dx\mathcal R(\hat f) := \mathbb E\!\int_D \|\hat f(x) - f(x)\|^2\, dx the integrated mean squared error,

R(f^GL)R(f^NW)R(f^LL).\mathcal R(\hat f_{\text{GL}}) \gg \mathcal R(\hat f_{\text{NW}}) \gg \mathcal R(\hat f_{\text{LL}}).

The lower bound for f^GL\hat f_{\text{GL}} holds whenever ff is not globally affine. The lower bound for f^NW\hat f_{\text{NW}} holds whenever ff has sufficiently large normal gradient along D\partial D.

B: LLA as an additive correction — the derivation

Starting from the LLA forward

oiLLA=jiwij(1tij)ωiμiρivj,tij=ρizij,\boldsymbol o_i^{\textsf{LLA}} = \sum_{j \le i} \frac{w_{ij}(1 - t_{ij})}{\omega_i - \boldsymbol\mu_i^\top \boldsymbol\rho_i^\star}\, \boldsymbol v_j, \quad t_{ij} = \boldsymbol\rho_i^{\star\top}\boldsymbol z_{ij},

divide numerator and denominator by ωi\omega_i and set pij=wij/ωip_{ij} = w_{ij}/\omega_i. Using μiρi/ωi=Epi[tij]=tˉi\boldsymbol\mu_i^\top \boldsymbol\rho_i^\star / \omega_i = \mathbb E_{\boldsymbol p_i}[t_{ij}] = \bar t_i,

oiLLA=Epi[(1tij)vj]1tˉi.\boldsymbol o_i^{\textsf{LLA}} = \frac{\mathbb E_{\boldsymbol p_i}[(1 - t_{ij})\boldsymbol v_j]}{1 - \bar t_i}.

Expanding the numerator with zij=kjqi\boldsymbol z_{ij} = \boldsymbol k_j - \boldsymbol q_i and the cross-moment factorization Epi[vjkj]=ΣKV(i)+vˉikˉi\mathbb E_{\boldsymbol p_i}[\boldsymbol v_j \boldsymbol k_j^\top] = \boldsymbol\Sigma_{KV}^{(i)} + \bar{\boldsymbol v}_i \bar{\boldsymbol k}_i^\top:

Epi[vjzij]=ΣKV(i)+vˉizˉi,Epi[tijvj]=ΣKV(i)ρi+tˉivˉi.\mathbb E_{\boldsymbol p_i}[\boldsymbol v_j \boldsymbol z_{ij}^\top] = \boldsymbol\Sigma_{KV}^{(i)} + \bar{\boldsymbol v}_i \bar{\boldsymbol z}_i^\top, \qquad \mathbb E_{\boldsymbol p_i}[t_{ij}\boldsymbol v_j] = \boldsymbol\Sigma_{KV}^{(i)}\boldsymbol\rho_i^\star + \bar t_i \bar{\boldsymbol v}_i.

So Epi[(1tij)vj]=(1tˉi)oiSAΣKV(i)ρi\mathbb E_{\boldsymbol p_i}[(1 - t_{ij})\boldsymbol v_j] = (1 - \bar t_i)\boldsymbol o_i^{\textsf{SA}} - \boldsymbol\Sigma_{KV}^{(i)}\boldsymbol\rho_i^\star. Dividing by 1tˉi1 - \bar t_i and identifying 1/(1tˉi)=1+ηi1/(1 - \bar t_i) = 1 + \eta_i gives the additive form

oiLLA=oiSA(1+ηi)ΣKV(i)ρi.\boldsymbol o_i^{\textsf{LLA}} = \boldsymbol o_i^{\textsf{SA}} - (1 + \eta_i) \boldsymbol\Sigma_{KV}^{(i)} \boldsymbol\rho_i^\star.

Setting ηi=0\eta_i = 0 and replacing the exact solve with the learned probe ρi=WRxi\boldsymbol\rho_i = \boldsymbol W_R \boldsymbol x_i recovers the Parallax forward used throughout the post.

C: Hopper decode kernel: three optimizations

The CuTeDSL prototype on H200 hits the matches-or-beats result against FA2/FA3 through three Hopper-specific tricks:

  1. WGMMA sharing. Each CTA packs Qr\mathbf Q_r and Rr\mathbf R_r into a single shared-memory tile, with Q in the first row, R in the second, and issues one WGMMA that emits S1\mathbf S_1 and S2\mathbf S_2 jointly in the same accumulator. After P1\mathbf P_1 is produced, P2=P1S2\mathbf P_2 = \mathbf P_1 \odot \mathbf S_2 is built in registers and stacked with P1\mathbf P_1 in shared memory. The PV WGMMA then emits O1\mathbf O_1 and O2\mathbf O_2 jointly. The cost is one extra row of register accumulators per CTA, no extra HBM traffic, and this is what lets the second branch ride along for free.
  2. Persistent split over the KV loop. Decoding only presents BHBH query rows, often well below H200's 132 SMs. A persistent grid of (B,H,S)(B, H, S) CTAs is launched, with SS CTAs sharing a (B,H)(B, H) partition of the L/Bc\lceil L/\mathcal B_c \rceil tile loop. SS is chosen so the launch fits one wave and rounds to a power of two, enabling vectorized cross-split reduction.
  3. In-kernel reduction. Each CTA writes its unnormalized partials to a small fp32 HBM workspace and atomically increments a per-(B,H)(B, H) counter. The CTA that observes the final increment is elected the merger: it reads the SS partials, runs log-sum-exp rescaling in fp32, evaluates (1+d2/d1)O1/d1O2/d1(1 + d_2/d_1)\, O_1/d_1 - O_2/d_1, and writes the output row in the same kernel launch. A compile-time branch on S=1S = 1 skips the workspace round-trip entirely on short-context shapes.

D: Arithmetic intensity

The key property of the streaming algorithm is that it increases the arithmetic intensity (AI\texttt{AI}) over FA, defined as the ratio of floating point operations (FLOPs) to high-bandwidth memory (HBM) traffic in bytes. Write LqL_q and LkvL_{kv} as the query and KV sequence lengths respectively and dhd_h as the head dimension,

AIFA4LqLkvdh2(Lq+2nrLkv)dh=2LqLkvLq+2nrLkv,\texttt{AI}^{\textsf{FA}} \approx \frac{4 L_q L_{kv} d_h}{2(L_q + 2 n_r L_{kv}) d_h} = \frac{2 L_q L_{kv}}{L_q + 2 n_r L_{kv}}, AIPLX8LqLkvdh2(2Lq+2nrLkv)dh=2LqLkvLq+nrLkv,\texttt{AI}^{\textsf{PLX}} \approx \frac{8 L_q L_{kv} d_h}{2(2 L_q + 2 n_r L_{kv}) d_h} = \frac{2 L_q L_{kv}}{L_q + n_r L_{kv}},

where nr=Lq/Brn_r = \lceil L_q / \mathcal B_r \rceil is the number of query row blocks. In the regime where nrLkvLqn_r L_{kv} \gg L_q, Parallax roughly doubles the arithmetic intensity by adding more compute while reusing the same KV stream. The shift toward a more compute-bound operator is what makes decoding a target for kernel-level optimization on modern hardware.

E: Boundary amplification is non-negative

The proof that ηi0\eta_i \ge 0 exposes a Mahalanobis structure inside Σi\boldsymbol\Sigma_i. Decomposing via the variance identity gives a rank-one split

Σi=Ai+ωizˉizˉi,Ai=ωiVarpi(zij)+λI0,\boldsymbol\Sigma_i = \boldsymbol A_i + \omega_i \bar{\boldsymbol z}_i \bar{\boldsymbol z}_i^\top, \quad \boldsymbol A_i = \omega_i \mathrm{Var}_{\boldsymbol p_i}(\boldsymbol z_{ij}) + \lambda \boldsymbol I \succ 0,

where zˉi=Epi[zij]\bar{\boldsymbol z}_i = \mathbb E_{\boldsymbol p_i}[\boldsymbol z_{ij}]. Sherman–Morrison inverts Σi\boldsymbol\Sigma_i and, using μi=ωizˉi\boldsymbol\mu_i = \omega_i \bar{\boldsymbol z}_i, yields

ρi=Σi1μi=ωiAi1zˉi1+ui,ui:=ωizˉiAi1zˉi0.\boldsymbol\rho_i^\star = \boldsymbol\Sigma_i^{-1}\boldsymbol\mu_i = \frac{\omega_i \boldsymbol A_i^{-1} \bar{\boldsymbol z}_i}{1 + u_i}, \quad u_i := \omega_i \bar{\boldsymbol z}_i^\top \boldsymbol A_i^{-1} \bar{\boldsymbol z}_i \ge 0.

Substituting back through tˉi=zˉiρi\bar t_i = \bar{\boldsymbol z}_i^\top \boldsymbol\rho_i^\star,

tˉi=ui1+ui[0,1),ηi=tˉi1tˉi=ui=ωizˉiAi1zˉi0.\bar t_i = \frac{u_i}{1 + u_i} \in [0, 1), \qquad \eta_i = \frac{\bar t_i}{1 - \bar t_i} = u_i = \omega_i \bar{\boldsymbol z}_i^\top \boldsymbol A_i^{-1} \bar{\boldsymbol z}_i \ge 0.

So ηi\eta_i equals ωi\omega_i times the squared Mahalanobis distance from qi\boldsymbol q_i to the weighted key mean kˉi\bar{\boldsymbol k}_i under the metric Ai1\boldsymbol A_i^{-1}. Queries near the weighted key center give ηi0\eta_i \approx 0 (pure covariance correction); queries near the boundary give ηi1\eta_i \gg 1 (amplified correction). This is the geometric content sitting under "boundary amplification."

F: Parallax backward (closed form)

The backward admits the same row-tile / column-tile streaming structure as the FA backward. With upstream gradient dOi\mathrm{d}\boldsymbol O_i, define the row scalars and per-token quantities

τi=dOioi,βi=dOivˉi,aij=dOivj,δij=aijβi,\tau_i = \mathrm{d}\boldsymbol O_i^\top \boldsymbol o_i, \quad \beta_i = \mathrm{d}\boldsymbol O_i^\top \bar{\boldsymbol v}_i, \quad a_{ij} = \mathrm{d}\boldsymbol O_i^\top \boldsymbol v_j, \quad \delta_{ij} = a_{ij} - \beta_i,

and the two channel coefficients

gij(1)=pij(aijτi+(tˉitij)δij),gij(2)=pijδij.g_{ij}^{(1)} = p_{ij}\bigl(a_{ij} - \tau_i + (\bar t_i - t_{ij})\delta_{ij}\bigr), \qquad g_{ij}^{(2)} = -p_{ij}\,\delta_{ij}.

The gradients are then

dQi=h1jigij(1)kj,dRi=jigij(2)kj,dKj=h1ijgij(1)qi+ijgij(2)ρi,dVj=ijpij(1+tˉitij)dOi.\begin{aligned} \mathrm{d}\boldsymbol Q_i &= h^{-1}\sum_{j \le i} g_{ij}^{(1)} \boldsymbol k_j, \qquad &\mathrm{d}\boldsymbol R_i &= \sum_{j \le i} g_{ij}^{(2)} \boldsymbol k_j,\\ \mathrm{d}\boldsymbol K_j &= h^{-1}\sum_{i \ge j} g_{ij}^{(1)} \boldsymbol q_i + \sum_{i \ge j} g_{ij}^{(2)} \boldsymbol\rho_i, \qquad &\mathrm{d}\boldsymbol V_j &= \sum_{i \ge j} p_{ij}(1 + \bar t_i - t_{ij})\,\mathrm{d}\boldsymbol O_i. \end{aligned}

The forward caches (oi,vˉi,tˉi,ωi,mi)(\boldsymbol o_i, \bar{\boldsymbol v}_i, \bar t_i, \omega_i, m_i) per row — only d+1d + 1 extra values beyond the FA cache. Because the row-sum and column-sum directions are opposite, the backward splits into a row-tile pass (loads Qr,Rr,dOr\mathbf Q_r, \mathbf R_r, \mathrm{d}\mathbf O_r, streams over column blocks of K,V\mathbf K, \mathbf V, accumulates dQr,dRr\mathrm{d}\mathbf Q_r, \mathrm{d}\mathbf R_r) and a column-tile pass (loads Kc,Vc\mathbf K_c, \mathbf V_c, streams over row blocks of Q,R,dO\mathbf Q, \mathbf R, \mathrm{d}\mathbf O in reverse order, accumulates dKc,dVc\mathrm{d}\mathbf K_c, \mathrm{d}\mathbf V_c).

G: Weight-decay annealing during WSD decay

While Muon delivers a substantial advantage over AdamW, we do not claim Muon with WSD is the optimal combination for Parallax. The advantage of Parallax shrinks during the final linear decay phase of the WSD schedule, and weight norms shrink throughout the decay phase, which may partially explain the shrinkage. We ablate this with weight-decay annealing (WDA), which replaces the constant decay λ\lambda with a schedule λ(t)=λ(1t)γ\lambda(t) = \lambda (1 - t)^\gamma. WDA effectively mitigates the weight-norm shrinkage and reaches lower final training loss than the standard recipe, with the improvement monotone in γ\gamma over the range tested.

The relative effective step in parameter space is

Δt=ηtWtLtFWtF.\Delta_t = \frac{\|\eta_t \nabla_{\boldsymbol W_t} \mathcal L_t\|_F}{\|\boldsymbol W_t\|_F}.

Under standard WSD, both numerator and denominator shrink together over the decay window, partially preserving Δt\Delta_t. The Parallax advantage shrinks during decay, and WRF\|\boldsymbol W_R\|_F also shrinks throughout. This correlation suggests the relative-step collapse may be the mechanism.

WDA replaces the constant weight decay λ\lambda with λ(t)=λ(1t)γ\lambda(t) = \lambda(1 - t)^\gamma over t[0,1]t \in [0, 1], where γ=0\gamma = 0 recovers standard WSD and γ>0\gamma > 0 suppresses decay more aggressively toward the end of training. Tested at γ{0.5,1,2}\gamma \in \{0.5, 1, 2\} at 0.6B scale, WDA holds WtF\|\boldsymbol W_t\|_F - higher γ\gamma, larger final norms - and yields lower final training loss than the standard recipe, monotone in γ\gamma, with γ=2\gamma = 2 giving the largest gain. But the gap closes in the second half of the decay stage at similar step counts across γ\gamma: as ηt0\eta_t \to 0 with the denominator now held by WDA, Δt\Delta_t collapses faster than under standard WSD. WDA partially mitigates the issue without fully resolving it, which is preliminary evidence that Muon + WSD is not the optimal recipe for Parallax in its current form, and an open recipe-design question.

References

  1. Zuo, Y., Pai, D., Zeng, Z., Dewulf, A., Hu, S., Wang, Z. (2026).
  2. Zuo, Y., Pai, D., Wang, Z. (2026).
  3. Vaswani, A. et al. (2017).
  4. On Estimating Regression
    Nadaraya, E. A. (1964).
  5. Smooth Regression Analysis
    Watson, G. S. (1964).
  6. Yang, S. et al. (2025).
  7. Kimi Team (2025).
  8. Jordan, K. et al. (2024).
  9. Kingma, D. P., Ba, J. (2015).
  10. Loshchilov, I., Hutter, F. (2019).
  11. Qwen Team (2025).
  12. Gao, L. et al. (2024).
  13. Zhang, B., Sennrich, R. (2019).
  14. Wang, Z. et al. (2025).