More ConvNets in the 2020s: Scaling up Kernels Beyond 51x51 using Sparsity
- Publication
- ICLR 2023Conference
- First submitted to arXiv
- arXiv:2207.03620
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{classiccnnsslak2022,
title = {{More ConvNets in the 2020s: Scaling up Kernels Beyond 51x51 using Sparsity}},
author = {Shiwei Liu and Tianlong Chen and Xiaohan Chen and Xuxi Chen and Qiao Xiao and Boqian Wu and Tommi Kärkkäinen and Mykola Pechenizkiy and Decebal Mocanu and Zhangyang Wang},
year = {2022},
eprint = {2207.03620},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2207.03620}
}
In the first half of 2022, convolutional networks put out two comeback papers in a row. ConvNeXt reworked ResNet step by step following Swin Transformer's design, enlarging the kernel from 3×3 to 7×7. Two months later, RepLKNet went bolder and used 31×31 outright, with reparameterized small kernels helping it train.
RepLKNet stopped at 31×31. This paper wants to know whether kernels can get bigger still, and whether accuracy keeps climbing at 51×51 and 61×61. The authors come from UT Austin, Eindhoven University of Technology, and other universities. Decebal Mocanu and first author Shiwei Liu have worked on dynamic sparse training for years, and several of the sparse methods the paper cites are their own earlier work. This time, too, they come at the problem through sparsity.
Defining the Problem
Beyond 31
The authors first scale up ConvNeXt-T's kernels with the two existing approaches, training each setting for only 120 epochs to get a first look at the trend:
| Largest kernel | Naive enlargement | With RepLKNet's approach |
|---|---|---|
| 7×7 (original ConvNeXt) | 81.0% | — |
| 31×31 | 80.5% | 81.5% |
| 51×51 | 80.4% | 81.3% |
| 61×61 | 80.3% | 81.3% |
In the naive-enlargement column, bigger kernels do worse. RepLKNet's approach rescues 31×31, 0.5 percentage points above the original, but beyond that it stops moving. On top of that, the 51×51 version needs 9.3 GFLOPs, twice the original ConvNeXt-T, and 61×61 goes up to 11.5 GFLOPs.
The authors' explanation has to do with locality. ConvNeXt's stem is a 4×4 convolution with stride 4, so a 224×224 input comes out as just 56×56; a 51×51 kernel on a feature map like that is almost a global convolution. The ViT side has seen something similar, where local-window attention like Swin's usually beats ViT's global attention. Once a kernel is big enough to cover the whole image, it loses the inductive bias of looking only at what's nearby.
So two things need solving. First, the kernel has to be very large while still keeping locality. Second, compute and parameter count grow with the square of the kernel's side length, and that cost has to come down.
Solving the Problem
The authors' recipe comes in two steps.
Step 1: Split It into Two Strips
An M×M kernel is replaced with two parallel strip convolutions, one M×N and one N×M, with N set to 5. The long side looks far away, and the short side keeps the local detail. RepLKNet's parallel 5×5 small kernel stays too, and each of the three branches gets its own BatchNorm before they're summed. The authors stress that putting BatchNorm on every branch before the sum is a crucial step.

