QuARK Attention: Learning Quantized K-Way Routing for Sparse Transformers
Self-attention flexibly models interactions between tokens but incurs quadratic computational cost, motivating sparse mechanisms that preserve the most useful relationships. We introduce QuARK Attention, which formulates content-adaptive sparse routing as learning a discrete partition of the model's attention-induced interaction graph. Routing is learned jointly with the Transformer through a differentiable auxiliary objective that shapes both the routing encoder and the representations that determine attention, allowing the routing structure and attention geometry to co-adapt. Sigmoid-relaxed binary addresses define differentiable same-bucket collision probabilities: alignment encourages attention-important token pairs to share an address, while log-uniformity discourages excess background collisions. The forward pass nevertheless uses hard bucket-sorted sparse attention without differentiating through discrete assignments or sorting. Across three controlled graph benchmarks, QuARK improves median test accuracy on MalNetTiny by 5.0 percentage points over the strongest baseline and achieves the lowest aggregate normalized test error on OpenABC-D. Routing diagnostics reveal that stronger collision enrichment, broader bucket utilization, or greater preservation of attention-important pairs do not individually guarantee better task performance. These findings support learning sparse attention as a relational preservation problem, where routing and attention are jointly shaped by the downstream task.
Authors
- Yaniv Shulman
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-01
- DOI
- https://doi.org/10.5281/zenodo.24714914
- Primary Topic
- Advanced Neural Network Applications
- Type
- preprint