Adjoined Networks: A Training Paradigm with Applications to Network Compression

Utkarsh Nath, Shrinu Kushagra, Shuicheng Yan · DOI

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

Deep Neural Networks (DNNs) are incredibly powerful but notoriously resource-intensive, requiring significant memory and computational power. This makes deploying them on edge devices—like smartphones or IoT sensors—a major challenge. Traditional solutions usually fall into two categories: pruning (removing weights post-training) and knowledge distillation (using a pre-trained "teacher" to train a smaller "student").

However, standard distillation often uses a static, frozen teacher, which limits the potential for mutual optimization. Adjoined Networks (AN) propose a shift in this paradigm: "good teachers are lifelong learners." By training the teacher and student models together with shared parameters, AN produces highly efficient compressed models while simultaneously improving the accuracy of the larger base model through a unique regularization effect.

Methodology: Weight Sharing and Adjoined Loss

The Adjoined Networks paradigm is defined by two key innovations: weight sharing and a dynamic joint loss function.

Weight Sharing

Instead of maintaining two separate models, the student network in AN is a structural subset of the teacher network. For every convolutional layer, the student uses a specific subset (the first $\alpha$ filters) of the teacher's filters. This ensures that the parameters of the smaller network are shared across both, facilitating direct knowledge transfer through the weights themselves.

The Adjoined Network architecture showing shared filters and dual outputs for the teacher (p) and student (q).

Adjoined Loss Function

The models are trained using a combined loss function. It begins with standard cross-entropy for the teacher, and as training progresses, a time-dependent KL-divergence term is added. This term forces the student’s output to match the teacher’s output. Because the teacher is not frozen, it adapts its weights to be more "teachable" while the student learns to be more efficient. Mathematically, this induces a data-dependent $L_2$ penalty on the weights, encouraging the over-parameterized parts of the teacher to stay in sync with the essential parts used by the student.

Differentiable Adjoined Networks (DAN)

While AN uses a fixed width (e.g., the student always uses a fixed fraction of filters), Differentiable Adjoined Networks (DAN) utilize Neural Architecture Search (NAS) via the Gumbel-softmax trick. This allows the system to automatically search for the optimal number of filters for each individual layer during the training process, further optimizing the efficiency-accuracy trade-off.

Experimental Results

The researchers evaluated AN and DAN on standard computer vision benchmarks, including ImageNet, CIFAR-10, and CIFAR-100.

Performance and Efficiency

AN and DAN consistently outperform state-of-the-art pruning and distillation methods. On ImageNet, AN achieved 71.8% top-1 accuracy with only 1.8M parameters—a massive reduction from the standard ResNet-50's ~25M parameters. DAN achieved ResNet-50 level accuracy while using 3.8× fewer parameters and 2.2× fewer FLOPs.

Comparison of ImageNet top-1 accuracy vs. number of parameters for AN, DAN, and various state-of-the-art pruning methods.

The Regularization Bonus

A significant finding is that training a student inside a teacher makes the teacher better. The shared weights and adjoined loss act as a regularizer, preventing the large model from overfitting. On CIFAR-100, a ResNet-50 trained in the adjoined fashion saw an accuracy boost of 0.77% compared to the same model trained normally.

Conclusion

Adjoined Networks provide a robust framework for simultaneous model compression and regularization. By sharing weights and training teacher and student models jointly, AN and DAN achieve state-of-the-art efficiency without sacrificing accuracy. Because the compression happens by reducing filter counts (structured pruning), these models provide immediate speedups on standard hardware without needing specialized sparse-matrix software. Future work may explore applying this paradigm to Transformer-based architectures and real-world latency benchmarks on edge hardware.

Summary updated

BibTeX
@inproceedings{nath2022adjoined,
  author = {Utkarsh Nath and Shrinu Kushagra and Shuicheng Yan},
  title = {{Adjoined Networks: A Training Paradigm with Applications to Network Compression}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=HiehK0TvOzA},
}
Figure