arXiv:2511.00833cs.CVcs.AI2025-11NeurIPS被引 8

用成对差异学习视觉对比,让ViT更高效准确

Linear Differential Vision Transformer: Learning Visual Contrasts via Pairwise Differentials

  • 通过空间池化提取对比特征,再分正负流做差分交互
  • 在ImageNet上提升准确率3.4个百分点,生成质量也显著改善
  • 模块轻量无额外计算,适配各类ViT架构

视觉变换器(ViT)已成为图像识别与生成的通用主干网络。然而其多头自注意力层对每对标记进行二次方查询-键交互,大量计算耗费在视觉弱或冗余的相关性上。本文提出视觉对比注意力(VCA),作为MHSA的即插即用替代方案,将理论复杂度从O(N²C)降至O(NnC),其中n << N。VCA首先将每头密集查询场压缩为少量空间池化的视觉对比标记,再将其分为可学习的正负流,通过差分交互突出区域间真正差异。该模块仅向DeiT-Tiny增加不到0.3M参数,不增加额外浮点运算量,且完全与架构无关。实验表明,VCA将DeiT-Tiny在ImageNet-1K上的准确率从72.2%提升至75.6%(+3.4),并使三款强模型最高提升3.1%;在类别条件图像生成中,于扩散(DiT)与流模型(SiT)上均使FID-50K降低2.1至5.2分。大量消融实验验证:(i) 空间池化提供低方差全局线索,(ii) 双位置嵌入对对比推理不可或缺,(iii) 两阶段联合使用产生最强协同效应。因此,VCA为构建更快更锐利的视觉变换器提供了简洁路径。源码见https://github.com/LeapLabTHU/LinearDiff。

原文摘要 · Abstract (English)

Vision Transformers (ViTs) have become a universal backbone for both image recognition and image generation. Yet their Multi-Head Self-Attention (MHSA) layer still performs a quadratic query-key interaction for every token pair, spending the bulk of computation on visually weak or redundant correlations. We introduce Visual-Contrast Attention (VCA), a drop-in replacement for MHSA that injects an explicit notion of discrimination while reducing the theoretical complexity from O(N N C) to O(N n C) with n << N. VCA first distils each head's dense query field into a handful of spatially pooled visual-contrast tokens, then splits them into a learnable positive and negative stream whose differential interaction highlights what truly separates one region from another. The module adds fewer than 0.3M parameters to a DeiT-Tiny backbone, requires no extra FLOPs, and is wholly architecture-agnostic. Empirically, VCA lifts DeiT-Tiny top-1 accuracy on ImageNet-1K from 72.2% to 75.6% (+3.4) and improves three strong hierarchical ViTs by up to 3.1%, while in class-conditional ImageNet generation it lowers FID-50K by 2.1 to 5.2 points across both diffusion (DiT) and flow (SiT) models. Extensive ablations confirm that (i) spatial pooling supplies low-variance global cues, (ii) dual positional embeddings are indispensable for contrastive reasoning, and (iii) combining the two in both stages yields the strongest synergy. VCA therefore offers a simple path towards faster and sharper Vision Transformers. The source code is available at https://github.com/LeapLabTHU/LinearDiff.

视觉对比ViT改进注意力机制图像生成

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