arXiv reader

Anticorrelated Noise Injection for Improved Generalization

Antonio Orvieto, Hans Kersting, Frank Proske, Francis Bach and Aurelien Lucchi

arXiv
2202.02831v3 · PDF · 19 May 2023
Categories
stat.ML, cs.LG, math.OC
Licence
CC BY 4.0 The site shows the text.

Abstract

Injecting artificial noise into gradient descent (GD) is commonly employed to improve the performance of machine learning models. Usually, uncorrelated noise is used in such perturbed gradient descent (PGD) methods. It is, however, not known if this is optimal or whether other types of noise could provide better generalization performance. In this paper, we zoom in on the problem of correlating the perturbations of consecutive PGD steps. We consider a variety of objective functions for which we find that GD with anticorrelated perturbations ("Anti-PGD") generalizes significantly better than GD and standard (uncorrelated) PGD. To support these experimental findings, we also derive a theoretical analysis that demonstrates that Anti-PGD moves to wider minima, while GD and PGD remain stuck in suboptimal regions or even diverge. This new connection between anticorrelated noise and generalization opens the field to novel ways to exploit noise for training machine learning models.

Items 22

Theorem

Theorem 2.1 (Convergence of the regularized gradients)

APYQ

Let L:\mathbb{R}^d\to\mathbb{R} be lower bounded with continuous fourth-order partial derivatives and \beta-Lipschitz continuous third-order partial derivatives, for some constant \beta > 0. Consider the iterates \{z_n\}_{n=0}^{N-1} computed by Anti-PGD as in (?), where for each n the noise coordinate \xi^n_i follows a symmetric centered Bernoulli distribution with variance \sigma^2 (i.e., \sigma and -\sigma have probability 1/2). If we set \epsilon>0 small enough such that \eta = \Theta(\epsilon/\sigma^2)<\frac{1}{\beta} and let N = \Omega(\sigma^2\epsilon^{-2}), then it holds true(The first version of this paper had a mistake in the proof of this result and did not include the O(\sigma^3) error. We note that this correction comes with minor changes in the theorem assumptions.) that

\mathbb{E}\left[\frac{1}{N}\sum_{n=0}^{N-1}\|\nabla \tilde L(z_{n})\|^2\right]\le O(\epsilon) + O(\sigma^3).
Theorem

Theorem 2.2

U69X

Let Q(w|w^*) be any distribution over the parameters, centered at the solution w^* found by a gradient-based method. For any non-negative real number \lambda, with probability at least 1-\delta one has

\begin{aligned} &L_{\rm true}(Q(w|w^*)) \le L(w^*) +\frac{\lambda}{2M} +\frac{1}{\lambda}\ln\left(\frac{1}{\delta}\right)\\& + \underbrace{L(Q(w|w^*))-L(w^*)}_{\text{expected sharpness}} +\frac{1}{\lambda} \operatorname{KL}[Q(w|w^*) || P(w)], \end{aligned}

where L_{\rm true} is the generalization loss; L(Q) := \mathbb{E}_{w \sim Q} L(w) and L_{\rm true}(Q) := \mathbb{E}_{w \sim Q} L_{\rm true}(w); P is a distribution over parameters; and \operatorname{KL} denotes the Kullback-Leibler divergence.

Theorem

Theorem 3.1 (Widening Valley)

JLXY

Let L:\mathbb{R}^{d+1}\to\mathbb{R} be the widening valley loss from Eq. (?). We start optimizing from a point w_0=(u_0,0), where \|u_0\|^2=D\gg 1 (e.g. the solution found by gradient descent), around which we consider the domain \mathcal{D}_\alpha :=\{(u,v) \in \mathbb{R}^{d+1}: \|u\|^2\in(\alpha D,D/\alpha)\} for some fixed \alpha \in (0,1). We want to compare the long-term stochastic dynamics of PGD and Anti-PGD, as defined in Eqs. (?) and (?), in terms of where they exit \mathcal{D}_\alpha. As a noise model, we assume that the i.i.d. perturbations \xi_n are distributed according to a symmetric centered Bernoulli distribution (i.e., \sigma and -\sigma have probability 1/2) whose variance \sigma^2 is upper bounded by \sigma^2 \in\left(0, \min\left\{\tfrac{\alpha^3 D}{2}, \tfrac{D}{8\alpha}\right\} \right]. As a step size, we set \eta = \frac{\alpha}{2D} which, for both methods, leads to stable dynamics inside of \mathcal{D}_\alpha. We find that (on average) PGD and Anti-PGD exit through different sides of \mathcal{D}_\alpha:

  1. In high dimensions, PGD diverges away from zero. If d \geq \frac{2}{\alpha^2}, then it holds for any admissible \sigma^2 that

    \lim_{n \to \infty} \mathbb{E}\left[ \| u_n \|^2 \right] \geq D/\alpha,

    where u_n are the first d coordinates of w_n computed by PGD as in (?).

  2. Independent of dimensions, Anti-PGD goes to zero. For any d \in \mathbb{N}, if we choose any admissible \sigma^2 such that \sigma^2 \leq \frac{\alpha D}{2d}, then

    \lim_{n \to \infty} \mathbb{E}\left[ \| u_n \|^2 \right] \leq \alpha D,

    where u_n are the first d coordinates of w_n, computed by Anti-PGD as in (?).

