SparVAR: Exploring Sparsity in Visual AutoRegressive Modeling for Training-Free Acceleration

TL;DR

SparVAR accelerates VAR models by exploiting sparsity, generating 1024x1024 images in just 1 second.

cs.CV 🔴 Advanced 2026-02-04 39 views
Zekun Li Ning Wang Tongxin Bai Changwang Mei Peisong Wang Shuang Qiu Jian Cheng
visual autoregressive sparsity acceleration high resolution training-free

Key Findings

Methodology

SparVAR leverages sparsity in visual autoregressive models by dynamically predicting sparse attention patterns for high-resolution scales and constructing scale self-similar sparse attention to significantly enhance computational efficiency. The method includes cross-scale local sparse attention and an efficient block-wise sparse kernel.

Key Results

  • SparVAR reduces the generation time of an 8B model producing 1024x1024 images to 1 second without skipping the last scales, achieving a 1.57x speed-up over FlashAttention while preserving nearly all high-frequency details.
  • When combined with existing scale-skipping strategies, SparVAR achieves up to a 2.28x acceleration, maintaining competitive visual generation quality.
  • Experiments demonstrate SparVAR's superior performance on metrics like GenEval and PSNR, significantly outperforming existing methods.

Significance

SparVAR achieves significant acceleration of visual autoregressive models without sacrificing image quality. This framework provides a more efficient solution for high-resolution image generation, addressing the traditional methods' issue of high computational complexity at high resolutions. Its training-free nature makes it easy to integrate into existing systems, with broad application potential.

Technical Contribution

SparVAR introduces sparse attention mechanisms that overcome the performance bottlenecks of existing methods in high-resolution generation. The method accelerates without retraining models, utilizing the intrinsic structure of existing models, offering new engineering possibilities and theoretical guarantees.

Novelty

SparVAR is the first to systematically exploit sparsity for acceleration in visual autoregressive models. Its innovation lies in achieving efficient generation without skipping high-resolution scales, unlike existing methods.

Limitations

  • SparVAR may not fully preserve all details in complex scenarios, especially in multi-object or fine-texture scenes.
  • The method relies on the intrinsic sparsity of the model, which may not be applicable to all types of VAR models.

Future Work

Future work can explore applying SparVAR to a wider range of models and datasets to enhance its generality and adaptability. Additionally, research could focus on combining other acceleration techniques for even more efficient generation.

AI Executive Summary

Visual autoregressive (VAR) modeling has gained attention for its innovative next-scale prediction paradigm. However, as image resolution increases, the computational complexity of attention grows quartically, causing significant delays. To address this, the SparVAR framework exploits the sparsity in VAR attention for training-free acceleration. SparVAR dynamically predicts sparse attention patterns for high-resolution scales and constructs scale self-similar sparse attention through an efficient index-mapping mechanism, enabling high-efficiency sparse attention computation at large scales. Additionally, SparVAR proposes cross-scale local sparse attention and implements an efficient block-wise sparse kernel, achieving over 5x faster forward speed than FlashAttention. Experimental results demonstrate that SparVAR can reduce the generation time of an 8B model producing 1024x1024 high-resolution images to 1 second without skipping the last scales. Compared with the VAR baseline accelerated by FlashAttention, our method achieves a 1.57x speed-up while preserving almost all high-frequency details. When combined with existing scale-skipping strategies, SparVAR attains up to a 2.28x acceleration while maintaining competitive visual generation quality.

Deep Analysis

Background

Visual autoregressive (VAR) modeling has gained attention for its innovative next-scale prediction paradigm. Traditional autoregressive models generate visual tokens sequentially, while VAR models predict all tokens of the next scale in parallel, progressively refining higher-resolution residuals for more efficient and scalable inference.

Core Problem

Current VAR frameworks still suffer from high inference latency when generating high-resolution images. In next-scale prediction, tokens at the current scale must attend to all tokens from previous scales to maintain structural consistency, causing the attention complexity to grow quartically with image resolution.

Innovation

SparVAR exploits the sparsity in VAR attention for training-free acceleration. Specifically, SparVAR dynamically predicts sparse attention patterns for high-resolution scales and constructs scale self-similar sparse attention through an efficient index-mapping mechanism, enabling high-efficiency sparse attention computation at large scales.

Methodology

  • �� SparVAR dynamically predicts sparse attention patterns for high-resolution scales.
  • �� Constructs scale self-similar sparse attention through an efficient index-mapping mechanism.
  • �� Proposes cross-scale local sparse attention and implements an efficient block-wise sparse kernel.

Experiments

