Transferring Learning Trajectories of Neural Networks

Daiki Chijiwa · DOI

Introduction

Training deep neural networks (DNNs) is notoriously expensive. Whether building ensembles or fine-tuning pre-trained models, researchers often repeat similar training runs from different random starting points. This paper introduces the Learning Transfer Problem, proposing a method to "copy-paste" training progress by mapping the learning trajectory of a source network onto a new target network. By leveraging permutation symmetry, the authors demonstrate that it is possible to recycle the computational effort of one training run to accelerate many others.

Methodology

The primary obstacle to transferring weights between networks is that different random initializations lead to neurons being learned in different "orders." To address this, the authors utilize Permutation Symmetry to align the internal representations of the source and target models.

Gradient Matching along Trajectory (GMT)

The core algorithm, GMT, seeks a permutation $\pi$ (a reordering of neurons) that aligns the source network's updates with the target network's local gradient. To make this practical for large-scale training, the authors developed FGMT (Fast GMT), which caches gradients to reduce computational complexity from $O(T^2)$ to $O(T)$, where $T$ is the number of training steps.

Conceptual overview of transferring a learning trajectory from a source initialization to a target initialization using a permutation $\pi$.

Linear Trajectories

A key finding is that transferring every individual step of a noisy training run is often less effective than using a Linear Trajectory. By connecting the initial and final weights of the source network with a straight line in parameter space, the transfer process filters out noise and provides a cleaner learning signal for the target network to follow.

Experimental Results

The approach was evaluated across several standard vision benchmarks, including MNIST (2-layer MLP), CIFAR-10/100 (Conv8), and fine-tuning tasks on ImageNet, Stanford Cars, and CUB-200-2011 (ResNet-18).

Performance and Convergence

Transferred models achieved significant "instant" accuracy—reaching ~80% on MNIST and ~40% on CIFAR-10 before any actual training steps. Furthermore, these models converged much faster than those trained from scratch. For instance, in Conv8 experiments on CIFAR-10, transferred models reached peak accuracy in approximately half the time of standard training.

Cosine similarity between transferred and actual gradients for Conv8 on CIFAR-10/100, demonstrating the effectiveness of the matching algorithm.

Discussion

The Role of Initialization

A significant insight is that the transferred network inherits the generalization properties of the target initialization rather than the source. This suggests that a trajectory from a model trained on limited data can still be successfully transferred to a model with a superior (e.g., pre-trained) initialization, maintaining the latter's performance benefits.

Limitations and Future Directions

While highly effective for MLPs and shallow CNNs, the method faces challenges with very deep architectures like ResNets, where the assumption of similarity between trajectories holds more weakly over time. Future work may focus on "teleporting" fine-tuned models to new foundation model versions as they are released, potentially revolutionizing how large-scale models are updated and maintained.

Summary updated

BibTeX
@inproceedings{chijiwa2024transferring,
  author = {Daiki Chijiwa},
  title = {{Transferring Learning Trajectories of Neural Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=bWNJFD1l8M},
}
Figure