Used by Proof, Proof
Corollary

Corollary 3.1 (The trace of the Hessian in the widening valley)

2OWW

In the same setting as Thm. 3.1, let \eta = \frac{\alpha}{2D}, \sigma^2 \in\left(0, \min\left\{\tfrac{\alpha^3 D}{2}, \tfrac{D}{8\alpha},\frac{\alpha D}{2d}\right\} \right] and d\ge\frac{2}{\alpha^2}. If \alpha\ll 1, then

\begin{aligned} &\lim_{n \to \infty} \mathbb{E}[\operatorname{Tr}(\nabla^2 L(w^{\rm anti}_n)))] \leq 16 \alpha D \ll \mathbb{E}[\operatorname{Tr}(\nabla^2 L(w_0)))]\\ &\lim_{n \to \infty} \mathbb{E}[\operatorname{Tr}(\nabla^2 L(w^{\text{un}}_n)))]\ge \ D/\alpha \ \gg \mathbb{E}[\operatorname{Tr}(\nabla^2 L(w_0)))], \end{aligned}

where w^{\text{un}}_n=(u_n,v_n) and w^{\rm anti}_n=(u_n,v_n) are the weights computed by Anti-PGD and PGD respectively.

Theorem

Theorem 2.1

1LDZ
Proof of Theorem 2.1

First, we observe that Eq. (?) implies – in the considered case of Bernoulli perturbations \xi_n with (\xi_i^n)^2 = \sigma^2 a.s. – that

z^{i}_{n+1} - z^{i}_{n} = - \underbrace{\partial_i \eta L(z_{n}) - \partial_i \eta\frac{\sigma^2}{2}\sum_{j}\partial^2_{jj} L(z_{n})}_{= \eta \partial_i \tilde{L}(z_n)\ \text{(Regularized Gradient)}} -\underbrace{\eta\sum_{j}\partial^2_{ij} L(z_{n})\xi_{n}^j - \frac{\eta}{2} \partial_i \sum_{j\ne k}\partial^2_{jk} L(z_{n})\xi_{n}^j\xi_{n}^k}_{\text{Mean-zero Perturbation}} + \underbrace{O(\eta\sigma^3)}_{\text{Expansion error (small)}}.

Since we assumed that L has \beta-Lipschitz continuous third-order partial derivatives, Theorem 2.1.5 from [nesterov2018book] implies that \tilde L is \beta-smooth. For some tensor B which captures all summands from the mean-zero perturbation of Eq. (Proof) we have

\begin{aligned} \tilde L(z_{n+1}) &\le \tilde L(z_{n}) +\langle\nabla \tilde L(z_{n}), z_{n+1} - z_{n}\rangle + \frac{\beta}{2}\|z_{n+1} - z_{n}\|^2\\ &\overset{\eqref{eq:writing_out_z_n_for_Ber}}{=} \tilde L(z_{n}) -\eta\langle\nabla \tilde L(z_{n}), \nabla \tilde L(z_n) + B(z_n)\odot \xi_n + O(\sigma^3)\rangle + \frac{\beta\eta^2}{2}\|\nabla \tilde L(z_n) + B(z_n) \odot \xi_n + O(\sigma^3)\|^2\\ &= \tilde L(z_{n}) -\eta\|\nabla \tilde L(z_{n})\|^2 + \frac{\beta\eta^2}{2}\|\nabla \tilde L(z_n)\|^2\\ &\quad -\eta\langle\nabla \tilde L(z_{n}), B(z_n)\odot \xi_n\rangle + \eta\langle\nabla \tilde L(z_{n}), O(\sigma^3)\rangle\\ & \quad + \frac{\beta\eta^2}{2}\left[\|B(z_n) \odot \xi_n\|^2 +O(\sigma^6)+ 2 \langle \nabla \tilde L(z_n) + O(\sigma^3), B(z_n) \odot \xi_n\rangle + 2 \langle \nabla \tilde L(z_n), O(\sigma^3)\rangle\right] \end{aligned}

