Abstract
Transferring knowledge embedded in trained neural networks is a core problem in areas like model compression and continual learning. Among knowledge transfer approaches, functional transfer methods such as knowledge distillation and representational distance learning are particularly promising, since they allow for transferring knowledge across different architectures and tasks. Considering various characteristics of networks that are desirable to transfer, equivariance is a notable property that enables a network to capture valuable relationships in the data. We assess existing functional transfer methods on their ability to transfer equivariance and empirically show that they fail to even transfer shift equivariance, one of the simplest equivariances. Further theoretical analysis demonstrates that representational similarity methods, in fact, cannot guarantee the transfer of the intended equivariance. Motivated by these findings, we develop a novel transfer method that learns an equivariance model from a given teacher network and encourages the student network to acquire the same equivariance, via regularization. Experiments show that our method successfully transfers equivariance even in cases where highly restrictive methods, such as directly matching student and teacher representations, fail.
Introduction
A central challenge in deep learning is transferring the "knowledge" of a high-performing teacher model to a student model with a different architecture. When architectures differ significantly—for instance, transferring from a Convolutional Neural Network (CNN) to a Vision Transformer (ViT)—direct weight copying is impossible. Instead, researchers rely on functional transfer methods, which encourage the student to mimic the teacher's outputs (Knowledge Distillation) or internal activations (Representational Distance Learning).
A critical component of a teacher's knowledge is its inductive bias, such as shift equivariance in CNNs. Ideally, a student should inherit these symmetries even if its own architecture does not natively support them. However, this research demonstrates that existing functional transfer methods fail to transfer even simple shift equivariance, leading to poor performance on out-of-distribution data.
The Failure of Existing Functional Transfer
The authors identify a fundamental flaw in representational similarity methods: they are often invariant to orthogonal transformations. This "orthogonal trap" allows a student to learn a representation that is mathematically similar to the teacher's but geometrically rotated or flipped. While the information content remains, this transformation destroys the alignment with spatial operations like max-pooling, causing the student to lose the teacher's inherent shift invariance. Consequently, if a student has not encountered a specific shift during training, it fails at test time, even if the teacher is perfectly equivariant.
Orbit Transfer: Learning and Transferring Equivariance
To address these limitations, the authors propose Orbit Transfer. This method explicitly models the "orbit" of representations—how they change under input transformations—rather than just matching static feature vectors.
The Orbit Transfer process consists of two stages:
- Learning the Equivariance Model: A small auxiliary model (denoted as $\rho$) is trained to predict how the teacher's internal representations transform when the input is shifted or rotated.
- Regularized Transfer: The student is trained using a regularization term that forces its representations to transform in the exact same way as the teacher's, using the learned model $\rho$ as a ground-truth guide for the symmetry.
Experimental Results
The effectiveness of Orbit Transfer was evaluated across several benchmarks, including MNIST-1D (for precise shift control), MNIST-C (translated digits), and Rotated MNIST.
Robustness to Unseen Shifts
In the MNIST-1D task, standard students and those trained via Knowledge Distillation (KD) saw accuracy plummet when faced with shifts not seen during training. In contrast, Orbit Transfer maintained near-perfect performance, demonstrating that the student truly inherited the teacher's equivariance.
Cross-Architecture Transfer
The method showed dramatic gains in challenging cross-architecture scenarios:
- CNN to MLP: On translated MNIST-C images, a baseline student achieved 35.7% accuracy, and KD improved this to 41.1%. Orbit Transfer reached 95.2%.
- ResNet to ViT: Transferring from a ResNet18 to a Vision Transformer resulted in 84.0% accuracy for Orbit Transfer, compared to just 41.2% for KD.
- Rotational Symmetries: Orbit Transfer improved accuracy on rotated digits to 76.5%, nearly doubling the performance of the next best method (KD at 46.3%).
Conclusion
This work highlights a significant gap in current knowledge transfer techniques: matching functions does not guarantee the transfer of underlying symmetries. By decoupling the computation of features from the modeling of their equivariance, Orbit Transfer provides a robust framework for ensuring students inherit the vital inductive biases of their teachers. Future work will focus on scaling this approach to more complex, continuous symmetries in natural images and handling multiple simultaneous transformations.
Summary updated