提出可学习注意力KArAt,让ViT更灵活捕捉特征交互。
Kolmogorov-Arnold Attention: Is Learnable Attention Better For Vision Transformers?
- 用可学习激活函数替代传统softmax,设计新型KArAt注意力机制。
- 在多个数据集上性能媲美甚至超越传统ViT,尤其在CIFAR和ImageNet表现佳。
- 首次证明注意力可被学习,适合探索新型模型架构的研究者参考。
Kolmogorov-Arnold网络(KANs)通过可学习激活函数实现对复杂数据关系的建模,现被用于替换深度网络中的MLP,包括视觉变换器(ViTs)。本文首次设计可学习注意力机制Kolmogorov-Arnold Attention(KArAt),支持傅里叶、小波、样条等多种基函数,可操作于任意基础。然而,可学习激活导致内存爆炸,为此提出基于低秩近似的模块化版本。采用傅里叶基的Fourier-KArAt在部分情况下优于传统softmax,或在CIFAR-10、CIFAR-100和ImageNet-1K上表现相当。该方法还应用于ConViT与Swin-Transformer,并在检测与分割任务中使用ViT-Det。通过损失曲面、权重分布、优化器路径、注意力可视化及迁移性分析发现,KArAt在所有ViTs中均产生更优注意力得分,提升特征交互与推理能力。但其泛化能力未随模型规模增加而提升。当前计算接口影响其性能表现。本研究目标并非追求高效,而是首次证明注意力可被学习,鼓励后续探索更先进架构中的应用。
原文摘要 · Abstract (English)
Kolmogorov-Arnold networks (KANs) are a remarkable innovation that consists of learnable activation functions, with the potential to capture more complex relationships from data. Presently, KANs are deployed by replacing multilayer perceptrons (MLPs) in deep networks, including advanced architectures such as vision Transformers (ViTs). This work asks whether KAN could learn token interactions. In this paper, we design the first learnable attention called Kolmogorov-Arnold Attention (KArAt) for ViTs that can operate on any basis, ranging from Fourier, Wavelets, Splines, to Rational Functions. However, learnable activations in the attention cause a memory explosion. To remedy this, we propose a modular version of KArAt that uses a low-rank approximation. By adopting the Fourier basis, Fourier-KArAt and its variants, in some cases, outperform their traditional softmax counterparts, or show comparable performance on CIFAR-10, CIFAR-100, and ImageNet-1K. We also deploy Fourier KArAt to ConViT and Swin-Transformer, and use it in detection and segmentation with ViT-Det. We dissect the performance of these architectures by analyzing their loss landscapes, weight distributions, optimizer paths, attention visualizations, and transferability to other datasets. KArAt's learnable activation yields a better attention score across all ViTs, indicating improved token-to-token interactions and contributing to enhanced inference. Still, its generalizability does not scale with larger ViTs. However, many factors, including the present computing interface, affect the relative performance of parameter- and memory-heavy KArAts. We note that the goal of this paper is not to produce efficient attention or challenge the traditional activations; by designing KArAt, we are the first to show that attention can be learned and encourage researchers to explore KArAt in conjunction with more advanced architectures.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。