arXiv:2606.14757cs.CVcs.LG2026-06

用空间填充曲线给视觉Transformer加空间先验,小模型小数据下效果提升显著。

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

论文配图:Spatial Priors via Space Filling Curves for Small and Limited Data Vision Transformers
图 1 · 摘自论文原文
  • 用空间填充曲线生成注意力掩码,轻量注入空间结构信息。
  • 在小数据场景下最高提升8.7%准确率,像素级任务增7.2%。
  • 参数增加不足0.0015%,可与LoRA等方法无缝结合。

尽管视觉变压器(ViTs)已成为众多计算机视觉任务的主流骨干网络,但其注意力机制因排列等变性而缺乏显式空间归纳偏置。这一问题在模型容量小或训练数据有限时尤为突出。受线性变压器的注意力掩码策略和视觉状态空间模型扫描模式的启发,本文提出VIOLIN——一种轻量级掩码注意力机制,通过空间填充曲线(SFCs)在注意力中编码空间结构,额外参数少于0.0015%,计算开销可忽略。VIOLIN利用多条SFC扫描图像,构建曲线特异性衰减掩码,再与注意力矩阵结合。在广泛评估中,VIOLIN持续提升性能:在微调VTAB-1K等数据受限场景下,各类任务准确率均提升,空间敏感任务最高达8.7%;可与参数高效微调方法(如LoRA)结合进一步增益。此外,在ImageNet-1K预训练中,能提升多种小型ViT架构(如DeiT、DINO)表现;在依赖位置信息的像素级CIFAR-100训练中,准确率最高提升7.2%。总体而言,VIOLIN为向ViTs注入空间归纳偏置提供了一种高效且有效的方法,尤其适用于小模型和小数据场景。

原文摘要 · Abstract (English)

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.

视觉Transformer空间先验小样本学习轻量化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。