arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2606.14757cs.CVcs.LG
收藏

基于空间填充曲线的小型与有限数据视觉Transformer的空间先验

Spatial Priors via Space Filling Curves for Small and Limited Data Vision Transformers

ETH Zürich(苏黎世联邦理工学院)

Leyla Naz Candogan, Arshia Afzal, Pol Puigdemont, Volkan Cevher

AI总结:

提出VIOLIN,一种轻量级掩码注意力机制,通过空间填充曲线编码空间结构,以极小的参数和计算开销为视觉Transformer注入空间归纳偏置,在小模型和有限数据场景下显著提升性能。

摘要:

尽管视觉Transformer(ViT)已成为许多计算机视觉任务中的主导骨干网络,但由于置换等变性,其注意力机制缺乏显式的空间归纳偏置。这在模型容量小或训练数据有限的情况下尤为重要。受线性Transformer中的注意力掩码策略和视觉状态空间模型(SSM)的扫描模式的启发,我们引入了VIOLIN,一种轻量级掩码注意力机制,通过空间填充曲线(SFC)在注意力中编码空间结构,仅增加不到0.0015%的额外参数和可忽略的计算开销。VIOLIN使用多条SFC扫描图像,构建曲线特定的衰减掩码,然后将其组合并与注意力矩阵相乘。在广泛的评估中,VIOLIN持续提升性能。在有限数据场景下,例如在VTAB-1K上进行微调时,它提升了所有任务组的准确率,在空间信息至关重要的任务上提升高达8.7%。它可以与参数高效微调方法(如LoRA)结合,进一步提高性能。除了微调,VIOLIN在ImageNet-1K上预训练期间改进了各种小型ViT架构(如DeiT、DINO)。此外,在高度依赖位置信息的像素级CIFAR-100训练中,VIOLIN将准确率提升了高达7.2%。总体而言,VIOLIN提供了一种计算高效且有效的方式,将空间归纳偏置注入ViT,特别有利于小模型和有限数据场景。

英文摘要:

Though Vision Transformers (ViTs) have become the dominant backbone in many computer vision tasks, due to permutation equivariance, their attention mechanism lacks explicit spatial inductive biases. This become particularly important in two settings: when model capacity is small or training data is limited. Inspired by the attention masking strategies in Linear Transformers and the scanning patterns of Vision SSMs, we introduce VIOLIN, a lightweight masked attention mechanism that encodes spatial structure within attention via Space Filling Curves (SFCs) with less than 0.0015% extra parameters and negligible computational overhead. VIOLIN scans the image using multiple SFCs to construct curve-specific decay masks, which are then combined and multiplied with the attention matrix. Across a wide range of evaluations, VIOLIN consistently improves performance. In limited data regimes such as fine-tuning on VTAB-1K, it boosts accuracy across all task groups and by up to 8.7% on the tasks where spatial information is essential. It can be combined with parameter-efficient fine-tuning methods such as LoRA to further increase the performance. Beyond fine-tuning, VIOLIN improves various small scale ViT architectures (e.g., DeiT, DINO) during pretraining on ImageNet-1K. Additionally, on pixel-level CIFAR-100 training, a task that is highly dependent on location information, VIOLIN increases accuracy by up to 7.2%. Overall, VIOLIN provides a computationally efficient yet effective way to inject spatial inductive bias into ViTs, especially benefiting small models and limited data settings.

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

↑