PAROAttention: 시각 생성 모델을 위한 효율적인 희소 및 양자화 어텐션을 위한 패턴 인식 재정렬
PAROAttention: Pattern-Aware ReOrdering for Efficient Sparse and Quantized Attention in Visual Generation Models
June 19, 2025
저자: Tianchen Zhao, Ke Hong, Xinhao Yang, Xuefeng Xiao, Huixia Li, Feng Ling, Ruiqi Xie, Siqi Chen, Hongyu Zhu, Yichong Zhang, Yu Wang
cs.AI
초록
시각적 생성 분야에서 어텐션 메커니즘의 이차 복잡도는 높은 메모리와 계산 비용을 초래하며, 특히 고해상도 이미지나 다중 프레임 비디오 생성에 필요한 긴 토큰 시퀀스에서 더욱 두드러집니다. 이를 해결하기 위해, 기존 연구에서는 희소화(sparsification)와 양자화(quantization)와 같은 기법들을 탐구해왔습니다. 그러나 이러한 기법들은 낮은 밀도와 감소된 비트폭(bitwidth) 하에서 상당한 어려움에 직면합니다. 체계적인 분석을 통해, 우리는 이러한 어려움의 핵심 원인이 시각적 어텐션 패턴의 분산적이고 불규칙한 특성에서 비롯됨을 확인했습니다. 따라서, 이러한 패턴을 수용하기 위해 특수한 희소화 및 양자화 설계를 도입하는 대신, 우리는 어려움을 완화하기 위한 대안적 전략을 제안합니다: 어텐션 패턴을 *재구성*하는 것입니다. 시각적 특징 추출의 지역적 집합 특성에서 영감을 받아, 우리는 다양한 어텐션 패턴을 하드웨어 친화적인 블록 단위 패턴으로 통일하는 새로운 **패턴 인식 토큰 재정렬(PARO)** 기법을 설계했습니다. 이러한 통일은 희소화와 양자화를 상당히 단순화하고 개선합니다. 우리는 다양한 설계 선택의 성능-효율성 트레이드오프를 평가하고, 통일된 패턴에 맞춰진 방법론을 확정했습니다. 우리의 접근 방식인 **PAROAttention**은 무손실 메트릭을 유지하며, 완전 정밀도(FP) 기준선과 거의 동일한 결과를 달성하면서도 상당히 낮은 밀도(~20%-30%)와 비트폭(**INT8/INT4**)에서 동작하여, **1.9배**에서 **2.7배**의 종단 간 지연 시간 개선을 달성했습니다.
English
In visual generation, the quadratic complexity of attention mechanisms
results in high memory and computational costs, especially for longer token
sequences required in high-resolution image or multi-frame video generation. To
address this, prior research has explored techniques such as sparsification and
quantization. However, these techniques face significant challenges under low
density and reduced bitwidths. Through systematic analysis, we identify that
the core difficulty stems from the dispersed and irregular characteristics of
visual attention patterns. Therefore, instead of introducing specialized
sparsification and quantization design to accommodate such patterns, we propose
an alternative strategy: *reorganizing* the attention pattern to alleviate the
challenges. Inspired by the local aggregation nature of visual feature
extraction, we design a novel **Pattern-Aware token ReOrdering (PARO)**
technique, which unifies the diverse attention patterns into a
hardware-friendly block-wise pattern. This unification substantially simplifies
and enhances both sparsification and quantization. We evaluate the
performance-efficiency trade-offs of various design choices and finalize a
methodology tailored for the unified pattern. Our approach, **PAROAttention**,
achieves video and image generation with lossless metrics, and nearly identical
results from full-precision (FP) baselines, while operating at notably lower
density (~20%-30%) and bitwidth (**INT8/INT4**), achieving a **1.9x** to
**2.7x** end-to-end latency speedup.