Taking the expectation, most of the terms cancel out and we get

\begin{aligned} \mathbb{E}[\tilde L(z_{n+1})] \le & \mathbb{E}\left[\tilde L(z_{n}) -\eta\|\nabla \tilde L(z_{n})\|^2 + \frac{\beta\eta^2}{2}\|\nabla \tilde L(z_n)\|^2\right]\\ &\quad + O(\eta\sigma^3)\\ & \quad + \frac{\beta\eta^2}{2}\left[O(\sigma^2) +O(\sigma^6)+ O(\sigma^3)\right]\\ &=\mathbb{E}[\tilde L(z_{n})] -\left(\eta-\frac{\beta\eta^2}{2}\right)\mathbb{E}[\|\nabla \tilde L(z_{n})\|^2] + O(\eta^2\sigma^2) + O(\eta\sigma^3). \end{aligned}

Note that, under the assumption of positive \eta, \left(\eta-\frac{\beta\eta^2}{2}\right)>0 implies 0<\eta\le \frac{2}{\beta}. If we further require \left(\eta-\frac{\beta\eta^2}{2}\right)\ge\frac{\eta}{2}, we get the condition 0<\eta\le \frac{1}{\beta}.

Under this condition, the following upper bound holds(Outlined in blue color below is the updated version of the proof of the theorem.):

\mathbb{E}[\tilde L(z_{n+1})] \le \mathbb{E}[\tilde L(z_{n})] -\frac{\eta}{2}\mathbb{E}[\|\nabla \tilde L(z_{n})\|^2] + O(\eta^2\sigma^2) + O(\eta\sigma^3).

Rearranging the terms we get

\frac{\eta}{2}\mathbb{E}[\|\nabla \tilde L(z_{n})\|^2] \le \mathbb{E}[\tilde L(z_{n})] - \mathbb{E}[\tilde L(z_{n+1})] + O(\eta^2\sigma^2) + O(\eta\sigma^3).

After a division by \eta/2>0 we arrive at

\mathbb{E}[\|\nabla \tilde L(z_{n})\|^2] \le \frac{2}{\eta} \left(\mathbb{E}[\tilde L(z_{n})] - \mathbb{E}[\tilde L(z_{n+1})]\right) + O(\eta\sigma^2) + O(\sigma^3).

Summing all terms, we arrive at the following:

\mathbb{E}\left[\sum_{n=0}^{N-1}\|\nabla \tilde L(z_{n})\|^2\right] \le \frac{2}{\eta} \left(\mathbb{E}[\tilde L(z_{0})] - \mathbb{E}[\tilde L(z_{N})]\right) + O(N\eta\sigma^2) + O(N\sigma^3).

After dividing by N we get

\mathbb{E}\left[\frac{1}{N}\sum_{n=0}^{N-1}\|\nabla \tilde L(z_{n})\|^2\right] \le \frac{2}{\eta N} \left(\mathbb{E}[\tilde L(z_{0})] - \mathbb{E}[\tilde L(z_{N})]\right) + O(\eta\sigma^2) + O(\sigma^3).

Note that \tilde L(z_{N})\ge\tilde L^* = \min_z \tilde L(z) > -\infty. This is because L is lower bounded and also tr(\nabla^2 L) is lower bounded since we assumed L has Lipschitz gradients. Therefore, \mathbb{E}[\tilde L(z_{0})] - \mathbb{E}[\tilde L(z_{N})] = O(1) and we conclude that

\mathbb{E}\left[\frac{1}{N}\sum_{n=0}^{N-1}\|\nabla \tilde L(z_{n})\|^2\right] \le O(\eta^{-1} N^{-1}) + O(\eta\sigma^2) + O(\sigma^3).

If we set \eta = O(\epsilon/\sigma^2), then O(\eta\sigma^2) = O(\epsilon). Further, under the choice \eta = \Theta(\epsilon/\sigma^2), we also have O(\eta^{-1} N^{-1}) = O(\sigma^2 \epsilon^{-1}N^{-1}). By setting N = \Omega(\sigma^2\epsilon^{-2}), we ensure that O(\eta^{-1} N^{-1}) = O(\epsilon).