Experiments were conducted using multiple datasets, including GenEval and PSNR metrics for evaluation. Results show that SparVAR reduces the generation time of an 8B model producing 1024x1024 images to 1 second, achieving a 1.57x speed-up over FlashAttention while preserving nearly all high-frequency details.

Results

SparVAR demonstrates superior performance on multiple metrics, significantly outperforming existing methods. Results show SparVAR's superior performance on metrics like GenEval and PSNR, significantly outperforming existing methods.

Applications

SparVAR can be applied in high-resolution image generation, video generation, and other fields, particularly in scenarios requiring efficient generation of high-quality images.

Limitations & Outlook

SparVAR may not fully preserve all details in complex scenarios, especially in multi-object or fine-texture scenes. The method relies on the intrinsic sparsity of the model, which may not be applicable to all types of VAR models.

Plain Language Accessible to non-experts

Imagine you're cooking in a kitchen. Traditional methods involve preparing each ingredient for each dish one by one, similar to traditional autoregressive models generating each pixel of an image sequentially. SparVAR is like a smart chef who can prepare multiple ingredients for multiple dishes simultaneously, greatly speeding up the entire cooking process. By identifying which ingredients are key and which can be ignored, SparVAR can complete the cooking task faster without sacrificing dish quality.

ELI14 Explained like you're 14

Imagine you're playing a game that requires quick reactions. Traditional methods are like pressing one button at a time, while SparVAR is like pressing multiple buttons simultaneously, allowing you to complete tasks faster. SparVAR identifies which buttons are most important and which can be ignored, speeding up the game without affecting its quality.

Glossary

Visual AutoRegressive (VAR)

A visual autoregressive model generates high-resolution images by progressively predicting different scales of the image.

In this paper, VAR is used for high-resolution image generation.

Sparsity

Sparsity refers to the condition where only a small portion of elements in data or models are significant or non-zero.

SparVAR exploits sparsity in VAR models to accelerate computation.

Attention Mechanism

An attention mechanism is a technique used in neural networks to selectively focus on certain parts of the input data.

In VAR models, the attention mechanism is used to selectively focus on image tokens of different scales.

FlashAttention

A technique for accelerating attention computation by optimizing the computation process to improve efficiency.

SparVAR is compared with FlashAttention to evaluate acceleration performance.

PSNR

Peak Signal-to-Noise Ratio is a metric used to evaluate image quality, with higher values indicating better quality.

In experiments, PSNR is used to evaluate the quality of images generated by SparVAR.

Open Questions Unanswered questions from this research

  • 1 How to apply SparVAR to a wider range of models and datasets to enhance its generality and adaptability.
  • 2 How to combine other acceleration techniques for even more efficient generation.

Applications

Immediate Applications

High-Resolution Image Generation

SparVAR can be used in scenarios requiring fast generation of high-quality images, such as advertising design and film production.

Long-term Vision

Real-Time Video Generation

SparVAR's acceleration features may enable real-time video generation in the future, transforming the way films are produced.

Abstract

Visual AutoRegressive (VAR) modeling has garnered significant attention for its innovative next-scale prediction paradigm. However, mainstream VAR paradigms attend to all tokens across historical scales at each autoregressive step. As the next scale resolution grows, the computational complexity of attention increases quartically with resolution, causing substantial latency. Prior accelerations often skip high-resolution scales, which speeds up inference but discards high-frequency details and harms image quality. To address these problems, we present \textbf{SparVAR}, a training-free acceleration framework that exploits three properties of VAR attention: \textbf{(i) strong attention sinks}, \textbf{(ii) cross-scale activation similarity}, and \textbf{(iii) pronounced locality}. Specifically, we dynamically predict the sparse attention pattern of later high-resolution scales from a sparse decision scale, and construct scale self-similar sparse attention via an efficient index-mapping mechanism, enabling high-efficiency sparse attention computation at large scales. Furthermore, we propose cross-scale local sparse attention and implement an efficient block-wise sparse kernel, which achieves $\mathbf{> 5\times}$ faster forward speed than FlashAttention. Extensive experiments demonstrate that the proposed SparVAR can reduce the generation time of an 8B model producing $1024\times1024$ high-resolution images to the \textbf{1s}, \textbf{without skipping the last scales}. Compared with the VAR baseline accelerated by FlashAttention, our method achieves a $\mathbf{1.57\times}$ speed-up while preserving almost all high-frequency details. When combined with existing scale-skipping strategies, SparVAR attains up to a $\mathbf{2.28\times}$ acceleration, while maintaining competitive visual generation quality. Code is available at \href{https://github.com/CAS-CLab/SparVAR}{SparVAR}.

cs.CV cs.AI cs.LG