Learning Strides in Convolutional Neural Networks
Rachid Riad, Olivier Teboul, David Grangier, Neil Zeghidour
Abstract
Convolutional neural networks typically contain several downsampling operators, such as strided convolutions or pooling layers, that progressively reduce the resolution of intermediate representations. This provides some shift-invariance while reducing the computational complexity of the whole architecture. A critical hyperparameter of such layers is their stride: the integer factor of downsampling. As strides are not differentiable, finding the best configuration either requires cross-validation or discrete optimization (e.g. architecture search), which rapidly become prohibitive as the search space grows exponentially with the number of downsampling layers. Hence, exploring this search space by gradient descent would allow finding better configurations at a lower computational cost. This work introduces DiffStride, the first downsampling layer with learnable strides. Our layer learns the size of a cropping mask in the Fourier domain, that effectively performs resizing in a differentiable way. Experiments on audio and image classification show the generality and effectiveness of our solution: we use DiffStride as a drop-in replacement to standard downsampling layers and outperform them. In particular, we show that introducing our layer into a ResNet-18 architecture allows keeping consistent high performance on CIFAR10, CIFAR100 and ImageNet even when training starts from poor random stride configurations. Moreover, formulating strides as learnable variables allows us to introduce a regularization term that controls the computational complexity of the architecture. We show how this regularization allows trading off accuracy for efficiency on ImageNet.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext cb20a753-ae27-4797-9fd1-023aa213efd8Cited by top-tier papers10
- PointTAD: Multi-Label Temporal Action Detection with Learnable Query PointsJing Tan, Xiaotong Zhao, Xintian Shi, Bin Kang et al.NeurIPS 2022 · 41 citations
- Dilated convolution with learnable spacingsIsmail Khalfaoui Hassani, Thomas Pellegrini, Timothée MasquelierICLR 2023 · 18 citations
- Learning Temporal Resolution in Spectrogram for Audio ClassificationHaohe Liu, Xubo Liu, Qiuqiang Kong, Wenwu Wang et al.AAAI 2024 · 15 citations
- Pooling Revisited: Your Receptive Field is SuboptimalDong-Hwan Jang, Sanghyeok Chu, Joonhyuk Kim, Bohyung HanCVPR 2022 · 13 citations
- FouriDown: Factoring Down-Sampling into Shuffling and SuperposingQi Zhu, Man Zhou, Jie Huang, Naishan Zheng et al.NeurIPS 2023 · 12 citations
Builds on8
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Searching for MobileNetV3Andrew Howard, Ruoming Pang, Hartwig Adam, Quoc V. Le et al.ICCV 2019 · 9,163 citations
- Sharpness-aware Minimization for Efficiently Improving GeneralizationPierre Foret, Ariel Kleiner, Hossein Mobahi, Behnam NeyshaburICLR 2021 · 1,861 citations
- CoAtNet: Marrying Convolution and Attention for All Data SizesZihang Dai, Hanxiao Liu, Quoc V. Le, Mingxing TanNeurIPS 2021 · 1,747 citations
- Revisiting ResNets: Improved Training and Scaling StrategiesIrwan Bello, William Fedus, Xianzhi Du, Ekin Dogus Cubuk et al.NeurIPS 2021 · 378 citations
Related papers
- Learning in the Frequency DomainKai Xu, Minghai Qin, Fei Sun, Yuhao Wang et al.CVPR 2020
- Truly Scale-Equivariant Deep Nets with Fourier LayersMd Ashiqur Rahman, Raymond A. YehNeurIPS 2023 · 17 citations
- FlexConv: Continuous Kernel Convolutions With Differentiable Kernel SizesDavid W. Romero, Robert-Jan Bruintjes, Jakub Mikolaj Tomczak, Erik J. Bekkers et al.ICLR 2022 · 94 citations
- Efficient Architecture Search for Diverse TasksJunhong Shen, Mikhail Khodak, Ameet TalwalkarNeurIPS 2022 · 42 citations
- ShiftMorph: A Fast and Robust Convolutional Neural Network for 3D Deformable Medical Image RegistrationLijian Yang, Weisheng Li, Yucheng Shu, Jian-Xun Mi et al.ACM MM 2024 · 4 citations
