Quantum Doubly Stochastic Transformers
Jannis Born, Filip Skogh, Kahn Rhrissorrakrai, Filippo Utro, Nico Wagner, Aleksandros Sobczyk
摘要
At the core of the Transformer, the softmax normalizes the attention matrix to be right stochastic. Previous research has shown that this often de-stabilizes training and that enforcing the attention matrix to be doubly stochastic (through Sinkhorn's algorithm) consistently improves performance across different tasks, domains and Transformer flavors. However, Sinkhorn's algorithm is iterative, approximative, non-parametric and thus inflexible w.r.t. the obtained doubly stochastic matrix (DSM). Recently, it has been proven that DSMs can be obtained with a parametric quantum circuit, yielding a novel quantum inductive bias for DSMs with no known classical analogue. Motivated by this, we demonstrate the feasibility of a hybrid classical-quantum doubly stochastic Transformer (QDSFormer) that replaces the softmax in the self-attention layer with a variational quantum circuit. We study the expressive power of the circuit and find that it yields more diverse DSMs that better preserve information than classical operators. Across multiple small-scale object recognition tasks, we find that our QDSFormer consistently surpasses both a standard ViT and other doubly stochastic Transformers. Beyond the Sinkformer, this comparison includes a novel quantum-inspired doubly stochastic Transformer (based on QR decomposition) that can be of independent interest. Our QDSFormer also shows improved training stability and lower performance variation suggesting that it may mitigate the notoriously unstable training of ViTs on small-scale data.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Attention is not all you need: pure attention loses rank doubly exponentially with depth 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- The emergence of clusters in self-attention dynamics 引用了 Attention is not all you need: pure attention loses rank doubly exponentially with depth
- Segment Anything 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapse 引用了 Attention is not all you need: pure attention loses rank doubly exponentially with depth
- Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapse 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
它引用的 Paper14
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Segment AnythingAlexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao 等ICCV 2023 · 13,211 次引用
- Attention is not all you need: pure attention loses rank doubly exponentially with depthYihe Dong, Jean-Baptiste Cordonnier, Andreas LoukasICML 2021 · 522 次引用
- The emergence of clusters in self-attention dynamicsBorjan Geshkovski, Cyril Letrouit, Yury Polyanskiy, Philippe RigolletNeurIPS 2023 · 163 次引用
- Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank CollapseLorenzo Noci, Sotiris Anagnostidis, Luca Biggio, Antonio Orvieto 等NeurIPS 2022 · 161 次引用
相关 Paper
- Alternating Layered Variational Quantum Circuits Can Be Classically Optimized Efficiently Using Classical ShadowsAfrad Basheer, Yuan Feng, Christopher Ferrie, Sanjiang LiAAAI 2023 · 13 次引用
- BiViT: Extremely Compressed Binary Vision TransformersYefei He, Zhenyu Lou, Luoming Zhang, Jing Liu 等ICCV 2023 · 44 次引用
- Bridging the Gap Between Vision Transformers and Convolutional Neural Networks on Small DatasetsZhiying Lu, Hongtao Xie, Chuanbin Liu, Yongdong ZhangNeurIPS 2022 · 107 次引用
- QuantumDARTS: Differentiable Quantum Architecture Search for Variational Quantum AlgorithmsWenjie Wu, Ge Yan, Xudong Lu, Kaisen Pan 等ICML 2023 · 42 次引用
- Spatial Priors via Space Filling Curves for Small and Limited Data Vision TransformersLeyla Candogan, Arshia Afzal, Pol Puigdemont, Volkan CevherICML 2026
