How Does Adaptive Optimization Impact Local Neural Network Geometry?

Adaptive optimization methods are well known to achieve superior convergence relative to vanilla gradient methods. The traditional viewpoint in optimization, particularly in convex optimization, explains this improved performance by arguing that, unlike vanilla gradient schemes, adaptive algorithms mimic the behavior of a second-order method by adapting to the global geometry of the loss function. We argue that in the context of neural network optimization, this traditional viewpoint is insufficient. Instead, we advocate for a local trajectory analysis. For iterate trajectories produced by running a generic optimization algorithm OPT, we introduce $R^{\text{OPT}}_{\text{med}}$, a statistic that is analogous to the condition number of the loss Hessian evaluated at the iterates. Through extensive experiments, we show that adaptive methods such as Adam bias the trajectories towards regions where $R^{\text{Adam}}_{\text{med}}$ is small, where one might expect faster convergence. By contrast, vanilla gradient methods like SGD bias the trajectories towards regions where $R^{\text{SGD}}_{\text{med}}$ is comparatively large. We complement these empirical observations with a theoretical result that provably demonstrates this phenomenon in the simplified setting of a two-layer linear network. We view our findings as evidence for the need of a new explanation of the success of adaptive methods, one that is different than the conventional wisdom.

Paper

Similar papers

Peer review

Reviewer qhhF6/10 · confidence 4/52023-07-06

Summary

This paper aims to understand why Adam works better than SGD for language model training from the perspective of local geometry of the training loss around the algorithm iterates.

Strengths

The problem that this paper considers is indeed a very important question, and this work sets out to answer the question from first principles. This paper has many good intuitions. This paper also has some partial theory that backs up their empirical observation. Given their empirical observation is quite hard to theoretically analyze, I think their theory is quite valuable although it only shows a weak result for a very specific model.

Weaknesses

- Many plots have too small fonts. Please adjust the font sizes for better readability. - In general, the plots have legends and axes that are quite hard to read, please adjust them. - In Figure 8, how can the spectrum on the right plot approximately low-rank? All singular values are greater than 0.5 and compared to the left plot, I wouldn't consider this approximate low rank. Please explain - Regarding Section A.6, the plots seem a bit inconclusive. Given how noisy the plots are, I don't see this as alignment. Do you have any intuitions behind why the layer gradients align with diagonal of Hessian? - Are the results established in Theorem 1 empirically tight? I think the experiments on this very simple setting to see if your empirical observations hold true for this very simple setting is required. In particular, for this two layer MLP, do you see lower R-value for Adam than SGD-M? - In Figure 9, I see that the observation doesn't hold for the right singular vectors.. This makes the observation quite brittle in my opinion. Could you explain why it doesn't hold for the right singular vectors? - In general, this paper lacks empirical investigation on smaller/toy models. I think to what extent this observation holds for simpler models would help readers comprehend how universal this observed phenomenon is. - Given that the language model training is done mostly with the cross entropy loss, I'm curious whether the conclusion you made in Theorem 1 similarly holds true for the logistic loss? - In the Gaussian initialization, I see the variances of the different layers are chosen quite carefully. Also the variance looks quite small. Could you justify this assumption as to why making these assumptions is practical. Also, could you explain intuition behind why these assumptions are required for the proof? - In the Theorem statement, how big are $T_1^{sgd}, T_2^{sgd}$ compared to $T_1^{adam}, T_2^{adam}$? Are they comparable? Or as you observed in the empirical results, are $T_1^{sgd}, T_2^{sgd}$ provably larger than $T_1^{adam}, T_2^{adam}$? - Could you share some intuitions as to why training behavior of vision models (CIFAR 10, IMAGENET) is so different than that of language models? I don't find the explanation that it has to do with transformer architecture quite conclusive... - Minor comment: It would be helpful if the proof sketch of Theorem 1 appears in the main text. I think it has many good intuitions.

Questions

See above

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, 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

3 good

Presentation

2 fair

Contribution

3 good

Limitations

N/A

Reviewer 8Quz4/10 · confidence 4/52023-07-07

Summary

