cs.LGNov 24, 2026

AVQ-Attention-2: Adaptive Vector-Quantized Attention with Exact Local Blocks and Linear-Cost Training

Authors: Winfried van den Dool, Patrick Forré, Amir Habibian, Yuki M. Asano, Max Welling

Organizations: QUVA Lab & AMLab, University of Amsterdam · AI4Science Lab & KdV Institute, University of Amsterdam · Qualcomm AI Research, Amsterdam · FunAI Lab, University of Technology Nuremberg · 

Abstract

Attention costs O(N2)\mathcal{O}(N^2) in the number of tokens. Vector-quantized attention reduces this to O(NM)\mathcal{O}(NM) by clustering the NN keys, attending to the MM codewords instead, and its adaptive form, AVQ-attention, concentrates codebook resolution where a query's attention mass actually falls. We present AVQ-Attention-2, a better design that merges it with exact local attention and attends to the mean of each cluster's keys rather than to a codeword. We show three improvements: consistently better quality at comparable cost; training that now also costs O(NM)\mathcal{O}(NM) rather than O(N2)\mathcal{O}(N^2); and an approximation accurate enough that the layer can be dropped into a pretrained transformer without fine-tuning. Across a variety of sequence lengths the result is competitive not merely with other approximate attention but with exact dense attention, running faster than FlashAttention at little to no loss in quality.

Figures & tables

Appendix figures & tables7 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. AVQ-Attention: Adaptive Vector-Quantized Attention

    Jul 14, 2026Winfried van den dool, Patrick Forré, Amir Habibian +2Transformer AttentionVector Quantization

  2. KV Cache Compression Through the Lens of Transform Coding

    Aug 14, 2026Hannah Laus, Claudio Mayrink Verdun, Hao Wang +2KV-Cache CompressionKV-Cache Quantization

  3. Spend Bits Where Queries Look: KV Cache Vector Quantization with Attention-Preserving Transforms

    Aug 4, 2026Samuel Fernández-Menduiña, Amir Ziashahabi, Eduardo Pavez +2KV CachingVector Quantization