Manuscript Offprint
arXiv:2611.08236Beyond Quadratic Attention: Separable Gaussian Operators for ODE Vision Transformers
Carlos Boned Riera*
Universitat Autònoma de Barcelona Centre de Visió per Computador (CVC) cboned@cvc.uab.cat
David Romero Sánchez
Universitat Autònoma de Barcelona Centre de Recerca Matemàtica (CRM) dromero@crm.cat
Oriol Ramos Terrades
Universitat Autònoma de Barcelona Centre de Visió per Computador (CVC) oriolrt@cvc.uab.cat

Figure 1: Left: throughput–memory trade-off at resolution 1024 as the width of the model increases. Points farther upward provide more throughput and points farther left allocate less memory. Our proposed method dominates multi-head attention, achieving higher throughput at lower memory. Right: comparison of the three model families with our proposed method.
ABSTRACT
Self-attention carries a quadratic cost in token count, which limits how far Vision Transformers can scale with input resolution. We introduce SSoG, a separable sum-of-Gaussians spatial operator that replaces dense self-attention with a learned mixture of axis-factorized Gaussian kernels, reducing the per-layer cost from to subquadratic in . Unlike dot-product self-attention, whose Lipschitz constant is unbounded outside a compact input domain, SSoG with fixed kernels is globally Lipschitz continuous, which, via the Picard–Lindelöf theorem, guarantees that the continuous-depth variant has a unique solution on the whole integration interval, a global guarantee that dense-attention counterparts lack in general. On CIFAR-100 at , in a matched discrete-Transformer setting and in the continuous setting, SSoG improves Top-1 accuracy by 2.2–4.1 points across three model widths while using 8.8–16.6% fewer parameters, with depth and training recipe held fixed. In a looped-Transformer setting, SSoG improves
*Corresponding Author.
Top-1 accuracy by 5.4–8.1 points. We further probe inference-time scaling by evaluating on inputs up to at matched batch size: in the continuous-depth (Neural ODE) architecture, SSoG reaches up to 154% higher throughput and over 60% lower peak memory than dense attention, with the gap widening as resolution grows, consistent with the difference in asymptotic cost. In the discrete and looped settings, SSoG also achieves over 30% higher throughput than dense attention at this resolution. Together, these results establish SSoG as a practical, parameter-efficient, and theoretically grounded alternative to dense attention across discrete, weight-shared, and continuous-depth Transformer variants.
1 INTRODUCTION
The self-attention mechanism, implemented through scaled dot-product attention (SDPA) Vaswani et al. (2017), has marked a paradigm shift in AI. ViT Dosovitskiy et al. (2021) showed that this SDPA mechanism could scale to images, and this led to remarkably impressive results across a wide range of vision tasks. Foundation models such as DINO Caron et al. (2021), SAM Kirillov et al. (2023) for segmentation and DiT Peebles & Xie (2023) for diffusion, as well as VLMs and LLMs, demonstrated that this attention mechanism could scale to results beyond what seemed possible. Alongside these strengths, however, come several problems: the complexity of self-attention itself, a limited understanding of how a model learns to attend, difficulty training these models due to theoretical issues inherent to SDPA, and the emergence of artifacts Darcet et al. (2024); Qiu et al. (2025), among others. These issues have mostly been studied in isolation. In this paper, we show that reducing the complexity of self-attention and satisfying the theoretical property required for Lipschitz continuity can be achieved by the same operator, and we study the behaviour of this operator when instantiated across discrete, looped, and continuous-depth Transformers.
The complexity of SDPA arises from the token sequence length. For tokens of dimension , SDPA needs memory and computation, and in vision grows with the square of the image side, so the cost increases with the resolution. Research on context compression Zhang et al. (2025); Liu et al. (2026) reduces the memory needed to store the matrix, reducing the effective sequence length, but the operation is still quadratic. State Space Models Gu & Dao (2024); Zhu et al. (2024) drop pairwise interaction altogether and are linear in ; however, they tend to be harder to train and imply a complete change of architecture. Looped Transformers Byra et al. (2026) and Neural ODEs Zhong et al. (2022) work on a different axis: they share parameters across depth, which reduces model size but not the cost of a single evaluation. Moreover, these models are sensitive to hyperparameters, and noise in the parameter space is carried through all the optimization steps and cannot be isolated.
Beyond the cost of recurrent and continuous models, they inherit a second, more fundamental problem from dense attention itself: attention scores are computed over an unbounded domain. Since the query-key interaction is an inner product between unconstrained vectors, SDPA is not globally Lipschitz continuous Kim et al. (2021). This is part of why the literature argues that Transformers are sensitive to hyperparameters, initialization, and learning rate Qi et al. (2023). These theoretical implications matter most for continuous-depth models. Dense attention is smooth, and hence Lipschitz on bounded sets, so the Picard–Lindelöf theorem still guarantees a unique solution locally in time. What global Lipschitz continuity adds is existence of the solution on the whole integration interval for every initial condition, without finite-time blow-up, together with a uniform bound on how much two trajectories can drift apart when their initial conditions differ. Recurrent and continuous architectures, which apply the same block many times, are therefore the ones that benefit most from a property that dense attention lacks.
Pisoni (2026) recently outlined SSoG, a Sum of Separable Gaussians operator that replaces dot-product attention in standard ViTs with a small mixture of anisotropic, axis-factorized Gaussian kernels, in a fixed and a content-steered variant, and reported preliminary results on image classification. Because the kernel factorizes along the image axes, SSoG never builds the attention matrix and is subquadratic in N. We study it in a regime for which it was neither designed nor analyzed: as the token mixer of looped and continuous-depth Transformers. In this paper, we show that SSoG with fixed kernels is globally Lipschitz continuous by construction, precisely the property that looped and continuous-depth models require, while its content-steered variant is Lipschitz on sets of bounded token norms; we are the first to study it inside these architectures. Unlike MHA, where tokens compete for a fixed normalization budget through content-dependent scores, fixed SSoG assigns weights from a spatial kernel of the relative offsets, so no token can take mass away from another, leaving no mechanism for an attention sink to form. We confirm this empirically on the trained models: dense attention develops a persistent sink on ImageNet, whereas SSoG does not (Appendix A.2). We benchmark this instantiation of SSoG against dense attention across discrete, looped, and continuous-depth settings, providing the first empirical and theoretical characterization of its behavior as a weight-shared, continuous-depth attention mechanism. We also find that content steering improves the discrete and looped models but not the continuous-depth one, and that the efficiency gains of SSoG grow with input resolution.
-
We use SSoG, in fixed and content-steered variants, as a drop-in replacement for dense attention in discrete, looped and continuous-depth vision Transformers, and benchmark it extensively against dense attention in each setting.
-
We study the accuracy-compute trade-off of ODE-SSoG in integration depth and number of atoms, and show its sub-quadratic operator gains over dense attention in throughput and memory as resolution grows.
2 METHOD
We follow the formulation of Pisoni (2026) and restate it with the notation used in our analysis. In contrast to conventional self-attention, SSoG does not construct query-key similarities or explicitly materialize an attention matrix. Instead, each head mixes value features through a small collection of learned anisotropic Gaussian spatial kernels. These kernels factorize along the and axes, so two-dimensional mixing reduces to successive one-dimensional contractions.
Each Gaussian atom, , provides a compact geometric description of a spatial interaction pattern. Its center determines where information is gathered from, its spread determines how local or global the interaction is, and its mixture weight determines the contribution of that pattern to the head output. Let denote the sequence of input tokens, where the tokens are patch tokens and one is a class token and let be the number of heads with head dimension . Unlike dot-product self-attention, SSoG contains no query or key projections. For each head , a learned projection produces:
Stacking all heads gives . The class token is separated before spatial filtering, while the remaining patch tokens are reshaped onto a spatial grid.
Gaussian spatial kernels. Each head contains Gaussian atoms. Atom is parameterized by a center , an anisotropic spread , and a mixture logit , from which the mixture weights are obtained by softmax over atoms. For axis and offset , the unnormalized Gaussian log-kernel is:
The kernel is normalized over source coordinates using a learned positive temperature ,
To ensure valid, non-degenerate kernels, and are obtained from unconstrained learned counterparts and via a positive reparameterization, with bounding each axis-wise spread from below:
Here and prevent over-sharpening of the axis-wise softmax and ensure numerical stability of the width constraint, respectively. Under the offset convention , a center selects source positions near , so the learned centers directly encode the relative spatial locations from which each head gathers information.
We study two variants of this operator: fixed SSoG and content-steered, described below. In fixed SSoG the geometric parameters, centers, spreads, and mixture weights, are shared across all images and query positions. In the content-steered variant, termed LookAt, bounded input-dependent perturbations adapt the geometry per query patch while preserving the separable structure.
2.1 FIXED SSOG
In fixed SSoG, the atom geometry and mixture weights are shared across images and query positions. For a fixed head , the value vectors are collected into . For each atom , the axis attention matrices defined entry-wise by equation 3 are and . The head output is:
This separable formulation reduces the asymptotic cost of spatial mixing from quadratic to sub-quadratic in the number of tokens: for a square token grid with and a small, fixed number of atoms , applying separable Gaussian atoms through successive horizontal and vertical contractions costs , compared with for dense self-attention; Appendix A.1 gives the full derivation, including storage costs and the effect of query-dependent steering.
2.2 CONTENT-STEERED SSOG
Fixed SSoG applies the same learned spatial geometry independently of image content. To introduce content dependence without reintroducing pairwise query-key interactions, we additionally consider the LookAt variant. For each query position , with token (the -th row of ), the model predicts bounded modifications to the Gaussian centers, spreads, and mixture weights. Three linear predictors generate the following query-dependent perturbations for each head independently:
where and are learned weights and biases, denotes the -th entry of (indexed over atoms and axes), is the steering radius, so that each center moves by at most grid cells, and
The tanh nonlinearities bound the predicted modifications, while the exponential parameterization ensures that the steered spreads remain positive. Query-dependent steering does not remove the separable factorization; the computation continues to use successive one-dimensional contractions. Individual steering paths can be disabled independently for ablation.
The scalar steering parameters are initialized close to zero; the specific values used in each training regime are given in §3. The model therefore starts close to the fixed SSoG geometry and progressively activates content-dependent modulation during training. This initialization is particularly useful in the continuous-depth setting, where the operator is applied repeatedly.
2.3 INSTANTIATING SSOG ACROSS ARCHITECTURES
SSoG is designed as a drop-in replacement for MHA: in every architecture we study, the only change relative to the corresponding baseline is replacing its attention block with SSoG, while the surrounding architecture is left unchanged. We instantiate this substitution in three settings: a standard discrete (non-recurrent) ViT, a looped/recurrent Transformer based on Byra et al. (2026) that shares its attention block across depth, and a continuous-depth architecture in which SSoG defines the vector field of a Neural ODE Boned Riera et al. (2025).
All three settings share the same tokenization. Let an input image be , where is the batch size. A convolution with kernel size and stride produces a grid of patch tokens, where and . We denote the total sequence length by and the embedding dimension by . With a class token prepended, the initial sequence is
Class-token handling. The class token has no natural two-dimensional coordinate and is therefore excluded from Gaussian spatial filtering. Instead, it receives a lightweight global aggregation of the projected patch values , :
This aggregated class-token representation is concatenated with the filtered patch representations and projected through , producing the SSoG block output. Patch-to-patch mixing therefore remains entirely Gaussian, while no dense class-to-patch attention scores are introduced. Here denotes the per-block value-space aggregate of the class token; in all three settings below, the class-token state accumulated across blocks is denoted .
Discrete ViT and looped Transformer. In the standard discrete setting, SSoG blocks are stacked, each with its own independent parameters . In the looped setting, a single block is used instead, with parameters shared across all iterations ( is the depth); both follow the recurrence
with independent across l in the discrete case, and for all l in the looped case.
ODE-SSoG (continuous-depth). Rather than applying SSoG a fixed number of times, ODE-SSoG treats depth as continuous: SSoG serves as the token-mixing operator inside the vector field of the Continuous ViT, and the token sequence is evolved by the initial-value problem
integrated numerically from to . As in the looped setting, the same parameters are reused at every function evaluation; ODE-SSoG can be seen as the continuum limit of the looped variant, where the number of iterations define the horizon in the integration path.
In all three settings, the final class-token state , obtained after L iterations of equation 15 or by integrating equation 16 to t = 1, is normalized and linearly projected to the class logits:
3 EXPERIMENTS AND RESULTS
In this section, we study different questions, each addressed in its own subsection. The Appendix A.3 reports further supporting ablations that isolate individual design choices without bearing directly on these questions. Unless otherwise stated, classification ablations are conducted on CIFAR-100 for 500 epochs, following the same training recipe as Touvron et al. (2021) and patch size 16. For the continuous models, explicit Euler integration is used; NFE denotes the number of vector field evaluations.

