Abstract
Recent work has shown that convolutional networks can be substantially deeper, more accurate, and efficient to train if they contain shorter connections between layers close to the input and those close to the output. In this paper, we embrace this observation and introduce the Dense Convolutional Network (DenseNet), which connects each layer to every other layer in a feed-forward fashion. Whereas traditional convolutional networks with $L$ layers have $L$ connections—one between each layer and its subsequent layer—our network has $L(L+1)/2$ direct connections. For each layer, the feature-maps of all preceding layers are used as inputs, and its own feature-maps are used as inputs into all subsequent layers. DenseNets have several compelling advantages: they alleviate the vanishing-gradient problem, strengthen feature propagation, encourage feature reuse, and substantially reduce the number of parameters. We evaluate our proposed architecture on four highly competitive object recognition benchmark tasks (CIFAR-10, CIFAR-100, SVHN, and ImageNet). DenseNets obtain significant improvements over the state-of-the-art on most of them, whilst requiring less memory and computation to achieve high performance.
Introduction
As convolutional neural networks (CNNs) scale in depth to tackle increasingly complex visual recognition tasks, they encounter a fundamental challenge: information and gradients can "wash out" or vanish as they traverse hundreds of layers. While architectures like Residual Networks (ResNets) mitigate this through identity shortcuts that combine information via summation, this approach can potentially impede the flow of information. Furthermore, many deep architectures exhibit high redundancy, with different layers often re-learning similar features.
DenseNet addresses these issues by introducing a simple yet powerful connectivity pattern: every layer is connected to every other layer within a block in a feed-forward fashion. This design maximizes information flow and encourages massive feature reuse, leading to highly efficient and accurate models.
Architecture: The Dense Block
The core innovation of DenseNet is the Dense Block. Within such a block, the $\ell^{th}$ layer receives the feature maps of all preceding layers ($x_0, x_1, \dots, x_{\ell-1}$) as input.
Key Technical Components
- Concatenation vs. Summation: Unlike ResNets, which sum feature maps, DenseNet concatenates them. This explicitly distinguishes between preserved information and newly added information.
- Growth Rate ($k$): Each layer adds $k$ new feature maps to the "collective knowledge." By keeping $k$ small (e.g., 12 or 24), the network remains narrow and efficient.
- Bottleneck Layers (DenseNet-B): To manage computational costs, a $1 \times 1$ convolution is applied before each $3 \times 3$ convolution to reduce the number of input feature maps.
- Transition Layers: To facilitate down-sampling, the network is organized into multiple dense blocks separated by transition layers, which utilize $1 \times 1$ convolutions and pooling.
- Compression (DenseNet-C): Transition layers can further reduce the number of feature maps by a factor $\theta$ (typically 0.5) to enhance compactness.
Experiments and Results
DenseNet was evaluated on four major benchmarks: CIFAR-10, CIFAR-100, SVHN, and ImageNet. The results demonstrate that DenseNets achieve state-of-the-art performance while being significantly more efficient than previous architectures.
Key Findings
- Parameter Efficiency: On CIFAR, a DenseNet-BC with 0.8M parameters matched the accuracy of a 10.2M parameter ResNet—a 12x reduction in size. On ImageNet, DenseNet-201 (20M parameters) performed similarly to ResNet-101 (40M parameters), effectively halving the required parameters.
- State-of-the-Art Accuracy: DenseNet-BC (L=190, k=40) achieved record-breaking error rates of 3.46% on CIFAR-10 and 17.18% on CIFAR-100.
- Computational Efficiency: As shown in Figure 5, DenseNets require fewer floating-point operations (FLOPs) to achieve the same level of accuracy as ResNets.
Discussion
The success of DenseNet stems from several key properties:
- Feature Reuse: Access to the "global state" of a block eliminates the need to replicate features, making the model highly parameter-efficient.
- Implicit Deep Supervision: Dense connections provide shorter paths to the loss function for every layer, making the models easier to train and more robust.
- Regularization: Dense connections act as a natural regularizer, reducing overfitting on smaller datasets like CIFAR and SVHN.
Conclusion and Future Work
While DenseNets are highly efficient in terms of parameters and computation, standard implementations can be memory-intensive during training due to the storage of intermediate feature maps. Future work includes developing more memory-efficient implementations and exploring DenseNets as feature extractors for tasks like object detection and segmentation.
Code and pre-trained models are available at https://github.com/liuzhuang13/DenseNet.
Summary updated