Trajectory Alignment: Understanding the Edge of Stability Phenomenon via Bifurcation Theory

Cohen et al. (2021) empirically study the evolution of the largest eigenvalue of the loss Hessian, also known as sharpness, along the gradient descent (GD) trajectory and observe the Edge of Stability (EoS) phenomenon. The sharpness increases at the early phase of training (referred to as progressive sharpening), and eventually saturates close to the threshold of $2 / \text{(step size)}$. In this paper, we start by demonstrating through empirical studies that when the EoS phenomenon occurs, different GD trajectories (after a proper reparameterization) align on a specific bifurcation diagram independent of initialization. We then rigorously prove this trajectory alignment phenomenon for a two-layer fully-connected linear network and a single-neuron nonlinear network trained with a single data point. Our trajectory alignment analysis establishes both progressive sharpening and EoS phenomena, encompassing and extending recent findings in the literature.

Paper

References (27)

Scroll for more · 15 remaining

Similar papers

Peer review

Reviewer Qm1U7/10 · confidence 4/52023-07-05

Summary

This paper discovers and studies a new phenomenon that occurs when training neural nets on 1 data point with large enough learning rates. The phenomenon concerns the end-stage evolution of the tuple (residual, sharpness), where the residual (defined as "prediction - target") is a scalar because there is only 1 data point. If one fixes the sharpness and considers the evolution of the residual, and if one linearizes the network, then the dynamical system that governs the evolution of the residual has a stable period-2 orbit whose value depends on the fixed sharpness, i.e. residual $\to \pm$ function(sharpness). The main finding of the paper is that the residual and sharpness rapidly evolve onto the curve "residual $=\pm$ function(sharpness)" and then remain on this curve for the end stage of training. This finding is made empirically on some real architectures and is also proved rigorously in two highly simplified settings. This is interesting because it is a richer characterization of the training dynamics than has been previously known (previous knowledge is limited to the behavior of the sharpness and says nothing about the residual).

Strengths

- I think the identification of the trajectory alignment phenomenon is a solid contribution. - It's great that the authors can rigorously establish this phenomenon in several simplified settings

Weaknesses

- The main weakness is that the trajectory alignment phenomenon seems mostly limited to the setting of training on one data point. The authors do briefly try to extend it to the setting of multiple data points, but the experimental evidence is not highly convincing (especially the $\ell_\infty$ plot) and I do not really see why the phenomenon _would_ be true. For example, I do not see why the generalized sharpness metric (which is kind of like trace(Hessian) / n) would be the right generalization. - Another weakness is that the EOS setting seems different than the one from Cohen et al '21. In that paper, training with gradient flow makes the sharpness continually increase, whereas my understanding is that in this paper, training with gradient flow does not make the sharpness continually increase. Is my understanding correct? If so, I would prefer if the paper were clearer about the differences from Cohen et al '21, so as not to add confusion to the literature.

Questions

- Could the authors please cite these two papers in the related work section? https://arxiv.org/abs/1807.05031, https://arxiv.org/abs/2002.09572. These papers gave evidence prior to Cohen et al '21, that the step size affects the sharpness along the optimization trajectory. - I wonder if the reason why the trajectory alignment phenomenon occurs on wide networks but not narrow ones is that the linearization of the network is more accurate for wide networks. Therefore, I wonder if one could also see trajectory alignment on narrow nets if one adopted the scaling trick from Chizat and Bach (https://arxiv.org/abs/1812.07956) which makes any network closer to its linearization. - I believe Lemma 2.1(ii) has a typo, it should be r_hat(q)

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

4 excellent

Presentation

4 excellent

Contribution

3 good

Limitations

Please see the second point in the 'weaknesses' section.

Reviewer 6YQZ3/10 · confidence 2/52023-07-06

Summary

This paper studies the Edge of Stability phenomenon in training neural networks. The authors demonstrate that, on some reparameterization of the loss function, for a small enough stepsize, the trajectories of gradient descent with different initializations align on a bifurcation diagram. They show this for two classes of functions: (1) Two-layer fully connected linear neural networks trained on a single data point with a convex and Lipschitz loss. (2) Single-neuron nonlinear network trained on a single data point with the squared loss.

Strengths

1. The analysis presented by the authors is novel, and it improves upon prior work in some settings (e.g. tightening the gap on sharpness upper and lower bounds from $\mathcal{O}(\eta)$ to $\mathcal{O}(\eta^3)$ for two-layer linear neural networks). 2. The paper imports a lot of ideas from the literature on control theory to studying the optimization of neural nets. This might be useful more generally.

Weaknesses

1. Why is the whole "trajectory alignment" phenomenon is interesting in the first place? What new things does it tell us? 2. It seems very obvious that for high-dimensional, deep networks, gradient descent doesn't converge to the same minimizers for different initializations. Is this whole phenomenon a product of small $d$ and toy examples? You fix the Xavier initialization for all experiments, and as far as I can tell the widest network used has width 256. This is a far cry from modern neural networks. 3. The conditions you have on the initialization in Thm 4.2 are very restrictive. Do they hold in practice?

Questions

See the weaknesses section.

Rating

3: Reject: For instance, a paper with technical flaws, weak evaluation, inadequate reproducibility and incompletely addressed ethical considerations.

Confidence

2: You are willing to defend your assessment, but it is quite likely that you did not understand the central parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

2 fair

Contribution

2 fair

Limitations

N/A.

Reviewer ft7H6/10 · confidence 3/52023-07-27

Summary

This paper investigates a trajectory alignment phenomenon during the edge of stability (EoS) regime in gradient descent (GD): the trajectories from different GD dynamics tend to align on a bifurcation diagram. The paper first empirically observes the trajectory alignment in deep neural network training in a canonically reparametrized space that can reveal the bifurcation. With a problem setting of a two-layer linear neural network and single neuron nonlinear network training on a single data point, the alignment is theoretically analyzed, explaining the GD trajectories in the gradient flow regime, two phases of the EoS regime, and the progressive sharpening.

Strengths

- Based on simple models, this paper clearly characterizes the gradient flow regime, two phases of the EoS regime, and progressive sharpening using the bifurcation theory. This seems a novel and original way to analyze the phenomenon. The introduction of canonical reparametrization greatly helps capture the crux of the EoS phenomenon. This work will provide useful insight to study the dynamics in the EoS regime of neural network training, which is recently getting a huge interest in the community. - This paper is in general very well written. The theories seem to be developed in a mathematically sound manner.

Weaknesses

- The claim that the trajectory alignment on a bifurcation diagram is independent of network architecture and training data seems somewhat excessive. It does not corroborate well with some experimental results in the main text and appendix (see Figures 5, 10, 13, 14, 15), which shows that the degree of alignment depends greatly on the width size and the number of data. Also, the analyses are only performed for specific network architecture and loss function combinations. - The theory does not cover some widely used losses, e.g., the cross-entropy loss. Is the loss function necessary to be symmetric for this alignment to occur?

Questions

In addition to the questions posed in the **Weaknesses** section, I have the following questions: - Is any further analysis possible for the period-4 (or more) oscillation shown in Figure 1 (b) and (c)? - Can the EoS for GD with momentum also be explained by this theory? - How do the experimental conditions differ for each color in Figure 2? - In Figure 5 of the appendix, why there seems to be more alignment to the bifurcation diagram for the mean and $L_\infty$-norm cases than the $L_1$, $L_2$-norm cases? - What happens if $q_0 < \frac{1}{2}$ in line 221? - How is the sharpness anticipation for progressive sharpening in **Theorem 4.4** accurate for neural networks larger than those in Figure 1 (a)? - Can the progressive sharpening also be interpreted in the bifurcation diagram?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

4 excellent

Presentation

4 excellent

Contribution

3 good

Limitations

Some limitations of the current results are discussed in **Conclusion**. For other possible limitations, please refer to the weaknesses and questions above.

Reviewer mAcJ5/10 · confidence 3/52023-07-31

Summary

This paper studies the edge of stability phenomenon and proposes a "trajectory alignment" phenomenon, which states that with different learning rates and different initializations, if one plots the residuals and the inverse squared gradient norms, these lie on a fixed curve. The paper supports this theory with experiments on small networks with log-cosh loss and rigorously proves it for a two-layer linear net and a single neuron nonlinear net, both trained on a single datapoint.

Strengths

- While the bifurcation analysis of GD at EoS is not new, this paper takes this analysis further than previous papers and rigorously characterizes the limiting curve for toy models trained on a single datapoint. - The paper also provides fine-grained analyses for each of the toy cases it considers including precise predictions for the limiting sharpness which improves over previous work.

Weaknesses

- The abstract and the introduction state that GD trajectories (after a proper reparameterization) align on a specific bifurcation diagram. However, the (p,q) variables in the paper are only a reparameterization in the toy case when $\theta$ has dimension 2. In the general case (e.g. in section 3) it is not fair to call this a reparameterization as the variables (p,q) do not determine the GD trajectory. - The abstract claims that the paper establishes the trajectory alignment phenomenon through empirical studies. However, the experiments in the paper are extremely limited. The experiments in figure 3 use a single datapoint equal to $e_1 \in \mathbb{R}^{10}$ and the non-standard log-cosh loss function, while the experiments in figure 4 use 10 datapoints sampled from a Gaussian distribution in $\mathbb{R}^{10}$. While these settings are certainly more difficult to analyze than the settings in the rest of the paper, they are still very much toy settings. It would be interesting to see if similar phenomena occur on more realistic datasets/models with more realistic loss functions (e.g. square loss or cross entropy loss). - The paper states a couple of times that the bifurcation diagram is determined solely by the loss function, independent of the network architecture, training data, and step size. However, this strong claim is not demonstrated outside of the toy setting of a single datapoint. Figure 4 does suggest that in the general case it may be independent of the learning rate but there is no evidence for the full claim. - It seems that all of the results in terms of the "canonical parameterization" in eq (2) are specific to assumption 2.4. In particular, the results in section 5 for square loss require defining a different parameterization (definition 5.2) which challenges the generality of the results in the rest of the paper. As the original EoS phenomenon as described in Cohen et al. was observed for square/logistic/cross entropy losses, it is unclear whether the phenomenon being studied is the same as the phenomenon observed in Cohen et al. Minor Comments: - There seems to be a clear separation of colors in Figures 2, 3, 4 but as far as I can tell these colors are never defined. Also, increasing the size of the datapoints might help with visibility, especially in Figure 3. - When discussing previous EoS papers with bifurcation diagrams, the paper should cite Chen et al. "Beyond the Edge of Stability via Two-step Gradient Updates" (it is in the list of references but not in the related work)

Questions

- Why did the authors chose to parameterize $q$ in terms of the inverse squared gradient norm instead of simply the squared gradient norm? At first glance, the reciprocal $1/q$ seems like an easier object to work with? - How is the analysis in section 5 for square loss different from the analyses in the rest of the paper?

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

2 fair

Contribution

2 fair

Limitations

The authors have adequately addressed the limitations of this work.

Reviewer mAcJ2023-08-15

Thank you for the clarifications. I have updated my score accordingly. Regarding the term “reparameterization,” I agree it doesn’t have to be a bijection (e.g. you can parameterize a matrix by the outer product of two vectors to enforce a rank 1 constraint), but the statistics in the paper don’t constitute a reparameterization because there is no obvious map from these statistics to the original parameter space. One possibility would be something like “the gradient norm and various statistics of the residuals align on a curve independent of initialization” but there are many ways of rephrasing this that would work.

Authorsrebuttal2023-08-15

We appreciate your careful reading of our responses and your valuable suggestion. We would also like to thank you for raising the review score. We acknowledge your point and agree that there is no obvious mapping from statistics of a reparameterization to the original parameter space. We will consider alternative expressions (e.g., canonical mapping) that more accurately capture the nature of the relationship and avoid any potential confusion in the revised manuscript.

Reviewer ft7H2023-08-15

I am grateful to the authors who faithfully answered my concerns and questions. Several questions have been answered, but some unresolved issues require further investigation before the theory is convincing in more general settings. So I will keep my score.

Authorsrebuttal2023-08-16

Thank you for taking the time to review our response. If there are any remaining concerns or unresolved issues, please let us know. We will do our best to address the concerns and will proceed with the necessary revisions accordingly.

Reviewer ft7H2023-08-16

In my opinion, a more sophisticated analysis is necessary for the case of training on multiple data points. However, this expansion might be difficult due to the short discussion period.

Authorsrebuttal2023-08-17

