Published 21 Jan 2025 in cs.LG, cs.AI, physics.data-an, and stat.ML | (2501.12391v1)
Abstract: We aim to understand physics of skill learning, i.e., how skills are learned in neural networks during training. We start by observing the Domino effect, i.e., skills are learned sequentially, and notably, some skills kick off learning right after others complete learning, similar to the sequential fall of domino cards. To understand the Domino effect and relevant behaviors of skill learning, we take physicists' approach of abstraction and simplification. We propose three models with varying complexities -- the Geometry model, the Resource model, and the Domino model, trading between reality and simplicity. The Domino effect can be reproduced in the Geometry model, whose resource interpretation inspires the Resource model, which can be further simplified to the Domino model. These models present different levels of abstraction and simplification; each is useful to study some aspects of skill learning. The Geometry model provides interesting insights into neural scaling laws and optimizers; the Resource model sheds light on the learning dynamics of compositional tasks; the Domino model reveals the benefits of modularity. These models are not only conceptually interesting -- e.g., we show how Chinchilla scaling laws can emerge from the Geometry model, but also are useful in practice by inspiring algorithmic development -- e.g., we show how simple algorithmic changes, motivated by these toy models, can speed up the training of deep learning models.
The paper introduces the Domino effect, demonstrating that neural networks learn skills sequentially as one task’s mastery triggers the next.
It employs three progressively simpler models—Geometry, Resource, and Domino—to explain how task frequency, optimizer dynamics, and resource allocation shape learning.
The findings offer practical insights into neural scaling laws, optimizer performance, and modular design strategies for improved learning efficiency.
This paper explores the "physics" of how skills are learned within neural networks during training, aiming for intuitive, physics-like understanding rather than purely mathematical rigor or engineering solutions. It introduces the "Domino effect" observation, where skills are often learned sequentially, with one skill's learning kicking off just as another finishes, much like falling dominoes. To understand this and related phenomena, the paper proposes three progressively simpler models.
Three Models of Skill Learning
Geometry Model:
Concept: This model assumes that skills (tasks) are represented by specific directions (task vectorsti) in the high-dimensional parameter space (θ) of a neural network. The skill level si for task i is the projection of the parameter change (θ−θ0) onto its task vector: si=(θ−θ0)⋅ti.
Assumptions:
Tasks contribute independently to the total loss: ℓ=i=1∑ntaskpiL(si), where pi is the frequency/importance of task i and L is a per-task loss function (e.g., MSE (1−si)2 or cross-entropy).
Task vectors are linearly represented in parameter space. In overparametrized scenarios (ndim≥ntask), they can often be treated as orthogonal.
Implementation: Task vectors ti are typically drawn from a Gaussian distribution. Task frequencies pi often follow a power law (pi∝i−α). The model is trained using standard optimizers (SGD, Adam, SignGD).
Findings: This model reproduces the Domino effect, particularly strongly with the SignGD optimizer. SignGD's element-wise sign operation causes gradients from high-frequency (large gradient magnitude) tasks to dominate, effectively pausing learning for low-frequency tasks until the dominant ones are learned. SGD shows less interference, while Adam is intermediate.
Resource Model:
Concept: Inspired by the Geometry model (especially with SignGD), this model abstracts away the parameter geometry and focuses on "resource" competition. It posits that the total learning capacity (related to ndim) is a limited resource allocated among tasks based on their current need (gradient magnitude).
Dynamics: The rate of learning for unskill ui=1−si is governed by:
dtdui=−ηeff(∑j=1ntaskpjuj)+N0piui
Here, ηeff is an effective learning rate (calibrated from the Geometry model, e.g., ηeff=2ndimηgeo for SignGD), and N0 is a phenomenological parameter representing "wasted" resources (e.g., due to optimization noise, bouncing). Smaller N0 means faster learning. N0 effectively captures details like learning rate, batch size, and optimizer specifics (e.g., β values in Adam).
Underparametrized Regime (ntask>ndim): The model is extended by introducing a correlation matrix C where Cij=ti⋅tj captures task interference. The dynamics become (for regression):
A similar form exists for classification using cross-entropy gradients. This allows modeling non-monotonic skill learning observed in underparametrized settings.
Findings: The Resource model successfully replicates the skill dynamics (including sequential learning and non-monotonicity) observed in the Geometry model across various hyperparameter settings by tuning N0. It provides analytical insights, like conserved quantities (ui1/pi should be constant across tasks i for independent tasks) and learning time scaling.
Domino Model:
Concept: A further simplification of the Resource model under strong assumptions:
No wasted resources (N0=0).
Strong task hierarchy (p1≫p2≫…).
Dynamics: Predicts strictly sequential learning. Task i+1 only starts learning precisely when task i finishes. Each task takes a fixed time t0=1/ηeff to learn.
Learning Time: Total time to learn ntask skills is T=ntaskt0∝ntask.
Practical Implications and Applications
Neural Scaling Laws:
The models provide insights into scaling exponents relating loss to model size (αN) and training steps/data (αS).
Crucially, the Geometry model in the underparametrized regime can produce non-zero scaling exponents even for α=1 (Zipfian distribution), predicting αN≈0.34, matching Chinchilla [hoffmann2022training], whereas the Quanta and Domino models predict αN=0.
Experiments on multitask sparse parity show that optimizer choice (Adam betas) affects measured scaling exponents, reinforcing the importance of optimization dynamics.
Optimization:
Understanding Optimizers: The models, particularly the Geometry model, serve as useful, interpretable testbeds for optimizers.
They show adaptive, element-wise optimizers (like SignGD, Adam) are sensitive to the alignment between task directions and parameter axes, unlike SGD. Non-basis-aligned quadratic losses demonstrate the Domino effect with SignGD but not SGD.
Applying SignGD (Adam with β1=β2=0) to a grokking task (modular addition) showed significantly faster generalization than standard Adam, suggesting simplified models can inspire practical optimizer choices.
The Geometry model helps analyze newer optimizers like AdEMAMix pagliardini2024ademamix and Lion chen2024symbolic, reproducing their characteristic behaviors and linking them to skill dynamics under noise and task interference.
Data Reweighting: The observation that low-frequency tasks learn later suggests reweighting data. Using loss as a proxy for frequency (weighting high-loss examples more) showed speedups in early stages of GPT-2 pre-training, though potential issues with noisy tokens in later stages were noted. The Resource model's conserved quantities (ℓ1/(2pi)=C) offer a theoretical basis for inferring frequencies from losses.
Task Compositionality:
The Resource model can be readily extended to model dependent tasks by introducing a modulating function Bi(u1,…,untask) that determines when a task can start learning based on the status of its prerequisites.
Example: Bk(ui,uj)=(1−ui)γ(1−uj)γ models task k needing tasks i AND j to be learned.
This was shown to capture the dynamics of learning composite sparse parity (y3=y1⊕y2) better than assuming independence. The framework allows simulating dynamics for arbitrary task dependency graphs.
Modularity:
The Domino model provides a clear rationale for modularity benefits. In a non-modular network, tasks compete for the same resources (ndim), leading to sequential learning (TN∝ntask/ndim).
In a perfectly modular network where parameters are partitioned (ndim′=ndim/ntask per module), tasks learn in parallel within their dedicated resources, albeit with slower individual rates. The total time becomes TM∝ntask/ndim.
This theoretical speedup (TM≪TN for large ntask) is analogous to Grover's algorithm speedup (O(N) vs O(N)).
The Geometry model simulations confirm modular networks learn faster in later stages, especially when ndim isn't excessively large.
An MLP experiment predicting (x2,y2) with sparse y showed that a non-modular MLP exhibited sequential learning (t2≈2t1), while a modular MLP learned both tasks roughly in parallel (t2≈t1).
Conclusion and Limitations
The paper offers a hierarchy of physics-inspired models (Geometry, Resource, Domino) that simplify the complex dynamics of skill learning in neural networks. These models provide intuitive explanations for phenomena like the Domino effect and yield practical insights into scaling laws, optimizer behavior, task dependencies, and the benefits of modularity.
Limitations include not modeling overfitting/generalization gaps, assuming convex local landscapes within the Geometry model, and not providing a concrete method to map real-world data/tasks onto the abstract "skill" representation. Despite these, the models are presented as useful tools for building intuition, benchmarking optimizers, and inspiring algorithmic ideas like data reweighting and modular architectures. The core message advocates for using appropriately simplified models to understand complex systems like neural networks.