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

用于对比自监督学习的可裁剪网络

Slimmable Networks for Contrastive Self-supervised Learning

Zhejiang University(浙江大学);University of Technology Sydney(悉尼科技大学)

Shuai Zhao, Linchao Zhu, Xiaohan Wang, Yi Yang

AI总结:

提出单阶段对比自监督学习框架SlimCLR,通过慢启动训练、在线蒸馏和损失重加权解决共享权重子网络间的梯度干扰问题,引入可切换线性探针层,以更少参数和计算量实现优于以往的小型模型预训练性能。

摘要:

自监督学习在预训练大型模型方面取得了显著进展,但在小型模型上仍面临困难。该问题主流的解决方案主要依赖知识蒸馏,这涉及一个两阶段过程:首先训练一个大型教师模型,然后将其蒸馏以提升较小模型的泛化能力。在本工作中,我们提出了另一种单阶段解决方案,无需额外教师即可获得预训练的小型模型,即用于对比自监督学习的可裁剪网络(SlimCLR)。可裁剪网络由一个完整网络和多个共享权重的子网络组成,只需预训练一次即可获得包括低计算成本小型网络在内的多种网络。然而,在自监督场景下,共享权重网络之间的干扰会导致严重的性能下降,具体表现为梯度幅度不平衡和梯度方向发散。前者表明在反向传播期间,小部分参数产生主导梯度,而主要参数可能未被充分优化。后者表明梯度方向紊乱,优化过程不稳定。为解决这些问题,我们引入三种技术,使主要参数产生主导梯度并使子网络具有一致的输出。这些技术包括子网络的慢启动训练、在线蒸馏以及根据模型大小进行损失重加权。此外,我们给出了理论结果,证明在 linear evaluation 期间,单一可裁剪线性层是次优的。因此在 linear evaluation 中应用了可切换线性探针层。我们用典型的对比学习框架实例化 SlimCLR,并以更少的参数和 FLOPs 取得了优于以往方法的性能。代码位于 https://github.com/mzhaoshuai/SlimCLR。

英文摘要:

Self-supervised learning makes significant progress in pre-training large models, but struggles with small models. Mainstream solutions to this problem rely mainly on knowledge distillation, which involves a two-stage procedure: first training a large teacher model and then distilling it to improve the generalization ability of smaller ones. In this work, we introduce another one-stage solution to obtain pre-trained small models without the need for extra teachers, namely, slimmable networks for contrastive self-supervised learning (SlimCLR). A slimmable network consists of a full network and several weight-sharing sub-networks, which can be pre-trained once to obtain various networks, including small ones with low computation costs. However, interference between weight-sharing networks leads to severe performance degradation in self-supervised cases, as evidenced by gradient magnitude imbalance and gradient direction divergence. The former indicates that a small proportion of parameters produce dominant gradients during backpropagation, while the main parameters may not be fully optimized. The latter shows that the gradient direction is disordered, and the optimization process is unstable. To address these issues, we introduce three techniques to make the main parameters produce dominant gradients and sub-networks have consistent outputs. These techniques include slow start training of sub-networks, online distillation, and loss re-weighting according to model sizes. Furthermore, theoretical results are presented to demonstrate that a single slimmable linear layer is sub-optimal during linear evaluation. Thus a switchable linear probe layer is applied during linear evaluation. We instantiate SlimCLR with typical contrastive learning frameworks and achieve better performance than previous arts with fewer parameters and FLOPs. The code is at https://github.com/mzhaoshuai/SlimCLR.

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

↑