Simulating Training Spikes of Deep Neural Networks by Layer-wise Random Feature Models
Organizations: Google Deepmind
Abstract
Intermittent ``spikes'' in loss, during the pre-training of Large Language Models (LLMs), remains a mysterious phenomenon both theoretically and empirically. In this paper, we show that simple quadratic models with heavy-tailed, power-law distributed inputs can replicate these spikes. We introduce a theoretical framework and simulation algorithm to model per-layer training dynamics of Deep Neural Networks (DNNs), using such quadratic models. In a case study on an Adam hyperparameter configuration (where is set close to ) known to induce spikes in Transformer LMs, our simulation successfully predicts bumps indicating spiky behavior from a given checkpoint. Furthermore, we derive an appropriate schedule from observed metrics, which empirically improves performance.
Figures & tables
| Experiment | Train | Eval | Eval | & | Simulation | |
|---|---|---|---|---|---|---|
| Data size | 25.5B tokens | 336M tokens | 336M tokens | 336M tokens | 336M tokens | 1500 steps |
| Model size | 1.3B (24 blocks) | 24 ffn_0 | all layers | all layers | 6 ffn_0 | 1 layer |
| Time | 40 hrs | 1.1 hrs | 8 min | 15 min | 1.7 hrs | 5 sec |
| Machine | TPUv4 | TPUv4 | TPUv4 | TPUv4 | TPUv4 | CPU |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| B=1,LR=0.03,TH=0.3 | B=8,LR=0.1,TH=0.5 | B=64,LR=0.5,TH=1.0 | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Q90 | RAT | MRLAT | Q90 | RAT | MRLAT | Q90 | RAT | MRLAT | |
| PLRF | 0.89 | 0.18 | 8.2 | 1.1 | 0.051 | 2.2 | 3.8 | 0.035 | 1.3 |
| Simulation1 | 0.59 | 0.14 | 4.9 | 1.4 | 0.096 | 2.7 | 0.38 | 4.6 | |
| Simulation2 | 0.53 | 0.18 | 5.1 | 2.5 | 0.19 | 3.7 | 0.36 | 6.9 | |
| schedule | |||
|---|---|---|---|
| 2.4421 | 2.4405 | 2.4502 | 2.4404 |
Random Feature Methods
Random feature methods approximate kernels and neural networks with finite randomized embeddings to reduce computation while retaining useful accuracy.
See all 46 papers