Learning the Architecture of Deep Neural Networks

Suraj Srinivas, R. Venkatesh Babu

Abstract

Deep neural networks with millions of parameters are at the heart of many state-of-the-art machine learning models today. However, recent works have shown that models with a much smaller number of parameters can also perform just as well. In this work, we introduce the problem of architecture-learning (AL), i.e., learning the architecture of a neural network along with its weights. We introduce a new trainable parameter called the tri-state ReLU (tsReLU), which helps in eliminating unnecessary neurons. We also propose a smooth regularizer which encourages the total number of neurons after elimination to be small. The resulting objective is differentiable and simple to optimize. We experimentally validate our method on both small and large networks, and show that it can learn models with a considerably small number of parameters without affecting prediction accuracy.

1. Introduction

Modern deep learning often relies on "over-parameterized" networks—models with millions of parameters that are far larger than necessary for the task at hand. While these large models perform well, they are computationally expensive to run and difficult to deploy on mobile or embedded devices. Traditionally, finding a smaller, efficient architecture involves a "trial-and-error" manual search or expensive automated methods like Bayesian Optimization, which require training dozens of different models from scratch. Pruning techniques usually happen after a model is already trained. This paper tackles the challenge of Architecture-Learning (AL): learning the weights and the network structure simultaneously in a single training run using standard gradient descent.

2. Methodology

2.1 The Tri-State ReLU (tsReLU)

The core of the approach is the Tri-State ReLU (tsReLU), a new trainable activation function defined as: $$tsReLU(x) = \begin{cases} wx, & x \ge 0 \\ wdx, & \text{otherwise} \end{cases}$$

Here, $w$ and $d$ are learnable parameters constrained to be binary (0 or 1). These parameters act as "gates":

  • Width Control ($w$): If $w=0$, the neuron's output is zeroed out, effectively pruning it from the network.
  • Depth Control ($d$): If $w=1$ and $d=0$, it behaves like a standard ReLU. If $w=1$ and $d=1$, it becomes an identity function (linear). Since two consecutive linear layers can be mathematically collapsed into one, this allows the model to reduce its effective depth.
Architecture selection strategy (a) and the binarizing regularizer (b).

2.2 Optimization and Regularization

To make this work with backpropagation, the authors treat $w$ and $d$ as continuous variables and use a binarizing regularizer ($w \times (1-w)$). Unlike standard $L_2$ regularization which pulls weights toward zero, this regularizer creates a "downward-facing parabola" that pushes parameters toward either 0 or 1. They also add a complexity regularizer that penalizes the total number of active neurons, encouraging the model to find the smallest possible architecture that still solves the task. This turns a discrete "integer programming" problem (how many neurons?) into a differentiable one that backpropagation can solve.

3. Experimental Evaluation

The method was validated on two primary benchmarks:

  • MNIST: Used with a LeNet-like architecture to test basic pruning and depth selection.
  • ILSVRC 2012 (ImageNet): Used with an AlexNet-like model (CaffeNet) to demonstrate scalability to large-scale, real-world image classification tasks.

4. Key Results

  • MNIST Efficiency: The method successfully reduced a baseline LeNet (20-50-500-10) to a much smaller 16-26-10 architecture. This learned model achieved 99.07% accuracy, nearly identical to the baseline's 99.3%, but with a fraction of the parameters.
  • ImageNet Compression: On the massive CaffeNet model, the "AL-conv-fc" variant achieved 68% parameter compression while maintaining an accuracy of 55.90% (compared to the 57.41% reference).
  • Speed: For a small network, the proposed method took ~30 minutes on a single GPU, whereas Bayesian Optimization took ~10 hours to find a comparable architecture. Architecture learning happens alongside weight learning, making it orders of magnitude faster than black-box methods.
  • Superiority over SVD: The method outperformed standard post-training compression techniques like Singular Value Decomposition (SVD) in terms of the accuracy-to-parameter-count trade-off.

5. Discussion and Conclusion

By introducing $w$ and $d$ as continuous variables pushed toward binary values, the authors demonstrate that architecture search can be treated as a continuous optimization problem. The insight that "linearity" between layers allows for depth reduction is a clever way to handle depth selection without changing the network's topology during training.

However, some limitations remain. The second part of the process—actually removing the zero-gate neurons and collapsing linear layers—is currently human-guided. Fully automating this post-processing step would be a natural next step. Additionally, while the complexity regularizer uses an indicator function that is technically non-differentiable, the authors bypassed this by treating it as a constant during certain gradient steps. Future work could explore extending this framework to more modern structures like skip-connections (ResNets) or attention mechanisms (Transformers).

Summary updated

BibTeX
@inproceedings{srinivas2016learning,
  author = {Suraj Srinivas and R. Venkatesh Babu},
  title = {{Learning the Architecture of Deep Neural Networks}},
  booktitle = {BMVC},
  year = {2016},
  url = {https://openreview.net/forum?id=TUrBCDpdmI},
}
Figure