Abstract: Pruning effectively compresses overparameterized models. Despite the success of pruning methods for discriminative models, applying them for generative models has been relatively rarely approached. This study conducts structured pruning on U-Net generators of conditional GANs. A per-layer sensitivity analysis confirms that many unnecessary filters exist in the innermost layers near the bottleneck and can be substantially pruned. Based on this observation, we prune these filters from multiple inner layers or suggest alternative architectures by completely eliminating the layers. We evaluate our approach with Pix2Pix for image-to-image translation and Wav2Lip for speech-driven talking face generation. Our method outperforms global pruning baselines, demonstrating the importance of properly considering where to prune for U-Net generators.
Introduction
Generative Adversarial Networks (GANs), particularly those utilizing U-Net architectures for tasks such as image-to-image translation, are notoriously resource-intensive. While pruning—the process of removing unimportant weights—is a standard technique for compressing classification models, its application to generative models has been less effective. The primary challenge lies in determining which layers are critical for high-fidelity synthesis. Standard global pruning methods often treat all layers equally, leading to significant quality degradation in generative tasks.
Methodology: The "Cut Inner Layers" Strategy
The authors propose a "Cut Inner Layers" strategy grounded in a rigorous layer-wise sensitivity analysis. By pruning filters in each layer of a pre-trained U-Net individually and measuring the impact on the Fréchet Inception Distance (FID), they identified a distinct "U-shaped" sensitivity curve.
The analysis revealed that outermost layers (near input/output) are vital for structural integrity, while innermost layers (near the bottleneck) are highly insensitive to pruning. Based on this, the researchers implemented:
- Filter-level Pruning: Removing filters with the smallest L2-norm magnitudes specifically in the innermost layers.
- Layer Removal: Completely eliminating innermost encoder-decoder layer pairs, effectively widening the bottleneck (e.g., from $1 \times 1$ to $4 \times 4$ spatial resolution).
- Joint Retraining: Performance recovery is achieved by retraining the pruned generator alongside the original discriminator, rather than freezing it.
Experimental Setup
The strategy was evaluated across two distinct generative tasks:
- Image-to-Image Translation (Pix2Pix): Evaluated on the Edges2Shoes (50k images) and Facades (0.5k images) datasets.
- Talking Face Generation (Wav2Lip): Evaluated on the LRS3 dataset (32k utterances), focusing on generating lip movements synchronized with audio tracks.
Analysis and Insights
The core discovery is the non-uniform sensitivity of U-Net layers. The outer layers handle low-level structural details critical for the final image, whereas the deep inner layers, which process abstract high-level features, contain significant redundancy. This redundancy is likely facilitated by skip connections that "shuttle" low-level information directly from the encoder to the decoder, making the deep bottleneck layers less critical for maintaining image structure.
Consequently, global pruning methods like Uniform Pruning or LAMP perform poorly because they damage sensitive outer layers. By focusing on "safe" inner zones, much higher compression ratios are achievable. Interestingly, in some cases, pruning improved FID scores, suggesting it may remove "defective" weights or mitigate overfitting in overparameterized models.
Results
The proposed method achieves massive efficiency gains with negligible impact on image quality.
- Pix2Pix (Edges2Shoes): Removing innermost layers reduced parameters from 54.4M to 29.2M while maintaining an FID (29.7) nearly identical to the original (29.0).
- Wav2Lip: Achieved an 18.9x reduction in parameters and an 8.9x reduction in MACs. The pruned model even achieved a slightly better FID (6.09) than the original (6.16).
- Inference Speed: On a CPU, the compressed Wav2Lip model demonstrated a 6.8x speedup, significantly enhancing viability for real-time edge applications.
Conclusion and Future Work
While effective, the current approach requires a manual grid search to determine optimal pruning ratios. Future work could involve automating this via Neural Architecture Search (NAS). Additionally, combining "inner layer" pruning with techniques like Knowledge Distillation or Quantization could further push efficiency. Finally, verifying the "U-shape" theory across other architectures like StyleGAN remains an important step for generalization.
Summary updated