We appreciate your feedback and recognize the need for more rigorous analysis in the case of training on multiple data points. While our current theory does not cover this setting, we have taken an initial step to explore it by extending Eq.(3) to the multiple data setting. This extension assumes that a network can be well approximated by its linearized model, providing insights into the relationship between residuals and sharpness. Specifically, under the linear approximation $f(X; \Theta_{t+1}) \approx f(X; \Theta_t) + Df(X; \Theta_t) (\Theta_{t+1} - \Theta_t)$, we can obtain $$f(X; \Theta_{t+1}) - y \approx (f(X; \Theta_t) - y) - \frac{\eta}{n} K(X, X; \Theta_t) \ell'(f(X; \Theta_t) - y),$$ where $K(X, X; \Theta)\in \mathbb{R}^{n\times n}$ is a Gram matrix where (i,j)-th entry is given by $\langle \nabla_{\Theta} f(x_i; \Theta), \nabla_{\Theta} f(x_j; \Theta) \rangle$, also known as NTK [Jacot2018]. In the case of n=1, $K(x_1, x_1; \Theta) = \lVert \nabla_{\Theta} f(x_1; \Theta) \rVert_2^2$ and the expression matches Eq.(3) in our manuscript. Understanding the trajectory alignment phenomenon in this context remains a topic for future work. --- __Reference__ [Jacot2018] https://arxiv.org/abs/1806.07572

Reviewer ft7H2023-08-18

I appreciate the response. The [**Reviewer Qm1U**'s additional comment](https://openreview.net/forum?id=PnJaA0A8Lr&noteId=RiUngFp3S7) may be worth studying further.

Authorsrebuttal2023-08-18

We appreciate your suggestion. Following Reviewer Qm1U's [additional comment](https://openreview.net/forum?id=PnJaA0A8Lr&noteId=RiUngFp3S7), we conducted further experiments and observed that the trajectory alignment phenomenon also persists in this reparameterization. For more details, please refer to [our response](https://openreview.net/forum?id=PnJaA0A8Lr&noteId=GJGePFLQNp) to Reviewer Qm1U's comment.

Reviewer Qm1U2023-08-17

multiple data points

It may be worth trying to see whether the trajectory alignment holds for multiple datapoints if you consider (1) the largest eigenvalue of the NTK, and (2) the projection of the residuals onto the largest eigenvector of the NTK?

Authorsrebuttal2023-08-18

We greatly appreciate your insightful suggestions. Based on your recommendations, we conducted additional experiments utilizing an alternative reparameterization. In this approach, we considered a canonical mapping given by: $$(p,q) = \left(v_1(X;\Theta)^\top (f(X; \Theta)-y), \frac{2n}{\eta \lambda_1(X; \Theta)}\right).$$ Here, $\lambda_1(X;\Theta)$ and $v_1(X;\Theta)$ represent the largest eigenvalue and its corresponding normalized eigenvector of the NTK matrix $K(X, X; \Theta)\in \mathbb{R}^{n\times n}$, respectively. We observed that even with this reparameterization, the trajectory alignment phenomenon persists across different settings, including varying network width and depth trained on CIFAR-10. Notably, trajectories align along a curve qualitatively similar to the mean plot in Figure 14(d) of the appendix and converge to a point close to $(p,q) = (1,0)$. To understand this phenomenon, we consider the one-step update of the residual and approximated it as follows: $$f(X; \Theta_{t+1}) - y \approx (f(X; \Theta_t) - y) - \frac{\eta}{n} K(X, X; \Theta_t) \ell'(f(X; \Theta_t) - y).$$ Assuming $v_1(X;\Theta_{t+1}) \approx v_1(X; \Theta_t)$, we can approximate the one-step update of $p_t$ as: $$p_{t+1} \approx p_t - \frac{2v_1(X;\Theta_t)^\top \ell'(f(X; \Theta_t) - y)}{q_t}.$$ An interesting question arises concerning whether the term $v_1(X;\Theta_t)^\top \ell'(f(X; \Theta_t) - y)$ can be represented as a function of $p_t$. Under a stronger assumption, where $v_1(X; \Theta_t)$ is approximated by a fixed vector $v_1$ and the residual $(f(X; \Theta_t)-y)$ aligns with $v_1$, we find that $v_1(X;\Theta_t)^\top \ell'(f(X; \Theta_t)-y) \approx g(p_t)$, where $g(p) := v_1^\top \ell'(pv_1)$ for each $p\in \mathbb{R}$. This assumption aligns with the observation that the oscillation direction in the EoS regime corresponds to the eigenvector of the largest eigenvalue. This insight leads us to the conclusion that $p_{t+1} \approx p_t - \frac{2g(p_t)}{q_t}$, enabling us to potentially conduct bifurcation analysis on this map, analogous to the single data point case outlined in Section 2.3 of our manuscript. We deeply value your comment, as we believe this approach will pave the way for extending our theory to the multiple data setting in future work.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC