Lune

ICLR2026顶会

Sublinear Time Quantum Algorithm for Attention Approximation

Zhao Song, Jianfei Xue, Jiahao Zhang, Lichen Zhang

摘要

Given the query, key and value matrices Q,K,V∈Rn×dQ, K, V\in \mathbb{R}^{n\times d}, the attention module is defined as Att(Q,K,V)=D−1AV\mathrm{Att}(Q, K, V)=D^{-1}AV where A=exp⁡(QK⊤/d)A=\exp(QK^\top/\sqrt{d}) with exp⁡(⋅)\exp(\cdot) applied entrywise, D=diag(A1n)D=\mathrm{diag}(A{\bf 1}_n). The attention module is the backbone of modern transformers and large language models, but explicitly forming the softmax matrix D−1AD^{-1}A incurs Ω(n2)\Omega(n^2) time, motivating numerous approximation schemes that reduce runtime to O~(nd)\widetilde O(nd) via sparsity or low-rank factorization. We propose a quantum data structure that approximates any row of Att(Q,K,V)\mathrm{Att}(Q, K, V) using only row queries to Q,K,VQ, K, V. Our algorithm preprocesses these matrices in O~(ϵ−1n0.5(sλ2.5+sλ1.5d+α0.5d))\widetilde{O}\left( \epsilon^{-1} n^{0.5} \left( s_\lambda^{2.5} + s_\lambda^{1.5} d + \alpha^{0.5} d \right) \right) time, where ϵ\epsilon is the target accuracy, sλs_\lambda is the λ\lambda-statistical dimension of the exponential kernel defined by QQ and KK, and α\alpha measures the row distortion of VV that is at most d/srank(V)d/{\rm srank}(V), the stable rank of VV. Each row query can be answered in O~(sλ2+sλd)\widetilde{O}(s_\lambda^2 + s_\lambda d) time. To our knowledge, this is the first quantum data structure that approximates rows of the attention matrix in sublinear time with respect to nn. Our approach relies on a quantum Nyström approximation of the exponential kernel, quantum multivariate mean estimation for computing DD, and quantum leverage score sampling for the multiplication with VV.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Big Bird: Transformers for Longer Sequences 引用了 Reformer: The Efficient Transformer
  • Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting 引用了 Reformer: The Efficient Transformer
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. ETS: Energy-Guided Test-Time Scaling for Training-Free RL AlignmentXiuyu Li, Jinkai Zhang, Mingyang Yi, Yu Li 等ICML 2026 · 4 次引用

它引用的 Paper35

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  3. Informer: Beyond Efficient Transformer for Long Sequence Time-Series ForecastingHaoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang 等AAAI 2021 · 7,289 次引用
  4. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie 等NeurIPS 2020 · 3,159 次引用
  5. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用

相关 Paper

  1. Conv-Basis: A New Paradigm for Efficient Attention Inference and Gradient Computation in TransformersYingyu Liang, Heshan Liu, Zhenmei Shi, Zhao Song 等EMNLP Findings 2025
  2. Fast Attention Requires Bounded EntriesJosh Alman, Zhao SongNeurIPS 2023 · 115 次引用
  3. MonarchAttention: Zero-Shot Conversion to Fast, Hardware-Aware Structured AttentionCan Yaras, Alec S. Xu, Pierre Abillama, Changwoo Lee 等NeurIPS 2025 · 5 次引用
  4. LevAttention: Time, Space and Streaming Efficient Algorithm for Heavy AttentionsRavindran Kannan, Chiranjib Bhattacharyya, Praneeth Kacham, David P. WoodruffICLR 2025
  5. Algorithm and Hardness for Dynamic Attention Maintenance in Large Language ModelsJan van den Brand, Zhao Song, Tianyi ZhouICML 2024 · 35 次引用
黄昏的海面,两侧是细线勾勒的悬崖