We present a neat yet effective recursive operation on vision transformers that can improve parameter utilization without involving additional parameters. This is achieved by sharing weights across depth of transformer networks. The proposed method can obtain a substantial gain (~2%) simply using na\"ive recursive operation, requires no special or sophisticated knowledge for designing principles of networks, and introduces minimum computational overhead to the training procedure. To reduce the additional computation caused by recursive operation while maintaining the superior accuracy, we propose an approximating method through multiple sliced group self-attentions across recursive layers which can reduce the cost consumption by 10~30% with minimal performance loss. We call our model Sliced Recursive Transformer (SReT), which is compatible with a broad range of other designs for efficient vision transformers. Our best model establishes significant improvement on ImageNet over state-of-the-art methods while containing fewer parameters. The proposed sliced recursive operation allows us to build a transformer with more than 100 or even 1000 layers effortlessly under a still small size (13~15M), to avoid difficulties in optimization when the model size is too large. The flexible scalability has shown great potential for scaling up and constructing extremely deep and large dimensionality vision transformers. Our code and models are available at https://github.com/szq0214/SReT.
翻译:我们在视觉变压器上展示了一个精巧而有效的循环操作,可以在不增加参数的情况下改善参数的利用。这是通过在变压器网络的深度之间分享重量来实现的。建议的方法可以简单地使用“na”的循环操作而获得大量收益(~2% ), 不需要特殊或尖端的知识来设计网络的原则, 并为培训程序引入最小的计算间接费用。 为了减少再循环操作引起的额外计算, 同时保持更高的准确性, 我们提议了一种近似方法, 通过多个切片组在循环层之间自我注意, 将成本消耗减少10~ 30 %, 并减少最低性能损失。 我们称之为模型的精精精精精精变压器(~ 2% ), 与高效的视觉变压器的广大其他设计相容。 我们的最佳模型在图像网络上大大改进了状态和艺术方法, 并且包含较少的参数。 拟议的再切变压操作让我们在小的面积( 13~15M) 下建立一个变压器, 避免在模型的深度上出现困难。