← All projects

Machine learning

Training sparse neural networks

How many neural network connections do we actually need? We compared three sparse training methods on CIFAR-10.

Duke · ECE 685D / CS 675D team project

PyTorchResNet-20CIFAR-10

The question

We wanted to see how much we could reduce a neural network’s connections while keeping its predictive accuracy. We also compared methods that keep the same connections with methods that change them during training.

What we did

  • Compared fixed sparse masks, Sparse Evolutionary Training (SET), and gradient-guided RigL on a CIFAR-style ResNet-20.
  • Trained at 90%, 95%, and 98% sparsity, using both SGD with momentum and Adam.
  • Compared accuracy curves and weight visualizations, and looked at how connections changed during training.
Project bar chart comparing final test accuracy for static sparse, SET, and RigL training at three sparsity levels
Final test accuracy across methods and sparsity levels. Our notebooks and paper describe the training setup. Source figure

Results & discussion

Static sparsity was a competitive baseline in our experiments, and RigL generally did better than SET. The optimizer made a difference, too. At the highest sparsity level, the model had clearer limits on what it could learn.

Limitations

We used one model family and CIFAR-10, with no data augmentation and only 15 training epochs. These results describe those runs; they don’t establish which method would work best in other settings.

Team: Ammy Lin, Tonantzin Real Rojas, and Anvita Suresh. Completed for Introduction to Deep Learning at Duke University.

For the code and full project details, see the project repository.