arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.08236cs.LGcs.CV
收藏

超越二次注意力:用于ODE视觉Transformer的可分离高斯算子

Beyond Quadratic Attention: Separable Gaussian Operators for ODE Vision Transformers

Universitat Autònoma de Barcelona(巴塞罗那自治大学);Centre de Visió per Computador (CVC)(计算机视觉中心);Centre de Recerca Matemàtica (CRM)(数学研究中心)

Carlos Boned Riera, David Romero Sanchez, Oriol Ramos Terrades

AI总结:

该研究提出SSoG可分离高斯算子替代密集自注意力,降低计算成本,在多Transformer设置下提升图像分类准确率,且在高分辨率推理时吞吐量更高、内存占用更低。

摘要:

自注意力的计算成本随token数量呈二次增长,这限制了视觉Transformer在输入分辨率下的扩展能力。我们提出SSoG,一种可分离的高斯和空间算子,它用学习到的轴分解高斯核混合体替代密集自注意力,将每层的计算成本从O(N²)降至N的亚二次级。与点积自注意力不同,其Lipschitz常数在紧凑输入域外无界,而具有固定核的SSoG是全局Lipschitz连续的,通过Picard-Lindelöf定理,这保证了其连续深度变体在整个积分区间上存在唯一解,这是密集注意力对应模型通常缺乏的全局保证。在224×224的CIFAR-100数据集上,在匹配的离散Transformer设置和连续设置中,SSoG在保持深度和训练方案固定的情况下,在三种模型宽度上将Top-1准确率提升了2.2至4.1个百分点,同时减少了8.8%至16.6%的参数。在循环Transformer设置中,SSoG将Top-1准确率提升了5.4至8.1个百分点。我们进一步通过在匹配批次大小下评估高达1024×1024的输入来探究推理时的扩展情况:在连续深度(神经ODE)架构中,SSoG的吞吐量最高提升了154%,峰值内存降低了60%以上,且随着分辨率增长差距扩大,这与渐近成本的差异一致。在离散和循环设置中,SSoG在该分辨率下的吞吐量也比密集注意力高出30%以上。这些结果共同表明,SSoG是一种实用、参数高效且有理论支撑的替代方案,适用于离散、权重共享和连续深度Transformer变体中的密集注意力。

英文摘要:

Self-attention carries a quadratic cost in token count, which limits how far Vision Transformers can scale with input resolution. We introduce SSoG, a separable sum-of-Gaussians spatial operator that replaces dense self-attention with a learned mixture of axis-factorized Gaussian kernels, reducing the per-layer cost from $\mathcal{O}(N^2)$ to subquadratic in $N$. Unlike dot-product self-attention, whose Lipschitz constant is unbounded outside a compact input domain, SSoG with fixed kernels is globally Lipschitz continuous, which, via the Picard--Lindelöf theorem, guarantees that the continuous-depth variant has a unique solution on the whole integration interval, a global guarantee that dense-attention counterparts lack in general. On CIFAR-100 at $224\times224$, in a matched discrete-Transformer setting and in the continuous setting, SSoG improves Top-1 accuracy by 2.2--4.1 points across three model widths while using 8.8--16.6\% fewer parameters, with depth and training recipe held fixed. In a looped-Transformer setting, SSoG improves Top-1 accuracy by 5.4--8.1 points. We further probe inference-time scaling by evaluating on inputs up to $1024\times1024$ at matched batch size: in the continuous-depth (Neural ODE) architecture, SSoG reaches up to 154\% higher throughput and over 60\% lower peak memory than dense attention, with the gap widening as resolution grows, consistent with the difference in asymptotic cost. In the discrete and looped settings, SSoG also achieves over 30\% higher throughput than dense attention at this resolution. Together, these results establish SSoG as a practical, parameter-efficient, and theoretically grounded alternative to dense attention across discrete, weight-shared, and continuous-depth Transformer variants.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