Exact learning dynamics of deep linear networks with prior knowledge
Lukas BraunClémentine C. J. DominéJames FitzgeraldAndrew M. Saxe
Derives exact analytical solutions for the learning dynamics of deep linear networks from structured initial weights, revealing how prior knowledge changes training speed and weight alignment across tasks such as continual and reversal learning.
Deep neural networks are central to modern artificial intelligence, yet how initial network states and pre-existing knowledge influence training trajectories remains poorly understood. Machine learning practitioners frequently rely on pre-training, fine-tuning, and transfer learning, but the mathematical principles linking prior knowledge to learning speed, representation structure, and failure modes have remained elusive. This gap makes it difficult to reliably forecast model training behavior, prevent catastrophic forgetting in sequential tasks, or design optimal initialization strategies.
The main objective of the article is to provide an exact, closed-form mathematical description of gradient-based learning dynamics in deep linear neural networks trained from structured initial weights. It demonstrates how diverse initializations alter learning speed, internal representations, and model performance across sequential learning, reversal learning, and hierarchical task revision.
To achieve this, the article extends a mathematical framework based on matrix Riccati differential equations to describe two-layer networks under full-batch gradient descent. The approach accommodates both equal and unequal input-output dimensions and derives closed-form expressions that remain numerically stable by relying entirely on decaying exponential terms. The analytical solutions were validated against numerical simulations across dozens of network architectures, learning rates, and structured benchmark tasks, including hierarchical semantic categories.
The findings establish several fundamental insights into neural network training. First, the derived analytical solution exactly tracks the evolution of training loss, network functions, internal representational similarity, and kernel metrics over time. Second, the analysis reveals that network initialization variance can decouple training speed from representation richness: large zero-balanced initial weights produce fast, exponential learning trajectories while still converging to the exact, rich internal representations traditionally associated only with slow, step-like learning. Third, network weights dynamically decouple and realign with task structure during training, explaining why tabula rasa networks with small weights succeed through a fast, silent alignment phase. Fourth, in sequential task learning, catastrophic forgetting is complete for linear networks and can be calculated before training begins purely from the geometric similarity between tasks. Finally, when revising existing knowledge or reversing task associations, deep networks encounter mathematical saddle points that cause catastrophic slowing, an impediment not present in shallow networks.
These insights demonstrate that fast learning does not require sacrificing rich, generalizable internal representations, providing a theoretical foundation to optimize initialization schemes and reduce compute time. However, the findings also show that possessing pre-existing structured knowledge offers no inherent learning speedup when the task structure must be revised, and in cases of association reversals, it severely stalls gradient-based optimization. Furthermore, the exact predictability of catastrophic forgetting highlights the fundamental limitation of standard gradient descent in retaining historical task knowledge without explicit preservation mechanisms.
For practical implementation, engineering teams should explore structured, zero-balanced initialization schemes that accelerate convergence while preserving representational quality. When designing continual learning pipelines, practitioners should utilize task-similarity metrics to forecast forgetting risks and avoid relying on prior training when task mappings undergo structural reversals. Researchers should prioritize extending these analytical formulations to fully nonlinear architectures and non-whitened data distributions.
These conclusions are established with high theoretical and numerical confidence within the scope of two-layer deep linear networks with whitened inputs and zero-balanced initial states. Readers should exercise caution when extrapolating specific quantitative predictions to highly nonlinear architectures, such as networks using non-linear activations, where weight balancing breaks down and empirically results in even greater catastrophic forgetting.
- Paper: Exact solutions to the nonlinear dynamics of learning in deep linear neural networks, Andrew M. Saxe et al. (2014). It derives the original exact analytical solutions for gradient descent learning dynamics in deep linear networks under small, decoupled initializations that the source explicitly generalizes to rich prior knowledge.
- Paper: Neural Tangent Kernel: Convergence and Generalization in Neural Networks, Arthur Jacot et al. (2018). It introduces the Neural Tangent Kernel framework governing network evolution in function space, providing the theoretical context for the analytical NTK dynamics tracked in the source.
- Paper: Wide neural networks of any depth evolve as linear models under gradient descent, Jaehoon Lee et al. (2019). It formulates how infinitely wide deep networks evolve as linear models under gradient descent, establishing the foundational link between linear dynamics and representation learning.
- Paper: Continual Learning Through Synaptic Intelligence, Friedemann Zenke et al. (2017). It develops the theory of parameter trajectories and consolidation in continual learning, providing the baseline context for understanding the source's findings on continual and reversal learning.
- Paper: Self-Consistent Dynamical Field Theory of Kernel Evolution in Wide Neural Networks, Blake Bordelon et al. (2022). It extends the analysis of dynamic kernel evolution to infinite-width feature learning regimes using dynamical field theory, analyzing kernel trajectories beyond exact deep linear settings.
- Paper: High-dimensional Asymptotics of Feature Learning: How One Gradient Step Improves the Representation, Jimmy Ba et al. (2022). It characterizes high-dimensional representation alignment and feature learning in nonlinear settings from initial gradient updates, building on the initial weight dynamics analyzed in the source.
- Paper: Probing Representation Forgetting in Supervised and Unsupervised Continual Learning, MohammadReza Davari et al. (2022). It investigates how internal representations evolve and survive across sequential tasks using linear probing, connecting directly to the source's theoretical implications for continual learning dynamics.
- Paper: Continual Learning via Sequential Function-Space Variational Inference, Tim G. J. Rudner et al. (2022). It formulates continual learning directly in function space via variational inference, offering a Bayesian counterpart to the functional learning trajectories analyzed in the source.
