M2SGD: Learning to Learn Important Weights

Nicholas I-Hsien Kuo, Mehrtash Harandi, Nicolas Fourrier, Christian Walder, Gabriela Ferraro, Hanna SuominenWorkshops @ CVPR 2020

Abstract

Meta-learning concerns rapid knowledge acquisition. One popular approach casts optimization as a learning problem, showing that learned neural optimizers update base learners more quickly than handcrafted counterparts. In this paper, we learn an optimization rule that sparsely updates learner parameters and removes redundant weights. We present Masked Meta-SGD (M²SGD), a neural optimizer capable of updating learners quickly and removing 83.71% of weights for ResNet20s.

Introduction

Modern deep learning models are notoriously over-parameterized, leading to high memory consumption and slow inference on edge devices. While pruning is a common solution, traditional "train-prune-retrain" cycles are computationally expensive. This research addresses two primary challenges: the lack of task-specific adaptation in handcrafted optimizers (like SGD) and the high cost of finding sparse "winning ticket" sub-networks.

Methodology

The authors propose two extensions to the Meta-SGD framework to integrate pruning directly into the optimization process.

Dynamic Meta-SGD (DMSGD)

Standard Meta-SGD utilizes a static learning rate for each parameter. DMSGD evolves this by employing a coordinate-wise LSTM-based meta-learner. This LSTM processes the current gradient and hidden state to predict a dynamic learning rate (β) for each weight at every time step, allowing the optimizer to adapt its aggressiveness throughout the training process.

Masked Meta-SGD (M²SGD)

M²SGD introduces a masking mechanism atop DMSGD. It treats the magnitude of the learned update as a proxy for weight importance. If the meta-learner assigns a learning rate below a specific threshold (ξ), the corresponding weight is considered redundant and is masked (set to zero). This enables the discovery of sparse sub-networks "on the fly" without post-hoc analysis.

Comparison of Meta-SGD and M2SGD optimization flows.

The models were evaluated on the STL10 dataset using ResNet20 architectures and Fashion-MNIST using Multi-Layer Perceptrons (MLPs).

Results and Discussion

M²SGD demonstrates significant improvements in both efficiency and performance. On the ResNet20 benchmark (STL10), M²SGD achieved a sparsity of 83.71% (reducing parameters from 270K to 40K) while maintaining an accuracy of 63.53%, comparable to a dense model trained with standard SGD (63.64%).

Loss convergence comparison between standard SGD, Meta-SGD, DMSGD, and M2SGD.

As shown in the convergence plots, the meta-learned optimizers reached peak performance in approximately 4,000 steps, nearly doubling the optimization speed of standard SGD, which required 7,850 steps. Furthermore, the dense DMSGD variant outperformed all baselines, reaching 65.52% accuracy on STL10.

Conclusion

M²SGD successfully integrates pruning into the optimization loop, bypassing the traditional retraining tax. While the meta-training phase introduces initial overhead, the resulting optimizer provides faster convergence and extreme sparsity. Future work may explore the scalability of coordinate-wise LSTMs to larger architectures and automated thresholding for target sparsity.

Summary updated

BibTeX
@inproceedings{kuo2020m,
  author = {Nicholas I-Hsien Kuo and Mehrtash Harandi and Nicolas Fourrier and Christian Walder and Gabriela Ferraro and Hanna Suominen},
  title = {{M2SGD: Learning to Learn Important Weights}},
  booktitle = {Workshops @ CVPR},
  year = {2020},
  url = {https://openreview.net/forum?id=xjaDKJSS-Ac},
}
Figure