All in all, we get \mathbb{E}\left[\frac{1}{N}\sum_{n=0}^{N-1}\|\nabla \tilde L(z_{n})\|^2\right] \le O(\epsilon) + O(\sigma^3).

Lemma

Lemma 3.1 (Variations of constants formula)

N56V

Let w\in\mathbb{R}^d evolve with time-varying linear dynamics w_{k+1} = A_k w_k + \varepsilon_k, where A_k\in\mathbb{R}^{d\times d} and \varepsilon_k\in \mathbb{R}^{d} for all k. Then, with the convention that \prod_{j=k+1}^{k} A_j = 1,

w_{k+1} = \left(\prod_{j=0}^{k}A_j\right)w_0 +\sum_{i=0}^{k}\left(\prod_{j=i+1}^{k} A_j\right)\varepsilon_i.
Proof of Lemma 3.1

For k=1 we get w_1 = A_0 w_0 + \varepsilon_0. The induction step yields

\begin{aligned} w_{k+1} &= A_k\left(\left( \prod_{j=0}^{k-1}A_j\right)w_0 +\sum_{i=0}^{k-1}\left(\prod_{j=i+1}^{k-1} A_j\right)\varepsilon_i\right) + \varepsilon_k.\\ &= \left( \prod_{j=0}^{k}A_j\right)w_0 +\sum_{i=0}^{k-1}A_k\left(\prod_{j=i+1}^{k-1} A_j\right)\varepsilon_i + \varepsilon_k.\\ &= \left( \prod_{j=0}^{k}A_j\right)w_0 +\sum_{i=0}^{k-1}\left(\prod_{j=i+1}^{k} A_j\right)\varepsilon_i + \left(\prod_{j=k+1}^{k} A_j\right)\varepsilon_k.\\ &= \left( \prod_{j=0}^{k}A_j\right)w_0 +\sum_{i=0}^{k}\left(\prod_{j=i+1}^{k} A_j\right)\varepsilon_i. \end{aligned}

This completes the proof of the variations of constants formula.

Corollary

Corollary 3.2 (Anticorrelated variations of constants formula)

HQ2I

Under the same setting of Lemma 3.1, if there exist a family of vectors \{\xi_k\} such that \varepsilon_0 = \xi_0 and \varepsilon_k = \xi_k-\xi_{k-1}, then

w_{k+1} = \left(\prod_{j=0}^{k}A_j\right)w_0 +\xi_k +\sum_{i=0}^{k-1}(A_{i+1}-I)\left(\prod_{j=i+2}^{k} A_j\right)\xi_{i}.
Proof of Corollary 3.2

We have, by direct computation:

\begin{aligned} w_{k+1} &= \left(\prod_{j=0}^{k}A_j\right)w_0 + \left(\prod_{j=1}^{k} A_j\right)\xi_0 +\sum_{i=1}^{k}\left(\prod_{j=i+1}^{k} A_j\right)\xi_i - \sum_{i=1}^{k}\left(\prod_{j=i+1}^{k} A_j\right)\xi_{i-1}\\ &= \left(\prod_{j=0}^{k}A_j\right)w_0+ \left(\prod_{j=1}^{k} A_j\right)\xi_0 +\sum_{i=1}^{k-1}\left(\prod_{j=i+1}^{k} A_j\right)\xi_i +\xi_k - \sum_{i=0}^{k-1}\left(\prod_{j=i+2}^{k} A_j\right)\xi_{i}\\ &= \left(\prod_{j=0}^{k}A_j\right)w_0 +\xi_k +\sum_{i=0}^{k-1}\left(\prod_{j=i+1}^{k} A_j\right)\xi_i - \sum_{i=0}^{k-1}\left(\prod_{j=i+2}^{k} A_j\right)\xi_{i}\\ &= \left(\prod_{j=0}^{k}A_j\right)w_0 +\xi_k +\sum_{i=0}^{k-1}\left[\left(\prod_{j=i+1}^{k} A_j\right)-\left(\prod_{j=i+2}^{k} A_j\right)\right]\xi_{i}. \end{aligned}
Remark

Remark 3.3

4FBC

If A_i=I for all i, then the last summand is zero. This showcases the effect of anticorrelation: noise cancellation under noise accumulation.

Proposition

Proposition 3.4 (An Itô-like formula)

IY8T

