TL;DR
This paper introduces FlipOut, a novel neural network pruning method that identifies redundant weights by tracking their "sign flips" around zero during training. This approach allows for efficient pruning before convergence, requires minimal hyperparameter tuning, and achieves state-of-the-art performance at extremely high sparsity levels (99.6% and above) on various object classification tasks.
What Problem Does This Paper Address?
Modern deep neural networks, while achieving impressive results, are often burdened by a massive number of parameters. This leads to increased training time, computational costs, and memory requirements, hindering their deployment on resource-constrained devices and in time-sensitive applications. Network pruning aims to alleviate these issues by removing redundant weights. However, existing pruning methods often suffer from several drawbacks: they can be computationally intractable, require multiple cycles of pruning and retraining to convergence, demand extensive hyperparameter tuning for optimal performance, and struggle to precisely target a desired sparsity level. This paper addresses the need for a more efficient, user-friendly, and effective pruning technique.
Methods
The core innovation of FlipOut is the "aim test," a heuristic designed to determine if a weight has a local optimum at a specific value (in this case, zero) during training, without waiting for convergence. The aim test monitors how often a weight "oscillates" around zero, specifically looking for "sign flips" (when a weight's sign changes from positive to negative or vice-versa).
To make this test more robust and address "deceitful shots" (updates that might falsely indicate a local optimum), FlipOut incorporates two key components:
- Sign Flipping as Saliency: The primary saliency score for a weight is based on the number of sign flips it undergoes. This is normalized by the weight's magnitude (specifically, its distance from zero, raised to a power
p). This normalization helps to account for weights that are already close to zero and might flip signs more easily. - Gradient Noise: Gaussian noise is added to the gradients during training. This serves two purposes: it aids in optimization and exploration, and crucially, it helps to convert "under-shooting" updates (where a weight gets closer to zero but stays on the same side) into "over-shooting" updates (where it crosses zero), making the sign flip detection more reliable. The variance of this noise is scaled by the L2 norm of the weights and a hyperparameter
λ.
FlipOut applies this saliency criterion periodically during training, pruning a fixed percentage of the lowest-saliency weights at each step until the desired sparsity is reached.
Datasets
The paper evaluates FlipOut on the following datasets:
- CIFAR-10
- Imagenette
The models used for evaluation include:
- ResNet18
- VGG19
- DenseNet121
Key Insights and Ideas
- Sign flips as a signal for redundancy: The paper posits that weights that frequently oscillate around zero (i.e., change signs) are likely redundant and can be safely pruned. This is a novel criterion compared to traditional magnitude-based pruning.
- Pruning before convergence is viable: By using the aim test, FlipOut demonstrates that effective pruning can occur well before the network reaches its final converged state, saving significant training time.
- Gradient noise as a facilitator for pruning: The addition of gradient noise is not just for optimization but is shown to be crucial for the effectiveness of the sign-flipping criterion, by helping to convert under-shoots into over-shoots.
- Default hyperparameters work well: A significant practical advantage highlighted is that FlipOut achieves near-optimal results with default hyperparameter settings (
p=2,λ=1), greatly reducing the burden of tuning. - High sparsity is achievable without catastrophic performance drops: The method excels at very high sparsity levels (99.6% and above), outperforming previous methods in many cases.
Key Results
- FlipOut achieves state-of-the-art performance for sparsity levels of 99.6% and above on ResNet18 and VGG19 trained on CIFAR-10.
- For ResNet18 at 99.9% sparsity, FlipOut achieves 83.75% accuracy, a significant improvement of 1.68 percentage points over the next best method.
- For VGG19 at 99.9% sparsity, FlipOut achieves 87.72% accuracy, outperforming the next best method by 0.48 percentage points.
- While DenseNet121 on Imagenette shows a more competitive landscape, FlipOut is the second-best method at the highest sparsity level.
- The method is competitive with other baselines at lower sparsity levels, typically within a 1 percentage point difference.
- An ablation study shows that both the sign-flipping criterion and gradient noise addition play important roles in FlipOut's performance.
Limitations and Future Work
- Deceitful shots: While addressed, the paper acknowledges that "deceitful shots" (updates that might falsely indicate a local optimum) can still occur, especially when the hypothesized optimum is far from the true optimum. The normalization by magnitude and the use of gradient noise aim to mitigate this.
- Hyperparameter sensitivity at extreme sparsities: While default values are generally good, the paper notes that for very high sparsity levels (e.g., 99.9%), optimizing the
λhyperparameter can yield slightly better results, though the defaultλ=1remains competitive. - Comparison to Hoyer-Square: For DenseNet121, Hoyer-Square generally outperforms FlipOut, suggesting that other pruning criteria might be more effective for certain architectures or datasets.
- Future work: The paper suggests that the "aim test" is a general method that could be applied to other scenarios beyond pruning, such as detecting local optima for other purposes during training. The authors also note that their method's ability to handle deceitful shots through noise addition and magnitude normalization is a promising avenue for future research.
Summary updated