一个模块,多种深度:具有深度编程专家的循环视觉Transformer
研究论文 · 2026/10/09
本文提出 reViT,通过循环应用单个 Transformer 块,在推理 FLOPs 相当的情况下,无需中间特征蒸馏即可达到全深度视觉编码器的精度。reViT 将每个循环深度处的 FFN 表示为小型共享专家库的凸组合,并通过连续归一化深度坐标进行编程,形成可重采样的 FFN 参数空间轨迹。在监督 ImageNet-1k 训练和 DINOv2 蒸馏两种设置下,受控实验表明权重空间合并是匹配单 FFN 预算下最强的 MoE 变体。从头训练的 reViT-B/16 以约少 70% 的存储参数达到 DeiT III 精度;8 专家蒸馏模型保留近乎全部 DINOv2 线性探测精度,并可迁移至分类、分割和深度预测。弹性深度训练允许单一检查点通过重采样归一化坐标区间在多个深度运行。固定深度部署时,循环块可物化为常规稠密图,移除在线路由与合并,计算量不变但存储增加。
该工作提出一种参数高效、可弹性深度的视觉 Transformer 设计,在显著减少存储参数的同时保持精度,并支持多深度部署与跨任务迁移,对高效模型架构研究具有参考价值。
In this work, we show that a single Transformer block, applied recurrently, can match the accuracy of a full-depth vision encoder at comparable inference FLOPs without intermediate feature distillation. reViT restores depth-specific transformations by representing the FFN at each recurrent depth as a convex combination of a small shared expert bank. A continuous normalized-depth coordinate programs this mixture, defining a resampleable trajectory through FFN parameter space. We evaluate this design in two regimes: supervised ImageNet-1k training and distillation from a DINOv2 teacher. Across both regimes, controlled adaptations identify weight-space merging as the strongest tested MoE family at a matching one-FFN budget, ahead of the token-dispatch and output-mixture alternatives. Trained from scratch, reViT-B/16 attains DeiT III accuracy with about 70\% fewer stored parameters. An 8-experts model distilled using only the teacher's output features retains nearly all of its DINOv2 teacher's linear-probe accuracy and transfers across classification, segmentation, and depth prediction. Elastic-depth training allows one checkpoint (trained model) to operate at multiple tested depths by resampling the same normalized coordinate interval. For fixed-depth deployment, the recurrent block can be materialized as a conventional dense graph, removing online routing and merging without changing the one-FFN-per-depth compute but expanding deployment storage.