Abstract
Resolution Switchable Networks (RS-Nets) enable a single convolutional neural network to adjust its input resolution dynamically, facilitating on-the-fly trade-offs between accuracy and computational speed. By employing shared weights alongside resolution-specific Batch Normalization and a novel multi-resolution ensemble distillation technique, RS-Nets not only eliminate the need for multiple stored models but also outperform models trained for fixed resolutions.
Introduction
Deep learning models are increasingly deployed across diverse hardware environments, from cloud servers to edge devices. A common strategy to manage varying computational constraints is adjusting input image resolution. However, standard CNNs are sensitive to resolution changes; a model trained at $224 \times 224$ typically experiences a significant accuracy drop when tested at $128 \times 128$ due to shifts in internal feature statistics. Traditionally, this necessitates training and storing separate models for each target resolution—a "storage nightmare" that increases memory requirements linearly and introduces switching latency.
Methodology: RS-Nets
The proposed RS-Net framework produces a single set of weights capable of operating across multiple resolutions (e.g., $224, 192, 160, 128, 96$). This is achieved through two core innovations:
- Multi-Resolution Parallel Training with Private BNs: While convolutional and fully-connected weights are shared, the network maintains "private" Batch Normalization (BN) layers for each resolution. This allows the model to account for the distinct feature map statistics produced at different scales.
- Multi-Resolution Ensemble Distillation (MRED): During training, an image is processed at all supported resolutions. A "teacher" prediction is generated via a weighted ensemble of these outputs. Each resolution path is then optimized using both a standard classification loss and a distillation loss to mimic this ensemble teacher.
Key Insights
The "Apparent Object Size" Discrepancy
Standard training often involves random-size cropping, which can make objects appear larger during training than during testing. Parallel training on multiple resolutions acts as a form of data augmentation that reduces this "apparent object size" gap, better aligning training and testing distributions.
Wisdom of the Multi-Scale Crowd
The authors observed that the highest resolution is not always optimal for every image; lower resolutions can sometimes provide better global context. By ensembling these multi-scale views into a teacher during training, the model develops more robust representations than single-resolution counterparts.
Experimental Results
Evaluations on ImageNet (ILSVRC12) across ResNet-18, ResNet-50, and MobileNetV2 architectures demonstrate the efficacy of RS-Nets.
- Performance Gains: RS-Nets consistently outperform individually trained models (I-Nets). For instance, an RS-ResNet50 at $224 \times 224$ achieves 79.3% top-1 accuracy, surpassing the 77.1% of a standard ResNet50.
- Efficiency: An RS-ResNet18 at $160 \times 160$ outperforms a standard ResNet18 at $224 \times 224$ while requiring 49% fewer FLOPs.
- Comparison to Width-Switching: RS-Nets offer a superior accuracy-to-complexity trade-off compared to "Slimmable Networks." An RS-MobileNetV2 was found to be 2.5% more accurate than a width-scaled version at the same computational cost.
Conclusion and Future Work
RS-Nets provide a zero-cost switching mechanism for runtime efficiency, maintaining high accuracy across resolutions with minimal storage overhead. While highly effective for image recognition and robust to quantization, future research could explore extending this approach to broader resolution ranges and tasks like object detection or semantic segmentation where spatial resolution is paramount.
Summary updated