Fixed-Query Oscillator Attention
- Fixed-query oscillator attention is a mechanism that replaces input-dependent queries with fixed learned anchors on a sphere, encoding attention via cosine similarity.
- It employs Kuramoto–Lohe dynamics to equilibrate free oscillators, resulting in almost-global convergence guarantees and a physical interpretation of attention normalization.
- Empirical results demonstrate improved performance on tasks like keyword spotting and subject-verb agreement, highlighting its potential as a hardware-friendly alternative to softmax.
Fixed-query oscillator attention is an attention mechanism in which the query side is replaced by learned anchors fixed on a sphere, while input-dependent free oscillators evolve under Kuramoto–Lohe dynamics until they settle at positions that encode attention weights through cosine similarity. In this formulation, the nonlinear core of attention is no longer softmax but equilibration of a gradient flow on , followed by affine normalization at readout. The proposal is explicitly motivated by “energy-constrained physical substrates,” where exponentiation and in-loop global reduction are costly and lack a natural physical analog, whereas synchronization is native to oscillator arrays (Pasqualetti et al., 10 Jun 2026).
1. Definition and scope
In fixed-query oscillator attention, the “fixed-query” designation means that the query-like objects are not input-dependent token queries. Instead, they are learned anchors that are fixed during inference. Inputs still determine pairwise couplings, but the query side of the mechanism is a fixed learned reference geometry on the sphere rather than a runtime-generated as in standard scaled dot-product attention (Pasqualetti et al., 10 Jun 2026).
The construction begins from the Lohe model for oscillators on the unit sphere,
with in the fixed-query attention setting. For , writing recovers the classical scalar Kuramoto model. The method then specializes the dynamics asymmetrically: anchor oscillators are learned and fixed, while free oscillators evolve under the forcing induced by those anchors. This asymmetry is central because the paper attributes the resulting uniqueness and almost-global convergence guarantees to the one-particle forced system rather than to a mutually coupled many-oscillator network (Pasqualetti et al., 10 Jun 2026).
This makes the mechanism distinct from several adjacent synchronization-based attention proposals. In "Kuramoto Attention," the effective query is implicit in the current token phase state and learned query gates, so it is oscillator attention but not literally fixed-query in the sense of a shared fixed learned query template (Nunley, 10 Jun 2026). In "Selective Synchronization Attention," there is no explicit query variable at all; the operator is best described as query-free oscillator attention derived from pairwise synchronization compatibility (Hays, 16 Feb 2026). "Attention as Frustrated Synchronization" keeps a causal query-key score map but replaces the value pathway with harmonic synchronization dynamics, making it a synchronization-based alternative to standard value attention rather than a fixed-query design (Nunley, 17 Jun 2026).
2. Dynamical formulation on the sphere
Let the input sequence be . For one attention head, fixed-query oscillator attention defines positive couplings
where are learned projections, 0 is the head dimension, and 1 is any strictly positive function; the experiments use 2, i.e. softplus (Pasqualetti et al., 10 Jun 2026).
These couplings weight the learned anchors:
3
The free oscillator state 4 evolves according to
5
The tangent projector 6 keeps the dynamics on the sphere. The settled state is
7
Software training and inference use this analytic fixed point directly rather than numerically integrating the ODE (Pasqualetti et al., 10 Jun 2026).
Attention weights are then read out through shifted cosine similarity:
8
The shift by 9 guarantees nonnegative numerators because 0. Per-head outputs use standard value aggregation,
1
followed by the usual multi-head combination with 2 (Pasqualetti et al., 10 Jun 2026).
For causal masking, the method sets 3 for 4 and restricts the denominator in the readout to 5. The paper also notes a software-side sharpening variant,
6
but treats 7 as the hardware-native case (Pasqualetti et al., 10 Jun 2026).
3. Geometric and variational interpretation
The fixed-query dynamics are presented as a constrained gradient flow on the sphere. For each free oscillator, define the energy
8
Because 9 must remain on 0, the Euclidean gradient must be projected onto the tangent space, yielding
1
The equilibrium therefore solves
2
whose solution is 3 whenever 4 (Pasqualetti et al., 10 Jun 2026).
This gives the mechanism a clear geometric decomposition. First, the digital front-end computes input-dependent positive couplings. Second, those couplings form a weighted anchor sum in 5. Third, the free oscillator relaxes to the unit vector maximally aligned with that sum. Fourth, cosine similarity to the anchors is affinely normalized into a row-stochastic attention distribution. The essential nonlinearity is therefore the normalization map 6, interpreted as physical equilibration rather than softmax arithmetic (Pasqualetti et al., 10 Jun 2026).
The same section of the literature makes clear that not all oscillator-attention proposals share this geometry. In "Kuramoto Attention," values are the raw phase states, the update is exactly 7 coordinatewise, and the query is state-tied rather than fixed (Nunley, 10 Jun 2026). In "Attention as Frustrated Synchronization," the update is instead a harmonic Kuramoto–Sakaguchi–Daido coupling law with a learned complex kernel and one-step delay, so the computation is located in structured departures from agreement rather than in convergence to a single spherical anchor mixture (Nunley, 17 Jun 2026).
4. Theoretical guarantees
The main theorem for fixed-query oscillator attention states that if
8
then the gradient flow
9
has exactly two equilibria,
0
The equilibrium 1 is asymptotically stable with basin of attraction
2
while 3 is unstable. The proof uses the Lyapunov function 4 and LaSalle’s invariance principle, giving almost-global convergence from every initial condition except the antipodal unstable equilibrium (Pasqualetti et al., 10 Jun 2026).
Two finite-time failure modes are isolated. The first is a degenerate weighted anchor sum, where 5 is very small. If anchors are drawn i.i.d. uniformly from the sphere, the paper gives
6
and
7
for some absolute constant 8. The second is initialization near the unstable antipode. If 9 is uniform on the sphere, then the probability of starting within angle 0 of 1 decays exponentially in 2 for fixed 3 (Pasqualetti et al., 10 Jun 2026).
These guarantees are specific to the one-free-oscillator forced system used in fixed-query attention. The paper explicitly does not extend them to generic mutually coupled multi-oscillator Lohe networks, where multistability is common. This distinction matters because several neighboring synchronization models, including Kuramoto Attention and FSN, rely on token-token coupling rather than fixed anchors (Nunley, 10 Jun 2026).
5. Empirical behavior
The reported experiments span keyword spotting, subject-verb agreement, WikiText-2, and TinyStories. The paper’s headline pattern is task-dependent: at the minimal hardware configuration 4, oscillator attention outperforms softmax on low-complexity bidirectional tasks, while on causal language modeling softmax remains better but the gap decreases monotonically as 5 grows (Pasqualetti et al., 10 Jun 2026).
| Task | Softmax | Fixed-query oscillator attention |
|---|---|---|
| Keyword spotting | 6 | 7 |
| Subject-verb agreement, hard sentences | 8 | 9 |
| WikiText-2 PPL, 0 | 1 | 2 |
| WikiText-2 PPL, 3 | 4 | 5 |
| TinyStories PPL, 6 | 7 | 8 |
| TinyStories PPL, 9 | 0 | 1 |
On hard subject-verb agreement sentences, the gain is 2 percentage points, and the paper reports zero training failures for oscillator attention versus one catastrophic failure in five runs for softmax. On keyword spotting, oscillator attention improves by 3 percentage point at 4. By contrast, on causal language modeling the perplexity gap falls from 5 to 6 on WikiText-2 and from 7 to 8 on TinyStories as 9 increases from 0 to 1 (Pasqualetti et al., 10 Jun 2026).
Ablations indicate that the attention geometry itself carries much of the computation on the bidirectional tasks. With frozen 2, keyword spotting changes from 3 to 4, and subject-verb agreement changes from 5 to 6. The paper interprets this as evidence that the oscillator attention geometry is the main computational element in those settings (Pasqualetti et al., 10 Jun 2026).
The ODE verification experiments compare RK45 integration to the analytic fixed point. On TinyStories models, the fraction of tokens converged to error 7 at 8 rises from 9 at 0 to 1 at 2, while apparent antipodal and degenerate failures both decrease with oscillator dimension. Extending 3 from 4 to 5 at 6 raises convergence from 7 to 8, consistent with the asymptotic theorem (Pasqualetti et al., 10 Jun 2026).
6. Relation to adjacent notions of “fixed-query” and “oscillator attention”
The literature around attention and synchronization uses overlapping terminology, but the mechanisms are not interchangeable. The closest direct relatives of fixed-query oscillator attention are other oscillator-based self-attention layers on phase or manifold-valued states; more distant relatives either use “fixed-query” in a different sense or are not oscillator models at all.
| Method | Relation to fixed-query oscillator attention | Key distinction |
|---|---|---|
| Kuramoto Attention (Nunley, 10 Jun 2026) | Strong oscillator-attention relative | Query is implicit and state-tied, not fixed across tokens |
| Selective Synchronization Attention (Hays, 16 Feb 2026) | Adjacent oscillator operator | Query-free synchronization kernel, not query-based |
| Frustrated Synchronization Network (Nunley, 17 Jun 2026) | Synchronization-based alternative | Keeps query-key score map, replaces value pathway with frustrated coupling |
| Tempo-invariant audio attention (Dorfer et al., 2018) | Only partially related | Soft frame-wise input weighting, explicitly not oscillator or fixed-query transformer attention |
| NAC (Razzaq et al., 11 Dec 2025) | Contrasting dynamical attention | First-order relaxation of logits, not oscillatory |
| DS-Det (Cao et al., 26 Jul 2025) | Different use of “fixed-query” | Fixed number of object queries in DETR-like decoders, not oscillator dynamics |
"Attention as a Perspective for Learning Tempo-invariant Audio Queries" uses a softmax attention pathway 9 that outputs scalar weights 00 for spectrogram frames and multiplies each frame by its weight before the audio CNN. The paper explicitly states that this is not oscillator attention, not periodic attention, and not a fixed external query vector in the transformer sense (Dorfer et al., 2018).
"NAC" reformulates attention-logit computation as the solution of a scalar first-order ODE,
01
with exact solution
02
The paper explicitly characterizes this as content-conditioned exponential relaxation toward a learned attractor, not as an oscillator mechanism (Razzaq et al., 11 Dec 2025).
"DS-Det" uses “fixed-query” to refer to a fixed-size set of detector queries in DETR-like decoders. Its notion of an “oscillator-like” problem is interpretive: the paper itself names the conflict between self-attention and cross-attention Recurrent Opposing inTeractions (ROT), not oscillator dynamics in the mathematical sense (Cao et al., 26 Jul 2025).
7. Limitations and research directions
The proposal is explicit about its scope. Its main objective is not to replace softmax in software, where softmax is described as “simpler, faster, and better understood,” but to provide a mathematically grounded blueprint for accurate attention on physical substrates. The intended deployment is hybrid: a digital front-end computes couplings and anchor positions, a physical oscillator network performs the equilibration, and a digital back-end reads out attention weights and continues the transformer computation (Pasqualetti et al., 10 Jun 2026).
Several constraints are intrinsic to that goal. Couplings are required to be positive; the geometry is spherical; the query side is fixed by learned anchors; and attention is read out through cosine similarity with affine normalization. The paper explicitly attributes the residual language-modeling gap to the limited expressivity of fixed learned query anchors relative to fully input-dependent softmax queries, especially when 03 is small (Pasqualetti et al., 10 Jun 2026).
Hardware maturity is also uneven across dimensions. The 04 case is described as the physically mature setting, with possible substrates including mechanical oscillators, Josephson junctions, MEMS resonators, and electrical LC tanks. Higher-dimensional oscillator substrates remain an open hardware question. The observed scaling of the perplexity gap with 05 is empirical rather than theoretically proved; the paper reports fitted power laws for the gap but explicitly does not claim a theorem that oscillator attention converges to softmax as 06 grows (Pasqualetti et al., 10 Jun 2026).
The future directions named in the paper are correspondingly concrete: using nonzero 07 to encode positional information, identifying the effective rank of softmax attention required by a task and matching it with 08, developing higher-dimensional physical oscillator substrates, and exploring biologically plausible learning rules such as Hebbian or STDP updates for couplings instead of backpropagation. Taken together, these directions suggest that fixed-query oscillator attention is best understood not as a universal replacement for standard attention, but as a physically grounded synchronization-based attention family whose central research problem is the trade-off between hardware realizability and representational flexibility (Pasqualetti et al., 10 Jun 2026).