TL;DR
Self-supervised learning (SSL) models are powerful but notoriously resource-intensive. This paper demonstrates that SSL models learn highly redundant channel features and introduces an on-the-fly, dynamic channel selection mechanism that slashes computational complexity (FLOPs) by up to 90% during inference with minimal impact on downstream accuracy.
What Problem Does This Paper Address?
Self-supervised learning (SSL) has revolutionized computer vision by allowing networks to learn rich representations from unlabeled data, nearly matching the performance of supervised pre-training. However, this success comes at a steep cost: SSL models typically require massive parameter counts, computationally expensive training regimes, and slow inference speeds.
While the supervised learning community has successfully used conditional channel computation—dynamically selecting which convolutional channels to activate based on the input image—to reduce costs, its impact on SSL remains largely unexplored. This paper addresses two core questions:
- Do self-supervised models learn highly redundant channel features?
- Can we integrate dynamic channel selection directly into SSL pre-training to achieve faster, more efficient inference on downstream tasks?
Methods
The authors integrate a dynamic channel selection mechanism directly into SimSiam, a popular Siamese-network-based SSL framework, using a ResNet18 backbone.
Unlike traditional pruning methods that require a tedious three-stage pipeline (pretrain $\rightarrow$ prune $\rightarrow$ finetune), this approach learns channel sparsity from scratch and on-the-fly.
Key components of the architecture include:
- Gating Mechanism: Following the DGNet architecture, the model uses a Squeeze-and-Excitation (SE) block to generate a spatial-agnostic context vector for each layer. This vector passes through a lightweight network to output a channel attention score.
- Hard Attention Mask: Channels with scores $\ge 0$ are kept ("on"), while others are skipped ("off").
- Gumbel-Softmax Trick: Because discrete on/off decisions are non-differentiable, the Gumbel-Softmax reparameterization trick is used during training to allow standard gradient descent.
- Optimisation: The network is trained using a joint loss function: $$\mathcal{L} = \mathcal{L}_{SSL} + \mathcal{L}_G$$ where $\mathcal{L}_{SSL}$ is the standard SimSiam cosine similarity loss, and $\mathcal{L}_G$ is a sparsity objective that penalizes the network for exceeding a user-defined target FLOP budget ($t_d$).
Datasets
The approach was validated on three standard image classification datasets:
- CIFAR-10
- CIFAR-100
- ImageNet-100 (a 100-class subset of the standard ImageNet dataset)
Evaluation was performed using a $k$-nearest neighbors ($k$-NN with $k=1$) classifier on the validation sets.
Key Insights and Ideas
- Confirmation of Redundancy: The experiments confirm that SSL models naturally learn highly redundant features. As shown in Figure 1, a massive portion of the channels are either "Always Off" or "Always On" across the entire validation set, while only a fraction are strictly input-dependent.
- Dataset Similarities: The channel activation distributions for CIFAR-10 and CIFAR-100 look remarkably similar. The authors attribute this to the fact that the underlying image statistics between the two datasets are highly correlated.
- Sparsity as a Regularizer: Restricting channel usage doesn't just maintain performance—in some cases, it can actually improve it by acting as a regularizer against overfitting.
Key Results
The authors evaluated the network across various target budgets ($t_d$), representing the target fraction of FLOPs compared to the baseline model. The complete breakdown is available in Table 1 (Figure 2).
- CIFAR-10: At a 70% budget ($t_d = 0.7$), the model achieved 83.08% accuracy (a minor drop from the 85.46% baseline) while cutting FLOPs by 34.76%. Remarkably, even at a aggressive 10% budget, the model retained 76.72% accuracy while reducing FLOPs by 90.55%.
- CIFAR-100: At a 60% budget, the dynamic model actually surpassed the baseline accuracy (53.18% vs. 52.95%) while saving 43.73% of the computational cost.
- ImageNet-100: Setting the budget to 50% yielded 60.38% accuracy (down from 64.34% baseline) but achieved a 51.55% reduction in FLOPs.
Limitations and Future Work
While promising, the authors note a few limitations to be addressed in future research:
- Downstream Task Variety: The current evaluation is restricted to image classification. Performance needs to be verified on other downstream tasks like object detection, segmentation, and instance retrieval.
- Consistency Constraints: The core mechanism of SSL relies on maximizing agreement between different augmented views of the same image. However, the current gating module does not enforce any consistency-aware constraints to ensure that both augmented views select similar channels during training.
Summary updated