An Adaptive Empirical Bayesian Method for Sparse Deep Learning

Wei Deng, Xiao Zhang, Faming Liang, Guang Lin

Introduction

Modern Deep Neural Networks (DNNs) are notoriously over-parameterized. While this massive scale allows them to learn highly complex patterns, it introduces two major challenges: overfitting (where models "memorize" noise and fail to generalize) and massive resource intensity (making deployment on edge devices impractical).

Traditional solutions like $L_1$ regularization (Lasso) or Variational Inference (VI) have notable drawbacks. Lasso can over-shrink important weights, and VI often struggles with the non-convex landscapes typical of deep learning, frequently getting trapped in poor local optima. To address this, researchers propose a novel Adaptive Empirical Bayesian (AEB) method. By combining stochastic gradient Markov Chain Monte Carlo (MCMC) with stochastic approximation, this approach automatically induces sparsity using "spike-and-slab" priors, achieving state-of-the-art model compression and significantly improved robustness against adversarial attacks.

The SG-MCMC-SA Algorithm

The core contribution of the paper is the SG-MCMC-SA algorithm, which performs Bayesian variable selection at a scale suitable for deep learning.

  • Spike-and-Slab Priors (SSGL): The model assumes network weights are drawn from a mixture of two distributions: a "spike" (a narrow Laplace distribution that aggressively pushes irrelevant weights toward zero) and a "slab" (a wider Normal distribution that accommodates important weights).
  • Hybrid Learning Strategy: Sampling every single variable in a deep network is computationally exhausting. Instead, the method uses a hybrid approach:
  • Sampling (SG-MCMC): It utilizes Stochastic Gradient Langevin Dynamics (SGLD) or Hamiltonian Monte Carlo (SGHMC) to sample the network weights ($\beta$). This allows the model to thoroughly explore the parameter space and avoid local traps.
  • Optimization (Stochastic Approximation - SA): It uses SA to smoothly and dynamically optimize the hyperparameters (the "priors") on the fly.
  • Self-Adaptivity: Unlike standard methods requiring manual tuning of a sparsity penalty, this model learns the optimal level of sparsity automatically from the data.
  • Pruning: A magnitude-based pruning strategy is integrated directly into the training loop, gradually increasing sparsity without destroying the network's underlying structure.
Posterior estimation of $\beta_1$ comparing SGLD-SA against baselines.

By treating weights as a distribution rather than fixed points, the model acts as a natural ensemble. This Bayesian approach provides a posterior average that leads to better generalization and resilience.

Empirical Results

The authors evaluated their method across several benchmarks, ranging from synthetic linear regression simulations to complex image classification tasks.

Synthetic Data Performance

To test variable selection capabilities, the authors used a "Large-p-Small-n" linear regression simulation (1000 predictors, but only 100 observations). The SG-MCMC-SA method demonstrated superior ability to identify true underlying values and generalize to unseen data compared to standard SGLD and Expectation-Maximization (EM) baselines.

Performance on synthetic data: training, testing, and posterior mean vs. truth.

Image Classification and Compression

  • State-of-the-Art Compression: On the CIFAR-10 dataset using a ResNet20 architecture, the method achieved 91.68% accuracy with 90% sparsity (utilizing only 27K parameters). This significantly outperformed other popular compression methods like Targeted Dropout. Notably, at 50% sparsity, the model actually outperformed the dense pre-trained baseline.
  • Superior Accuracy: On MNIST, the method reached 99.59% accuracy (and 99.75% with data augmentation), outperforming established models like Maxout Networks.

Adversarial Defense

The paper demonstrates that Bayesian uncertainty makes the model much more resilient to attacks. When subjected to the Fast Gradient Sign Method (FGSM) attack at high noise levels ($\zeta = 0.5$), the AEB method maintained an accuracy roughly 11% higher than standard "Vanilla" or "Dropout" models.

Limitations and Future Work

While highly effective, the method is not without limitations. To avoid a computationally "cumbersome system," the authors used a thinning factor of 500 during sampling. This indicates that while it is more efficient than full MCMC, there remains a non-trivial computational overhead compared to simple Stochastic Gradient Descent (SGD). Additionally, while many parameters are auto-tuned, the initial values for the spike-and-slab scales ($v_0, v_1$) still require some manual initialization based on the desired sparsity level.

Looking forward, the authors suggest this adaptive sampling framework could be generalized to other "state-space models" within deep learning, potentially paving the way for more complex, self-adaptive Bayesian architectures.

Summary updated

BibTeX
@inproceedings{deng2019adaptive,
  author = {Wei Deng and Xiao Zhang and Faming Liang and Guang Lin},
  title = {{An Adaptive Empirical Bayesian Method for Sparse Deep Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=O9-nbFx9HA},
}
Figure