Back to paper library
Paper notesarXiv 2024ECCV 2024

RDNet

Don't Add, Concatenate

Original paper

DenseNets Reloaded: Paradigm Shift Beyond ResNets and ViTs

Paper authors

Donghyun Kim · Byeongho Heo · Dongyoon Han

Publication
ECCV 2024Conference
First submitted to arXiv
arXiv:2403.19588
Cite this paper · BibTeX

The citation identifies the linked source version. It cites the original paper and its authors.

@misc{classiccnnsrdnet2024,
  title = {{DenseNets Reloaded: Paradigm Shift Beyond ResNets and ViTs}},
  author = {Donghyun Kim and Byeongho Heo and Dongyoon Han},
  year = {2024},
  eprint = {2403.19588},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.19588}
}
On this page

There are two ways to make a shortcut connection. ResNet adds input to output, x+f(x)x + f(x); DenseNet concatenates them, [x,f(x)][x, f(x)].

DenseNet matched ResNet with fewer parameters in 2016 and won the CVPR 2017 Best Paper Award. Yet the mainstream networks that followed—ResNeXt, EfficientNet, ConvNeXt, then ViT and Swin—almost all used addition. DenseNet gradually faded from discussions of mainstream architectures.

This paper comes from NAVER Cloud AI and NAVER AI Lab, by Donghyun Kim, Byeongho Heo, and Dongyoon Han. They argue that DenseNet's neglect stems from outdated training and design details. They keep concatenation and modernize everything else to see how far DenseNet can go.

Defining the Problem

Addition versus Concatenation

An additive shortcut keeps output width fixed. However many layers you stack, features remain dd channels wide; each layer can only change the contents of those dd channels.

A concatenative shortcut adds gg channels at every layer. Here gg is the growth rate, or GR. All preceding features remain unchanged and directly available to later layers.

The authors explain the benefit through matrix rank. For a layer output f(XW)f(XW), XX is an N×dinN\times d_{in} input and WW is a din×doutd_{in}\times d_{out} weight matrix. With nonlinearity, output rank generally approaches doutd_{out}. Higher output dimensionality brings greater expressive capacity. Concatenation is equivalent to writing W=[WP,I]W=[W_P, I]: retain the original dind_{in} channels and add gg channels produced by WPW_P, so rank keeps growing.

That is also DenseNet's old problem. More channels keep increasing memory use, so the original uses a small GR, such as 32, and compensates with great depth. DenseNet-201 has four dense blocks of 6, 12, 48, and 32 layers. Deep, narrow networks run slowly on GPUs.

The authors further argue that transition layers can compress channels without losing much rank, provided the compressed dimension remains large enough. Frequent compression can therefore control memory while preserving much of the expressive capacity.

First, Sample Fifteen Thousand Random Networks

These are still hypotheses, so the authors test them first. On Tiny-ImageNet, they randomly generate over 15,000 networks, divided into additive and concatenative shortcut groups. Depth, width, activation, normalization, and kernel size are randomized too. Only networks within the compute budget are trained, giving the two shortcut types similar computational costs.

There are five random search spaces. A, B, and C have three different sizes; D adds augmentation to C, and E further switches the optimizer to AdamW:

Table: from the paper's Table 7; mean and standard deviation over all networks in each space.
SpaceAdd top-1Concat top-1Add mem. (GB)Concat mem. (GB)
A (~2.2M params)45.8 ± 2.0%47.5 ± 2.1%0.650.75
B (~4.5M)50.1 ± 2.1%51.2 ± 2.1%0.780.90
C (~9.5M)53.2 ± 2.2%54.3 ± 2.0%1.011.24
D (C with augmentation)57.4 ± 1.5%58.1 ± 1.4%1.021.24
E (D with AdamW)58.2 ± 1.5%58.9 ± 1.6%1.021.25

Concatenation has higher mean accuracy in all five spaces, by 0.7 to 1.7 percentage points. Standard deviations are around 2 points, though, so the distributions overlap heavily. Stronger training recipes also narrow the gap from 1.1 to 0.7. Meanwhile, concatenation uses 15% to 23% more memory; DenseNet's old problem persists.

