Abstract
We propose a simple and easy to implement neural network compression algorithm that achieves results competitive with more complicated state-of-the-art methods. The key idea is to modify the original optimization problem by adding K independent Gaussian priors (corresponding to the k-means objective) over the network parameters to achieve parameter quantization, as well as an L1 penalty to achieve pruning. Unlike many existing quantization-based methods, our method uses hard clustering assignments of network parameters, which adds minimal change or overhead to standard network training. We also demonstrate experimentally that tying neural network parameters provides less gain in generalization performance than changing network architecture and connectivity patterns entirely.
Introduction
Modern neural networks are notoriously parameter-heavy. While their massive size allows them to learn complex patterns, it makes them difficult to deploy on hardware with limited storage, such as mobile devices or IoT sensors, and can lead to overfitting on smaller datasets. Existing solutions typically involve pruning (removing unnecessary connections) and quantization (reducing weight precision). However, many state-of-the-art methods require multi-stage pipelines or complex Bayesian models that are slow to train.
Automatic Parameter Tying (APT)
The authors introduce Automatic Parameter Tying (APT), a streamlined approach that integrates directly into standard gradient descent. The core of APT is a modified loss function that includes two specific penalties:
- A $k$-means Penalty: This encourages weights to cluster around $K$ distinct values (cluster centers). APT uses "hard" assignments, where each weight belongs to exactly one cluster.
- An $L_1$ Penalty (Lasso): This encourages sparsity, pushing weights toward zero to achieve pruning.
The training process consists of two stages: Soft-Tying, where the network alternates between weight updates via backpropagation and cluster center updates using an optimized 1D $k$-means algorithm; and Hard-Tying, where weights are locked to their cluster means for a final round of fine-tuning via projected gradient descent.
Key Results
The authors evaluated APT on standard benchmarks including MNIST (LeNet architectures) and CIFAR-10 (VGG-16). APT proved highly competitive with complex "Deep Compression" pipelines:
- LeNet-5 (MNIST): 346x compression rate with 1.0% error.
- LeNet-300-100 (MNIST): 127x compression with 1.9% error.
- VGG-16 (CIFAR-10): 93x compression with 8.3% error.
The method is highly efficient; the 1D $k$-means step adds almost no overhead to standard training time due to optimizations using sorting and binary search.
Analysis and Insights
- Simplicity and Efficiency: Hard $k$-means assignments provide compression results similar to sophisticated Bayesian machinery but are much faster and easier to implement.
- Architecture vs. Parameter Tying: A key finding is that network architecture (e.g., local connectivity in CNNs) provides a more significant boost to generalization than parameter tying itself. This suggests quantization is primarily a compression tool.
- The "Zero Cluster": Combining $L_1$ regularization with clustering naturally creates a "zero cluster," allowing the model to prune over 99% of the network while quantizing the remainder.
Conclusion
While APT is effective, it faces challenges such as sensitivity to local optima due to the non-convex $k$-means objective and the need for manual hyperparameter tuning ($K, \lambda_1, \lambda_2$). Future work may explore non-parametric approaches like DP-means to automatically determine the optimal number of clusters during training.
Summary updated