AVQ-Attention: Adaptive Vector-Quantized Attention

Winfried van den dool, Patrick Forré, Amir Habibian, Yuki M. Asano, Max Welling
7/14/2026
cs.LGcs.CV

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

The $\mathcal{O}(N^2)$ complexity of attention over $N$ tokens remains a computational bottleneck in transformer models. Vector-Quantized (VQ) attention reduces this to $\mathcal{O}(MN)$ by representing keys with $M$ 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.

Show full abstract

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 $\mathcal{O}(MN)$ complexity while achieving improved accuracy-efficiency trade-offs compared to fixed-codebook VQ-attention.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{dool2026avqattention,
  title  = {AVQ-Attention: Adaptive Vector-Quantized Attention},
  author = {Winfried van den dool and Patrick Forré and Amir Habibian and Yuki M. Asano and Max Welling},
  year   = {2026},
  eprint = {2607.12789},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.12789v1},
  journal = {ECCV 2026 2026}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.12789.svg)](https://codeofpaper.com/paper/2607.12789)

Discussion