These experiments use small 64×64 images and networks under 10 million parameters. They indicate a direction, with the behavior of larger networks still to be checked. Next comes an actual ImageNet model.

Solving the Problem

Starting from DenseNet-201

The approach resembles ConvNeXt's: start with an old model, change one thing at a time, and record accuracy and speed at each step. DenseNet-201 with a modern recipe—AdamW, cosine learning rate, 300 epochs, and assorted augmentations—starts at 79.7% ImageNet accuracy.

Steptop-1ParametersFLOPs
DenseNet-201 (new recipe)79.7%20.0M4.3G
Wider and shallower79.5%21.8M11.1G
Modern blocks80.4%12.9M4.8G
Expansion relative to input80.8%19.9M4.7G
More transitions, stage-specific GR82.3%21.2M5.0G
Patchify stem82.4%21.2M4.9G
Redesigned transitions82.6%22.4M4.9G
Channel rescaling82.8%23.9M5.0G
Table: selected columns from the paper's Table 1.
StepInference latency (batch 1)Training latencyTraining memory
DenseNet-201 (new recipe)38.4 ms131 ms3.9 GB
Wider and shallower8.5 ms85 ms3.2 GB
Modern blocks10.4 ms112 ms3.4 GB
Expansion relative to input11.8 ms88 ms3.1 GB
More transitions, stage-specific GR11.0 ms90 ms3.4 GB
Patchify stem11.0 ms88 ms3.2 GB
Redesigned transitions13.6 ms97 ms3.1 GB
Channel rescaling14.0 ms99 ms3.1 GB

Take these step by step.

Wider and shallower. GR rises from 32 to 120, while block counts across the four stages shrink from (6,12,48,32)(6, 12, 48, 32) to (3,3,12,3)(3, 3, 12, 3). Accuracy barely changes; training latency falls 35% and memory 18%. FLOPs rise to 11.1G, to be addressed later.

Modern blocks. Each block takes a ConvNeXt-like form: 7×7 depthwise convolution, LayerNorm, then 1×1 convolutions expanding and compressing channels, with fewer normalizations and activations. The difference is that output width equals GR and is smaller than input width. Every block compresses all the preceding concatenated features into GR new channels. This adds 0.9 percentage points.

Expansion relative to input. The original DenseNet bottleneck has width 4 times GR. The authors change it to 4 times the input channel count, enriching the features before the nonlinearity. They then halve GR from 120 to 60 to control compute. Accuracy gains 0.4 points and training becomes 21% faster.

More transition layers. The original DenseNet places transitions only between stages, also downsampling there. The authors add a stride-1 transition after every 3 blocks within a stage, solely to halve channels. The saved compute allows a larger GR, now varying by stage. This adds 1.5 percentage points, the largest single gain.

The final three steps are smaller. The stem becomes a 4×4, stride-4 patchify layer. Transitions replace average pooling with convolutions whose stride equals kernel size. Channel rescaling combines layer scale with effective SE. Each adds 0.1 to 0.2 points.

Figure 1 from the paper: the upper left shows RDNet's overall sequence: Stem, Stage-1, Transition S/2, Stage-2, Transition S/2, Stage-3, Transition S/2, Stage-4, GlobalAvgPool, LayerNorm, FC. The upper right expands feature mixer f into DW Conv 7×7 (C→C), LayerNorm, Linear (C→4C), GeLU, Linear (4C→GR). The lower left expands Stage-N: purple feature blocks grow thicker by concatenation after each f, followed by a Transition S/1; the group repeats L_N times. The lower right shows Transition layer S/s as LayerNorm and an s×s stride-s convolution, halving channels.
Figure 1 from Kim et al., taken from PDF page 6. The original caption is omitted.

This is the final RDNet. The lower half shows one stage: each feature mixer ff adds a purple slice. After three ff mixers, a stride-1 transition halves the thickness. This combination repeats LNL_N times.

Following the Channel Counts