These are all depthwise convolutions, with one kernel per channel.
When the kernel is small, splitting it actually costs more; 7×7 split up comes to nearly twice the original. At 51×51, the split leaves only a fifth. The square's cost grows with M², while the strips grow only with M, so the bigger the kernel, the wider the gap.
After the split into a cross, what one convolution layer sees is in fact a cross, with the four corners empty. A network has many layers, and stacking them fills the corners in. With a small 9×3 cross, one layer sees only 45 of the 81 cells in the 9×9 area; two layers cover all of them.
After the split, again training ConvNeXt-T for 120 epochs, largest kernels of 7, 31, 51, and 61 reach 81.0%, 81.3%, 81.5%, and 81.4%, while FLOPs grow only from 4.5G to 5.6G. For the first time, 51×51 beats 31×31, and its 5.4 GFLOPs cost over 40% less than the 9.3G of RepLKNet's approach.
Step 2: A Little Sparser, a Little Wider
ResNeXt proposed “split into more groups and make the network wider,” and ConvNeXt pushed that to the extreme with depthwise convolution plus wider channels. This paper turns the same line into a sparse version, which the authors write as “use sparse groups, expand more width.”
Concretely, 40% of the convolution weights are set to 0. The per-layer sparsity ratios are borrowed from SNIP. Across the whole network, the most important weights are picked by , the magnitude of gradient times weight, and however many each layer keeps becomes that layer's ratio; which positions within each layer are 0 is decided at random at the start. Training uses dynamic sparsity. Every so often, the smallest-magnitude weights are pruned and the same number of weights are regrown at random positions. The total number of nonzero weights stays fixed while their positions keep shifting.
The compute saved is then spent on widening every stage's channels by 1.3×:
| Largest kernel | Split into strips | + 40% sparsity | + 1.3× width |
|---|---|---|---|
| 7×7 | 81.0% (4.5G) | 80.0% (2.6G) | 81.1% (4.5G) |
| 31×31 | 81.3% (5.0G) | 80.4% (2.9G) | 81.5% (4.8G) |
| 51×51 | 81.5% (5.4G) | 80.5% (3.1G) | 81.6% (5.0G) |
| 61×61 | 81.4% (5.6G) | 80.4% (3.2G) | 81.5% (5.2G) |
Sparsifying costs about 1 percentage point of accuracy and cuts about 2G of FLOPs; with the width added back, accuracy returns to the top. The 81.5% in the 61×61 row uses 55% fewer FLOPs than the 81.3% of RepLKNet's approach at 61×61.
Look at the 7×7 row. Applied to a small kernel, the whole recipe goes from 81.0% to 81.1%, barely a change. In other words, the accuracy comes from the large kernel, and the strips and sparsity just make the large kernel trainable and affordable.
The title promises going beyond 51×51, and 61×61 was indeed tried, but it doesn't beat 51×51 in any column, so the final SLaK sticks with 51.
What SLaK Looks Like
SLaK reuses ConvNeXt's skeleton directly. The stem is a 4×4 convolution with stride 4, and the block counts of the four stages are [3, 3, 9, 3] for SLaK-T and [3, 3, 27, 3] for SLaK-S and SLaK-B. The four stages' kernels are [51, 49, 47, 13] in order, each split into M×5 and 5×M plus 5×5. The whole network is 40% sparse with width multiplied by 1.3, and every model size uses this same setting; the authors didn't tune hyperparameters separately for each model.
Discussion
ImageNet
With the full 300-epoch training, compared against other models:
| Model | Parameters | FLOPs | Top-1 |
|---|---|---|---|
| Swin-T | 28M | 4.5G | 81.3% |
| ConvNeXt-T | 29M | 4.5G | 82.1% |
| SLaK-T | 30M (50M) | 5.0G (8.7G) | 82.5% |
| ConvNeXt-S | 50M | 8.7G | 83.1% |
| SLaK-S | 55M (91M) | 9.8G (16.7G) | 83.8% |
| RepLKNet-31B | 79M | 15.3G | 83.5% |
| ConvNeXt-B | 89M | 15.4G | 83.8% |
| SLaK-B | 95M (158M) | 17.1G (28.5G) | 84.0% |
At every size SLaK beats ConvNeXt, by 0.2 to 0.7 percentage points. With 384×384 input, SLaK-B reaches 85.5% and ConvNeXt-B 85.1%, twice the gap at 224. The authors believe large kernels have more room to shine at higher resolutions.
Look at the numbers in parentheses, though. Without sparse acceleration, SLaK-T has 50M parameters and 8.7 GFLOPs, exactly the size of ConvNeXt-S, and ConvNeXt-S reaches 83.1%, higher than SLaK-T. SLaK-S's 91M and 16.7G are also about the same as ConvNeXt-B, and both sit at 83.8%. Compared at the unaccelerated cost, SLaK's advantage disappears.
Downstream Tasks
Downstream is where large kernels really pay off. All three tasks compare the T size:
| Task | ConvNeXt-T (7×7) | ConvNeXt-T (31×31, RepLKNet's approach) | SLaK-T (51×51) |
|---|---|---|---|
| ADE20K semantic segmentation mIoU | 44.6 | 45.0 | 46.2 |
| PASCAL VOC 2007 detection mAP | 80.6 | 81.3 | 82.7 |
| COCO detection APbox | 47.3 | 47.8 | 48.4 |
The bigger the kernel, the better on all three tasks. On ADE20K, SLaK-T is 1.6 above ConvNeXt-T, a far bigger gap than on ImageNet, and it even passes ConvNeXt-S's 45.9. RepLKNet observed the same phenomenon, where models with similar classification scores can differ a lot on downstream tasks that need to see a wide area.
With full training, ADE20K results for the T, S, and B sizes improve from 46.0, 48.7, and 49.1 to 47.6, 49.4, and 50.2; with 36 epochs of COCO fine-tuning, APbox goes from 50.4 to 51.3.
The authors also measured the effective receptive field. They take 50 images from the validation set, resize them to 1024×1024, and compute how much each input pixel contributes to the center point of the last layer's output. ConvNeXt's high-contribution pixels cluster right in the middle. The 31×31 version spreads out more but still doesn't cover the whole image. SLaK spreads the widest, with high-contribution points showing up even far from the center.
Running It for Real
FLOPs are theoretical, so in Appendix H the authors add measurements on an A100. In FP32 without any sparse acceleration, the number of images processed per second is 1,779 for ConvNeXt-T, 1,305 for Swin-T, and 709 for SLaK-T. SLaK-T's throughput is only 40% of ConvNeXt-T's; the authors say the gap is acceptable given that the network is 1.3× wider and the kernels are more than 7× larger.
Next, they break the recipe down step by step and measure throughput with ConvNeXt-B and [51, 49, 47, 13] kernels:
| Approach | Images per second |
|---|---|
| Plain 51×51 square kernels | 96 |
| Split into strips | 283 |
| + 40% sparsity | 282 |
| + 1.3× width | 198 |
Splitting into strips really is fast, nearly 3×. The sparsity step goes from 283 to 282, no faster at all, because the sparsity is implemented with binary masks and the GPU multiplies all those zeros anyway. The cost of widening, on the other hand, is very real, and throughput drops by 30%.
In the limitations section, the authors say candidly that the inference FLOPs in the paper are all theoretical and will only pay off once hardware supports unstructured sparsity. In other words, the FLOPs in black in the paper's main table are written for the GPUs of the future to read.
Conclusion
Splitting one big square into two strips is the most practical trick in this paper. Locality is preserved, the cost grows only linearly with the side length, 51×51 finally beats 31×31, and downstream tasks improve even more. Splitting into strips also works on any hardware, so you can try it in your own network right away.
The sparse half is a letdown. On ordinary GPUs, the 40% zeros still get multiplied, while the 1.3× widening costs you for real, and SLaK-T's throughput is only 40% of ConvNeXt-T's.
So with this Pro Max, take the strip half home for now; the sparse half can wait until GPUs support it someday.