How does DenseNet differ from ResNet?
DenseNet and ResNet both use shortcut connections to train deep convolutional networks, but they combine earlier features differently: DenseNet concatenates them, while ResNet adds them.
Key differences
- How layers connect: In ResNet, a residual block adds the input to a learned transformation:
y = x + F(x). In DenseNet, each layer receives a concatenation of all earlier feature maps in the same dense block. - What happens to channels: Residual addition normally preserves the output channel count. DenseNet concatenation increases the available channel count as each layer contributes new feature maps.
- What the network learns: ResNet learns corrections to existing representations. DenseNet encourages explicit reuse of previously computed features.
- Efficiency trade-offs: DenseNet can achieve strong parameter efficiency through feature reuse, but retaining and concatenating many feature maps can increase activation-memory demands. Actual speed and memory depend on the implementation and model configuration.
Simple example
Suppose the earlier features are x and a new layer produces F(x):
- ResNet:
x + F(x)— combines corresponding values through addition. - DenseNet:
[x, F(x)]— keeps both sets of features as separate channels.
That difference determines how information is reused by subsequent layers.
Which should you choose?
- ResNet is a strong general-purpose CNN baseline with widely used residual blocks.
- DenseNet is worth considering when feature reuse and parameter efficiency are priorities, provided its feature-map memory costs fit the deployment and training setup.
Neither architecture is universally better; compare validation accuracy, latency, and memory for the actual task.
For background, see “What is DenseNet?”, “What is a ResNet?”, and “What is a dense connection in a neural network?”.
Original papers: Deep Residual Learning for Image Recognition and Densely Connected Convolutional Networks.
Sources & Research References
Learning Sequence
Deep Learning Curriculum
Why does increasing neural network depth sometimes reduce performance?
Explore Related Questions
Deepen your understanding across related Deep Learning topics.