The figure alone makes channel growth hard to feel. Take RDNet-T in timm: it wraps every 3 blocks into a group, and groups 2 through 5 together form the paper's third stage, with 12 blocks. Channels grow within each group, then a transition halves them; group 2, for example, grows from 216 to 600 and its transition brings it back to 296. Stage 3 therefore keeps moving between 216 and 744 channels.

What if stage 3 had no internal transitions? Each block's costliest parts are the two 1×1 convolutions: expand to 4 times the input width, then compress to GR, for roughly 4c2+4c⋅GR4c^2 + 4c\cdot\mathrm{GR} multiply-adds per spatial position. Counting only these two convolutions, stage 3 without internal transitions ends at 1752 channels and takes 4.6 times the compute of compression every 3 blocks. The expansion layer's cost grows quadratically with channel count. Concatenation grows channels linearly, sending compute up quadratically. Frequent compression makes a larger GR affordable.

The paper's ablations support this interval too. At similar compute, compression every 2 blocks gives 82.7%, every 3 gives 82.8%, every 4 gives 82.6%, and every 6 falls to 82.1%.

Discussion

ImageNet

First, compare representative models trained only on ImageNet-1K. Latency measures inference on 128 images at once; memory uses batch size 16:

Table: selected rows from the paper's Table 4.
ModelParamsFLOPsLatency (ms)Mem. (GB)top-1
Swin-T28M4.5G1732.681.3%
ConvNeXt-T29M4.5G1502.782.1%
InceptionNeXt-T28M4.2G1323.382.3%
RDNet-T24M5.0G1754.182.8%
ConvNeXt-S50M8.7G2664.083.1%
RDNet-S50M8.7G2895.483.7%
ConvNeXt-B89M15.4G4175.483.8%
RDNet-B87M15.4G4726.984.4%

At each size, RDNet gains 0.6 to 0.7 percentage points over ConvNeXt, at the cost of roughly 10% to 20% greater inference latency and 30% to 50% more memory. Keeping all preceding features still makes concatenation memory-hungry.

The authors also compare with newer models from 2022 to 2024: HorNet, VAN, BiFormer, NAT, SMT, and MogaNet. Here the tradeoff reverses. RDNet-T is similarly sized, with accuracy matching them or trailing by up to 1 percentage point, but batch-1 latency is just 7.4 ms, against 20 to 52 ms for the others. The table's description explicitly says their model trades a slight accuracy deficit for speed.

Downstream Tasks

The advantage is clearer in segmentation and detection. On ADE20K with UperNet, RDNet-T gets 47.6 single-scale mIoU against ConvNeXt-T's 46.0; at size B, it is 49.6 versus 49.1. On COCO with Mask R-CNN trained on a 3× schedule, RDNet-T reaches 47.5 box AP against ConvNeXt-T's 46.2, with 5M fewer parameters. The authors suggest that retaining features from different layers particularly helps dense prediction.

The authors also train CLIP with OpenCLIP, using RDNet-B and ConvNeXt-B as image encoders. ImageNet zero-shot top-1 is 54.1% versus 51.2%.

Stochastic Depth Helps Too

The original DenseNet did not use stochastic depth; the authors say their connection patterns already share some similarities. Testing it gives a substantial effect: a rate of 0 yields 81.6%, while 0.15 yields 82.8%, gaining 1.2 percentage points.

Conclusion

The main results:

  1. Concatenation itself: over fifteen thousand random networks, concatenation gains 0.7 to 1.7 percentage points on average, using about 10% to 20% more memory.
  2. DenseNet's proportions make it competitive: becoming wider and shallower makes it fast; more transitions allow a larger GR. The latter step alone gains 1.5 points.
  3. Results: at similar size, accuracy beats ConvNeXt by 0.6 to 0.7 points, with larger gaps in segmentation and detection. Inference is somewhat slower and memory use 30% to 50% greater.

Seen this way, DenseNet's neglect owed much to its deep, narrow proportions and old training recipe. Concatenation itself held up. Its appetite for memory, though, has stayed with it since 2016.