This paper aims to study the connections between an optimization algorithm and the geometric properties observed during the training of a neural network with that algorithm. The authors argue that when analyzing these connections, it is important to consider the local iterates. To address this, they propose the utilization of a metric called $R^{OPT}_{med}$, which involves the local condition number of the Hessian calculated at the iterates. The authors conduct experiments to illustrate their findings that fast convergence is often associated with low statistics, and adaptive methods such as Adam often has low statistics. They proves that for some small theoretical setting, Adam has better statistic than SGD with some probability.

Strengths

Studying the influence of algorithms on the loss geometry is interesting. This paper provides some insights on the uniformity of diagonal geometry by the $R^{OPT}_{med}$ metric where the values found by Adam are smaller than those found by SGDM in the empirical results. The theoretical setting shows that the diagonal of loss Hessian for Adam has good uniformity while the diagonal of loss Hessian for SGD+M is less uniform.

Weaknesses

While there may exist a correlation between the proposed statistic and the optimization algorithm, the reasons behind the favorable behavior of these algorithms remain uncertain. Is it better due to the uniformity or is the diagonal uniformity a byproduct of Adam's inherent algorithmic properties that are unrelated to its overall effectiveness? As a result, it is more important to demonstrate the contribution of the proposed statistic to achieving successful convergence rather than focusing on the relationship between Adam and the the diagonal uniformity. Why the large batch setting are needed to prove the correlation of Adam and diagonal uniformity effectiveness? It is not clear how the algorithms behave in other settings and how high the probability can be in the theoretical analysis.

Questions

Please see above. --- I thank the authors for your rebuttal. My recommendation remains the same.

Rating

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

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

2 fair

Presentation

3 good

Contribution

2 fair

Limitations

NA

Authorsrebuttal2023-08-18

Thanks for your feedback on our rebuttal. We would like to know which part of our rebuttal is still unclear and are willing to elaborate more on it. As for the demonstration of the contribution of our metric to fast optimization, please see the first paragraph on Page 7 and Appendix B for more details, in case of any unclear part in our rebuttal.

Reviewer cQDf6/10 · confidence 4/52023-07-07

Summary

This study makes the comparison between the adaptive optimization method (Adam) and the non-adaptive one (stochastic gradient method with momentum) through a lens of ``uniformity'' of diagonal components of the Hessian denoted by $R_{\rm med}^{\rm OPT}(t)$. The comparison is conducted experimentally for various deep learning models such as BERT-small and theoretically for the two-layer linear neural networks under several assumptions. Both comparisons conclude that the uniformity will be smaller when using the Adam, which results in faster convergence.

Strengths

- The experimental comparison is conducted carefully. - The theoretical results have a novelty, which gives new insight into analyzing the implicit bias of various optimization methods.

Weaknesses

- I couldn't fully understand the motivation for employing $R_{\rm med}^{\rm OPT}(t)=\frac{{\rm max}\{|H_{ii}^{(t)}|\}}{{\rm median}\{|H_{ii}^{(t)}}|\}$ as for the notion of uniformity. I realize this value is more stable than the condition number; as explained in footnote 1, many types of variants could be considered. Indeed, in the experiment, there are some cases where $\frac{R_{\rm med}^{\rm SGD}(t)}{R_{\rm med}^{\rm Adam}(t)}$ is smaller than 1. - In the theoretical comparison (Theorem 1), there are several unclear points to me. First, the training dynamics will change by the selection of hyperparameter and affects to $R_{\rm med}^{\rm OPT}(t)$, but some parameters (such as $\alpha$, $\sigma$) can be taken in a different order. Will it be a fair comparison? Moreover, I think it will be more helpful for readers if the authors clarify the dependence of $T_{\rm OPT,(1,2)}$ on other parameters. - (minor) The reference to Figure 4. seems wrong. The authors write ``see Section 4.1'' in the caption, but it is explained in Section 6.

Questions

- Although the initialization order required in Theorem 1 seems to be very small, can the authors import the theoretical result or its insights into the practical settings? If not, what is the difficulty? - The setting in Section 5 requires $d_1=d_0=d$, but can the overparameterized settings (i.e., $d_1\ge d_0$ holds) be treated in the same way?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, 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

3 good

Presentation

3 good

Contribution

3 good

Limitations

N/A

Reviewer pmE66/10 · confidence 3/52023-07-11

Summary