Let w\in\mathbb{R}^d evolve with time-varying linear dynamics w_{k+1} = A_k w_k + \varepsilon_k, where A_k\in\mathbb{R}^{d\times d} and \varepsilon_k\in \mathbb{R}^{d} for all k. Let \{\xi_k\} be a family of uncorrelated zero-mean d-dimensional random variables with variance \mathbb{E}[\|\xi_k\|^2 ]= d\sigma^2 (dependency on the dimension because additivity of squared norm). Consider \varepsilon_0 = \xi_0 and \varepsilon_k = \xi_k-\xi_{k-1} for all k\ge 1. Further, assume that A_k = \rho_k I for all k (i.e. A_k is a multiple of the identity), with \rho_k\in\mathbb{R} a deterministic quantity. Then, with the convention that \prod_{j=k+1}^{k} A_j = 1, we have

\mathbb{E}[\|w_{k+1}\|^2] = \left(\prod_{j=0}^{k}\rho_j^2\right) \|w_0\|^2 + \left(1+\sum_{i=0}^{k-1}\left[ (1-\rho_{i+1})^2 \prod_{j=i+2}^k \rho_j^2\right]\right)d \sigma^2.

Instead, if \varepsilon_k = \xi_k for all k (standard noise injection) we have

\mathbb{E}[\|w_{k+1}\|^2] = \left(\prod_{j=0}^{k}\rho_j^2\right) \|w_0\|^2 + \sum_{i=0}^{k}\left(\prod_{j=i+1}^k \rho_j^2\right)d \sigma^2.
Used by Proof
Proof of Proposition 3.4

Using independence of the \{\xi_k\} family, we obtain for the anticorrelated case:

\begin{aligned} \mathbb{E}[w_{k+1}^\top w_{k+1}] &= \left(\prod_{j=0}^{k}\rho_j\right)^2\|w_0\|^2 +\mathbb{E}[\|\xi_k\|^2] +\sum_{i=0}^{k-1}(\rho_{i+1}-1)^2\left(\prod_{j=i+2}^{k} \rho_j\right)^2\mathbb{E}[\|\xi_{i}\|^2]\\ &= \left(\prod_{j=0}^{k}\rho_j\right)^2\|w_0\|^2 +\sigma^2 +\sum_{i=0}^{k-1}(\rho_{i+1}-1)^2\left(\prod_{j=i+2}^{k} \rho_j^2\right)\sigma^2, \end{aligned}

where we used the fact that the \xi_k are not correlated. The case \varepsilon_k = \xi_k is similar and therefore left to the reader.

Corollary

Corollary 3.5

5JOE

In the setting of Proposition 3.4, assume \rho_j = \rho \in (0,1) is constant for all j. If \varepsilon_0 = \xi_0 and \varepsilon_k = \xi_k-\xi_{k-1} for all k\ge 1 then

\mathbb{E}[\|w_{k+1}\|^2] = \rho^{2(k+1)} \|w_0\|^2 + \left(1+\frac{(1-\rho)^2(1-\rho^{2 (k+1)})}{1-\rho^2}\right)d \sigma^2 \quad\overset{\infty}{\longrightarrow}\quad \frac{2}{1+\rho} d \sigma^2.

Instead, if \varepsilon_k = \xi_k for all k (standard noise injection) we have

\mathbb{E}[\|w_{k+1}\|^2] = \rho^{2(k+1)} \|w_0\|^2 + \frac{1-\rho^{2 (k+1)}}{1-\rho^2} d \sigma^2\quad \overset{\infty}{\longrightarrow}\quad \frac{1}{1-\rho^2} d \sigma^2.
Used by Proof
Proof of Corollary 3.5

Simple application of the formula for geometric series. Numerical verification in Figure ?.

Remark

Remark 3.6

OFX7

Note that the corollary has a clear interpretation: if \rho is between zero and one, we experience striking difference between uncorrelated and anticorrelated noise. If \rho increases, the total accumulated anticorrelated noise decreases.(\frac{2}{1+\rho} is a decreasing function or \rho, while 1/(1-\rho^2) is increasing.) This trend is reversed for normal noise injection: as \rho\to 1 the total accumulated variance explodes. Numerical verification can be found in Figure ?.

Proposition

Proposition 3.7 (Limit bound on second moment for anticorrelated noise)

6DSP