Figure 2: Width scaling on CIFAR-100, dense attention (MHA) versus SSoG, across the three architecture settings. The dotted connector and label give the Acc@1 gain of SSoG at .

Figure 3: Ablations of SSoG on CIFAR-100 in the three architecture settings.
3.1 Is SSoG SENSITIVE TO DIFFERENT HYPERPARAMETERS?
Figure 2 summarizes the main comparison among models and capacity levels. In all cases the addition of the SSoG improves the results in all the families of models and in the capacity of each model within the family by at least 2.22 Top-1 points (full results in Table 10).
We report ablations over head count, depth, and atom count. Figure 3 shows the behavior of SSoG under different hyperparameters, with the underlying results reported in Appendix A.3 Table 11. The table shows that, at a fixed embedding dimension of 768 and four atoms per head, increasing the number of heads from 6 to 24 improves top-1 accuracy slightly in the Continuous model while there is almost no effect in the looped and discrete setting. The atom-count sweep saturates rapidly: moving from one to two atoms improves top-1 accuracy from 73.42% to 74.13%, whereas eight atoms reach only 73.99%. To assess whether this saturation reflects redundancy among the learned atoms, we computed the entropy of their mixture weights: on CIFAR-100, the eight-atom model has an entropy-derived effective atom count of only 3.381. Appendix A.4 gives the formulation of the entropy used to compute the effective atoms, and Appendix A.3.1 additionally reports the effect of the sigma floor , the remaining capacity constraint on the Gaussian atoms. Two to four atoms per head therefore appear sufficient, while additional atoms are redundant.
We ran the same ablation without SSoG, using dense attention instead; the results are reported in Appendix A.3 Table 12, where the variation across hyperparameters is larger than for SSoG.
3.2 STEERING: WHAT SHOULD BE STEERED?
We isolated query-dependent changes to the atom center , width , and mixture weight in Table 1. We used full cold steering initialization with 12 NFE as baseline. More runs can be found in the Appendix A.3 Table 7. We focus on the ODE as it yielded the worst results. Width-only
Table 1: Steering-component attribution on CIFAR-100 at NFE 12 and , cold initialization throughout. Checkmarks denote query-dependent components.
| Variant | Acc@1 | Acc@3 | Acc@5 | Loss | Time (h) | |||
|---|---|---|---|---|---|---|---|---|
| Fixed | - | - | - | 74.22 | 88.59 | 92.38 | 1.12 | 47.77 |
| Full, cold | ✓ | ✓ | ✓ | 70.89 | 86.89 | 91.30 | 1.20 | 59.48 |
| Center only | ✓ | - | - | 73.33 | 87.79 | 91.61 | 1.15 | 58.37 |
| Width only | - | ✓ | - | 74.01 | 88.39 | 92.16 | 1.11 | 57.42 |
| Mixture only | - | - | ✓ | 73.87 | 88.20 | 91.73 | 1.13 | 57.08 |
| Center + width | ✓ | ✓ | - | 71.21 | 86.83 | 91.13 | 1.19 | 58.61 |
steering matches the fixed model in accuracy (74.01% versus 74.22%). Mixture-only steering is also competitive at 73.87%. In contrast, jointly steering centers and widths reduces accuracy to 71.21%, close to full steering at 70.89%. Since center-only and width-only models reach 73.33% and 74.01%, respectively, we conjecture that the main failure mode is their joint query-dependent geometry from the division in equation 2. Appendix A.3.3 reports an ablation showing that a warmer initialization or a larger initialization of the gate both cost additional accuracy on top of this interaction, and Appendix A.3.4 shows that constraining the steering radius partially, but not fully, recovers it. Appendix A.3 Table 7 reports results of steering for the other families, where there is an improvement over the fixed SSoG.
3.3 DOES SSoG OUTPERFORM OPTIMIZED SDPA KERNEL S AS BATCH SIZE AND RESOLUTION GROW?
We benchmark randomly initialized models in FP16 on an NVIDIA A40 using ten warm-ups and 50 measured iterations. Figure 4 reports a stress test of measured throughput, FLOPs and peak allocated CUDA memory at different resolutions averaged over batch sizes from 8 to 512. Full throughput, memory and FLOPs results are given in Appendix A.1 (Figure 5, Table 4).
On the one hand, in the continuous-depth setting, the throughput of SSoG already exceeds ODE-ViT at every measured resolution, growing from +11.0% at to +154.5% at . The discrete setting instead starts below parity: SSoG trails ViT-B/16 by up to 22.6% at resolution 224, reaches approximate parity around resolution 512 to 640, and only clearly overtakes it from resolution 640 onward, reaching +30.1% at 1024. The looped setting sits between the two, with a positive throughput delta at every resolution, from a marginal +2.9% at 224 to +33.1% at 1024.
On the other hand, on memory, SSoG uses less memory than ODE-ViT, saving between 27% and over 60%, and less memory than the standard ViT, saving between approximately 6% and 10%, whereas the looped setting is the only one where SSoG costs more than dense attention. A plausible explanation is that the discrete and looped baselines use a highly optimized fused attention kernel with strong absolute memory efficiency, while the separable-Gaussian implementation used by SSoG relies on standard PyTorch ops; at high resolution, this constant-factor gap can outweigh the structural advantage of SSoG, an effect that appears earliest for the looped setting, whose dense baseline also carries less fixed parameter memory due to weight sharing. Appendix A.1.1 and Table 3 report the computation cost of the attention operation in isolation.
An independent sweep over Tiny, Small, Base and Large ViTs (Figure 1, left) shows that SSoG is faster and lighter than MHA at every width.
3.4 DOES SSoG GENERALIZE BEYOND SCALING?
Finally, Table 2 reports how the operator scales to a larger benchmark, ImageNet-1k in this case. Each model family was trained under the same experimental setup on the same hardware. SSoG matches or exceeds its dense counterpart in the continuous-depth and discrete settings, by a narrow +0.30-point margin for continuous-depth and a clearer +1.42-point margin for discrete; the looped setting is the only exception, where dense leads SSoG by 0.35 points on top-1 accuracy. The accuracy of SSoG is competitive with dense attention across all three settings rather than specific to

Figure 4: SSoG versus dense attention, throughput and memory improvement (%) by resolution, for each of the three architecture settings (continuous-depth ODE-ViT, discrete ViT-B/16, looped bViT). Each point is the mean relative difference over batch sizes 8 → 512 at that resolution. Memory is negated (plotted as % memory saved) so both lines share one direction: above the dashed zero line means SSoG wins that metric at that resolution, below means dense wins. The rightmost panel shows the relative improvement in FLOPs for the whole model and for the attention operation alone.
Table 2: ImageNet-1k accuracy at : SSoG versus dense attention (MHA).
| Metric | Continuous | Discrete | Looped | |||
|---|---|---|---|---|---|---|
| MHA | SSoG | MHA | SSoG | MHA | SSoG | |
| Acc@1 | 63.04 | 64.02 | 76.47 | 77.89 | 73.72 | 73.37 |
| Acc@3 | 79.04 | 79.62 | 89.44 | 90.59 | 88.35 | 87.93 |
| Acc@5 | 83.40 | 84.45 | 92.31 | 93.37 | 91.90 | 91.65 |
any one of them. Appendix A.5 additionally reports results on linear probing and full fine-tuning, as well as the effect of the data augmentation in the transfer setting.
4 RELATED WORK & DISCUSSION
Approximating attention versus replacing it. Most work on subquadratic attention approximates the softmax kernel instead of abandoning it, using low-rank projections, random features or kernel feature maps Wang et al. (2020); Choromanski et al. (2021); Katharopoulos et al. (2020). What ties these together is the idea that attention acts as a kernel smoother Tsai et al. (2019), which vision models have since adopted in several forms Han et al. (2023); Cai et al. (2023). SSoG goes the other way: it fixes the form of the kernel in advance and learns only the geometry, so the saving comes from structure and not from an approximation. Computationally the closest relatives are separable large-kernel convolutions Guo et al. (2023); Lau et al. (2024), which split a two-dimensional depth-wise kernel into cascaded one-dimensional ones for the same reason we do. What we do differently is constrain each axis kernel to a mixture of Gaussians instead of learning a free weight at every tap, and that constraint turns out to cost little, since accuracy can be saturated at few atoms per head: for instance, the continuous model with eight atoms uses an effective number of only 3.381.
Gaussians as a bias, and Gaussians as the operator. Gaussians appear often as a spatial prior for attention. The attention maps of a trained ViT tend towards a Gaussian shape Kim et al. (2023), and several models add a learned Gaussian term to the attention logits Hajimiri et al. (2026), which keeps the matrix and makes the Gaussian a bias on top of attention rather than the operator itself. Closer to how we parameterize things, Kundu et al. (2026) drop the query and key projections in favour of an RBF kernel with one bandwidth per head but still compare every pair of tokens, and concurrently Huang & Raza (2026) route tokens through Gaussian mixture components in a latent feature space for language. The operator we study is that of Pisoni (2026), who proposed SSoG for standard ViTs; our contribution lies in its theoretical analysis and in its use as a weight-shared and continuous-depth token mixer. We place the Gaussians over the grid of tokens instead, which is what makes the factorization along axes possible, but it also limits how much content dependence the operator can take on. In the continuous-depth model, steering the width alone matches the fixed model (74.01% against 74.22%) and steering the centers alone costs 0.77 points, while steering both drops to 71.21%; equation 2 suggests why: the center and the spread appear together as the ratio , so when both depend on the query the numerator and the denominator can drift at the same time. We therefore recommend the fixed operator or a limited steering for this model, whereas full steering improves the discrete and looped models (Table 7).
Lipschitz continuity, weight sharing and continuous depth. Kim et al. (2021) showed that dot-product attention is not globally Lipschitz, and the work that followed recovers the property by constraining the operator after the fact, either by substituting Lipschitz counterparts for the unstable components Qi et al. (2023) or by normalizing the layer and bounding its spectral norm Dasoulas et al. (2021); Yudin et al. (2025). In fixed SSoG it comes out of the parameterization itself, because the mixing weights depend only on bounded geometric parameters and not on inner products between unconstrained token vectors, so nothing has to be added to the loss to obtain it (Proposition 1); the content-steered variant retains this property only on bounded sets (Proposition 2). This matters most when one block is applied many times, which covers both depth recurrence, from the Universal Transformer Dehghani et al. (2019) and ALBERT Lan et al. (2020) to the fully shared single-block ViT of Byra et al. (2026), and continuous depth, from Chen et al. (2018) to recent image classifiers Zhong et al. (2022); Sander et al. (2022); Boned Riera et al. (2025); Belhasin et al. (2026). This second line has mostly used convolutional vector fields, which, unlike attention, are globally Lipschitz and thus satisfy the Picard–Lindelöf theorem on the whole interval.
We hypothesize that Lipschitz continuity contributes to the accuracy gains: our three settings differ in how much the property should matter, and the results are consistent with that order. The looped model applies an unconstrained dense block repeatedly and gains the most, 7.02 points on average and 79.80% against 72.30% at . The discrete model never repeats a block and gains 3.66 points. ODE-ViT also repeats one block, but it already relaxes the requirement to a local bound, since the JaSMin loss of Boned Riera et al. (2025) penalizes the eigenvalue distribution of the attention map and constrains the spectral radius, which may explain why its gain of 3.32 points is closer to that of the discrete setting than to that of the looped one. The regularizer also has a computational cost. Regularizing the spectrum of the attention map requires materializing that matrix during training, which rules out a fused kernel and keeps the full map in the computational graph at every function evaluation, so the memory and latency overhead grows with the NFE. What ODE-ViT obtains with a regularizer whose cost scales with the matrix it regularizes, fixed SSoG obtains from the form of the operator at no additional cost. Our efficiency benchmarks ($3.3) are measured at inference, where the regularizer is not evaluated; there, the advantage over ODE-ViT reflects the asymptotic cost of the operator together with the fact that the ODE-ViT baseline does not use a fused attention kernel (Appendix A.1.1).
Limitations. The margins narrow on ImageNet, where SSoG is on par with its counterparts while requiring less compute and achieving higher throughput. Part of this is expected, since a fixed spatial prior is an inductive bias and inductive biases are worth less when data is abundant. It also bounds what the Lipschitz argument can claim, because a benefit that shrinks with dataset size behaves like regularization rather than like well-posedness. We compare only against dense attention, while linear-attention variants and state space models Gu & Dao (2024); Zhu et al. (2024) scale subquadratically as well and are the natural competitors in the regime where SSoG wins. SSoG is also rather than linear (Appendix A.1), so a state space model keeps an asymptotic advantage, whereas SSoG drops into an existing model without changing the rest of the architecture or the training recipe. Finally, we evaluate classification only, leaving open other tasks that could benefit from this operator.
5 CONCLUSIONS
We presented the first systematic study of SSoG, a separable sum-of-Gaussians alternative to dense self-attention recently outlined by Pisoni (2026), as the token mixer of discrete, looped and continuous-depth Transformers. We proved that its fixed form is globally Lipschitz continuous, which guarantees a unique solution of the continuous-depth model on the whole integration interval, whereas the content-steered form is Lipschitz only on bounded sets; in both forms the cost is subquadratic in the number of tokens. On CIFAR-100, SSoG outperformed dense attention in all three settings with fewer parameters, most markedly in the looped one; on ImageNet-1k it matched or exceeded dense attention in the discrete and continuous-depth settings and trailed it slightly in the looped one. Its throughput advantage widened with resolution, and it used less memory than dense attention in the continuous-depth and discrete settings but not in the looped one, where the dense baseline benefits from a fused kernel. Future work includes a fused implementation of SSoG, tasks beyond classification, and a comparison with linear attention and state space models.
6 ACKNOWLEDGMENTS
This work has been partially supported by the Spanish project PID2024-157778OB-I00, Ministerio de Ciencia e Innovación. Carlos Boned Riera is funded with the support of the FI-STEP predoctoral grants program of the Department of Research and Universities of the Generalitat of Catalonia and co-financing by the European Social Fund Plus (2025 STEP 00066)
AI USE STATEMENT
In this work, we used generative AI tools, namely an LLM-based coding and writing assistant (Claude, Anthropic), to aid and polish writing, to support research ideation and execution, and to assist with mathematical claims, as detailed below.
Writing. The assistant polished the grammar and concision of author-written paragraphs, turned results and specifications provided by the authors into LaTeX tables, figure captions and descriptive paragraphs. The authors revised all such text.
Research ideation and execution. The LLM wrote and debugged experiment code: training and evaluation configurations and cluster launch scripts for the ablation and transfer experiments; the throughput and peak-memory benchmark harness; the operator-level attention memory benchmark; the patch-size robustness evaluation; scripts that collect metrics from experiment logs into tables; and the plotting scripts for the figures. While auditing benchmark results, it identified a cross-model measurement interference that led us to re-run every efficiency benchmark with each model in its own process, and all reported efficiency numbers come from these isolated runs. It also proposed an analysis that we adopted: isolating the memory scaling of the attention operator from the rest of the network. The research questions, the method, the choice of experiments to report, the runs and the interpretation of results are the authors'.
Mathematical claims. We used AI to help validate the derivations of the Lipschitz continuity results, providing intuition and suggesting directions that supported the final lemmas and propositions. The LLM also reviewed the notation and its consistency throughout the paper.
Verification. We have reviewed all AI-assisted work. AI-generated code was inspected and tested before any result was reported; for example, models re-loaded by the evaluation code were checked to reproduce their recorded validation accuracy at the training patch size, parameter counts were checked against the saved checkpoints, and efficiency benchmarks were cross-checked by re-running them in isolation. We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.
REPRODUCIBILITY STATEMENT
We release the complete source code as anonymized supplementary material. Every experiment is specified by a modular, hierarchical Hydra configuration: a base file per dataset and architecture setting (continuous, discrete and looped; SSoG and dense-attention baselines) fixes the full training recipe, and each experiment is a short file that inherits from it and overrides only the varied quantity (width, heads, atoms, depth or NFE, or augmentation), so every reported run corresponds to exactly one versioned configuration file. Each model family has its own entry point on a shared PyTorch Lightning training pipeline, and we provide the cluster launch scripts used for every run. Training is seeded through Lightning's seed_everything (including data-loader workers) and run with deterministic=True; the default seed is 42. Architectures and the training recipes are described in section 2 and section 3, and the per-ablation settings in Appendix A.3–A.5. Efficiency numbers come from a separate benchmark configuration and script, run on an NVIDIA A40 under torch.inference_mode(), with each model benchmarked in its own process (section 3.3 and Appendix A.1.1). We use only the public CIFAR-100 and ImageNet-1k datasets with their standard splits; all preprocessing and augmentation is defined in the released configurations and follows the DeiT recipe Touvron et al. (2021). The table-generation and plotting scripts that produce every table and figure from the logged metrics are also included.
REFERENCES
Omer Belhasin, Shelly Golan, Ran El-Yaniv, and Michael Elad. Advancing image classification with discrete diffusion classification modeling. In Conference on Computer Vision and Pattern Recognition 2026, 2026. URL https://openreview.net/forum?id=qxQcVusjI2.
Carlos Boned Riera, David Romero Sanchez, and Oriol Ramos Terrades. ODE-ViT: Plug & play attention layer from the generalization of the vit as an ordinary differential equation, 2025. URL https://arxiv.org/abs/2511.16501.
Michal Byra, Pawel Olszowiec, Grzegorz Stefanski, Grzegorz Gruszczynski, and Alberto Presta. bvit: Investigating single-block recurrence in vision transformers for image recognition, 2026. URL https://arxiv.org/abs/2605.10661.
Han Cai, Junyan Li, Muyan Hu, Chuang Gan, and Song Han. Efficientvit: Lightweight multi-scale attention for high-resolution dense prediction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 17302–17313, 2023.
Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 9650–9660, October 2021.
Ricky T. Q. Chen, Yulia Rubanova, Jesse Bettencourt, and David Duvenaud. Neural ordinary differential equations. In (NeurIPS), 2018. URL https://api.semanticscholar.org/CorpusID:49310446.
Krzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Quincy Davis, Afroz Mohiuddin, Lukasz Kaiser, David Benjamin Belanger, Lucy J Colwell, and Adrian Weller. Rethinking Attention with Performers. In International Conference on Learning Representations, 2021. URL https://mlanthology.org/iclr/2021/choromanski2021iclr-rethinking/.
Earl A. Coddington and Norman Levinson. Theory of Ordinary Differential Equations. McGraw-Hill, New York, 1955.
Timothée Darcet, Maxime Oquab, Julien Mairal, and Piotr Bojanowski. Vision transformers need registers. In (ICLR), 2024. URL https://openreview.net/forum?id=2dn03LLiJ1.
George Dasoulas, Kevin Scaman, and Aladin Virmaux. Lipschitz normalization for self-attention layers with application to graph neural networks. In International Conference on Machine Learning, volume 139, pp. 2456–2466, 2021. URL https://proceedings.mlr.press/v139/dasoulas21a.html.
Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Lukasz Kaiser. Universal transformers. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=HyzdRiR9Y7.
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In (ICLR), 2021. URL https://openreview.net/forum?id=YicbFdNTTy.
Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. In First Conference on Language Modeling (COLM), 2024. URL https://openreview.net/forum?id=tEYskw1VY2.
Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, and Shi-Min Hu. Visual attention network. Computational Visual Media, 9(4):733–752, 2023. doi: 10.1007/s41095-023-0364-2.
Sina Hajimiri, Farzad Beizaee, Fereshteh Shakeri, Christian Desrosiers, Ismail Ben Ayed, and Jose Dolz. Locality-Attending Vision Transformer. In International Conference on Learning Representations, 2026. URL https://mlanthology.org/iclr/2026/hajimiri2026iclr-localityattending/.
Dongchen Han, Xuran Pan, Yizeng Han, Shiji Song, and Gao Huang. Flatten transformer: Vision transformer using focused linear attention. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2023.
Yongchao Huang and Hassan Raza. Gaussian mixture attention: Linear-time sequence mixing via probabilistic latent routing, 2026. URL https://arxiv.org/abs/2606.18283.
Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In International Conference on Machine Learning, volume 119, pp. 5156–5165, 2020. URL https://proceedings.mlr.press/v119/katharopoulos20a.html.
Bum Jun Kim, Hyeyeon Choi, Hyeonah Jang, and Sang Woo Kim. Understanding gaussian attention bias of vision transformers using effective receptive fields, 2023. URL https://arxiv.org/abs/2305.04722.
Hyunjik Kim, George Papamakarios, and Andriy Mnih. The lipschitz constant of self-attention. In Marina Meila and Tong Zhang (eds.), Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 5562–5571. PMLR, 18–24 Jul 2021. URL https://proceedings.mlr.press/v139/kim2li.html.
Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C. Berg, Wan-Yen Lo, Piotr Dollár, and Ross Girshick. Segment anything, 2023. URL https://arxiv.org/abs/2304.02643.
Debarshi Kundu, Archisman Ghosh, Swaroop Ghosh, and Vasant Honavar. Projection-free transformers via gaussian kernel attention, 2026. URL https://arxiv.org/abs/2605.02144.
Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. ALBERT: A lite BERT for self-supervised learning of language representations. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=HleA7AEtvS.
Kin Wai Lau, Lai-Man Po, and Yasar Abbas Ur Rehman. Large separable kernel attention: Re-thinking the large kernel attention design in cnn. Expert Systems with Applications, 236:121352, 2024. ISSN 0957-4174. doi: https://doi.org/10.1016/j.eswa.2023.121352. URL https://www.sciencedirect.com/science/article/pii/S0957417423018547.
Xin Liu, Runsong Zhao, Pengcheng Huang, Xinyu Liu, Junyi Xiao, Chunyang Xiao, Tong Xiao, Shengxiang Gao, Zhengtao Yu, and Jingbo Zhu. Autoencoding-free context compression for LLMs via contextual semantic anchors. In The Fourteenth International Conference on Learning Representations (ICLR), 2026. URL https://openreview.net/forum?id=8Pi6Du0n7F.
William Peebles and Saining Xie. Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 4195–4205, October 2023.
Raphael Pisoni. A few gaussians is all you need: Ssog-attention that steers instead of scores, aug 2026. URL https://pisoni.ai/posts/ssog/. Code available at: https://github.com/4rtemi5/ssog.
Xianbiao Qi, Jianan Wang, Yihao Chen, Yukai Shi, and Lei Zhang. Lipsformer: Introducing lipschitz continuity to vision transformers. In (ICLR), 2023. URL https://openreview.net/forum?id=cHf1DcCwcH3.
Zihan Qiu, Zekun Wang, Bo Zheng, Zeyu Huang, Kaiyue Wen, Songlin Yang, Rui Men, Le Yu, Fei Huang, Suozhi Huang, Dayiheng Liu, Jingren Zhou, and Junyang Lin. Gated Attention for Large Language Models: Non-Linearity, Sparsity, and Attention-Sink-Free. In Advances in Neural Information Processing Systems, 2025. URL https://mlanthology.org/neurips/2025/qiu2025neurips-gated/.
Michael Sander, Pierre Ablin, and Gabriel Peyré. Do residual neural networks discretize neural ordinary differential equations? In S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (eds.), Advances in Neural Information Processing Systems, volume 35, pp. 36520–36532. Curran Associates, Inc., 2022. doi: 10.52202/068431-2646. URL https://proceedings.neurips.cc/paper_files/paper/2022/file/ecc38927fe5148c66bee64ee8fede176-Paper-Conference.pdf.
Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & amp; distillation through attention. In Marina Meila and Tong Zhang (eds.), (ICML), volume 139 of Proceedings of Machine Learning Research, pp. 10347–10357. PMLR, 18–24 Jul 2021. URL https://proceedings.mlr.press/v139/touvron21a.html.
Yao-Hung Hubert Tsai, Shaojie Bai, Makoto Yamada, Louis-Philippe Morency, and Ruslan Salakhutdinov. Transformer dissection: An unified understanding for transformer's attention via the lens of kernel. In Kentaro Inui, Jing Jiang, Vincent Ng, and Xiaojun Wan (eds.), Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 4344–4353, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1443. URL https://aclanthology.org/D19-1443/.
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017. URL https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf.
Sinong Wang, Belinda Z. Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity, 2020. URL https://arxiv.org/abs/2006.04768.
Nikolay Yudin, Alexander Gaponov, Sergei Kudriashov, and Maxim Rakhuba. Pay attention to attention distribution: A new local lipschitz bound for transformers, 2025. URL https://arxiv.org/abs/2507.07814.
Peitian Zhang, Zheng Liu, Shitao Xiao, Ninglu Shao, Qiwei Ye, and Zhicheng Dou. Long context compression with activation beacon. In The Thirteenth International Conference on Learning Representations (ICLR), 2025. URL https://openreview.net/forum?id=leQT9OzfNQ.
Yaofeng Desmond Zhong, Tongtao Zhang, Amit Chakraborty, and Biswadip Dey. A neural ODE interpretation of transformer layers. In The Symbiosis of Deep Learning and Differential Equations II, 2022. URL https://openreview.net/forum?id=nA9hvYMQCy.
Lianghui Zhu, Bencheng Liao, Qian Zhang, Xinlong Wang, Wenyu Liu, and Xinggang Wang. Vision mamba: Efficient visual representation learning with bidirectional state space model. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp (eds.), Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 62429–62442. PMLR, 21–27 Jul 2024. URL https://proceedings.mlr.press/v235/zhu24f.html.
A APPENDIX
A.1 NUMERICAL INTEGRATION AND COMPUTATIONAL COST
All costs below are stated per sample; multiply by batch size to obtain the total cost over a mini-batch. We integrate equation 16 over using torchdiffeq, with a uniform grid of evaluation points and the explicit Euler solver:
Euler performs function evaluations, so 13 grid points correspond to NFE 12.
Cost of one fixed SSoG evaluation. We count multiply-accumulate operations, reading the cost of each contraction off its index set as the product of the ranges of all free and all summed indices. The class token adds one token to the projections and is excluded from spatial filtering; since already counts it (§2.3), all costs below are written in terms of .
The value projection of equation 1 costs , and is the only input projection, since SSoG forms no queries and no keys where dense attention needs three. In the vertical contraction of equation 8, each of the heads and atoms multiplies an matrix by an matrix, giving
after recombining . In the horizontal contraction , the weights are applied as the atom index is summed, and each head multiplies, for every atom, an matrix by an matrix, giving
The class-token average of equation 14 costs and the output projection . Adding the two contractions and using , spatial mixing costs
which for a square grid with and becomes
The exponent 3/2 rather than 1 is the price of separability on a two-dimensional grid, since one axis of length remains inside each contraction.
Spatial mixing overtakes the projections when , that is when , while for dense attention the token interaction overtakes them when , that is when . At with and patch size 16, dense attention becomes interaction-bound above tokens, an input resolution of about 443, whereas SSoG would only become mixing-bound beyond a resolution of 3000. Across the whole range we benchmark, SSoG stays projection-bound while dense attention crosses into the quadratic regime part way through, which is the mechanism behind the crossover reported in §3.3.
Storage. Dense self-attention stores an attention matrix of size , and SSoG stores none. Its axis kernels are shared across the batch and cost independently of , while the atom-wise intermediates require . The latter is linear in and explains the memory behaviour of the looped setting in §3.3, where the dense baseline already carries little parameter memory.
Cost of content-steered SSoG. Steering still avoids the query-key matrix, but its axis kernels depend on the batch index and on the full query position rather than being shared. Building the query-dependent kernel tables costs , and the three linear predictors of equation 9 cost . Both are dominated by the contraction itself, by a factor for the tables
Table 3: Peak allocated memory (MiB) of the attention operator alone, at matching token count.
| Resolution | Tokens (N) | SSoG | Dense (fused MHA) | Ratio (×) |
|---|---|---|---|---|
| 224 | 197 | 47.6 | 29.2 | 1.63 |
| 384 | 577 | 113.0 | 56.0 | 2.02 |
| 512 | 1025 | 184.5 | 88.3 | 2.09 |
| 640 | 1601 | 281.3 | 128.1 | 2.20 |
| 768 | 2305 | 395.8 | 181.4 | 2.18 |
| 1024 | 4097 | 689.0 | 304.3 | 2.26 |
Table 4: Forward FLOPs per image (GFLOPs, 2 per multiply-add) at dim768 with 12 block applications. The counts are identical, to within 0.3 GFLOPs, for the continuous (12 ODE steps), discrete (12 blocks) and looped (12 iterations) settings. Attention includes the projections; element-wise operations are not counted for either operator. Reduction is SSoG relative to dense SDPA attention (MHA).
| Resolution | Tokens | Whole model | Attention | ||||
|---|---|---|---|---|---|---|---|
| MHA | SSoG | Reduction (%) | MHA | SSoG | Reduction (%) | ||
| 224 | 197 | 35.1 | 28.4 | 19.2 | 12.6 | 6.0 | 52.6 |
| 384 | 577 | 111.0 | 84.3 | 24.0 | 44.9 | 18.4 | 59.1 |
| 512 | 1025 | 214.1 | 151.1 | 29.4 | 96.8 | 33.9 | 65.0 |
| 640 | 1601 | 368.3 | 237.9 | 35.4 | 185.1 | 54.9 | 70.4 |
| 768 | 2305 | 590.1 | 345.3 | 41.5 | 326.4 | 81.7 | 75.0 |
| 1024 | 4097 | 1319.6 | 623.6 | 52.7 | 850.8 | 154.9 | 81.8 |
and for the predictors, the latter holding at every resolution we test although only narrowly at 224. Steering therefore has the same leading-order complexity as fixed SSoG. What changes is arithmetic intensity: in the fixed variant each kernel entry is reused across the batch and along one spatial axis, while under steering each entry is used once.
A.1.1 ISOLATING THE MEMORY SCALING OF ATTENTION OPERATION
Figure 4 shows that the memory of SSoG advantage over dense attention behaves differently across settings: it grows with resolution in the continuous-depth setting but shrinks (discrete) or reverses (looped) as resolution increases. Since the dense baselines of the discrete and looped settings both use the fused SDPA from PyTorch, while the continuous-depth baseline (ODE-ViT) does not. We isolate the attention operator itself stripped of every other confound, including patch embedding, MLP, classifier head, and weight sharing to test whether this implementation difference alone explains the pattern.
We instantiate SSOGAttention (fixed, non-steered) and torch.nn.MultiheadAttention (matching , the exact configuration used by the dense baselines) in isolation, feed both an identical input at token counts matching each benchmarked resolution (batch 8, patch size 16), reset the peak memory counter, and measure only that forward call of the module.
Table 3 reports that the ratio grows monotonically with resolution: the attention module of SSoG alone uses 63% more memory than the fused dense kernel at , rising to 126% more at . Fitting a power law (memory ) to each series gives for SSoG and for the fused dense kernel. We attribute this to an implementation gap rather than an inherent property of the separable formulation: the kernel construction and mixture application of SSoG are built from generic PyTorch broadcast and reshape operations, whereas SDPA dispatches to a fused, memory-optimized CUDA kernel.
Furthermore, in order to isolate the computation beyond the kernels and the hardware optimization Table 4 reports the numbers of the Flops among all settings.
A.2 ATTENTION SINKS
Dense attention can develop attention sinks: tokens that receive a disproportionate share of attention from every query, largely independent of the input. Fixed SSoG has no mechanism to form them. Its patch-to-patch weights depend only on the relative offset between two patches, so every key receives the same total attention up to renormalization at the image border, and patches never attend to the class token, which only pools. Content steering can move a kernel, but by at most tokens, so it cannot concentrate attention from the whole image onto one token.
We measure this on the trained models (Table 5). A sink requires three things at once: a key that receives much more than uniform attention (sink score), the same key across images (same key: the share of images whose most-attended key is the head's most frequent one), and persistence across layers, which the residual attention rollout captures because it compounds only concentration that the heads and layers agree on.
Only the ImageNet dense model meets all three. In its worst layer the most-attended key receives the uniform mass, it is the same token in 91% of images, and the rollout compounds it to ; 8.1% of patch attention also flows to the class token. The CIFAR-100 dense models each fail at least one condition. The continuous one has strong single-head peaks ( in the worst layer), but the attended key changes from image to image (same key in 6% of images) and rollout washes it out (): content-dependent focusing rather than a sink. The discrete one is intermediate (, same key in 49% of images, under rollout). The looped one has a higher same-key rate (64%) but a low worst-layer score (), so consistency alone does not make a sink: all three conditions must hold together.
Fixed SSoG stays at or below in every layer and under rollout in every setting. Its most-attended key is identical across images (100%) only because its content-independent kernel always peaks at an image corner through border renormalization, a geometric effect that no input can move. Steering raises the worst-layer score moderately ( discrete, looped) and at the same time lowers the same-key rate from 100% to 60% and 44%, while rollout stays near uniform ( and ). The added concentration therefore follows the content, as in the continuous dense model, rather than forming a fixed sink.
SSoG does not, however, avoid feature-norm artifacts altogether. On ImageNet, 29% of its final patch tokens have a norm above the image median, against 3.5% for the dense model. These tokens are concentrated at the image border, which suggests a positional rather than content-driven origin, unlike the isolated high-norm tokens associated with registers in dense ViTs Darcet et al. (2024). We therefore claim the absence of attention sinks, not of norm artifacts.
A.3 ABLATIONS
This appendix reports additional CIFAR-100 ablations that support the design choices made in §3. Unless stated otherwise, all rows use , NFE 12, and the training recipe of §3
A.3.1 SIGMA FLOOR
The lower bound on atom width (equation 4) trades off sharply local kernels against enforced smoothing. Table 6 sweeps this floor for fixed SSoG. The default value 0.25 performs best; lowering it to 0.10 costs 0.26 points and raising it to 0.50 costs 0.97 points, and the learned minimum sigma tracks the constraint in each case, confirming that the floor is active rather than a slack bound.
A.3.2 STEERING BASELINES
Table 7 reports the results of steered SSoG, which serve as the steering baselines. For the continuous-depth model (ODE-SSoG), steering is evaluated at different NFE; for the discrete and looped models, it is evaluated at 12 blocks and 12 iterations, respectively.
Table 5: Attention-sink diagnostics of trained models on 512 validation images. First 3 settings are on CIFAR100 and the last setting on ImageNet. Sink score: attention received by the most-attended key relative to uniform (1 = no sink), averaged over heads, as the mean over layers, for the worst layer, and for the residual attention rollout of the head-averaged maps. Same key: share of images whose most-attended key is the head's most frequent one (averaged over heads; most consistent layer); for fixed SSoG it is 100% by construction, because its content-independent kernel always peaks at an image corner through border renormalization. CLS: attention mass from patch queries to the class token (- where the model has none; SSoG patches never attend to it). High-norm: share of final pre-norm patch tokens with norm above the per-image median.
| Setting | Operator | Sink score | Same key (%) | CLS (%) | High-norm (%) | ||
|---|---|---|---|---|---|---|---|
| Mean | Worst layer | Rollout | |||||
| Continuous | MHA | 11.3 | 22.9 | 1.7 | 6 | 0.3 | 0.0 |
| SSoG | 2.2 | 2.2 | 1.3 | 100 | - | 0.2 | |
| Discrete | MHA | 3.8 | 8.1 | 5.0 | 49 | 0.9 | 0.0 |
| SSoG | 2.6 | 3.3 | 1.5 | 100 | - | 0.3 | |
| SSoG steered | 3.3 | 5.3 | 1.7 | 60 | - | 0.7 | |
| Looped | MHA | 2.8 | 3.5 | 2.8 | 64 | 1.0 | 0.1 |
| SSoG | 2.0 | 2.0 | 1.4 | 100 | - | 2.6 | |
| SSoG steered | 2.3 | 2.9 | 1.6 | 44 | - | 0.1 | |
| Discrete | MHA | 20.6 | 40.6 | 41.4 | 91 | 8.1 | 3.5 |
| SSoG | 2.0 | 2.5 | 1.1 | 100 | - | 29.0 | |
Table 6: Effect of the sigma floor on fixed SSoG.
| Acc@1 | Val. loss | Learned min | |
|---|---|---|---|
| 0.10 | 73.73 | 1.14 | 0.182 |
| 0.25 | 74.22 | 1.12 | 0.366 |
| 0.50 | 73.02 | 1.14 | 0.578 |
A.3.3 STEERING INITIALIZATION
Table 8 isolates how quickly the content-steered pathway should activate. Warm initialization of full steering underperforms cold initialization by 5.33 points and plateaus early. Within center-only steering, moving the initialization of the gate of equation 12 from -8 to -4 costs 1.80 points despite both runs converging to a nearly identical final scale (0.127 vs. 0.126), indicating that the optimization trajectory, not only the final steering magnitude, determines the outcome.
A.3.4 STEERING RADIUS
Table 9 sweeps the steering radius in the full content-steered model (equation 9). The offset sweep is monotonic over the tested range: constraining from 7 to 4 gains 1.59 points, and from 4 to 2 gains a further 0.36 points. Smaller is partially compensated by a larger learned scale , but the effective radius still grows with (0.87, 0.89, 0.94 for ), so the nominal limit remains the binding constraint.
A.3.5 DISCRETE-SETTING WIDTH SWEEP
Table 10 gives the full width sweep: a 12-block discrete transformer using SSoG at every block, compared against a matched dense-attention transformer of identical depth, width, and training recipe.
A.3.6 RESOLUTION ROBUSTNESS
In order to validate the robustness of our method whe test the trained models with different patch size. Table 13 reports the results of models trained at patch 16 (224px, tokens) evaluated at
Table 7: Fixed versus steered SSoG on CIFAR-100 across the three architecture settings. Steps are ODE function evaluations (continuous), blocks (discrete) or loop iterations (looped). Time is the W&B training runtime for 500 epochs.
| Setting | Variant | Steps | Acc@1 | Acc@3 | Acc@5 | Time (h) |
|---|---|---|---|---|---|---|
| Continuous | Fixed | 6 | 69.70 | 85.74 | 90.23 | 25.5 |
| Fixed | 8 | 72.16 | 87.30 | 91.05 | 33.2 | |
| Fixed | 12 | 74.22 | 88.59 | 92.38 | 47.8 | |
| Steered | 6 | 70.36 | 86.04 | 90.67 | 31.5 | |
| Steered | 8 | 72.00 | 87.16 | 91.42 | 40.3 | |
| Steered | 12 | 70.89 | 86.89 | 91.30 | 59.5 | |
| Discrete | Fixed | 12 | 78.63 | 90.12 | 93.38 | 33.40 |
| Steered | 12 | 81.17 | 90.21 | 91.67 | 57.81 | |
| Looped | Fixed | 12 | 79.80 | 90.58 | 93.10 | 23.90 |
| Steered | 12 | 81.20 | 91.12 | 93.56 | 49.23 |
Table 8: Effect of steering initialization at NFE 12, .
| Initialization | Final Acc@1 | Val. loss | Instabilities |
|---|---|---|---|
| Cold, full steering | 70.89 | 1.2017 | None |
| Warm, full steering | 65.56 | 1.3714 | Early plateau |
| Center-only, | 73.33 | 1.1546 | None |
| Center-only, | 71.53 | 1.2138 | None |
patch 14 and 8 without retraining. Patch-embedding kernels are PI-resized and position embeddings bicubically interpolated for every model; the rescaled SSoG row also scales , by the grid ratio so each Gaussian covers the same image.
A.4 EFFECTIVE ATOMS
To measure how many of the Gaussian atoms a head actually uses, we take its learned mixture weights and compute their Shannon entropy and its exponential,
ranges from 1 (all mass on one atom) to (uniform mixture), and we report its mean over heads. It is computed on the fixed per-head weights, before content-dependent steering, so it shows how the model spends its atom budget rather than any single query’s mixture.
A.4.1 IMAGENET WIDTH CONFIRMATION
Table 14 reports the ImageNet width sweep for fixed SSoG at constant head dimension . Best-epoch Top-1 improves from 55.65% to 62.43% to 64.02% as increases from 384 to 576 to 768, with diminishing gains from 576 to 768.
A.5 AUGMENTATION AND IMAGENET-TO-CIFAR-100 TRANSFER
Table 15 sweeps training augmentation strength for fixed SSoG trained from scratch on CIFAR-100: stronger augmentation is preferred when learning the full representation from random initialization. Table 16 instead adapts to CIFAR-100, either through a linear probe or full fine-tuning; here weaker augmentation is preferred, reversing the from-scratch trend, consistent with adapting rather than learning a representation from random initialization.
Table 9: Effect of the steering radius M, full steering, NFE 12.
| M | Acc@1 | Val. loss | Mean |
|---|---|---|---|
| 2 | 72.84 | 1.1385 | 0.529 |
| 4 | 72.48 | 1.1643 | 0.535 |
| 7 | 70.89 | 1.2017 | 0.475 |
Table 10: Width scaling on CIFAR-100, dense attention versus SSoG, across the three architecture settings. Params are per model; bold marks the smaller parameter count and the better Acc@1 within each row.
| Setting | D | MHA Params(M) | SSoG Params | MHA Acc@1 | SSoG Acc@1 |
|---|---|---|---|---|---|
| Continuous | 384 | 3.07 | 2.8 | 69.15 | 71.37 |
| 576 | 6.59 | 5.9 | 69.36 | 73.48 | |
| 768 | 11.45 | 10.3 | 70.47 | 74.22 | |
| Discrete | 384 | 21.69 | 18.5 | 74.51 | 77.56 |
| 576 | 48.47 | 41.0 | 74.20 | 78.18 | |
| 768 | 85.86 | 71.6 | 74.67 | 78.63 | |
| Looped | 384 | 2.18 | 1.9 | 72.04 | 77.46 |
| 576 | 4.60 | 3.9 | 71.24 | 79.38 | |
| 768 | 7.91 | 6.7 | 72.30 | 79.80 |

Figure 5: Throughput and peak memory versus input resolution, dense attention versus SSoG, across all three architecture settings (rows: continuous-depth ODE-ViT, discrete ViT-B/16, looped bViT) and six batch sizes (columns: 8, 32, 64, 128, 256, 512), at the paper's flagship width (, ; NFE 12 for the continuous-depth setting, depth 12 for the discrete and looped settings). Each panel shares a log-scaled resolution axis (224-1024) with two y-axes: throughput in images/s (blue, left) and peak allocated memory in MiB (magenta, right). Solid circles/lines denote dense attention; dashed triangles denote SSoG. An (dense) or + (SSoG) marks the first resolution at which that configuration ran out of GPU memory; its vertical position is the last successfully measured value at that batch size, not a measured point at the marked resolution, and no further resolutions are plotted for that curve beyond it. All measurements are FP16 autocast (model parameters and inputs in FP32) on a single NVIDIA A40, randomly initialized weights, a single run per configuration (no repeated-seed or repeated-measurement uncertainty), 10 warmup and 50 measured iterations per point.
Table 11: Capacity and depth ablations on CIFAR-100 for the three SSoG model families. The Depth column gives the number of blocks for the Discrete family, the number of loop iterations for the Looped family, and the number of ODE function evaluations (NFE) for the Continuous family. The Heads and Atoms blocks are evaluated at NFE 12 where applicable, while the Depth block varies depth or NFE at fixed , , . The column highlighted in blue is the parameter varied within each block; bold marks the best metric within each block.
| Family | Ablation | Depth | Par(M) | Acc@1 | Acc@3 | Acc@5 | |||
|---|---|---|---|---|---|---|---|---|---|
| DISCRETE | Heads | 768 | 6 | 4 | 12 | 71.6 | 79.97 | 89.99 | 91.94 |
| 12 | 78.63 | 90.12 | 93.38 | ||||||
| 24 | 79.52 | 88.59 | 90.14 | ||||||
| Atoms | 768 | 12 | 1 | 12 | 71.6 | 79.62 | 89.38 | 91.52 | |
| 2 | 80.34 | 89.83 | 91.69 | ||||||
| 4 | 78.63 | 90.12 | 93.38 | ||||||
| 8 | 79.93 | 88.67 | 90.35 | ||||||
| Depth | 768 | 12 | 4 | 6 | 36.2 | 79.55 | 90.93 | 93.89 | |
| 8 | 48.0 | 79.70 | 90.24 | 92.66 | |||||
| 12 | 71.6 | 78.63 | 90.12 | 93.38 | |||||
| LOOPED | Heads | 768 | 6 | 4 | 12 | 6.7 | 79.32 | 90.49 | 92.85 |
| 12 | 79.80 | 90.58 | 93.10 | ||||||
| 24 | 79.51 | 90.59 | 93.32 | ||||||
| Atoms | 768 | 12 | 1 | 12 | 6.7 | 80.31 | 90.68 | 93.28 | |
| 2 | 79.67 | 90.57 | 93.09 | ||||||
| 4 | 79.80 | 90.58 | 93.10 | ||||||
| 8 | 79.73 | 90.60 | 93.34 | ||||||
| Depth | 768 | 12 | 4 | 6 | 6.7 | 79.23 | 91.18 | 93.96 | |
| 8 | 78.88 | 90.18 | 93.17 | ||||||
| 12 | 79.80 | 90.58 | 93.10 | ||||||
| CONTINUOUS | Heads | 768 | 6 | 4 | 12 | 10.3 | 73.62 | 88.39 | 92.11 |
| 12 | 74.22 | 88.59 | 92.38 | ||||||
| 24 | 74.40 | 88.44 | 92.37 | ||||||
| Atoms | 768 | 12 | 1 | 12 | 10.3 | 73.42 | 88.25 | 92.05 | |
| 2 | 74.13 | 88.36 | 91.95 | ||||||
| 4 | 74.22 | 88.59 | 92.38 | ||||||
| 8 | 73.99 | 88.58 | 92.47 | ||||||
| Depth | 768 | 12 | 4 | 6 | 10.3 | 69.70 | 85.74 | 90.23 | |
| 8 | 72.16 | 87.30 | 91.05 | ||||||
| 12 | 74.22 | 88.59 | 92.38 | ||||||
| 16 | 74.92 | 89.02 | 92.46 |
Table 12: MHA capacity and depth ablations on CIFAR-100 for the Discrete MHA (ViT) and Looped MHA (bViT) families. The column highlighted in blue is the parameter varied within each block; bold marks the best metric within each block.
| Family | Ablation | D | H | Depth | Params | Acc@1 | Acc@3 | Acc@5 |
|---|---|---|---|---|---|---|---|---|
| DISCRETE | Heads | 768 | 6 | 12 | 85.9M | 75.63 | 87.51 | 90.55 |
| 12 | 74.67 | 86.89 | 90.19 | |||||
| 24 | 73.70 | 86.0 | 89.30 | |||||
| Depth | 768 | 6 | 43.3M | 70.47 | 84.50 | 88.61 | ||
| 8 | 57.5M | 72.22 | 85.68 | 89.60 | ||||
| 12 | 85.9M | 74.67 | 86.89 | 90.19 | ||||
| LOOPED | Heads | 768 | 6 | 12 | 7.9M | 73.18 | 85.80 | 89.41 |
| 12 | 72.30 | 84.37 | 88.33 | |||||
| 24 | 70.07 | 83.13 | 86.89 | |||||
| Depth | 768 | 6 | 7.9M | 68.72 | 83.44 | 87.69 | ||
| 8 | 70.99 | 84.57 | 88.60 | |||||
| 12 | 72.30 | 84.37 | 88.33 |
Table 13: Patch-size robustness on CIFAR-100: models trained at patch 16 (224px, 14 × 14 tokens) evaluated at patch 14 and 8 without retraining. Patch-embedding kernels are PI-resized and position embeddings bicubically interpolated for every model; the rescaled SSoG row also scales , by the grid ratio so each Gaussian covers the same image area. Acc@1 (%), change vs. patch 16 in parentheses.
| Setting | Operator | Patch 16(14 × 14) | Patch 14(16 × 16) | Patch 8(28 × 28) |
|---|---|---|---|---|
| Continuous | MHA | 70.47 | 70.23 (+0.80) | 58.05 (-11.38) |
| SSoG | 74.20 | 74.85 (+0.65) | 57.44 (-16.76) | |
| SSoG (rescaled , ) | 74.20 | 74.30 (+0.10) | 64.39 (-9.81) | |
| Discrete | MHA | 74.67 | 74.91 (-0.18) | 56.92 (-18.17) |
| SSoG | 78.63 | 79.34 (+0.71) | 63.49 (-15.53) | |
| SSoG (rescaled , ) | 78.63 | 79.48 (+0.85) | 72.09 (-6.93) | |
| Looped | MHA | 72.30 | 72.21 (-0.09) | 52.24 (-20.06) |
| SSoG | 79.80 | 80.98 (+1.18) | 73.56 (-6.74) | |
| SSoG (rescaled , ) | 79.80 | 80.12 (+0.42) | 73.59 (-6.71) |
Table 14: ImageNet width sweep, fixed SSoG, , NFE 12.
| Acc@1 | Acc@5 | ||
|---|---|---|---|
| 384 | 6 | 55.65 (245) | 78.46 |
| 576 | 9 | 62.43 (273) | 83.37 |
| 768 | 12 | 64.02 (254) | 84.45 |
Table 15: From-scratch augmentation ablation, , , NFE 12.
| Augmentation | Best Acc@1 (epoch) | Final Acc@1 | Runtime (h) |
|---|---|---|---|
| Strong | 74.22 (488) | 74.22 | 47.77 |
| Moderate | 73.09 (487) | 72.72 | 34.08 |
| Weak | 62.70 (452) | 62.27 | 33.26 |
Table 16: ImageNet→CIFAR-100 transfer, backbone from an ImageNet checkpoint, across all three architecture settings.
| Setting | Protocol / Augmentation | Best Acc@1 | |
|---|---|---|---|
| Continuous | Linear probe (frozen) | Hard | 66.26 (43) |
| Linear probe (frozen) | Weak | 70.01 (45) | |
| Full fine-tune | Hard | 80.25 (91) | |
| Full fine-tune | Moderate | 83.84 (83) | |
| Discrete | Linear probe (frozen) | Hard | 66.77 (48) |
| Linear probe (frozen) | Weak | 69.05 (43) | |
| Full fine-tune | Hard | 86.71 (92) | |
| Full fine-tune | Moderate | 87.09 (95) | |
| Looped | Linear probe (frozen) | Hard | 68.71 (48) |
| Linear probe (frozen) | Weak | 70.96 (47) | |
| Full fine-tune | Hard | 82.98 (97) | |
| Full fine-tune | Moderate | 84.32 (99) |
A.6 LIPSCHITZ CONTINUITY OF SSOG
In the continuous-depth setting of equation 16, the token matrix evolves under the vector field . By the Picard–Lindelöf theorem Coddington & Levinson (1955), if is continuous in and Lipschitz continuous in with a constant independent of and of , i.e. globally Lipschitz, then equation 16 has a unique solution on the whole interval for every initial condition . If is only Lipschitz on bounded sets, the same theorem guarantees existence and uniqueness only on a possibly shorter interval, which extends to provided the trajectory remains bounded.
The vector field is built from the SSOG spatial operator, the value and output projections and , the feed-forward block and layer normalization. Since sums and compositions of globally Lipschitz maps are globally Lipschitz, it suffices to bound each component. Linear maps are globally Lipschitz with constant equal to their spectral norm; the feed-forward block is globally Lipschitz with constant at most the product of the spectral norms of its weight matrices and the Lipschitz constant of its activation; and layer normalization with a stabilizing constant is globally Lipschitz (see the discussion following Proposition 1). The only non-trivial component is therefore the SSOG spatial operator. We show that fixed SSOG is globally Lipschitz (Proposition 1), so that ODE-SSoG with fixed kernels has a unique solution on , whereas content-steered SSoG is only Lipschitz on bounded sets (Proposition 2), so that for this variant only the local guarantee applies.
Notation. We recall the notation of §2. For head , the value projection is (equation 1). For each atom and axis , with , let denote the temperature-scaled Gaussian kernel of atom , where is given by equation 2 and is the temperature of equation 3. The normalized axis kernel coincides with from equation 3 evaluated for atom . The mixture weights lie in the probability simplex (equation 4), and the per-block class-token aggregate is (equation 14). All norms on token matrices are Frobenius; norms on linear maps are spectral.
We drop the batch index, since every operation is separable across the batch.
Lemma 1 (Kernel norm). For each atom and each axis , the axis kernel of equation 3 satisfies , where
and is the temperature-scaled Gaussian kernel , with as in equation 2 evaluated for atom and the temperature of equation 3.
Proof. Since all entries of are positive, and are its maximum row sum and maximum column sum, respectively. We bound each in turn.
By equation 3, each row of is a softmax over the source coordinate , so for every . Hence .
For a fixed column , each entry equals divided by the row sum . Bounding every such denominator from below by its minimum over gives
The denominator on the right no longer depends on , so taking the maximum over on both sides yields , with as in equation 24.
Finally, every real matrix satisfies , since . Applying this to with the two bounds above gives .
Remark. The constant is finite for every choice of atom parameters, which is all that Proposition 1 requires; with truncated boundaries, however, it does not approach one as the grid grows. A query at the edge of the axis only retains the part of that falls inside the grid, whereas an interior column collects the full kernel mass. Consequently only when the effective width is small compared with the patch spacing and the offset is close to zero; for a centred kernel of larger width is close to 2, and it grows rapidly with , since edge rows then retain only a tail of the kernel. The bound is therefore conservative.
Proposition 1 (Fixed SSoG is globally Lipschitz). Let consist of one class token and patch tokens arranged on an grid. For each head , assume that the atom parameters , , and the temperature are fixed, i.e. independent of X. Let be the value projections of equation 1, their concatenation, and the output projection. Let
be the effective spatial kernel of head h on the patch tokens. Then fixed SSoG is a linear map on and, with the Frobenius norm on token matrices,
where
and is the constant of Lemma 1 for atom r of head h. The bound depends only on the parameters and not on the input.
Proof. Fix a head , order the tokens with the class token last, as in §2, and write , where collects the patch rows. Vectorizing the grid in row-major order and using , equation 8 gives the filtered patch rows , while by equation 14 the class row is . Hence the output of head is , with
In the fixed variant does not depend on X. Denoting by
the output of head h, the SSoG output is obtained by concatenating the heads and applying the output projection,
which is linear in X; its Lipschitz constant is therefore its operator norm. Since the heads occupy disjoint column blocks,
Since the last column of vanishes, equals the spectral norm of its first columns; since, moreover, the squared spectral norm of a matrix equals the spectral norm of its Gram matrix,
where the inequality follows from the triangle inequality and , so that , which gives equation 26. For the inequality in equation 27, and lies in the simplex by equation 4, so equation 25 is a convex combination and, by Lemma 1, .
Proposition 1 has two immediate consequences. For the discrete and looped models, the residual block of equation 15 is globally Lipschitz with constant at most . Since is finite for any choice of parameters, the only factors not determined by the kernel are the projection norms, which spectral normalization bounds explicitly and weight decay keeps moderate in practice. For ODE-SSoG, the vector field of equation 16 composes fixed SSoG with the feed-forward block and layer normalization. The feed-forward block is globally Lipschitz, with constant at most the product of the spectral norms of its weight matrices and the Lipschitz constant of its activation. Layer normalization with gain and stabilizing constant added to the variance has Jacobian of spectral norm at most , so it is globally Lipschitz as well. Hence is continuous in and globally Lipschitz in with a constant independent of , and the Picard–Lindelöf theorem yields a unique solution of equation 16 on .
We now turn to content-steered SSoG. Steering acts on each head independently: the predictors of equation 9 modify only the atom parameters of their own head, and different heads interact only through the output projection , which is handled exactly as in Proposition 1. We therefore first analyse a single head. In Lemma 2 and its proof we fix one head and, to lighten notation, omit the superscript h from all of its quantities; the superscript is restored in Proposition 2, where all heads are combined.
Intuition and notation for Lemma 2. Steering can only move each atom within a bounded range. Since , equation 9 shifts the center by at most and multiplies the spread by a factor between and . Together with the floor , this confines every steered spread to an interval , and every distance between a grid offset and a steered center to at most , where
Thus is the narrowest spread an atom can reach, the widest, and the largest distance between a steered center and a grid offset. The first and the last bound how fast the logits of the axis softmax, , react to the atom parameters: on the logarithmic scale a Gaussian is a parabola, whose slope grows as the spread shrinks and as the offset moves away from the center, so the worst case is a spread at distance . The kernel value itself is close to zero far from the center, and the softmax damps changes in small entries, so bounding the kernel through its logits is conservative. The widest spread matters for a different reason: steering rescales the spread multiplicatively, so the same change in the predictor output moves a wide atom more than a narrow one. Lemma 2 turns these bounds into a Lipschitz constant, namely how fast the atom parameters follow the query token times how fast the kernel follows its parameters.
Lemma 2 (Steered kernel). Consider a single head, and let its atom parameters be steered by the query token as in equation 9, with steering radius , predictor weights and scales as in equation 12, and with and as in equation 4. Denote by the row of associated with the query position , and by the corresponding row of the effective kernel. Let and be as in equation 28. Then:
(i) for every , r and a,
(ii) the row of the effective kernel is Lipschitz in with respect to the Euclidean norm, with constant
where
Proof. (i) Since and , and .
(ii) Fix two tokens and . For the center, write and for the pre-activations of its predictor, so that . Since is 1-Lipschitz,
For the spread, write likewise and , and regard the steered spread as the function . Its derivative satisfies
because the steered spread never exceeds and . By the mean value theorem,
The axis row is the softmax of , , where , with as in equation 2, is evaluated at and ; let be the same vector at . On , every grid offset satisfies , so gives
Since is convex, the segment joining and stays in , where the bounds equation 32 hold. The mean value theorem along this segment, together with the two estimates above, gives for every source coordinate
(33)
where the last step is the definition equation 31 of . It remains to pass from the logits z to the normalized row. The softmax is -Lipschitz in the Euclidean norm, because its Jacobian is positive semidefinite with spectral norm at most . Hence
For the effective kernel, write , for its value at , and , so that
We bound the two sums separately.
Second sum. All rows are probability vectors, so their Euclidean norm is at most one. For any vectors ,
and applying it with , and their counterparts at gives
Since the weights form a convex combination, the second sum is at most .
First sum. Its coefficients add up to zero, , so splitting into its positive and negative parts gives for two probability vectors and . Since ,
Finally, the mixture weights are a softmax of ; since the softmax is -Lipschitz and is 1-Lipschitz,
Adding the bounds on the two sums gives equation 30.
The constants and of Lemma 2 are finite because of three design choices of §2 and the finiteness of the grid: the floor keeps the spread away from zero, the steering radius bounds how far the center moves, the offset keeps the temperature away from zero, and ranges over a finite set. Removing any one of them makes the corresponding bound in equation 32, and hence , diverge.
Proposition 2 (Steered SSoG is Lipschitz on bounded sets). Let , let and be as in Proposition 1, and let the atom parameters of every head be steered as in equation 9, under the assumptions of Lemma 2, so that the effective kernel has rows as in that lemma. For each head , atom and axis , let be the set of Lemma 2 for head , and let
where denotes the kernel of head evaluated at . Then, for all with ,
where
and is the constant equation 30 for head . In particular, the Lipschitz bound on the ball of radius grows linearly in .
Proof. With the class token last, as in the proof of Proposition 1, let . Denoting by
the output of head h, the SSoG output is obtained by concatenating the heads and applying the output projection,
Since the class row of does not depend on X,
where collects the patch rows of . Arguing over the heads as in the proof of Proposition 1 and using the triangle inequality, the first terms contribute at most:
and, since , the second at most:
By Lemma 2(i), every steered parameter lies in , a compact set on which is continuous and positive on the finite grid, so . Every row of is a probability vector, so . Each entry of a row of is at most
and since is a softmax, so the column of indexed by sums to at most . Hence
and, exactly as in Proposition 1,
so that . By Lemma 2(ii),
Combining the two contributions,
and gives equation 41.
Remark. The dependence on in equation 41 cannot be removed in general. For non-degenerate steering, fix a query position and its token , and scale the remaining patch tokens by a factor : a perturbation of changes the kernel row at a rate that does not depend on , while the values it multiplies are of size , so the directional derivative of steered SSoG grows linearly in . When the steering does not act, for instance when , the operator reduces to fixed SSoG and Proposition 1 applies.
The preceding Remark has the same structure as the obstruction that Kim et al. (2021) identify for dot-product attention, namely a data-dependent mixing matrix multiplying a data-dependent value matrix, but not the same rate. Attention logits are inner products between two token features, so the Lipschitz constant of the mixing matrix itself grows with and the available upper bounds on a ball of radius grow as ; the steered kernel depends only on the query token and only through a bounded tanh, so does not depend on X and the bound of Proposition 2 grows as . Relative to dot-product attention, steering thus lowers the exponent of this bound from two to one, and the fixed variant removes the dependence on altogether. We therefore regard Proposition 1 as a further reason to prefer the fixed operator, alongside the accuracy results of §3.2.