potentialpaper

Online Pseudo-average Shifting Attention(PASA) for Robust Low-precision LLM Inference: Algorithms, Numerical Analysis and Performance

Long Cheng, Qichen Liao, Fan Wu, Junlin Mu, Tengfei Han, Zhe Qiu, Lianqiang Li, Zhen Zhang, Fangzheng Miao, Tianyi Liu, Keming Gao, LiangWangdym, Yinqiande

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Attention computation remains a critical bottleneck for long-sequence inference in large models (e.g., long-text/video generation). To address this, we propose PASA(Pseudo-average Shifting Attention), a fully low-precision algorithm that maintains mathematical equivalence to Flash Attention while enabling stable half-precision computation. PASA introduces two key innovations: (1) online pseudo-average shifting and (2) global error recovery, which jointly prevent overflow and preserve numerical accuracy by dynamically adjusting attention score statistics. This approach significantly releases bandwidth pressure and leverages low-precision compute units on AI accelerators (e.g. NPUs). We identify that numerical instability in attention stems from a \textit{resonance} mechanism-phase alignment (or anti-alignment) between query and key matrices in the head dimension-which triggers overflow of attention score matrix and incurs large numerical errors. Experiments on Qwen2-7B and Stability AI/Stable-Video-Diffusion demonstrate that PASA eliminates these issues while achieving 1.2−1.65×1.2 - 1.65 \times speedup with fully half precision reaching up to 170170 TFLOPs/s on Ascend NPU compared to a highly optimized vendor Flash Attention from Ascend/CANN. To our knowledge, this is the first work to enable full half-precision acceleration for long-sequence attention (MHA/MQA) with guaranteed numerical stability.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…