TL;DR
This paper introduces a novel "feature-gate coupling" (FGC) method to improve dynamic network pruning (DNP) by aligning the distributions of features and their corresponding gating signals. By leveraging self-supervised learning to ensure that semantically similar features are handled by similar gates, FGC effectively reduces redundant computations while preserving network accuracy, outperforming existing state-of-the-art methods.
What Problem Does This Paper Address?
Deep neural networks (DNNs) are increasingly complex, leading to high computational costs that hinder their deployment on resource-constrained devices. Network pruning, a technique to reduce this cost, has seen significant progress. Dynamic network pruning (DNP) specifically aims to reduce run-time computation by selectively enabling or disabling network components (like channels) based on the input. This is often achieved using "gating modules" that generate binary masks (gates) for each input. However, existing DNP methods often overlook the crucial relationship between the features themselves and the gates that control them. This disconnect can lead to "gated features" that are distorted, introducing noise and degrading the network's representational capacity. The paper addresses this gap by proposing a method to explicitly align the distributions of features and gates, ensuring that similar inputs are processed by similar sub-networks.
Methods
The core of the proposed method is the Feature-Gate Coupling (FGC) approach, which operates in an iterative, self-supervised manner. FGC consists of two main steps:
- Neighborhood Relationship Exploration: This step uses the k-Nearest Neighbor (kNN) algorithm in the feature space. For each instance, it identifies its nearest neighbors based on feature similarity. These neighborhood relationships are then treated as self-supervisory signals.
- Feature-Gate Alignment: This step employs Contrastive Self-Supervised Learning (CSL) to regularize the gating modules. The previously identified nearest neighbors in the feature space are used as "positive" instances, while other instances are considered "negative." A contrastive loss function is then optimized in the gate space to pull these positive instances closer together and push negative instances apart. This process effectively aligns the neighborhood relationships observed in the feature space with those in the gate space.
This two-step process is iterated until convergence. FGC is designed as a "plug-and-play" module, meaning it can be integrated into existing DNP frameworks without requiring significant architectural changes.
Datasets
The paper evaluates its method on several standard datasets:
- Image Classification: CIFAR10, CIFAR100, and ImageNet.
- Object Detection: PASCAL VOC 2007.
- Semantic Segmentation: Cityscapes.
Key Insights and Ideas
- The Feature-Gate Disconnect is a Real Problem: The paper convincingly demonstrates that ignoring the alignment between feature distributions and gate distributions leads to suboptimal pruning and can even distort the learned representations.
- Self-Supervision is Key for Alignment: Since ground-truth labels are not directly helpful for aligning feature and gate distributions, the authors leverage self-supervised learning (specifically, kNN and CSL) to create supervisory signals from the data itself.
- Neighborhood Relationships as a Bridge: Using instance neighborhood relationships in the feature space as a proxy for semantic similarity provides a robust signal for guiding the alignment process in the gate space.
- FGC is Architecture-Agnostic: The plug-and-play nature of FGC means it can be readily applied to various DNP methods and network architectures, highlighting its broad applicability.
- Deep Layers Benefit Most: Ablation studies suggest that FGC is particularly effective when applied to the deeper layers of networks, where features are more discriminative and semantic relationships are more pronounced.
Key Results
- Improved Accuracy-Computation Trade-off: FGC consistently outperforms baseline methods and state-of-the-art DNP techniques across various datasets and network architectures (ResNet, WideResNet, MobileNetV2). For instance, on CIFAR10, FGC achieves better accuracy with comparable or higher pruning ratios compared to methods like BAS and FBS.
- Significant Pruning Gains: FGC achieves substantial computation reduction. For example, on ResNet-56 for CIFAR10, it reduces computation by 66.2%, outperforming static pruning methods.
- Effective for Transfer Tasks: The method also shows promise in object detection (PASCAL VOC 2007) and semantic segmentation (Cityscapes), demonstrating its generalization capabilities.
- Visualization Confirms Alignment: UMAP visualizations show that FGC effectively aligns feature and gate embeddings, leading to more discriminative and disentangled representations in the gate space.
Limitations and Future Work
- Bias in Distribution Estimates: The authors acknowledge that in scenarios with long-tailed data distributions or incremental learning of new classes, estimating feature distributions for gate space alignment might be challenging due to biased estimates.
- Future Directions: They suggest exploring "distribution calibration" methods that leverage implicit class relationships to address the bias issue. This could involve further research into how to better handle skewed data distributions for more robust feature-gate alignment.
Summary updated