This paper aims to study the interaction between optimizers and the local loss landscape. The authors introduce the notion of $R_{\mathrm{med}}^{\mathrm{OPT}}$ to characterize the uniformity of the Hessian diagonal. Through extensive experiments, they show that, compared with SGD, Adam biases the trajectory towards regions with higher Hessian diagonal uniformity, which, they argue, contributes to faster optimization. As a theoretical support, the authors demonstrate that Adam indeed possesses this property in a two-layer linear network setting.

Strengths

1. This paper is well-written, with extensive experiments and solid theoretical analysis. 2. The interaction between optimizers and local loss landscape is an important and interesting topic. The findings of this paper may inspire future studies on developing a deeper understanding of the success of adaptive methods.

Weaknesses

I was wondering whether $R_{\mathrm{med}}^{\mathrm{OPT}}$ can characterize the degree of the loss landscape being ill-conditioned. While it is true that $R_{\textrm{med}}^{\textrm{OPT}}$ conveys the similar message as the condition number when the Hessian is dominated by the diagonal ($\nabla^2 \mathcal{L}(\theta)\approx\mathrm{diag}(\nabla^2 \mathcal{L}(\theta))$, it remains unclear whether $\nabla^2 \mathcal{L}(\theta)\approx\mathrm{diag}(\nabla^2 \mathcal{L}(\theta))$ holds throughout the training trajectory. Can the authors provide some empircial evidence?

Questions

Regarding the comparison of different training runs, specifically run 1 (using Adam throughout), run 2 (using Adam initially and then switching to SGDM halfway), and run 3 (using SGDM throughout), Figure 1 illustrates that run 2 achieves a considerably lower loss level compared to run 3. However, I am interested in the gap in the final loss between run 1 and run 2. If this gap is acceptable, it raises a possibility: Could we design an algorithm that employs Adam during the initial phase and then seamlessly switches to SGDM halfway through the training process? Such an approach may offer the potential benefit of memory savings.

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

3 good

Presentation

3 good

Contribution

2 fair

Limitations

Yes

Reviewer PbqS6/10 · confidence 3/52023-07-20

Summary

The paper provides a new explanation of why adaptive gradient methods perform better than SGD with momentum though extensive experiments and theoretical analysis. The key insight is that adaptive gradient methods especially Adam bias toward solutions with uniform Hessian diagonal values, and this property may contribute to faster convergence. Theoretical analysis is conducted on a simple setting with 2 layer neural network, it is proven that Adam guarantees to converge to solution with more uniform Hessian diagonal values than SGD.

Strengths

The insight that Adam bias toward solutions with uniform Hessian diagonal values is an interesting and novel observation and this measure is easy to compute compared with Hessian singular value-based metrics. The observation is supplemented with comprehensive experiment results and an analysis in simplified setting of neural network, which make the work pretty solid in both theory and empirical sides.

Weaknesses

To my understanding, the weaknesses have two folds: The experiments in the paper mainly focus on settings where Adam outperforms SGD, in which more uniformity in Hessian diagonals is observed with Adam. However, it lacks a comparison in settings where SGD outperforms Adam. It remains a question whether uniformity is still a good measure of performance in this case. In other words, would SGD iterates observe more uniformity in Hessian diagonals instead? In the explanation of the paper, Adam biases towards solutions with more uniformity in Hessian diagonals, and this contributes to faster convergence. Thus, Adam converges faster than SGD. The bias in Adam has been well experimented with and studied. However, it is not very clear why uniformity in Hessian diagonals implies faster convergence. The paper does not provide a theory on it, and the experimental support of this claim is not strong. Additionally, intuitively, it is hard to connect uniformity with faster convergence since regions with more uniformity are allowed to have either large curvature or small curvature. The folklore intuition on a flat region encourages better optimization and generalization does not seem to hold for this measure.

Questions

Could the authors provide more intuition on how uniformity in Hessian diagonals can induce faster optimization?

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

3 good

Presentation

3 good

Contribution

3 good

Limitations

Limitations are adequately discussed in the paper.

Reviewer pmE62023-08-13

The authors' rebuttal has well addressed my concerns. I will keep my positive score.

Reviewer qhhF2023-08-13

I read the response and it's satisfactory. I raise my score to 6.

Authorsrebuttal2023-08-21

Thanks a lot for raising the score!

Reviewer cQDf2023-08-18

Thanks for the author's reply. My concerns are adequately addressed.

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC