Reproduce “AVQ-Attention: Adaptive Vector-Quantized Attention” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Winfried van den dool, Patrick Forré, Amir Habibian, Yuki M. Asano, Max Welling

AVQ-Attention adaptively allocates key-codebook resolution according to attention mass, refining selected parent codewords with child codewords while leaving others coarse. Its parent-child constraint supports attention without recomputing parent logits, retaining linear-in-sequence-length computation. On ADE20K, it reaches 43.33 ± 0.12 mIoU at 0.116 ms, versus flat VQ at 42.70 ± 0.08 and 0.103 ms; this is a 0.63-point gain at slightly higher kernel time.

Key insights

  • Attention weights naturally provide an importance signal for adaptively allocating quantization resources, guiding refinement where attention mass concentrates.
  • A hierarchical codebook with geometric constraints (parent as mean of children) allows for efficient parent contribution removal and correction when refining with child codewords.
  • Spatial reordering of queries (e.g., using a Gilbert curve) improves the effectiveness of tiled, adaptive codebook allocation by ensuring queries within a tile attend to similar regions.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.