atlas

Research map / Architectures and efficiency / Attention and transformers

FlashBias: Fast Computation of Attention with Bias

NeurIPS 2025 · Architectures and efficiency › Attention and transformers · approach: Sparse and structured attention · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes FlashBias, which factorizes attention bias matrices into low-rank factor tensors (exact, SVD, or neural decomposition) so FlashAttention-style kernels avoid reading the dense bias from HBM, yielding speedups for ALiBi, SwinV2, PDE solvers, and AlphaFold 3 Pairformer.

Problem

Attention with additive bias loses most of FlashAttention's IO efficiency because the dense bias matrix must be read from GPU HBM, creating a quadratic memory and runtime bottleneck.

Approach

Theoretically links FlashAttention IO cost to the rank of the attention/bias matrix, then replaces the dense bias with two low-rank factor tensors obtained by exact formulas (e.g., ALiBi, squared distance), SVD of learned parameters, or lightweight neural factor networks, and concatenates them onto queries and keys so standard FlashAttention kernels can be reused.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace dense bias reads with exact low-rank ALiBi decompositionGPT-2 with ALiBi · GPT-2 ALiBi, training and inferencetime (s): 124.3 -> 121.6; 40.32 -> 39.26Helped
Replace dense bias reads with exact low-rank ALiBi decompositionGPT-2 with ALiBi · GPT-2 ALiBi, training and inferencetime (s): 122.4 -> 121.5; 40.03 -> 39.78Helped
Use SVD-decomposed bias in the last 8 layersSwinV2-B · ImageNet-1KTime (s): 0.473 -> 0.190Helped
Use SVD-decomposed bias in the last 8 layersSwinV2-B · ImageNet-1KAcc@5: 98.232% -> 98.220%No clear effect
Remove the attention bias (ablation)SwinV2-B · ImageNet-1KAcc@1: 87.144% -> 9.376%Hurt
Use exact spatial-distance bias decompositionTransformer PDE Solver · PDE solving, sequence length 32186C_D Error: 0.0173 -> 0.0113Helped
Approximate pair-representation bias with neural low-rank factorsAlphaFold 3 · PDB ID 7wuxTime (s): 26.85 -> 18.19Helped
Approximate pair-representation bias with neural low-rank factorsAlphaFold 3 · PDB ID 7wuxpTM: 0.9500 -> 0.9498No clear effect
Remove pair-representation bias (ablation)AlphaFold 3 · PDB ID 7wuxpTM: 0.9500 -> 0.1713Hurt
Replace the bias matrix with decomposed factor functionsAlphaFold 3 · TrainingRunning Time (s / 10 iters): 165 -> 140Helped
Use SVD-decomposed relative-position bias in fine-scale layersPangu-Weather · ERA5, 100 samplesTime (s/100iters): 98.022 -> 76.779Helped
Apply FlashBias only to the last 8 layers rather than more layers (ablation)SwinV2-B · ImageNet-1Krunning timeMixed

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1K PDB weightedPDB_before2109_wopb_nometalc_0925 ERA5 Driving car simulation (Neural-Solver-Library)

Benchmarks: ImageNet-1K PDB test set recentPDB_1536_sample384_0925 ERA5 (Pangu-Weather output) Driving car simulation PDE benchmark

Metrics: Acc@1 Acc@5 running time GPU memory pLDDT loss pTM relative L2 error drag coefficient error output difference

Baselines: FlashAttention with Bias FlexAttention Pure FlashAttention Official Code INT8 PTQ FlashAttention w/o bias

Builds on: FlashAttention FlashAttention-2 FlexAttention ALiBi LoRA

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy