Memory-Efficient Visual Autoregressive Modeling with Scale-Aware KV Cache Compression

Kunjun Li, Zigeng Chen, Cheng-Yen Yang, Jenq-Neng Hwang

Introduction: The Memory Bottleneck in Visual Autoregression

Visual Autoregressive (VAR) modeling has emerged as a potent alternative to diffusion models, predicting entire image scales simultaneously. However, this approach introduces a significant memory bottleneck: the Key-Value (KV) cache. As resolution increases, the cache grows cubically, requiring up to 85 GB of VRAM for a 1024x1024 image in state-of-the-art models like Infinity-8B. This "memory explosion" restricts deployment to high-end hardware and limits scalability to ultra-high resolutions like 4K.

Methodology: ScaleKV and Scale-Aware Allocation

To address this, we present ScaleKV, a compression framework that reduces KV cache requirements by up to 90% with negligible loss in quality. ScaleKV departs from uniform cache management by identifying functional differences between transformer layers using the Attention Selectivity Index (ASI).

Scale-Aware Layer Budget Allocation: Traditional uniform allocation vs. the proposed scale-aware strategy distinguishing between Drafter and Refiner layers.

The framework categorizes layers into two functional groups:

  1. Drafters: These layers maintain dispersed attention across multiple scales to integrate global context.
  2. Refiners: These layers focus almost exclusively on the current token map to polish local details.

ScaleKV implements a scale-aware budget allocation, prioritizing memory for Drafters while progressively reducing the budget for Refiners as the image resolution increases. To decide which specific tokens to keep, ScaleKV uses a compact "observation window" of centroid tokens to score the relevance of all other tokens, preserving only the most important KV pairs.

Experimental Setup

Evaluation was conducted using the Infinity-2B and Infinity-8B text-to-image models. The researchers utilized several benchmarks to ensure a comprehensive assessment:

  • MS-COCO 2017: Measured output consistency via FID, LPIPS, and PSNR.
  • GenEval & DPG (Dynamic Prompt Guidelines): Assessed perceptual quality and adherence to complex text prompts.
  • LAION-Art: Used for robustness ablation studies across diverse image data.

Results and Discussion

ScaleKV achieves a massive 10x reduction in KV cache memory (from 85 GB to 8.5 GB) on the Infinity-8B model.

Visual comparison of original (85 GB cache) vs. ScaleKV-compressed (8.5 GB cache) generation. The quality remains virtually indistinguishable despite the 90% reduction.

Key findings include:

  • High Fidelity: Despite the 90% compression, quality degradation was nearly imperceptible. GenEval scores remained stable at 0.79, and DPG scores showed only a marginal decline from 86.61 to 86.49.
  • Efficiency: Beyond memory savings, the reduction in data movement resulted in an inference speedup of up to 1.25x on NVIDIA H20 GPUs.
  • Architectural Insights: The distinction between Drafters and Refiners is a fundamental property of the model architecture. This means the model only needs to be calibrated once (using as few as 10 prompts) to determine the optimal strategy.

Conclusion and Future Work

ScaleKV demonstrates that scale-aware compression makes high-resolution visual autoregression practical on consumer-grade hardware. While the study focused on models up to 8B parameters, the authors suggest this framework paves the way for 4K resolution generation. Future research will explore applying these scale-aware insights to other hierarchical architectures in video and 3D generation.

Summary updated

BibTeX
@inproceedings{li2025memory,
  author = {Kunjun Li and Zigeng Chen and Cheng-Yen Yang and Jenq-Neng Hwang},
  title = {{Memory-Efficient Visual Autoregressive Modeling with Scale-Aware KV Cache Compression}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=NFxA2Von7y},
}
Figure