Run, Don't Walk: Chasing Higher FLOPS for Faster Neural Networks
- Publication
- CVPR 2023Conference
- First submitted to arXiv
- arXiv:2303.03667
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{lightweightfasternet2023,
title = {{Run, Don't Walk: Chasing Higher FLOPS for Faster Neural Networks}},
author = {Jierun Chen and Shiu-hong Kao and Hao He and Weipeng Zhuo and Song Wen and Chul-Ho Lee and S.-H. Gary Chan},
year = {2023},
eprint = {2303.03667},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2303.03667}
}
The number people designing lightweight networks look at most is FLOPs. From MobileNet to ShuffleNet to GhostNet, everyone did all they could to push the count of floating-point operations down, and the most common tools were depthwise convolution and grouped convolution.
But with fewer FLOPs, does a network necessarily run faster? Jierun Chen and colleagues at the Hong Kong University of Science and Technology measured a whole range of networks and found the answer is often no. CycleMLP-B1, for example, has only half the FLOPs of ResNet-50, yet it's slower on a CPU, 116.1 ms versus 73.0 ms. The paper's title, “Run, Don't Walk,” means that rather than saving steps, you're better off running faster.
Defining the Problem
Latency Is FLOPs Divided by FLOPS
These two words differ only in the case of one letter. FLOPs is the number of floating-point operations, while FLOPS is how many floating-point operations can be done per second, that is, the speed the hardware actually delivers. Latency is one divided by the other:
If you only push FLOPs down and FLOPS falls even further, latency actually gets longer. The authors measured a batch of common networks on an Intel CPU:

The vertical axis of the left chart is how many operations are actually done per second. Many networks touted as fast have lower FLOPS than ResNet-50, leaving the hardware's compute unused.
ShuffleNet V2 already raised this in 2018, likewise pointing out that FLOPs and speed don't line up. Later lightweight networks kept using depthwise convolution anyway, because no better replacement had come along.
Why Depthwise Convolution Is Slow
Take an input feature map of and a 3×3 kernel with side length . Ordinary convolution has FLOPs. Depthwise convolution uses only each channel's own kernel, bringing FLOPs down to , times fewer.
The problem is that depthwise convolution only computes along the spatial dimensions, and used on its own it loses a lot of accuracy, so in practice the channel count always gets expanded; MobileNet-V2's inverted residual block expands it 6×. Once the channels go from to , the memory access is
one read of the input and one write of the output, nearly all of it spent moving feature maps around. Ordinary convolution's memory access is about , which is actually less.
With little computation, lots of data movement, and only a few operations for every number moved, the hardware spends its time waiting on memory.
Solving the Problem
Partial Convolution (PConv)
The authors observe that the different channels of a feature map are often very similar. They plotted the feature maps of an intermediate layer of a pretrained ResNet-50, and many channels looked very much alike. With that much repetition, the spatial convolution doesn't have to be done on every channel.

Partial Convolution (PConv) applies an ordinary 3×3 convolution only to the first channels and copies the remaining channels straight to the output. Taking a contiguous stretch at the front keeps memory access contiguous. By default , and the FLOPs are
only 1/16 of ordinary convolution; the memory access is about , 1/4 of ordinary convolution.
Fewer FLOPs do not automatically mean more speed. For a 192×28×28 input, an ordinary 3×3 convolution does 411 multiply-adds for every number it accesses, making the fullest use of the hardware; depthwise convolution does only 4.5 and spends most of its time waiting on memory; PConv convolves only a quarter of the channels and still does 169 multiply-adds per number accessed. In practice, depthwise convolution is usually preceded by widening the channels several times over, sixfold in MobileNet-V2, which adds memory access and pushes latency up.
The paper measured this on a 2080Ti, an i9-9900X and a Cortex-A72. Averaged over four feature-map sizes, PConv has 1/16 the FLOPs of ordinary convolution, and 10.5 times (GPU), 6.2 times (CPU) and 22.8 times (ARM) the FLOPS of depthwise convolution.
Followed by a 1×1 Convolution
PConv looks at only a quarter of the channels, so the rest of the information has to come from the 1×1 convolution that follows. Together, their receptive field looks like a T. The center position sees all the channels, while the eight surrounding positions see only channels.
The authors used a pretrained ResNet-18 to check whether this shape makes sense. For each 3×3 kernel, they computed the weight magnitude at each of the nine positions and noted which one was largest. In all four stages, the position that was most often the largest was the center. The center matters more than its surroundings to begin with, so spending a bit more computation on it is reasonable.
Then why not just use a T-shaped convolution? Because splitting it is cheaper. A T-shaped convolution has FLOPs, while PConv plus a 1×1 convolution has . With , the former is and the latter only .
The authors also checked whether this combination can stand in for ordinary convolution. They took the inputs and outputs of the first 3×3 convolution in each stage of a pretrained ResNet-50 and trained small networks to imitate it. Averaged over the four stages, the test loss is 0.0148 for depthwise convolution plus 1×1, 0.0133 for grouped convolution plus 1×1, and 0.0123 for PConv plus 1×1, which comes closest to the original ordinary convolution.
FasterNet

FasterNet's skeleton is very plain. The stem is a 4×4 convolution with stride 4, and between stages a 2×2 convolution with stride 2 does the downsampling. Each block is a PConv followed by two 1×1 convolutions that expand the channels 2× in between, with a residual added at the end.
The block has two more details. First, normalization and activation come only after the middle layer, so the whole block has just one set; the authors believe that too many would reduce feature diversity and also slow things down. Second, the normalization is BatchNorm, which can be merged into the adjacent convolution at inference.
The last two stages have less memory access and higher FLOPS, so the authors put more of the blocks and computation toward the back; T0's four stages, for example, have 1, 2, 8, and 2 blocks. From small to large, the family is T0, T1, T2, S, M, and L, with GELU for the small models and ReLU for the large ones.
Discussion
ImageNet
The authors measured speed on three devices. The GPU is a 2080Ti, measuring throughput at batch size 32; the CPU is an i9-9900X and the ARM chip a Cortex-A72, both single-threaded and measuring latency at batch size 1. Here are a few groups of models with similar accuracy:
| Model | FLOPs | GPU (images/s) | CPU (ms) | ARM (ms) | Top-1 |
|---|---|---|---|---|---|
| MobileViT-XXS | 0.42G | 2,393 | 30.8 | 348 | 69.0% |
| MobileNetV2 | 0.31G | 4,198 | 12.2 | 442 | 72.0% |
| ShuffleNetV2 ×1.5 | 0.30G | 4,878 | 12.1 | 266 | 72.6% |
| FasterNet-T0 | 0.34G | 6,807 | 9.2 | 143 | 71.9% |
| ResNet-50 | 4.11G | 959 | 73.0 | 1,131 | 78.8% |
| FasterNet-T2 | 1.91G | 1,991 | 33.5 | 497 | 78.9% |
| Swin-T | 4.51G | 609 | 122.2 | 1,424 | 81.3% |
| ConvNeXt-T | 4.47G | 657 | 86.3 | 1,889 | 82.1% |
| FasterNet-S | 4.56G | 1,029 | 71.2 | 1,103 | 81.3% |
| Swin-B | 15.47G | 237 | 349.2 | OOM | 83.5% |
| ConvNeXt-B | 15.38G | 253 | 257.1 | OOM | 83.8% |
| FasterNet-L | 15.52G | 323 | 219.5 | OOM | 83.5% |
In every group, FasterNet is the fastest on all three devices. The most striking is the last group. FasterNet-L, ConvNeXt-B, and Swin-B have nearly the same FLOPs, all around 15.4G to 15.5G, yet FasterNet-L's GPU throughput is 28% to 36% higher and its CPU time 15% to 37% lower. Same FLOPs, different speeds, and that's exactly what the whole paper sets out to show.
The accuracy needs a closer look. The abstract says T0 is 2.9 percentage points more accurate than MobileViT-XXS, which is true, but MobileNetV2 and ShuffleNetV2 in the same group are both more accurate than T0. FasterNet-S ties Swin-T at 81.3%, 0.8 below ConvNeXt-T. The paper calls FasterNet-L “comparable” to ConvNeXt-B, but it's actually 0.3 lower. What FasterNet buys is speed, with accuracy roughly level and sometimes a little behind.
Detection and Segmentation
On COCO with Mask R-CNN trained for 12 epochs, FasterNet-S reaches 39.9 box AP against ResNet-50's 38.0, with nearly identical GPU latency (54.3 ms versus 54.9 ms). FasterNet-L gets 44.0 against PVT-Large's 42.9, while latency drops from 152.2 ms to 93.8 ms.
Ablation
| Setting | GPU (images/s) | CPU (ms) | ARM (ms) | Top-1 |
|---|---|---|---|---|
| T0, (default) | 6,807 | 9.2 | 143 | 71.9% |
| T0*, | 6,626 | 9.6 | 145 | 71.7% |
| T0*, | 6,204 | 8.9 | 140 | 71.3% |
| T0, LayerNorm instead of BatchNorm | 5,515 | 10.7 | 159 | 71.9% |
| T0, ReLU instead of GELU | 6,929 | 8.2 | 114 | 71.3% |
| T2, GELU instead of ReLU | 1,985 | 35.4 | 557 | 78.7% |
A of 1/4 strikes the best balance. Too large and it degenerates into ordinary convolution; too small and it can't capture spatial features. LayerNorm and BatchNorm give the same accuracy, but LayerNorm can't be merged into the convolution, and GPU throughput drops by a fifth. As for activation functions, GELU is more accurate for small models and ReLU works better for large ones; the authors guess that small models need GELU's nonlinearity more.
In the appendix, the authors also list two limitations. PConv's stride can only be 1, since otherwise the convolved channels and the untouched channels won't line up, so downsampling has to be left to other layers. And FasterNet is built entirely from small convolutions with a limited receptive field; the authors leave enlarging the receptive field to future work.
Conclusion
Latency is FLOPs divided by FLOPS, and the whole paper revolves around that equation. Focus only on shrinking the numerator, and if the denominator falls faster, the network ends up slower. Depthwise convolution is exactly that case, saving on computation but spending the time moving memory around.
PConv is so simple it's almost embarrassing. Convolve a quarter of the channels and stitch them back on, that's all, and a few lines are enough to bring it into your own network.
Finally, always measure speed on your own device. The paper used a 2080Ti, an i9-9900X, and a Cortex-A72; on an i9-13900K we saw the same trend, but quite different numbers. Move to a phone NPU or a different inference framework, and which one is faster could flip entirely, so don't draw conclusions straight from the paper's tables.