用少量核心向量实现线性计算,让视觉Transformer更高效扩展。
Elastic Attention Cores for Scalable Vision Transformers

- 设计核心-外围注意力结构,仅通过少量可学习核心向量传递信息。
- 计算复杂度从二次方降为线性,支持高分辨率图像处理。
- 支持推理时灵活调节计算量与精度,适合资源受限场景。
视觉Transformer(ViT)通过全连接自注意力实现强数据驱动扩展,但其计算成本随图像分辨率呈平方级增长,限制了在高分辨率任务中的应用。本文挑战了‘像素块间需直接交互’的假设,证明无需显式块-块交互即可学习丰富视觉语义表征。提出VECA(视觉弹性核心注意力)架构,采用由少量可学习核心向量驱动的线性时间核心-外围注意力机制。在该结构中,所有图像块仅与固定数量 $C$ 的核心嵌入直接交互,实现 $O(N)$ 的线性复杂度($N$ 为图像块数)。核心向量从零初始化并跨层传播,保留全部 $N$ 个输入块信息,避免小 $C$ 值导致的瓶颈问题。结合沿核心轴的嵌套训练,模型可在推理时弹性权衡计算量与精度。在分类与密集预测任务中,VECA性能媲美最新视觉基础模型,同时显著降低计算开销。结果表明,弹性核心-外围注意力是视觉Transformer的可扩展替代组件。
原文摘要 · Abstract (English)
Vision Transformers (ViTs) achieve strong data-driven scaling by leveraging all-to-all self-attention. However, this flexibility incurs a computational cost that scales quadratically with image resolution, limiting ViTs in high-resolution domains. Underlying this approach is the assumption that pairwise token interactions are necessary for learning rich visual-semantic representations. In this work, we challenge this assumption, demonstrating that effective visual representations can be learned without any direct patch-to-patch interaction. We propose VECA (Visual Elastic Core Attention), a vision transformer architecture that uses efficient linear-time core-periphery structured attention enabled by a small set of learned cores. In VECA, these cores act as a communication interface: patch tokens exchange information exclusively through the core tokens, which are initialized from scratch and propagated across layers. Because the $N$ image patches only directly interact with a resolution invariant set of $C$ learned "core" embeddings, this yields linear complexity $O(N)$ for predetermined $C$, which bypasses quadratic scaling. Compared to prior cross-attention architectures, VECA maintains and iteratively updates the full set of $N$ input tokens, avoiding a small $C$-way bottleneck. Combined with nested training along the core axis, our model can elastically trade off compute and accuracy during inference. Across classification and dense tasks, VECA achieves performance competitive with the latest vision foundation models while reducing computational cost. Our results establish elastic core-periphery attention as a scalable alternative building block for Vision Transformers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。