Designing Network Design Spaces
- Publication
- CVPR 2020Conference
- First submitted to arXiv
- arXiv:2003.13678
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{classiccnnsregnet2020,
title = {{Designing Network Design Spaces}},
author = {Ilija Radosavovic and Raj Prateek Kosaraju and Ross Girshick and Kaiming He and Piotr Dollár},
year = {2020},
eprint = {2003.13678},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2003.13678}
}
Around 2019, one of the hottest ways to design convolutional networks was neural architecture search (NAS). You define a search space and let an algorithm find the best network within it; that's how NASNet and EfficientNet came about.
The networks found this way are strong, but what we get is a single network, a set of numbers tuned for one level of compute and one kind of hardware. Why does it look like this? How should it change for a different level of compute? The search result itself can't answer that.
Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár of Facebook AI Research wanted to take a different approach. Instead of designing a single network, they design “network design spaces,” finding design principles in how a large population of networks performs.
Defining the Problem
What Manual Design and NAS Each Lack
Look back at LeNet, AlexNet, VGG, and ResNet. These hand-designed networks left behind more than models; they also left principles such as using convolution, scaling up data and networks, going deeper, and adding residuals. These principles carry over to many new settings. The trouble is that once there are many design choices, it gets very hard to find the best combination by trying them one by one by hand.
NAS solves the “trying” problem, but what it produces is a network instance tuned for a specific setting. What the authors want are networks that are simple, easy to understand, and generalize to different settings, along with the principles behind them.
As for different compute requirements, the common practice is to take one network and scale its depth, width, or resolution by some rule, with EfficientNet's compound scaling as one example. But that still starts from a single network.
How to Compare Two Design Spaces
If what you're designing is “a population of networks,” you need a way to compare how good one population is against another. The authors use a tool that Radosavovic et al. proposed the year before, which randomly samples models from a design space, trains them all, and looks at the distribution of their errors.
Concretely, the tool is the error empirical distribution function (EDF):
is simply “the fraction of models with error below .” The closer the curve is to the upper left, the more good models the space contains.

The left panel shows the authors' process. Starting from a very large space A, each step adds one constraint, giving a smaller B and then C. The right panel shows the EDF obtained by sampling and training models from each of the three spaces; C's curve is furthest left, meaning its models are the best overall.
Comparing whole distributions is more robust than comparing only the best model found in each of two spaces. The authors also hope that principles holding for a whole population of models stand a better chance of generalizing to other settings.
Sampling and training hundreds of models is expensive. The authors do their design in a “low-compute, short-training” regime, with each model at about 400 million multiply-adds (400MF), trained for only 10 epochs on ImageNet. At that scale, training 100 models takes about as much compute as training one ResNet-50 for 100 epochs.
Solving the Problem
The Starting Point: AnyNet
The authors begin with a very unconstrained design space called AnyNet. A network has three parts. The stem is a single stride-2 convolution with 32 channels; the head is average pooling plus a fully connected layer; the body in the middle is where the action is, with 4 stages that halve the resolution one after another, each made of several identical blocks.
The block is a ResNeXt-style residual bottleneck with grouped convolution, which the authors call the X block:

Each stage has four tunable parameters:
- Number of blocks
- Block width : the number of output channels
- Bottleneck ratio : the middle layer has channels
- Group width : the number of channels in each group of the grouped convolution
Four stages with four parameters each make 16 degrees of freedom. The sampling ranges are , and divisible by 8, , and , which together give about possible networks. The input is fixed at .
Rather than searching these networks for the single best one, the authors add constraints step by step, and each step has to make the space simpler and easier to understand without reducing the number of good models.
Narrowing It Down Step by Step
Each time they add a constraint, the authors sample and train 500 new models to see whether the EDF gets worse:
| Space | New constraint | Degrees of freedom | Combinations | Min / mean error |
|---|---|---|---|---|
| AnyNetX | None | 16 | 39.0 / 49.0 | |
| AnyNetX | All stages share | 13 | 39.0 / 49.2 | |
| AnyNetX | All stages share | 10 | 38.9 / 49.4 | |
| AnyNetX | 10 | 38.7 / 43.2 | ||
| AnyNetX | 10 | 38.7 / 42.7 | ||
| RegNetX | Quantized linear | 6 | 38.2 / 41.0 |
The first two steps make all stages share the same and , removing 6 degrees of freedom while leaving the EDF almost unchanged, which shows that these two parameters don't need to be tuned separately for each stage.
The third step comes from observation. The authors plotted a few good and a few bad networks from AnyNetX and found that the good networks all get wider toward the end. Adding the constraint drops the mean error from 49.4% to 43.2% in one go, and the best model doesn't get any worse. The fourth step, , improves the results a little more.
At this point, the space has shrunk by a factor of more than three million, and the good models are more concentrated than ever.
Width Is a Straight Line
Next, the authors plot the 20 best models from AnyNetX on a single chart, with the block index on the horizontal axis and the block width on the vertical axis:

