Joint Subspace Sparse Attention for Efficient Long-Context Decoding
Organizations: Seoul National University
Abstract
Sparse attention reduces the KV-cache traffic that dominates long-context LLM decoding, but practical methods largely operate at coarse granularity. Token-level selection offers finer control, yet presents two challenges: low-dimensional scoring may lose query--key structure needed for accurate ranking, while gathering scattered selected tokens can offset the resulting latency benefit. We introduce Joint Subspace Sparse Attention (JSSA) to address both challenges. For selection quality, JSSA learns a shared low-dimensional query--key subspace by minimizing token-score preservation error. We upper-bound the resulting non-convex objective with a tractable marginal objective that admits a closed-form spectral solution; direct refinement of the exact objective provides no measurable improvement in the tested settings. For execution efficiency, we develop a gather-free token-level indexed-attention kernel that supports distinct per-KV-head selections under the standard grouped-query attention (GQA) KV-cache layout. Across standard GQA, hybrid sliding-window/global attention, and Multi-head Latent Attention (MLA) models, JSSA consistently remains close to full-KV accuracy while avoiding the substantial generation-length inflation and architecture-dependent failures observed with competing methods. On an NVIDIA B200 GPU, JSSA achieves up to the decoding throughput of full-KV attention at 128K context. JSSA achieves reasoning accuracy comparable to model-native DSA without model training and reaches 96--99% of its decoding throughput even at 700B scale large models.
Figures & tables
| Model | FKV | QUEST | SqueezedAttn. | SnapKV | FASA | Loki | JSSA |
|---|---|---|---|---|---|---|---|
| LLaMA-3.1-8B-Instruct | 48.35 | 46.94 | 47.95 | 43.53 | 46.74 | 45.65 | 49.16 |
| Qwen3-14B | 50.49 | 48.44 | 48.58 | 45.27 | 47.93 | 49.54 | 49.82 |
| Ministral-3-8B-Instruct-2512 | 47.90 | 46.48 | 47.91 | 44.82 | 46.04 | 48.07 | 47.79 |
| Model | Context | FKV | QUEST | FASA | Loki | JSSA |
|---|---|---|---|---|---|---|
| LLaMA-3.1-8B-Instruct | 32K | 11.07 | 35.10 | 23.12 | 50.15 | 11.27 |
| 64K | 10.14 | 21.68 | 14.76 | 41.45 | 10.14 | |
| 128K | 10.38 | 25.50 | 56.59 | 56.29 | 11.49 | |
| Qwen3-14B | 32K | 11.24 | 16.38 | 16.89 | 14.89 | 11.49 |
| 64K | 10.93 | 14.51 | 19.34 | 13.49 | 11.01 | |
| 128K | 10.41 | 13.29 | 15.05 | 14.61 | 10.53 |
| Model | Method | AIME 2025 | MATH-500 | GPQA-Diamond |
|---|---|---|---|---|
| Qwen3-8B | FKV | 69.58 (1.00 ) | 94.53 (1.00 ) | 57.95 (1.00 ) |
| TriAttention | 20.00 (1.75 ) | 86.20 (1.70 ) | 40.40 (4.13 ) | |
| QUEST | 62.92 (1.29 ) | 93.50 (1.21 ) | 58.14 (1.03 ) | |
| SeerAttention-R | 42.08 (1.54 ) | 91.80 (1.35 ) | 55.93 (1.43 ) | |
| FASA | 60.42 (1.30 ) | 93.58 (1.17 ) | 57.45 (1.06 ) | |
| JSSA | 68.33 (1.07 ) | 94.23 (1.09 ) | 57.39 (1.02 ) |
| Model | Method | AIME 2025 | GPQA-Diamond |
|---|---|---|---|
| DeepSeek-V3.1-Terminus | FKV | 86.67 | 81.57 |
| DeepSeek-V3.1-Terminus | JSSA | 87.50 | 80.30 |
| DeepSeek-V3.2-Exp | Native DSA | 87.50 | 78.54 |
| GLM-5.2 | JSSA | 83.33 | 90.91 |
| GLM-5.2 | Native DSA | 82.50 | 90.91 |
Appendix figures & tables21 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Attention architecture | LongBench | RULER | PG-19 | Reasoning | Throughput |
|---|---|---|---|---|---|---|
| LLaMA-3.1-8B-Instruct | GQA | ✓ | ✓ | ✓ | ||
| Qwen3-14B | GQA | ✓ | ✓ | ✓ | ||
| Ministral-3-8B-Instruct-2512 | GQA | ✓ | ✓ | ✓ | ||
| Qwen3-8B | GQA | ✓ | ✓ | |||
| Gemma4-26B-A4B-It | Hybrid local/global GQA | ✓ | ✓ | |||
| GLM-4.7-Flash | MLA | ✓ | ✓ |
| Model | Temperature | Top- | Top- | Max. new tokens |
|---|---|---|---|---|
| Qwen3-8B | 0.6 | 0.95 | 20 | 40960 |
| Gemma4-26B-A4B-It | 1.0 | 0.95 | 64 | 40960 |
| GLM-4.7-Flash | 1.0 | 0.95 | - | 131072 |
| Model | LLaMA-3.1-8B | Qwen3-14B | Ministral-3-8B | Gemma4-26B | GLM-4.7-Flash |
|---|---|---|---|---|---|
| Latency (s) | 203 | 295 | 129 | 365 | 247 |
| Method | Calibration Corpus | Packed 128K | Plain |
|---|---|---|---|
| JSSA | LongAlign | 49.16 | 49.06 |
| Qasper | 49.13 | 49.15 | |
| FASA | LongAlign | 43.99 | 46.74 |
| Qasper | 44.70 | 47.21 |
| Basis | ||
|---|---|---|
| Raw group-mean moments | 70.05% | 74.92% |
| Unit-trace-normalized group-mean moments | 71.34% | 75.94% |
| Relative Change | Overlap | ||||
|---|---|---|---|---|---|
| 8 | 0.005 | 0.999999 | |||
| 0.05 | 0.999958 | ||||
| 0.5 | 0.998841 | ||||
| 5.0 | 0.989120 | ||||
| 32 | 0.005 | 1.000000 | |||
| 0.05 | 0.999999 |
| Model | Oracle Recall | Subspace Overlap | |||
|---|---|---|---|---|---|
| Step 0 | Step 1600 | ||||
| LLaMA-3.1-8B-Instruct | 8 | 256 | 48.76% | 48.74% | 0.999958 |
| 2048 | 53.81% | 53.81% | |||
| 32 | 256 | 71.34% | 71.36% | 0.999999 | |
| 2048 | 75.94% | 75.95% | |||
| Gemma4-26B-A4B-It | 64 | 256 | 79.85% | 79.85% | 1.000000 |
| Model | JSSA | Loki | FASA | |
|---|---|---|---|---|
| LLaMA-3.1-8B-Instruct ( ) | 256 | 71.34% | 35.97% | 48.90% |
| 2048 | 75.94% | 51.84% | 53.31% | |
| Gemma4-26B-A4B-It ( ) | 256 | 79.85% | 67.79% | 44.60% |
| 2048 | 83.33% | 77.08% | 49.90% |
| Model | Method | 32K | 64K | 128K |
|---|---|---|---|---|
| LLaMA-3.1-8B-Instruct | Asymmetric (KQ-SVD) | 84.25 | 81.77 | 73.23 |
| JSSA | 86.35 | 82.55 | 75.38 | |
| Qwen3-14B | Asymmetric (KQ-SVD) | 71.46 | 82.42 | 75.78 |
| JSSA | 88.86 | 88.47 | 82.21 | |
| Ministral-3-8B-Instruct-2512 | Asymmetric (KQ-SVD) | 89.71 | 86.77 | 86.28 |
| JSSA | 90.72 | 89.02 | 85.97 |
| AIME 2025 | GPQA-Diamond | ||||||
|---|---|---|---|---|---|---|---|
| Model | Method | 512 | 1024 | 2048 | 512 | 1024 | 2048 |
| Qwen3-8B | Asymmetric (KQ-SVD) | 0.83 | 9.17 | 34.58 | 43.94 | 53.54 | 59.09 |
| JSSA | 64.58 | 68.33 | 67.92 | 58.08 | 57.39 | 58.21 | |
| Gemma4-26B-A4B-It | Asymmetric (KQ-SVD) | 26.67 | 77.50 | 85.83 | 55.81 | 75.25 | 81.82 |
| JSSA | 88.75 | 86.67 | 88.33 | 80.68 | 81.94 | 81.12 | |
| Model | Selection | 32K | 64K | 128K |
|---|---|---|---|---|
| LLaMA-3.1-8B-Instruct | Per-KV-head | 86.35 | 82.55 | 75.38 |
| Head-shared soft vote | 86.03 | 80.82 | 70.09 | |
| -0.32 | -1.73 | -5.29 | ||
| Ministral-3-8B-Instruct-2512 | Per-KV-head | 90.72 | 89.02 | 85.97 |
| Head-shared soft vote | 90.67 | 87.24 | 84.98 | |
| -0.05 | -1.78 | -0.99 |
| Single-Document QA | Multi-Document QA | Summarization | Few-Shot Learning | Synthetic | Code | Avg. | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | NarrativeQA | Qasper | MultiFieldQA-en | HotpotQA | 2WikiMQA | Musique | GovReport | QMSum | MultiNews | TREC | TriviaQA | SAMSum | PassageCount | PassageRetrieval-en | LCC | RepoBench-P | |
| LLaMA-3.1-8B-Instruct | |||||||||||||||||
| FKV | 29.67 | 45.58 | 55.09 | 56.47 | 45.07 | 32.23 | 35.32 | 24.94 | 27.17 | 72.50 | 91.48 | 43.58 | 7.93 | 99.50 | 54.72 | 52.28 | 48.35 |
| SnapKV | 25.70 | 31.04 | 51.46 | 54.50 | 42.70 | 26.86 | 22.87 | 23.60 | 22.53 | 55.50 | 91.57 | 41.58 | 8.42 | 99.50 | 53.85 | 44.84 | 43.53 |
| QUEST | 29.21 | 43.63 | 54.39 | 54.89 | 44.48 | 28.53 | 32.66 | 24.51 | 26.41 | 72.00 | 91.67 | 42.21 | 8.04 | 98.00 | 54.00 | 46.40 | 46.94 |
| SqueezedAttn. | 29.32 | 45.20 | 55.31 | 55.43 | 46.02 | 30.45 | 35.41 | 24.30 | 27.14 | 72.50 | 91.75 | 42.03 | 8.65 | 99.00 | 54.64 | 50.12 | 47.95 |
| Method | Avg. | NIAH-S1 | NIAH-S2 | NIAH-S3 | NIAH-MK1 | NIAH-MK2 | NIAH-MK3 | NIAH-MV | NIAH-MQ | VT | CWE | FWE | QA1 | QA2 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| LLaMA-3.1-8B-Instruct | ||||||||||||||
| 32K Context | ||||||||||||||
| FKV | 87.95 | 100.00 | 100.00 | 100.00 | 100.00 | 96.00 | 100.00 | 99.00 | 100.00 | 95.20 | 45.20 | 92.00 | 72.00 | 44.00 |
| SnapKV | 65.05 | 100.00 | 100.00 | 4.00 | 100.00 | 88.00 | 0.00 | 85.00 | 92.00 | 90.40 | 3.60 | 62.67 | 76.00 | 44.00 |
| QUEST | 74.92 | 100.00 | 100.00 | 100.00 | 100.00 | 80.00 | 4.00 | 95.00 | 99.00 | 94.40 | 6.80 | 78.70 | 68.00 | 48.00 |
| SqueezedAttn. | 83.14 | 100.00 | 100.00 | 100.00 | 100.00 | 96.00 | 56.00 | 99.00 | 100.00 | 93.60 | 61.60 | 50.67 | 76.00 | 48.00 |
| AIME 2025 | MATH-500 | GPQA-Diamond | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | 512 | 1024 | 2048 | 512 | 1024 | 2048 | 512 | 1024 | 2048 |
| FKV | 69.58 | 94.53 | 57.95 | ||||||
| TriAttention | 5.83 | 20.00 | 37.50 | 73.80 | 86.20 | 93.20 | 31.82 | 40.40 | 50.13 |
| QUEST | 47.08 | 62.92 | 66.25 | 92.73 | 93.50 | 89.93 | 57.01 | 58.14 | 56.12 |
| SeerAttention-R | 26.67 | 42.08 | 55.00 | 85.70 | 91.80 | 94.03 | 54.67 | 55.93 | 58.52 |
| FASA | 30.83 | 60.42 | 67.50 | 87.93 | 93.58 | 94.60 | 56.06 | 57.45 | 59.97 |
| AIME 2025 | MATH-500 | GPQA-Diamond | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | 512 | 1024 | 2048 | 512 | 1024 | 2048 | 512 | 1024 | 2048 |
| FKV | 90.00 | 97.15 | 80.87 | ||||||
| TriAttention | 13.33 | 22.50 | 54.17 | 68.35 | 83.95 | 95.35 | 40.28 | 43.94 | 68.69 |
| QUEST | 28.75 | 50.42 | 70.42 | 88.20 | 93.65 | 96.33 | 63.07 | 71.40 | 77.84 |
| FASA | 57.92 | 73.75 | 84.17 | 95.25 | 97.08 | 97.13 | 78.91 | 80.56 | 80.87 |
| JSSA | 88.75 | 86.67 | 88.33 | 96.18 | 97.08 | 97.10 | 80.68 | 81.94 | 81.12 |
| AIME 2025 | MATH-500 | GPQA-Diamond | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | 512 | 1024 | 2048 | 512 | 1024 | 2048 | 512 | 1024 | 2048 |
| FKV | 90.42 | 96.80 | 75.44 | ||||||
| FASA | 37.08 | 65.00 | 81.25 | 91.08 | 95.65 | 96.80 | 55.30 | 69.38 | 73.61 |
| JSSA | 86.67 | 91.67 | 91.25 | 96.95 | 96.88 | 96.88 | 75.25 | 77.53 | 78.03 |
| Model | Benchmark | Method | 512 | 1024 | 2048 |
|---|---|---|---|---|---|
| Qwen3-8B | AIME 2025 | TriAttention | 2.07 | 1.75 | 1.54 |
| QUEST | 1.51 | 1.29 | 1.16 | ||
| SeerAttention-R | 1.76 | 1.54 | 1.30 | ||
| FASA | 1.71 | 1.30 | 1.10 | ||
| JSSA | 1.16 | 1.07 | 1.04 | ||
| MATH-500 | TriAttention | 2.59 | 1.70 | 1.22 |
LLM Inference Acceleration
LLM inference acceleration develops algorithms and systems that reduce language-model latency, memory use, and serving cost while preserving output quality.
See all 1,084 papers