Let w\in\mathbb{R}^d evolve with time-varying linear dynamics w_{k+1} = A_k w_k + \varepsilon_k, where A_k\in\mathbb{R}^{d\times d} and \varepsilon_k\in \mathbb{R}^{d} for all k. Let \{\xi_k\} be a family of uncorrelated zero-mean d-dimensional random variables with variance \mathbb{E}[\|\xi_k\|^2 ]= d\sigma^2 (dependency on the dimension because additivity of squared norm). Consider \varepsilon_0 = \xi_0 and \varepsilon_k = \xi_k-\xi_{k-1} for all k\ge 1. Further, assume that A_k = \rho_k I for all k (i.e. A_k is a multiple of the identity) and that \rho_k\in[0,1] for all k. Assume that the probability of \rho_k<1 is non-zero, i.e. that \rho_k\ne 1 with non-vanishing probability. Then, we have

\lim_{k\to\infty}\mathbb{E}[\|w_{k+1}\|^2]\le 2d\sigma^2.
Used by Proof
Proof of Proposition 3.7

The proof is based on an induction argument, starting from the equation in Proposition 3.4:

\mathbb{E}[\|w_{k+1}\|^2] = \left(\prod_{j=0}^{k}\rho_j^2\right) \|w_0\|^2 + \left(1+\sum_{i=0}^{k-1}\left[ (1-\rho_{i+1})^2 \prod_{j=i+2}^k \rho_j^2\right]\right)d \sigma^2.

First, note that by assumption on \rho_k the first term vanishes as k\to\infty. We just have to deal with the second term. Specifically, we want to show that for whatever sequence \rho_k\in(0,1) we have

\nu_k = \sum_{i=0}^{k-1} (1-\rho_{i+1})^2 \left(\prod_{j=i+2}^k \rho_j^2\right)\le1, \ \quad \forall k\ge 0.

A fundamental observation, is that the term can be written in a recursive form. Indeed,

\begin{aligned} \nu_k &= \sum_{i=0}^{k-1} \left[(1-\rho_{i+1})^2 \left(\prod_{j=i+2}^k \rho_j^2\right)\right]\\ &= \sum_{i=0}^{k-2} \left[(1-\rho_{i+1})^2 \left(\prod_{j=i+2}^k \rho_j^2\right)\right] + (1-\rho_{k})^2\\ &= \rho_k \sum_{i=0}^{k-2} \left[(1-\rho_{i+1})^2 \left(\prod_{j=i+2}^{k-1} \rho_j^2\right)\right] + (1-\rho_{k})^2\\ & = \rho_k^2\nu_{k-1} + (1-\rho_k)^2, \end{aligned}

where the second equality follows from the fact that, as previously noted, our notation implies \prod_{j=k+1}^k \rho_k^2 = 1, for all k. Let us now proceed again by induction to show that v_k\in(0,1) for all k\ge 0. Note that trivially v_0=0. Let’s proceed with the inductive step:

\nu_k = \rho_k^2\nu_{k-1} + (1-\rho_k)^2 = (\nu_{k-1}+1)\rho_k^2 - 2\rho_k + 1.

This quantity is less then one if and only if

(\nu_{k-1}+1)\rho_k^2 \le 2\rho_k.

Note that this is satisfied since \nu_{k-1}+1\le2, and \rho_k^2 \le \rho_k since \rho_k\in(0,1). The result follows.

Theorem

Theorem 3.1

FGW2
Proof of Theorem 3.1

As above, we denote the perturbations by \varepsilon_k; i.e., \varepsilon_k = \xi_k for PGD and \varepsilon_k = \xi_{k+1} - \xi_k for Anti-PGD. Let us start by inspecting the equation

u_{k+1} = (1 - \eta v_k^2) \cdot u_k + \varepsilon_{k}^u,

where \varepsilon_{k}^u\in\mathbb{R}^d is the projection of the noise \varepsilon_{k} to the first d coordinates. It is clear that the optimal strategy of making \|w\| small is to increase |v|, so to sample nearby points and pick up the gradient. The greater v is in norm, the better. We can increase the norm of v by heavy noise injection (second equation). However, too much noise also increases \varepsilon_{k}^u, which acts adversarially to the decrease of \|w\| (error accumulation increases the Euclidean norm in expectation).

1.5ex plus 0.5ex minus .2ex

