Abstract
Compressing deep neural networks while maintaining accuracy is important when we want to deploy large, powerful models in production and/or edge devices. One common technique used to achieve this goal is knowledge distillation. Typically, the output of a static pre-defined teacher (a large base network) is used as soft labels to train and transfer information to a student (or smaller) network. In this paper, we introduce Adjoined Networks, or AN, a learning paradigm that trains both the original base network and the smaller compressed network together. In our training approach, the parameters of the smaller network are shared across both the base and the compressed networks. Using our training paradigm, we can simultaneously compress (the student network) and regularize (the teacher network) any architecture. In this paper, we focus on popular CNN-based architectures used for computer vision tasks. We conduct an extensive experimental evaluation of our training paradigm on various large-scale datasets. Using ResNet-50 as the base network, AN achieves 71.8% top-1 accuracy with only 1.8M parameters and 1.6 GFLOPs on the ImageNet data-set. We further propose Differentiable Adjoined Networks (DAN), a training paradigm that augments AN by using neural architecture search to jointly learn both the width and the weights for each layer of the smaller network. DAN achieves ResNet-50 level accuracy on ImageNet with $3.8\times$ fewer parameters and $2.2\times$ fewer FLOPs.
Introduction
Deploying Deep Neural Networks (DNNs) on edge devices like smartphones and IoT sensors is challenging due to strict memory, compute, and energy constraints. Standard approaches like Knowledge Distillation (KD) often rely on a frozen, pre-trained teacher network to guide a smaller student. This one-way transfer limits the potential for mutual optimization. Furthermore, many pruning methods result in unstructured sparsity that requires specialized hardware for actual speedups. This paper addresses these gaps by proposing a joint training paradigm where teacher and student learn together from scratch, sharing parameters to ensure structural compression compatible with commodity hardware.
Methods: Adjoined and Differentiable Adjoined Networks
The authors introduce two primary techniques to achieve efficient structural compression.
Adjoined Networks (AN)
AN utilizes a single network architecture with modified convolution layers. During training, each layer processes input twice: once using all filters (the "large" network) and once using a subset of filters (the "small" network). This ensures perfect weight sharing between the two. The training is guided by a time-dependent "Adjoined Loss," which combines standard cross-entropy for the large network with a KL-divergence loss that encourages the small network to mimic the large network's predictions.
Differentiable Adjoined Networks (DAN)
While AN uses a fixed global compression ratio, DAN employs Neural Architecture Search (NAS) to optimize the width of each individual layer. By using the Gumbel-Softmax trick, the choice of filter width becomes differentiable, allowing the network to learn the optimal architecture during training while being penalized by a FLOP-weighted regularization term.
Experimental Evaluation
The proposed methods were evaluated on several benchmarks:
- ImageNet: The primary large-scale benchmark for real-world vision tasks.
- CIFAR-10 & CIFAR-100: Used for ablation studies and comparisons against KD variants.
- Imagewoof: A subset of ImageNet used as a proxy for computationally intensive architecture searches in DAN.
Key Results and Insights
The experimental results demonstrate that joint training is superior to static distillation.
Performance and Efficiency
On ImageNet, the AN-50-Small model achieved 71.8% top-1 accuracy with only 2.2M parameters and 1.6 GFLOPs—an 11.5x reduction in size and 3x reduction in compute compared to a standard ResNet-50. The DAN-100 variant matched ResNet-50 accuracy (75.43%) while using 3.8x fewer parameters and 2.2x fewer FLOPs.
Compression as Regularization
A significant finding is that the large network's performance actually improves when trained in the Adjoined paradigm. For instance, a ResNet-50's baseline accuracy increased from 76.1% to 76.87%. Theoretical analysis suggests that forcing the large network to share weights with a smaller sub-network acts as a data-dependent $L_2$ regularizer, preventing overfitting.
Conclusion and Future Work
Adjoined Networks provide a hardware-friendly path to model compression by focusing on structural pruning and joint training. While currently focused on CNNs for computer vision, the paradigm is theoretically generalizable. Future research could explore its application to Transformers and NLP tasks, as well as more sophisticated masking strategies for architecture search.
Summary updated