cs.LGSep 24, 2026

QSV: Quat-Sphere-Vision for Coupled Quaternion Attention on Spherical Lattices

Authors: Nicholas Foley, Devin Marinelli, Donny Moore, Diego Enriquez, Amanda Fernandez

Organizations: Department of Computer Science, University of Texas at San Antonio

Abstract

In standard attention, three separately learned projections decide how strongly a token attends to each neighbor (WQW_Q, WKW_K) and how the attended features are transformed before aggregation (WVW_V). We study Quat-Sphere-Vision (QSV), a sparse spherical vision model that replaces this projection triple with a single learned unit quaternion per token: the relative quaternion rij=qi∗⊗qjr_{ij} = q_i^{*} \otimes q_j supplies both the attention logit Re⁡(rij)\operatorname{Re}(r_{ij}) and a sandwich-product feature transport x↦rij⊗x⊗rij∗x \mapsto r_{ij} \otimes x \otimes r_{ij}^{*}, with messages passed over sparse kNN graphs on concentric Fibonacci spheres. Ablations that change only the targeted component show the two roles to be asymmetric. Removing the transport reduces test accuracy by about four percentage points on CIFAR-10 and CIFAR-100 (single runs per CIFAR-100 variant), while replacing the learned attention weights with uniform averaging leaves it essentially unchanged. Parameter-matched controls then remove the geometry itself: standard attention on the same graph exceeds QSV (mean 87.3%87.3\% vs. 85.9%85.9\%), and the same model on a flat 2D lattice reaches 91.1%91.1\%, within 2.12.1 points of a ResNet-20 trained under the same pipeline (single run). In the coupled kernel, nearly all of the learned pairwise computation resides in the transport channel.

Figures & tables

Explore similar work

Mar 31, 2026

QUEST: A robust attention formulation using query-modulated spherical attention

The Transformer model architecture has become one of the most widely used in deep learning and the attention mechanism is at its core. The standard attention formulation uses a softmax operation applied to a scaled dot product between query and key vectors. We explore the role played by norms of the queries and keys, which can cause training instabilities when they arbitrarily increase. We demonstrate how this can happen even in simple Transformer models, in the presence of easy-to-learn spurious patterns in the data. We propose a new attention formulation, QUEry-modulated Spherical aTtention (QUEST), that constrains the keys to a hyperspherical latent space, while still allowing individual tokens to flexibly control the sharpness of the attention distribution. QUEST can be easily used as a drop-in replacement for standard attention. We focus on vision applications while also exploring other domains to highlight the method's generality. We show that (1) QUEST trains without instabilities and (2) produces models with improved performance (3) that are robust to data corruptions and adversarial attacks.
May 24, 2026

Quaternion Self-Attention with Shared Scores

Quaternion neural networks are parameter-efficient and model multidimensional dependencies by representing four related features as a single entity. However, existing quaternion self-attention computes component-wise scores and applies independent softmax operations to each component, which increases the computational cost and allows attention distributions to diverge across components. We propose a shared-score quaternion self-attention mechanism that computes a single real-valued score using the quaternion inner product and applies a shared attention distribution across all components. This reduces score-computation multiplications by 75% and the number of softmax operations from four to one. We prove that, when queries and keys are produced by quaternion linear projections that induce component pre-mixing, the component-wise and shared scores lie in the same interaction subspace, indicating that independent component-wise attention primarily re-parameterizes the same interactions rather than expanding the feature interaction space. In speech enhancement, our method reduces inference time by up to 44.3% on a GPU and 58.1% on a CPU while maintaining quality, with consistent trends across vision and natural language processing.
Jul 14, 2026

AVQ-Attention: Adaptive Vector-Quantized Attention

The O(N2)\mathcal{O}(N^2) complexity of attention over NN tokens remains a computational bottleneck in transformer models. Vector-Quantized (VQ) attention reduces this to O(MN)\mathcal{O}(MN) by representing keys with MM codewords, but applies uniform codebook capacity regardless of where attention mass concentrates: high-attention regions of key space may be coarsely approximated while low-attention regions waste representational capacity. We propose Adaptive Vector-Quantized (AVQ) Attention, which adaptively allocates codebook capacity based on attention importance. Starting from a small set of codewords, our method identifies the most important codes during the forward pass and refines them with pre-learned child codewords, achieving fine-grained quantization where it matters most while maintaining coarse quantization elsewhere. We develop an implementation using custom Triton kernels that enables the full adaptive refinement process, including importance scoring, child codeword insertion, and parent contribution replacement, to be carried out within the tiled computation paradigm of Flash Attention with minimal overhead. Our approach maintains O(MN)\mathcal{O}(MN) complexity while achieving improved accuracy-efficiency trade-offs compared to fixed-codebook VQ-attention.