< - 1.5ex plus 0.5ex minus .2ex-1emparagraph41.5ex plus 0.5ex minus .2ex-1emChoice of stepsize and operating region. We start by motivating the choice of stepsize \eta =\frac{\alpha}{2D}. Starting from the point (u_0,0) with \|u_0\|^2=D>0, we consider the operating landscape region \alpha D<\|u_k\|^2<D/\alpha, with \alpha\in(0,1). We want to show that while standard noise injection makes the process exit the region from the right (D/\alpha side, see Figure ?), anticorrelated noise injection makes the process exit the region from the left (\alpha D side). In this region, named \mathcal{D}_\alpha, the maximal allowed learning rate is \eta\le\frac{2}{\max_{\mathcal{D}_\alpha}\{v^2,\|u\|^2\}}. Since v stays small (we are going to check this later in great detail), we select the stepsize \eta\le\frac{1}{2\max_{\mathcal{D}_\alpha}\|u\|^2}=\frac{\alpha}{2D} — which guarantees stability in expectaction, i.e. without noise injection (even allowing for some slack).

1.5ex plus 0.5ex minus .2ex

< - 1.5ex plus 0.5ex minus .2ex-1emparagraph41.5ex plus 0.5ex minus .2ex-1em[]Lower bound for uncorrelated noise (\boldsymbol{\varepsilon_k =\xi_k}). For this case, we have to show that standard noise injection cannot possibly work for reaching \alpha D, therefore we have to put ourselves in the best case scenario for PGD: that is, we have to provide an uniform upper bound for v_k under the second equation (i.e. the equation for v) and show that this is not enough for a substantial decrease in \|u\|. In the next paragraph (anticorrelated noise), we instead have to put ourselves in the worst case scenario — i.e. a lower bound for |v|— and show that this is still enough for anticorrelated noise to yield a substantial decrease in \|u\|.

To start, let us then look at the second equation:

v_{k+1} = (1 - \eta \|u_k\|^2) \cdot v_k + \varepsilon^v_k,

where \varepsilon^v_k is the (d+1)-th component of \varepsilon_k. Since we start from v_0=0, the equation is completely dominated by noise, and is strongly mean reverting (i.e. v is effectively bounded). Indeed, since \eta = \frac{\alpha}{2D} and \|u_k\|^2\in\left(\alpha D,D/\alpha\right) by assumption, we have

|v_{k+1}| \le \max\left\{1 - \frac{\alpha^2}{2},\frac{1}{2}\right\} \cdot |v_k| + \sigma = \left(1 - \frac{\alpha^2}{2}\right) |v_k| +\sigma.

where we used the fact that |\varepsilon^v_k|=\sigma and that \alpha^2\in(0,1). By induction, the last inequality yields that, starting from v_0=0, we have

|v_k|\le v_{\max}:=\frac{2\sigma}{\alpha^2},\quad \forall k\ge 0.

Hence, we found the “best case scenario” for the w equation: |v_k| = \frac{2\sigma}{\alpha^2}, for all k. This gives w the best decrease rate possible.(Note that noise injection in u is independent of v, therefore to minimize \|u\| we need the shrinking factor to be as large as possible. We note that using this bound is precise: with probability one we are in the best scenario (we are finding a lower bound).) However, we need to check this value v_{\max} is such that the equation for w is indeed stable (we promised this to the reader in the last paragraph). We recall that this equation is w_{k+1} = (1 - \eta v_k^2) \cdot w_k + \varepsilon_{k}^u. Let us require (1 - \eta v_k^2)\in(0,1), for this we need 1/v_{\max}^2>\eta = \frac{\alpha}{2D}. Therefore, we need

\frac{1}{v_{\max}^2} = \frac{\alpha^4}{4\sigma^2}\ge \eta = \frac{\alpha}{2D}\quad\implies\quad \sigma^2\le \alpha^3 D/2.

This is guaranteed by assumption. To proceed, we substitute v_{\max} into the first equation to get

u_{k+1} = (1 - \eta \frac{4\sigma^2}{\alpha^4}) \cdot u_k + \varepsilon_{k}^u = \frac{\alpha^3 D- 2\sigma^2}{\alpha^3 D} u_k + \varepsilon_{k}^u.

Let us call \rho := \left(\frac{\alpha^3 D- 2\sigma^2}{\alpha^3 D}\right)\in(0,1) the (best case) shrinking factor. Since \varepsilon_{i}^u is zero-mean, computing the expected value of \|u_{k}\|^2 leads to the following limit by Corollary ?:

\lim_{k\to\infty} \mathbb{E}[\|u_{k}\|^2] = \frac{d\sigma^2}{1-\rho^2} = \frac{d D^2 \alpha^6 }{2 D \alpha^3-2\sigma^2}.

where we assumed \sigma^2 strictly positive. Note that this limit is a monotonically increasing function of \sigma^2\in(0,D \alpha^3/2). Hence, we get

