BurnyCoder commited on
Commit
0366ca1
路
verified 路
1 Parent(s): 284eae8

Explain why third derivatives could favor a wider low-loss neighborhood

Browse files
Files changed (1) hide show
  1. research/README.md +4 -2
research/README.md CHANGED
@@ -4,11 +4,13 @@ Sepp Hochreiter and J眉rgen Schmidhuber proposed that **among models that fit th
4
 
5
  Earlier work tested penalties on the **trace of the loss Hessian**, the sum of second derivatives along the weight coordinates. Sankar et al. added a layerwise trace penalty to the training loss of image classifiers. Liu, Yu and Lin proposed a stochastic trace penalty and reported WikiText-2 experiments with LSTM and GRU language models. Zhang, Li and Ju approximated a trace penalty with symmetric weight perturbations when fine-tuning GPT-2 for question answering. [Sankar et al., Table 1](https://arxiv.org/pdf/2012.03801#page=6) 路 [Liu, Yu and Lin, 搂5.2](https://arxiv.org/pdf/2208.05924#page=10) 路 [Zhang, Li and Ju, Table 5](https://arxiv.org/pdf/2306.08553#page=12)
6
 
7
- This project penalizes the squared third derivatives of next-token loss to discourage rapid changes in curvature as weights move. It tests whether this improves prediction on unseen tokens compared with ordinary AdamW and Hessian-trace regularization. It trains a TinyStories decoder from scratch and fine-tunes Pythia-410M鈥檚 low-rank attention adapters on research abstracts. [Study design](reports/planned-runs.md)
 
 
8
 
9
  ## Can the penalty favor a wider minimum?
10
 
11
- A minimum is **wide** if the weights can move a long way before the loss rises by a chosen amount. Near a smooth minimum, the Hessian trace predicts the average loss increase from a small nudge in a uniformly random direction. The third derivative measures **how curvature changes** as weights move. If curvature starts small and changes slowly nearby, the loss can stay low over a larger distance. [Basin width, Definition 1](https://proceedings.mlr.press/v70/dinh17b/dinh17b.pdf#page=2) 路 [Hessian and random perturbations, equation 4](https://arxiv.org/pdf/2306.08553#page=5)
12
 
13
  The penalty can help weights **stay** near a flat bottom. For $L(w)=w^4$, nudging the weight to either side makes the penalty rise, so a small descent step pulls it back. A steep quadratic such as $L(w)=100w^2$ has constant curvature and receives zero third-derivative penalty everywhere. [Worked examples](docs/third-derivative-penalty.md#when-can-the-penalty-favor-a-wider-minimum)
14
 
 
4
 
5
  Earlier work tested penalties on the **trace of the loss Hessian**, the sum of second derivatives along the weight coordinates. Sankar et al. added a layerwise trace penalty to the training loss of image classifiers. Liu, Yu and Lin proposed a stochastic trace penalty and reported WikiText-2 experiments with LSTM and GRU language models. Zhang, Li and Ju approximated a trace penalty with symmetric weight perturbations when fine-tuning GPT-2 for question answering. [Sankar et al., Table 1](https://arxiv.org/pdf/2012.03801#page=6) 路 [Liu, Yu and Lin, 搂5.2](https://arxiv.org/pdf/2208.05924#page=10) 路 [Zhang, Li and Ju, Table 5](https://arxiv.org/pdf/2306.08553#page=12)
6
 
7
+ **Why third derivatives?** Two minima can have the same small curvature at the bottom, yet one can steepen much sooner. The third derivatives of next-token loss measure how its Hessian changes as the weights move. The training penalty estimates their sum of squares, so rapid changes of either sign carry a cost. If curvature starts small and changes slowly throughout a neighborhood, the weights can move farther while loss stays low. If the penalty grows toward the edge of that region, its gradient can also oppose movement out of it. [Worked examples and width bound](docs/third-derivative-penalty.md#when-can-the-penalty-favor-a-wider-minimum) 路 [Taylor remainder, equation 22](https://link.springer.com/article/10.1007/s10288-023-00541-9)
8
+
9
+ The study tests whether this penalty improves prediction on unseen tokens compared with ordinary AdamW and Hessian-trace regularization at equal training-token counts. It trains a TinyStories decoder from scratch and fine-tunes Pythia-410M鈥檚 low-rank attention adapters on research abstracts. [Study design](reports/planned-runs.md)
10
 
11
  ## Can the penalty favor a wider minimum?
12
 
13
+ A minimum is **wide** if the weights can move a long way before the loss rises by a chosen amount. Near a smooth minimum, the Hessian trace predicts the average loss increase from a small nudge in a uniformly random direction. [Basin width, Definition 1](https://proceedings.mlr.press/v70/dinh17b/dinh17b.pdf#page=2) 路 [Hessian and random perturbations, equation 4](https://arxiv.org/pdf/2306.08553#page=5)
14
 
15
  The penalty can help weights **stay** near a flat bottom. For $L(w)=w^4$, nudging the weight to either side makes the penalty rise, so a small descent step pulls it back. A steep quadratic such as $L(w)=100w^2$ has constant curvature and receives zero third-derivative penalty everywhere. [Worked examples](docs/third-derivative-penalty.md#when-can-the-penalty-favor-a-wider-minimum)
16