In the top-left chart, every model's gray staircase is different, but the overall trend can be described by a very simple straight line, , which is the black curve (the vertical axis is logarithmic, so it looks bent).
The line gives every block a different width, but in a real network, all the blocks in a stage share the same width, forming a staircase. The authors turn the line into a staircase with three equations.
First, a straight line gives each block a continuous width:
is the initial width, is the slope, and is the total number of blocks. Next, a parameter is introduced, and is written as times some power of :
Finally, the exponent is rounded:
Once the exponents are integers, the widths can only take a few values, , , , and so on; the blocks with the same width form a stage, so is the width multiplier between adjacent stages.
Let's actually compute it for RegNetX-1.6GF. Its parameters in torchvision are , , , , and group width :
import math
d, w0, wa, wm, g = 18, 80, 34.01, 2.25, 24 # RegNetX-1.6GF
u = [w0 + wa * j for j in range(d)] # Eq. (2): a continuous width for each block
s = [math.log(uj / w0) / math.log(wm) for uj in u] # Eq. (3): convert to the exponent in w0 · wm^s
w = [w0 * wm ** round(sj) for sj in s] # Eq. (4): round the exponent, turning the widths into a staircase
w = [round(wj / 8) * 8 for wj in w] # round widths to multiples of 8
for j in (0, 1, 2, 5, 6, 15, 16, 17):
print(f"Block {j:>2}: u = {u[j]:6.1f}, s = {s[j]:4.2f} → rounded {round(s[j])}, width {w[j]}")
stages = sorted(set(w))
depths = [w.count(x) for x in stages]
widths = [round(x / g) * g for x in stages] # then adjust to multiples of the group width
print("Blocks per stage:", depths)
print("Width per stage:", widths)
Block 0: u = 80.0, s = 0.00 → rounded 0, width 80
Block 1: u = 114.0, s = 0.44 → rounded 0, width 80
Block 2: u = 148.0, s = 0.76 → rounded 1, width 176
Block 5: u = 250.0, s = 1.41 → rounded 1, width 176
Block 6: u = 284.1, s = 1.56 → rounded 2, width 408
Block 15: u = 590.1, s = 2.46 → rounded 2, width 408
Block 16: u = 624.2, s = 2.53 → rounded 3, width 912
Block 17: u = 658.2, s = 2.60 → rounded 3, width 912
Blocks per stage: [2, 4, 10, 2]
Width per stage: [72, 168, 408, 912]
The widths of the 18 blocks climb along the line, and once the exponents are rounded, they split into four segments, giving 2, 4, 10, and 2 blocks per stage, with widths of 72, 168, 408, and 912. This matches RegNetX-1.6GF as listed in the paper, and it also matches the model torchvision builds. The number of blocks per stage doesn't have to be specified separately; the line and the rounding determine it. torchvision's regnet_x_* and regnet_y_*, as well as timm's regnetx_* and regnety_*, are all generated with these formulas, so just pick one by compute.
The authors also went back to check this description. They fit the quantized line to every model from AnyNetX through AnyNetX and computed the fitting error . The scatter plots in the bottom row of Figure 8 show that the best models in each space all have fitting errors near 0, and that from C to E, the models as a whole conform more and more closely to this structure.
RegNet
Since the good models all look like this, the authors simply keep only networks with this structure. A network is then determined by four parameters, , , , and , plus and . The sampling ranges are , , and . The authors call this space RegNet, meaning it contains only regular networks.
The degrees of freedom drop from 16 to 6 and the size of the space shrinks by nearly 10 orders of magnitude, yet the mean error falls from 49.0% to 41.0%, and the best model gets slightly better too. Good models are concentrated enough that randomly sampling about 32 models is likely to turn up a good one.
The authors also confirmed that these conclusions hold beyond the low-compute, short-training setting. With higher compute, longer training, 5-stage networks, or other block types, the three spaces always rank in the same order, RegNetX first, then AnyNetX, then AnyNetX.
Discussion
Where It Breaks with Common Practice
Since good models are concentrated in RegNetX, the authors switch to sampling 100 models at each compute level and training them for 25 epochs, to look at the trend of each parameter:

Several results go against the habits of the time:
- The best depth is very stable. Whatever the compute, the best models have about 20 blocks (about 60 layers). The usual practice is to make the network deeper as compute grows.
- No bottleneck needed. The best models have , with the middle layer as wide as the output.
- The width multiplier between stages is about 2.5. The common practice is to double the width at each stage.
- Inverted bottlenecks and depthwise convolution both do worse. The common in mobile networks makes results slightly worse, and depthwise convolution with is worse still. When the authors retested in the appendix at 6.4GF with 100 epochs, the inverted bottleneck fell even further behind.
- A fixed resolution of is best. This runs counter to EfficientNet's finding that scaling up the resolution helps, and it holds even at higher compute.
, , and , on the other hand, grow with compute. In addition, adding an SE module to the X block gives the RegNetY space, which is better still overall.
The authors also bring in a metric few people usually look at, activations, the total size of the output tensors of all convolutional layers. On a V100 GPU, inference time has a correlation coefficient of 0.897 with activations, but only 0.643 with FLOPs. Hardware like GPUs is often limited by memory bandwidth, so the size of the intermediate results predicts speed better than the number of multiply-adds does. Among the best models, activations grow roughly with the square root of compute, while parameters grow linearly.
Based on these trends, the authors further constrain RegNetX with , , and , and limit parameters and activations, giving a faster, more memory-efficient space; all the comparisons that follow use this version.
Compared with ResNet and ResNeXt
To compare final models, the authors try 25 random parameter settings at each compute level, pick the best, and train it 5 times for 100 epochs. All models, including the ResNets and ResNeXts being compared, use the same basic training setup, with no regularization or training tricks beyond weight decay:
| Model | GFLOPs | Parameters | Inference (ms) | Top-1 error |
|---|---|---|---|---|
| ResNet-50 | 4.1 | 22.6M | 53 | 23.2% |
| ResNeXt-50 | 4.2 | 25.0M | 78 | 21.9% |
| RegNetX-4.0GF | 4.0 | 22.1M | 69 | 21.4% |
| ResNet-101 | 7.8 | 44.6M | 90 | 21.4% |
| ResNeXt-101 | 8.0 | 44.2M | 137 | 20.7% |
| RegNetX-8.0GF | 8.0 | 39.6M | 94 | 20.7% |
| ResNet-152 | 11.5 | 60.2M | 130 | 20.9% |
| ResNeXt-152 | 11.7 | 60.0M | 197 | 20.4% |
| RegNetX-12GF | 12.1 | 46.1M | 137 | 20.3% |
In all three groups, RegNetX is the best or tied for the best. In the 8GF group, RegNetX ties ResNeXt-101 but needs only 94 ms for inference, versus 137 ms for ResNeXt-101. These networks use the same components and training setup and differ only in structure, so the authors conclude that all of these gains come from the design space.
The Mobile Regime
Around 600MF, RegNetX-600MF has a top-1 error of 25.9% and RegNetY-600MF 24.5%. At the same compute, MobileNet-V2 reports 25.3% and ShuffleNet V2 25.1%, while the NAS-found NASNet-A gets 26.0% and AmoebaNet-C 24.3%.
The competitors' numbers are those reported in their own papers, usually with longer training and assorted enhancement tricks; RegNet uses only the basic 100-epoch setup and still comes quite close. The authors hope these simple models can serve as baselines for future research.
Compared with EfficientNet
Last comes EfficientNet, the strongest model of the time. The authors take EfficientNet's original architectures but retrain them with the same training setup as RegNet, tuning only the learning rate and weight decay separately for them:
| Model | GFLOPs | Parameters | Activations | Top-1 error |
|---|---|---|---|---|
| EfficientNet-B0 | 0.4 | 5.3M | 6.7M | 24.9% |
| RegNetY-400MF | 0.4 | 4.3M | 3.9M | 25.9% |
| EfficientNet-B3 | 1.8 | 12.0M | 23.8M | 22.5% |
| RegNetY-1.6GF | 1.6 | 11.2M | 8.0M | 22.0% |
| EfficientNet-B5 | 9.9 | 30.0M | 98.9M | 21.5% |
| RegNetY-8.0GF | 8.0 | 39.2M | 18.0M | 20.1% |
| Model | Inference (ms) | Training (hours) |
|---|---|---|
| EfficientNet-B0 | 34 | 11.7 |
| RegNetY-400MF | 19 | 5.1 |
| EfficientNet-B3 | 114 | 32.1 |
| RegNetY-1.6GF | 39 | 10.1 |
| EfficientNet-B5 | 504 | 135.1 |
| RegNetY-8.0GF | 113 | 28.1 |
At very low compute, EfficientNet is better; as compute goes up, RegNetY takes the lead. The speed gap is even more striking. EfficientNet-B5 takes 504 ms per inference batch, while RegNetY-8.0GF needs only 113 ms (by the time B5 finishes one batch, it has already run through four), with lower error to boot.
The speed gap ties back to activations. EfficientNet scales up both resolution and depth, so its activations grow roughly linearly with compute, reaching 98.9M for B5; RegNet's grow with the square root, only 18.0M at 8.0GF.
Keep the training setup in mind when reading this table. The original EfficientNet paper used longer training and enhancements such as AutoAugment, and reported much lower errors, 16.7% for B5, for example. The authors' own experiments also show that the training setup alone can shift EfficientNet-B0's error by about 2 percentage points. So this table compares “which architecture is better under the same training conditions,” not the best results each can achieve.
Conclusion
Do good architectures all look alike? Within this paper's design space, at least, the answer is yes. Narrowing all the way down from networks, the good models that remain all have widths on the same quantized line, a depth of about 20 blocks, no bottleneck, and widths that grow by a factor of about 2.5 from one stage to the next.
These regularities were found with a fixed X block, low compute, and short training, and the authors acknowledge that putting more options, such as operators, into the design space might lead to different answers.
To draw this line, the authors trained several thousand models just to compare design spaces. That's not cheap, but what they got in return is a set of rules you can actually explain, far easier to make sense of than a NAS-delivered network that amounts to “that's just how it is, don't ask.”