\lim_{k\to\infty} \mathbb{E}[\|u_{k}\|^2] \in \left(\frac{d D \alpha^3}{2}, d D \alpha^3\right)
Remark (Phase transition).

Note that, for \sigma exactly 0, the limit is instead \|u_0\|^2 = D. Instead, for any small noise the process will grow up until at least dD\alpha^2/2. This might seem weird at first — but recall that there is an interaction between noise scale and our best-case scenario bound for v: they both depend on \sigma. This causes a cancellation effect and a transition in behavior at \sigma=0.

Last, we need to show that this lower bound on \lim_{k\to\infty} \mathbb{E}[\|u_{k}\|^2] coincides with (or is bigger than) the right boundary of the operating region in Figure ?. To do this we set:

\frac{d D \alpha^3}{2} \ge \frac{D}{\alpha}\quad \implies \quad d\ge \frac{2}{\alpha^4}.

This concludes the proof of Eq. (?).

1.5ex plus 0.5ex minus .2ex

< - 1.5ex plus 0.5ex minus .2ex-1emparagraph41.5ex plus 0.5ex minus .2ex-1em[]Upper bound for anticorrelated noise (\boldsymbol{\varepsilon_k =\xi_k-\xi_{k-1}}). We consider anticorrelated noise injection (\xi_k)_i \in \{-\sigma,\sigma\}, and \varepsilon_k = (\varepsilon_k^u,\varepsilon_k^v) =\xi_k-\xi_{k-1}. Again, let us first look at the second equation:

v_{k+1} = (1 - \eta \|u_k\|^2) \cdot v_k + \varepsilon^v_k.

Since by hypothesis \eta = \frac{\alpha}{2D} and \alpha D \le \|u_k\|^2\le D/\alpha, we have (1 - \eta \|u_k\|^2)\in\left(1-\frac{\alpha^2}{2}, \frac{1}{2}\right). Clearly, we have that, for any k\ge 1 v_{k}^2, is non-zero with a non-vanishing probability. For  (noiseless) stability, we also need an upper bound on |v_k|. An easy (yet absolutely not tight) upper bound is the following:

|v_{k+1}| \le \frac{1}{2} |v_k| + 2\sigma \varepsilon^v_k.

where we simply used the absolute value subadditivity and the fact that |\varepsilon^v_k|\le |\xi_k|+|\xi_{k-1}| =2\sigma. Note that the equation directly yields by induction |v_k|\le 4\sigma for all k\ge 0.

Let us now deal with the equation for w.

u_{k+1} = (1 - \eta v_k^2) \cdot u_k + \varepsilon_{k}^u

For this equation, we would want all the coefficients \rho_k :=1 - \eta v_k^2 to be between 0 and 1 — i.e. we need to check that v is indeed not too big. Since |v_k|\le 4\sigma for all k\ge 0, we have the requirement 1 - \frac{\alpha}{2D} 16\sigma^2>0, which implies \sigma^2\le \frac{D}{8\alpha} — that satisfies our hypothesis.

So, to sum it up, we are in operating regime of Proposition 3.7: anticorrelated noise, \rho_k<1 with non-vanishing probability and \rho_k always between 0 and 1. Hence, we get that

\lim_{k\to\infty}\mathbb{E}[\|u_{k}\|^2]\le 2 \sigma^2 d.

Hence, for \sigma^2 small enough, the value \alpha D is reached. This directly implies the missing Eq. (?). The proof is thereby complete.

Corollary

Corollary 3.1

XDSE
Proof of Corollary 3.1

Recall from Eq. (?) that \operatorname{Tr}(\nabla^2 L(u,v)) = d v^2 + \|u\|^2.

For the first two inequalities in the corollary, recall from Eq. (?) of the proof of Theorem 3.1 that |v_n|\le 4\sigma for all n, almost surely. The first two inequalities in the Corollary follow now by Eq. (?).

For the last two inequalities in the Corollary, we lower bound the trace by \|u\|^2 and make use of Eq. (?).

Source and licence

The text on this page is from arXiv:2202.02831v3 by Antonio Orvieto, Hans Kersting, Frank Proske, Francis Bach and Aurelien Lucchi, under the licence CC BY 4.0. The corpus made these changes: it read the items out of the LaTeX source, it expanded the macros of the paper, it put each proof after its statement, and it converted the text to HTML. The formulas are the TeX of the paper, and KaTeX renders them. A formula or a reference can look different from the PDF. The page is published under CC BY 4.0.

The record of each item is in analysis/objects/2202/2202.02831.jsonl.