Abstract
While gradient descent has proven highly successful in learning connection weights for neural networks, the actual structure of these networks is usually determined by hand, or by other optimization algorithms. Here we describe a simple method to make network structure differentiable, and therefore accessible to gradient descent. We test this method on recurrent neural networks applied to simple sequence prediction problems. Starting with initial networks containing only one node, the method automatically builds networks that successfully solve the tasks. The number of nodes in the final network correlates with task difficulty. The method can dynamically increase network size in response to an abrupt complexification in the task; however, reduction in network size in response to task simplification is not evident for reasonable meta-parameters. The method does not penalize network performance for these test tasks: variable-size networks actually reach better performance than fixed-size networks of higher, lower or identical size. We conclude by discussing how this method could be applied to more complex networks, such as feedforward layered networks, or multiple-area networks of arbitrary shape.
Introduction
In standard deep learning, the "topology" of a network—the number of neurons and their connectivity—is typically a discrete choice made before training begins. If a network is too small, it lacks the capacity to solve the problem; if it is too large, it wastes computation and may overfit. While gradient descent is a powerful tool for optimizing connection weights, optimizing structure usually relies on computationally expensive trial-and-error, grid search, or meta-heuristics like Genetic Algorithms. This paper presents a method to make neural network size a differentiable parameter, allowing the model to "grow" its own architecture via backpropagation.
Methodology: Differentiable Structure
The core of the approach involves transitioning from "soft" structural changes to "hard" structural changes through four mechanisms:
- L1 Regularization on Outgoing Weights: An L1 penalty is applied to the outgoing weights of every neuron. This forces a neuron to either contribute significantly to the network's output or have its influence pushed toward zero.
- Deletion Threshold ($T_D$): If the L1-norm of a neuron’s outgoing weights falls below a small threshold, it is marked as "inactive."
- Computational Reserve ($k$): The system maintains a buffer of $k$ inactive neurons. If more than $k$ neurons fall below the threshold, the excess units are physically removed. Conversely, if gradient descent increases the weights of inactive neurons to reduce loss, new neurons are added to maintain the buffer.
- Probabilistic Stability: To prevent rapid flickering in network size, additions and deletions occur probabilistically at the end of training cycles.
Experimental Setup and Results
The method was evaluated on synthetic sequence prediction tasks using Recurrent Neural Networks (RNNs). The "Easy" task involved predicting constrained digraph sequences, while the "Hard" task required reversing groups of letters, necessitating higher internal memory.
In a dynamic transition task, the network demonstrated remarkable structural plasticity. When the task abruptly switched from Easy to Hard, the network size spiked almost immediately to handle the increased complexity. When the task simplified again, the network began to shed unnecessary neurons, though this reduction was less aggressive than the growth phase.
Performance Comparison
Crucially, the variable-size networks outperformed fixed-size networks across all benchmarks. As shown in the loss curves, the grown networks achieved lower cross-entropy loss than fixed-size models with 10, 20, 50, 75, or 100 neurons.
Discussion and Conclusion
The results suggest that "augmenting topologies"—starting small and adding complexity only as needed—acts as a form of natural curriculum learning. By forcing neurons to "earn their keep" through the L1 penalty, the model finds more efficient minima than fixed-capacity architectures.
While this study focused on small RNNs, the principle of differentiable structure offers a promising path toward automating architecture design. Future work remains to determine how these threshold-based mechanisms scale to massive architectures like Transformers or deep Convolutional Neural Networks, and whether the introduction of new hyperparameters (like the L1 penalty strength) is more robust than manual tuning of node counts.
Summary updated