2 The example
To show that the ADAM algorithm may fail to converge on nonconvex functions with Lipschitz gradient, we will exhibit an example in dimension one, which we construct in two stages. We first define sequences of iterates, together with associated function and gradient values, which remain constant throughout the iterations. We next verify that these sequences may be considered as generated by applying the ADAM algorithm to a nonconvex objective function with Lipschitz gradient. (Since the example is unidimensional, we omit the component indices (i) if what follows.) For , let the sequence of function values and gradients be defined by
and the sequence of (potential) iterates be defined (from (13.2)–(13.4)) by and
for , where we used (13.5) to derive the last equality in (13.6) and (13.7). Thus,
for and tends to infinity. We now show that there exists a (nonconvex) univariate function defined on with Lipschitz continuous gradient such that and for all . Indeed, a simple Hermite interpolation calculation based of these conditions yields that, for all ,
We may then define
so that is well-defined on the whole of has Lipschitz continuous gradient and is such that the ADAM algorithm (13.6)–(13.8) applied on f starting from generates iterates with for all . We thus conclude that the ADAM algorithm fails to converge on this particular instance of problem (13.1). A graph of for , is shown in Figure 13.1. One also verifies that the Lipschitz constant on the interval is given by
Moreover, defining , it results from (13.5), [1, Theorem A.9.2], (13.9) and the inequalities
that is bounded below by a constant only depending on α. As a consequence, we see that, for any fixed and , there exist unidimensional functions with Lipschitz continuous gradient whose gradient’s Lipschitz constant is as small as , which is bounded below by a constant only depending on α and for which the ADAM algorithm (13.6)–(13.8) starting from generates iterates tending to infinity with constant nonzero gradients (therefore failing to converge).

Figure 13.1 The shape of for small values of .
Since our example is unidimensional and since ADAM is defined componentwise, the same conclusion obviously applies irrespective of n, the problem dimension. Indeed divergence in a single component implies divergence on the whole space.
Our result thus extends that of [5] in that it includes methods for arbitrary but fixed stepsize. Note that is bounded by L for all , again at variance with the example of this reference.
Observe that our conclusions would also hold if we had fixed to another negative constant (we can multiply f by this constant) or if, instead of (13.4), we had considered
where ϵ is a small positive constant and the (now iteration-dependent) stepsizes are bounded away from zero, but they do not apply in the more realistic situation where stepsizes are used (as is for instance the case in [5, Proposition 1.1], where is a multiple of ). We also remark that, because of the periodicity of our example, it would be possible to derive a trigonometric variant. We finally note that we have chosen a constant zero value for in order to simplify our bounds, but that it is also possible to choose (leading to an monotonically increasing sequence of function values) without qualitatively affecting our conclusion, although this leads to a larger value of L.
Bibliography
[1]C. Cartis, N. I. M. Gould, and Ph. L. Toint. Evaluation Complexity of Algorithms for Nonconvex Optimization. MOS-SIAM Series on Optimization, volume 30. SIAM, Philadelphia, USA, June 2022. →
[2]A. Défossez, L. Bottou, F. Bach, and N. Usunier. A simple convergence proof for Adam and Adagrad. Transactions on Machine Learning Research, October 2022. →
[3]D. Kingma and J. Ba. Adam. A method for stochastic optimization. In: Proceedings in the International Conference on Learning Representations (ICLR), 2015. →
[4]S. Reddi, S. Kale, and S. Kumar. On the convergence of Adam and beyond. In: Proceedings in the International Conference on Learning Representations (ICLR), 2018. a, b
[5]Y. Zhang, C. Chen, N. Shi, R. Sun, and Z.-Q. Luo. Adam can converge without any modification on update rules. arXiv:2208.09632v5, 2022. a, b, c, d