[Paper Review] Sparse Model Soups: A Recipe for Improved Pruning via Model Averaging
This paper introduces Sparse Model Soups (SMS), a method that enhances iterative magnitude pruning (IMP) by averaging multiple pruned models trained with varied hyperparameters—such as learning rate schedules and weight decay—during retraining. By ensuring identical sparse connectivity across models, SMS preserves sparsity while significantly improving generalization and out-of-distribution performance, outperforming both individual pruned models and standard IMP with reduced training time.
Neural networks can be significantly compressed by pruning, yielding sparse models with reduced storage and computational demands while preserving predictive performance. Model soups (Wortsman et al., 2022) enhance generalization and out-of-distribution (OOD) performance by averaging the parameters of multiple models into a single one, without increasing inference time. However, achieving both sparsity and parameter averaging is challenging as averaging arbitrary sparse models reduces the overall sparsity due to differing sparse connectivities. This work addresses these challenges by demonstrating that exploring a single retraining phase of Iterative Magnitude Pruning (IMP) with varied hyperparameter configurations such as batch ordering or weight decay yields models suitable for averaging, sharing identical sparse connectivity by design. Averaging these models significantly enhances generalization and OOD performance over their individual counterparts. Building on this, we introduce Sparse Model Soups (SMS), a novel method for merging sparse models by initiating each prune-retrain cycle with the averaged model from the previous phase. SMS preserves sparsity, exploits sparse network benefits, is modular and fully parallelizable, and substantially improves IMP's performance. We further demonstrate that SMS can be adapted to enhance state-of-the-art pruning-during-training approaches.
Motivation & Objective
- To address the challenge of combining model averaging with sparsity in pruned neural networks.
- To improve generalization and out-of-distribution performance without increasing inference cost.
- To enable efficient, parallelizable training of sparse models by reusing a shared sparse connectivity pattern across multiple retrained models.
- To demonstrate that retraining with varied hyperparameters during IMP yields models suitable for averaging while maintaining sparsity.
- To show that initializing subsequent pruning cycles from the averaged model further enhances performance.
Proposed method
- Train multiple pruned models using iterative magnitude pruning (IMP) with identical initial weights but different hyperparameters such as learning rate schedules and weight decay.
- Ensure all models share the same sparse connectivity pattern by applying pruning before retraining, enabling direct parameter averaging.
- Construct a single sparse model by averaging the parameters of multiple retrained models, preserving sparsity and inference efficiency.
- Initiate each subsequent pruning cycle from the previously averaged model, enabling progressive performance gains.
- Use a consistent retraining schedule (e.g., ALLR) to ensure convergence and stability across models.
- Leverage the modular and parallelizable nature of the approach to scale across multiple models without increasing inference cost.
Experimental results
Research questions
- RQ1Can model averaging be effectively combined with structured sparsity in pruned neural networks without sacrificing sparsity or increasing inference cost?
- RQ2Does averaging multiple pruned models trained with different hyperparameters improve generalization and out-of-distribution performance compared to individual models?
- RQ3Can the performance of iterative magnitude pruning be enhanced by initializing subsequent pruning cycles from an averaged model?
- RQ4What hyperparameter configurations during retraining lead to models that are both diverse enough for averaging and share identical sparse connectivity?
- RQ5How does the length and schedule of retraining affect the performance of the resulting sparse model soup?
Key findings
- Sparse Model Soups (SMS) achieve a test accuracy of 99.52% on CIFAR-100 at 95% sparsity, outperforming standard IMP, which achieves 98.79% under the same conditions.
- At 97% sparsity, SMS achieves 97.68% accuracy, compared to 98.90% for IMP, demonstrating consistent gains even at high sparsity levels.
- The method reduces training time compared to retraining individual models for the same duration, as multiple models are trained in parallel with shared connectivity.
- Ablation studies show that even a single retraining epoch can yield significant improvements when combined with an appropriate learning rate schedule (e.g., ALLR).
- The use of diverse hyperparameters during retraining—such as learning rate schedules and weight decay—results in models that are sufficiently similar for averaging yet diverse enough to improve generalization.
- Initializing the next pruning cycle from the averaged model leads to improved performance in subsequent retraining phases, indicating a cascading benefit of the approach.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.