Deep Rewiring: Training very sparse deep networks

Guillaume Bellec, David Kappel, Wolfgang Maass, Robert Legenstein

TL;DR

The researchers introduce DEEP R, an algorithm that allows deep neural networks to be trained from scratch under strict, permanent sparsity constraints. By treating network architecture as a dynamic variable that is "rewired" through stochastic sampling, DEEP R maintains a constant number of active connections throughout training, achieving high performance on benchmark tasks with as little as 1% of the original connectivity.

What Problem Does This Paper Address?

Modern deep learning is notoriously resource-hungry. While we often think about compute (FLOPs), the real bottleneck for hardware like TPUs, FPGAs, and neuromorphic chips is often memory and connectivity. In these systems, moving weights from memory to the processor consumes orders of magnitude more energy than the actual calculation.

Existing solutions usually involve "pruning"—training a massive, dense network and then cutting away unimportant connections. However, this doesn't help if your hardware can't fit the dense network in the first place. The challenge is: how do we train a network that is sparse from the very first iteration and stays sparse until the last, without sacrificing accuracy?

Methods

The authors take inspiration from neurobiology, where the brain constantly rewires synaptic connections during learning. They translate this into a formal algorithm called DEEP R (Deep Rewiring).

Key components include:

  • Fixed Signs: Each potential connection is assigned a permanent sign (positive or negative). This mimics the distinction between excitatory and inhibitory neurons in the brain.
  • The $\theta$ Parameter: Instead of weights, the algorithm tracks a parameter $\theta_k$. The actual weight $w_k$ is $s_k \theta_k$ if $\theta_k > 0$, and zero (dormant) if $\theta_k \le 0$.
  • Stochastic Updates: The update rule combines standard gradient descent with $\ell_1$ regularization (to encourage sparsity) and a "random walk" (noise).
  • Active Rewiring: When a connection’s $\theta$ drops below zero, it becomes dormant. To maintain the strict connectivity bound $K$, the algorithm immediately picks a random dormant connection and "re-activates" it by resetting its $\theta$ to zero.
  • Bayesian Foundation: Unlike heuristic pruning, DEEP R is mathematically grounded. The authors prove that the algorithm effectively samples network configurations from a posterior distribution, meaning it's searching for the most probable "useful" architecture for the task.

Datasets

The authors evaluated DEEP R across three distinct architectures and datasets:

  1. MNIST: A fully connected feedforward network for digit recognition.
  2. CIFAR-10: A Convolutional Neural Network (CNN) for image classification.
  3. TIMIT: A Long Short-Term Memory (LSTM) recurrent network for speech (phoneme) recognition.

Key Insights and Ideas

  • Architecture as a Posterior: The most profound insight is viewing the network structure not as a fixed grid, but as a distribution to be sampled. This allows the network to "explore" different connectivity patterns even after the weights have seemingly converged.
  • Strict Bounds: Unlike "soft" sparsity methods that use penalties to reduce weights, DEEP R enforces a hard limit on the number of non-zero weights. This is crucial for hardware with fixed memory slots.
  • Transfer Learning via Rewiring: Because the algorithm never stops "testing" new connections, it is remarkably good at adapting to changing tasks. In experiments where MNIST labels were shuffled every epoch, DEEP R adapted quickly, suggesting it preserves "invariant features" in early layers while rewiring the later ones to meet new demands.

Key Results

Accuracy of DEEP R compared to other methods on MNIST and CIFAR-10 across different connectivity levels.
  • Extreme Sparsity: On MNIST, DEEP R achieved 96.3% accuracy with only 1% connectivity (a 100x reduction in parameters).
  • Competitive with Pruning: On CIFAR-10, it reached 84.1% accuracy at 5% connectivity, performing as well as (or better than) state-of-the-art pruning methods that start with a full dense network.
  • Recurrent Stability: Sparsifying LSTMs is notoriously difficult because it often leads to vanishing or exploding gradients. DEEP R successfully trained sparse LSTMs on TIMIT, outperforming standard training with fixed random sparsity.

Limitations and Future Work

  • Hyperparameter Sensitivity: The authors note that the regularization coefficient ($\alpha$) needs careful tuning; being off by an order of magnitude can lead to significant performance loss.
  • Fixed Signs: While biologically inspired, forcing connections to keep a fixed sign might limit the representational power of the network compared to standard backpropagation.
  • Computational Overhead of Sampling: While the resulting network is efficient, the process of randomly selecting and testing dormant connections during training adds a different kind of logic overhead that standard deep learning frameworks aren't currently optimized for.
  • Scaling: The paper focuses on relatively small benchmarks. Testing DEEP R on massive models like ImageNet or large language models remains a frontier for future research.

Summary updated

BibTeX
@inproceedings{bellec2018deep,
  author = {Guillaume Bellec and David Kappel and Wolfgang Maass and Robert Legenstein},
  title = {{Deep Rewiring: Training very sparse deep networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2018},
  url = {https://openreview.net/forum?id=BJ_wN01C-},
}
Figure