Are Large Kernels Better Teachers than Transformers for ConvNets?

Tianjin Huang, Lu Yin, Zhenyu (Allen) Zhang, Lijuan Shen, Meng Fang +3 more
5/1/2023

No official code found. Best implementation: VITA-Group/SLaK (283 stars, MIT, PyTorch, last commit 2023-07-05).

Abstract

This paper reveals a new appeal of the recently emerged large-kernel Convolutional Neural Networks (ConvNets): as the teacher in Knowledge Distillation (KD) for small-kernel ConvNets. While Transformers have led state-of-the-art (SOTA) performance in various fields with ever-larger models and labeled data, small-kernel ConvNets are considered more suitable for resource-limited applications due to the efficient convolution operation and compact weight sharing. KD is widely used to boost the performance of small-kernel ConvNets. However, previous research shows that it is not quite effective to distill knowledge (e.g., global information) from Transformers to small-kernel ConvNets, presumably due to their disparate architectures. We hereby carry out a first-of-its-kind study unveiling that modern large-kernel ConvNets, a compelling competitor to Vision Transformers, are remarkably more effective teachers for small-kernel ConvNets, due to more similar architectures. Our findings are backed up by extensive experiments on both logit-level and feature-level KD ``out of the box", with no dedicated architectural nor training recipe modifications. Notably, we obtain the \textbf{best-ever pure ConvNet} under 30M parameters with \textbf{83.1\%} top-1 accuracy on ImageNet, outperforming current SOTA methods including ConvNeXt V2 and Swin V2. We also find that beneficial characteristics of large-kernel ConvNets, e.g., larger effective receptive fields, can be seamlessly transferred to students through this large-to-small kernel distillation. Code is available at: \url{https://github.com/VITA-Group/SLaK}.

View on arXivView PDF

Code Implementations(1)

VITA-Group/SLaKCommunity100%
PyTorchMIT

[ICLR 2023] "More ConvNets in the 2020s: Scaling up Kernels Beyond 51x51 using Sparsity"; [ICML 2023] "Are Large Kernels Better Teachers than Transformers for ConvNets?"

28324C, C++May 25, 20223 years agoMIT
51x51convnetdeep-learningdynamic-sparsityknowledge-distillation+4 more

Cite this paper

@article{huang2023large,
  title  = {Are Large Kernels Better Teachers than Transformers for ConvNets?},
  author = {Tianjin Huang and Lu Yin and Zhenyu (Allen) Zhang and Lijuan Shen and Meng Fang and Mykola Pechenizkiy and Zhangyang Wang and Shiwei Liu},
  year   = {2023},
  eprint = {2305.19412},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/pdf/2305.19412},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.19412.svg)](https://codeofpaper.com/paper/2305.19412)

Discussion