New insights and perspectives on the natural gradient method

James Martens

Introduction and Overview

The natural gradient descent approach, pioneered by Amari and collaborators (e.g. Amari, 1998), is a popular alternative to traditional gradient descent methods which has received a lot of attention over the past several decades, motivating many new and related approaches. It has been successfully applied to a variety of problems such as blind source separation (Amari and Cichocki, 1998), reinforcement learning (Peters and Schaal, 2008), and neural network training (e.g. Park et al., 2000; Martens and Grosse, 2015; Desjardins et al., 2015).

Natural gradient descent is generally applicable to the optimization of probabilistic modelsThis includes neural networks, which can be cast as conditional models., and involves the use of the so-called “natural gradient”, which is defined as the gradient times the inverse of the model’s Fisher information matrix (aka “the Fisher” ; see Section 5), in place of the standard gradient. In many applications, natural gradient descent seems to require far fewer iterations than gradient descent, making it a potentially attractive alternative method. Unfortunately, for models with very many parameters such as large neural networks, computing the natural gradient is impractical due to the extreme size of the Fisher matrix. This problem can be addressed through the use of various approximations to the Fisher (e.g Le Roux et al., 2008; Ollivier, 2015; Grosse and Salakhudinov, 2015; Martens and Grosse, 2015) that are designed to be easier to compute, to store and finally to invert, than the exact Fisher.

Natural gradient descent is classically motivated as a way of implementing steepest descent“Steepest descent” is a common synonym for gradient descent, which emphasizes the interpretation of the gradient as being the direction that descends down the loss surface most “steeply”. Here “steepness” is measured as the amount loss reduction per unit of distance traveled, where distance is measured according to some given metric. For standard gradient descent this metric is the Euclidean distance on the default parameter space. in the space of realizable distributions“Realizable distributions” means distributions which correspond to some setting of the model’s parameters. instead of the space of parameters, where distance in the distribution space is measured with a special “Riemannian metric” (Amari and Nagaoka, 2007). This metric depends only on the properties of the distributions themselves and not their parameters, and in particular is defined so that it approximates the square root of the Kullback–Leibler divergence within small neighborhoods. Under this interpretation (discussed in detail in Section 6), natural gradient descent is invariant to any smooth and invertible reparameterization of the model, putting it in stark contrast to gradient descent, whose performance is parameterization dependent.

In practice however, natural gradient descent still operates within the default parameter space, and works by computing directions in the space of distributions and then translating them back to the default space before taking a step. Because of this, the above discussed interpretation breaks down unless the step-size becomes arbitrarily small, and as discussed in Section 10, this breakdown has important implications for designing a natural gradient method that can work well in practice. Another problem with this interpretation is that it doesn’t provide any obvious reason why a step of natural gradient descent should make more progress reducing the objective than a step of standard gradient descent (assuming well-chosen step-sizes for both). Moreover, given a large step-size one also loses the parameterization invariance property of the natural gradient method, although it will still hold approximately under certain conditions which are described in Section 12.

In Section 10 we argue for an alternative view of natural gradient descent: as a type of 2nd-order methodBy “2nd-order method” we mean any iterative optimization method which generates updates as the (possibly approximate) solution of a non-trivial local quadratic model of the objective function. This extends well beyond the classical Newton’s method, and includes approaches like (L-)BFGS, and methods based on the Gauss-Newton matrix. which utilizes the Fisher as an alternative to the Hessian. As discussed in Section 7, 2nd-order methods work by forming a local quadratic approximation to the objective around the current iterate, and produce the next iterate by optimizing this approximation within some region where the approximation is believed to be accurate. According to this view, natural gradient descent ought to make more progress per step than gradient descent because it uses a local quadratic model/approximation of the objective function which is more detailed (which allows it to be less conservative) than the one implicitly used by gradient descent.

In support of this view is the fact that the Fisher can be cast as an approximation of the Hessian in at least two different ways (provided the objective has the form discussed in Section 4). First, as discussed in Section 5, it corresponds to the expected Hessian of the loss under the model’s distribution over predicted outputs (instead of the usual empirical one used to compute the exact Hessian). Second, as we establish in Section 9, it is very often equivalent to the so-called “Generalized Gauss-Newton matrix” (GGN) (discussed in Section 8), a generalization of the classical Gauss-Newton matrix (e.g. Dennis Jr and Schnabel, 1996; Ortega and Rheinboldt, 2000; Nocedal and Wright, 2006), which is a popular alternative/approximation to the Hessian that has been used in various practical 2nd-order optimization methods designed specifically for neural networks (e.g Schraudolph, 2002; Martens, 2010; Vinyals and Povey, 2012), and which may actually be a better choice than the Hessian in the context of neural net training (see Section 8.1).

Viewing natural gradient descent as a 2nd-order method is also prescriptive, since it suggests the use of various damping/regularization techniques often used in the optimization literature to account for the limited accuracy of local quadratic approximations (especially over long distances). Indeed, such techniques have been successfully applied in 2nd-order methods designed for neural networks (e.g. Martens, 2010; Martens and Grosse, 2015), where they proved crucial in achieving fast and robust performance in practice. And before that have had a long history of application in the context of practical non-linear regression procedures (Tikhonov, 1943; Levenberg, 1944; Marquardt, 1963; Moré, 1978).

The “empirical Fisher”, which is discussed in Section 11, is an approximation to the Fisher whose computation is easier to implement in practice using standard automatic-differentiation libraries. The empirical Fisher differs from the usual Fisher in subtle but important ways, which as we show in Section 11.1, make it considerably less useful as an approximation to the Fisher, or as a curvature matrix to be used in 2nd-order methods. Using the empirical Fisher also breaks some of the theory justifying natural gradient descent, although it nonetheless preserves its (approximate) parameterization invariance (as we show in Section 12). Despite these objections, the empirical Fisher has been used in many approaches, such as TONGA (Le Roux et al., 2008), and the recent spate of methods that use the diagonal of this matrix such as RMSprop (Tieleman and Hinton, 2012) and Adam (Ba and Kingma, 2015) (which we examine in Section 11.2).

A well-known and oft quoted result about stochastic natural gradient descent is that it is asymptotically “Fisher efficient” (Amari, 1998). Roughly speaking, this means that it provides an asymptotically unbiased estimate of the parameters with the lowest possible variance among all unbiased estimators (that see the same amount of data), thus achieving the best possible expected objective function value. Unfortunately, as discussed in Section 14.1, this result comes with several important caveats which significantly limit its applicability. Moreover, even when it is applicable, it only provides an asymptotically accurate characterization of the method, which may not usefully describe its behavior given a finite number of iterations.

To address these issues we build on the work of Murata (1998) in Section 14.2 and Section 14.3 to develop a more powerful convergence theory for stochastic 2nd-order methods (including natural gradient descent) as applied to convex quadratic objectives. Our results provide a more precise expression for the convergence speed of such methods than existing results doAlternate versions of several of our results have appeared in the literature before (e.g. Polyak and Juditsky, 1992; Bordes et al., 2009; Moulines and Bach, 2011). These formulations tend to be more general than ours (we restrict to the quadratic case), but also less precise and interpretable. In particular, previous results tend to omit asymptotically negligible terms that are nonetheless important pre-asymptotically. Or when they do include these terms, their bounds are simultaneously looser and more complicated than our own, perhaps owing to their increased generality. We discuss connections to some prior work on convergence bounds in Sections 14.2.2 and 14.3.2., and properly account for the effect of the starting point. And as we discuss in Section 14.2.1 and Section 14.3.1 they imply various interesting consequences about the relative performance of various 1st and 2nd-order stochastic optimization methods. Perhaps the most interesting conclusion of this analysis is that, while stochastic gradient descent with Polyak-style parameter averaging achieves the same asymptotic convergence speed as stochastic natural gradient descent (and is thus also “Fisher efficient”, as was first shown by Polyak and Juditsky (1992)), stochastic 2nd-order methods can possess a much more favorable dependence on the starting point, which means that they can make much more progress given a limited iteration budget. Another interesting observation made in our analysis is that stochastic 2nd-order methods that use a decaying learning rate (of the form αk=1/(k+a+1)\alpha_{k}=1/(k+a+1)) can, for certain problems, achieve an asymptotic objective function value that is better than that achieved in the same number of iterations by stochastic gradient descent (with a similar decaying learning rate), by a large constant factor.

Unfortunately, these convergence theory results fail to explain why 2nd-order optimization with the GGN/Fisher works so much better than classical 2nd-order schemes based on the Hessian for neural network training (Schraudolph, 2002; Martens, 2010; Vinyals and Povey, 2012). In Section 15 we propose several important open questions in this direction that we leave for future work.

Table of Notation

Neural Networks

where a0=xa_{0}=x. Here, aia_{i} is the vector of values (“activities”) of the network’s ii-th layer, and ϕi(⋅)\phi_{i}(\cdot) is the vector-valued non-linear “activation function” computed at layer ii, and is often given by some simple scalar function applied coordinate-wise.

Note that most of the results discussed in this document will apply to the more general setting where f(x,θ)f(x,\theta) is an arbitrary differentiable function (in both xx and θ\theta).

Supervised Learning Framework

The goal of optimization in the context of supervised learning is to find some setting of θ\theta so that, for each input xx in the training set, the output of the network (which we will sometimes call its “prediction”) matches the given target outputs as closely as possible, as measured by some loss. In particular, given a training set SS consisting of pairs (x,y)(x,y), we wish to minimize the objective function

where L(y,z)L(y,z) is a “loss function” which measures the disagreement between yy and zz.

The prediction f(x,θ)f(x,\theta) may be a guess for yy, in which case LL might measure the inaccuracy of this guess (e.g. using the familiar squared error 12∥y−z∥2\frac{1}{2}\|y-z\|^{2}). Or f(x,θ)f(x,\theta) could encode the parameters of some simple predictive distribution. For example, f(x,θ)f(x,\theta) could be the set of probabilities which parameterize a multinomial distribution over the possible discrete values of yy, with L(y,f(x,θ))L(y,f(x,\theta)) being the negative log probability of yy under this distribution.

KL Divergence Objectives

The natural gradient method of Amari (1998) can potentially be applied to any objective function which measures the performance of some statistical model. However, it enjoys richer theoretical properties when applied to objective functions based on the KL divergence between the model’s distribution and the target distribution, or certain approximations/surrogates of these. In this section we will establish the basic notation and properties of these objective functions, and discuss the various ways in which they can be formulated. Each of these formulations will be analogous to a particular formulation of the Fisher information matrix and natural gradient (as defined in Section 5), which will differ in subtle but important ways.

In the idealized setting, input vectors xx are drawn independently from a target distribution QxQ_{x} with density function q(x)q(x), and the corresponding (target) outputs yy from a conditional target distribution Qy∣xQ_{y|x} with density function q(y∣x)q(y|x).

We define the goal of learning as the minimization of the KL divergence from the target joint distribution Qx,yQ_{x,y}, whose density is q(y,x)=q(y∣x)q(x)q(y,x)=q(y|x)q(x), to the learned distribution Px,y(θ)P_{x,y}(\theta), whose density is p(x,y∣θ)=p(y∣x,θ)q(x)p(x,y|\theta)=p(y|x,\theta)q(x). (Note that the second q(x)q(x) is not a typo here, since we are not learning the distribution over xx, only the conditional distribution of yy given xx.) Our objective function is thus

This is equivalent to the expected KL divergence E⁡Qx[KL⁡(Qy∣x∥Py∣x(θ))]\operatorname{E}_{Q_{x}}[\operatorname{KL}(Q_{y|x}\|P_{y|x}(\theta))] as can be seen by

It is often the case that we only have samples from QxQ_{x} and no direct knowledge of its density function. Or the expectation w.r.t. QxQ_{x} in eqn. 2 may be too difficult to compute. In such cases, we can substitute an empirical training distribution Q^x\hat{Q}_{x} in for QxQ_{x}, which is given by a set SxS_{x} of samples from QxQ_{x}. This results in the objective

Provided that q(y∣x)q(y|x) is known for each xx in SxS_{x}, and that KL⁡(Qy∣x∥Py∣x(θ))\operatorname{KL}(Q_{y|x}\|P_{y|x}(\theta)) can be efficiently computed, we can use the above expression as our objective. Otherwise, as is often the case, we might only have access to a single sample yy from Qy∣xQ_{y|x} for each x∈Sxx\in S_{x}, giving an empirical training distribution Q^y∣x\hat{Q}_{y|x}. Substituting this in for Qy∣xQ_{y|x} gives the objective function

where we have extended SxS_{x} to a set SS of the (x,y)(x,y) pairs (which agrees with how SS was defined in Section 3). Here, the proportionality is with respect to θ\theta, and it hides an additive constant which is technically infinityThe constant corresponds to the differential entropy of the Dirac delta distribution centered at yy. One can think of this as approaching infinity under the limit-based definition of the Dirac.. This is effectively the same objective that is minimized in standard maximum likelihood learning.

This kind of objective function fits into the general supervised learning framework described in Section 3 as follows. We define the learned conditional distribution Py∣x(θ)P_{y|x}(\theta) to be the composition of the deterministic prediction function f(x,θ)f(x,\theta) (which may be a neural network), and an “output” conditional distribution Ry∣zR_{y|z} (with associated density function r(y∣z)r(y|z)), so that

We then define the loss function as L(y,z)=−log⁡r(y∣z)L(y,z)=-\log r(y|z).

Given a loss function LL which is not explicitly defined this way one can typically still find a corresponding RR to make the definition apply. In particular, if exp⁡(−L(y,z))\exp(-L(y,z)) has the same finite integral w.r.t. yy for each zz, then one can define RR by taking r(y∣z)∝exp⁡(−L(y,z))r(y|z)\propto\exp(-L(y,z)), where the proportion is w.r.t. both yy and zz.

Various Definitions of the Natural Gradient and the Fisher Information Matrix

The Fisher information matrix FF of Px,y(θ)P_{x,y}(\theta) w.r.t. θ\theta (aka the “Fisher”) is given by

where gradients and Hessians are taken w.r.t. θ\theta. It can be immediately seen from the first of these expressions for FF that it is positive semi-definite (PSD) (since it’s the expectation of something which is trivially PSD, a vector outer-product). And from the second expression we can see that it also has the interpretation of being the negative expected Hessian of log⁡p(x,y∣θ)\log p(x,y|\theta).

The usual definition of the natural gradient (Amari, 1998) which appears in the literature is

where FF is the Fisher and hh is the objective function.

Because p(x,y∣θ)=p(y∣x,θ)q(x)p(x,y|\theta)=p(y|x,\theta)q(x), where q(x)q(x) doesn’t depend on θ\theta, we have

and so FF can also be written as the expectation (w.r.t. QxQ_{x}) of the Fisher information matrix of Py∣x(θ)P_{y|x}(\theta) as follows:

In Amari (1998), this version of FF is computed explicitly for a basic perceptron model (basically a neural network with 0 hidden layers) in the case where Qx=N(0,I)Q_{x}=N(0,I). However, in practice the real q(x)q(x) may not be directly available, or it may be difficult to integrate Hlog⁡p(y∣x,θ)H_{\log p(y|x,\theta)} over QxQ_{x}. For example, the conditional Hessian Hlog⁡p(y∣x,θ)H_{\log p(y|x,\theta)} corresponding to a multi-layer neural network may be far too complicated to be analytically integrated, even for a very simple QxQ_{x}. In such situations QxQ_{x} may be replaced with its empirical version Q^x\hat{Q}_{x}, giving

This is the version of FF considered in Park et al. (2000).

From these expressions we can see that when L(y,z)=−log⁡r(y∣z)L(y,z)=-\log r(y|z) (as in Section 4), the Fisher has the interpretation of being the expectation under Px,yP_{x,y} of the Hessian of L(y,f(x,θ))L(y,f(x,\theta)):

Meanwhile, the Hessian HH of hh is also given by the expected value of the Hessian of L(y,f(x,θ))L(y,f(x,\theta)), except under the distribution Q^x,y\hat{Q}_{x,y} instead of Px,yP_{x,y} (where Q^x,y\hat{Q}_{x,y} is given by the density function q^(x,y)=q^(y∣x)q^(x)\hat{q}(x,y)=\hat{q}(y|x)\hat{q}(x)). In other words

Thus FF and HH can be seen as approximations of each other in some sense.

Geometric Interpretation

The negative gradient −∇h-\nabla h can be interpreted as the steepest descent direction for hh in the sense that it yields the greatest instantaneous rate of reduction in hh per unit of change in θ\theta, where change in θ\theta is measured using the standard Euclidean norm ∥⋅∥\|\cdot\|. More formally we have

This interpretation highlights the strong dependence of the gradient on the Euclidean geometry of the parameter space (as defined by the norm ∥⋅∥\|\cdot\|).

One way to motivate the natural gradient is to show that it (or more precisely its negation) can be viewed as a steepest descent direction, much like the negative gradient can be, except with respect to a metric that is intrinsic to the distributions being modeled, as opposed to the default Euclidean metric which is tied to the given parameterization. In particular, the natural gradient can be derived by adapting the steepest descent formulation to use an alternative definition of (local) distance based on the “information geometry” (Amari and Nagaoka, 2000) of the space of probability distributions. The particular distance functionNote that this is not a formal “distance” function in the usual sense since it is not symmetric. which gives rise to the natural gradient turns out to be

To formalize this, one can use the well-known connection between the KL divergence and the Fisher, given by the Taylor series approximation

where “O(d3)O(d^{3})” is short-hand to mean terms that are order 3 or higher in the entries of dd. Thus, FF defines the local quadratic approximation of this distance, and so gives the mechanism of local translation between the geometry of the space of distributions, and that of the original parameter space with its default Euclidean geometry.

To make use of this connection, Arnold et al. (2011) proves for general PSD matrices AA that

where the notation ∥v∥B\|v\|_{B} is defined by ∥v∥B=v⊤Bv\|v\|_{B}=\sqrt{v^{\top}Bv}. Taking A=12FA=\frac{1}{2}F and using the above Taylor series approximation to establish that

as ϵ→0\epsilon\to 0, (Arnold et al., 2011) then proceed to show that

Thus the negative natural gradient is indeed the steepest descent direction in the space of distributions where distance is measured in small local neighborhoods by the KL divergence.

By using the smoothly varying PSD matrix FF to locally define a metric tensor at every point in parameter space, a Riemannian manifold can be generated over the space of distributions. Note that the associated metric of this space won’t be the square root of the KL divergence (this isn’t even a valid metric), although it will be “locally equivalent” to it in the sense that the two functions will approximate each other within a small local neighborhood.

2nd-order Optimization

Gradient descent, the canonical 1st-order method, can be viewed in the framework of 2nd-order methods as making the choice Bk=βIB_{k}=\beta I for some β\beta, resulting in the update δk∗=−1β∇h(θk)\delta_{k}^{*}=-\frac{1}{\beta}\nabla h(\theta_{k}). In the case where hh is convex and Lipschitz-smoothBy this we mean that ∥∇h(θ)−∇h(θ′)∥≤L∥θ−θ′∥\|\nabla h(\theta)-\nabla h(\theta^{\prime})\|\leq\mathcal{L}\|\theta-\theta^{\prime}\| for all θ\theta and θ′\theta^{\prime}. with constant L\mathcal{L}, a safe/conservative choice that will ensure convergence with αk=1\alpha_{k}=1 is β=L\beta=\mathcal{L} (e.g. Nesterov, 2013). The intuition behind this choice is that BB will act as a global upper bound on the curvature of hh, in the sense that Bk=LI⪰H(θ)B_{k}=\mathcal{L}I\succeq H(\theta)Here we define A⪰CA\succeq C to mean that A−CA-C is PSD. for all θ\theta, so that δk∗\delta_{k}^{*} never extends past the point that would be safe in the worst-case scenario where the curvature is at its upper bound L\mathcal{L} the entire way along δ∗\delta^{*}. More concretely, one can show that given this choice of β\beta, Mk(δ)M_{k}(\delta) upper bounds h(θk+δ)h(\theta_{k}+\delta), and will therefore never predict a reduction in h(θk+δ)h(\theta_{k}+\delta) where there is actually a sharp increase (e.g. due to hh curving unexpectedly upward on the path from θk\theta_{k} to θk+δ\theta_{k}+\delta). Minimizing Mk(δ)M_{k}(\delta) is therefore guaranteed not to increase h(θk+δ)h(\theta_{k}+\delta) beyond the current value h(θk)h(\theta_{k}) since Mk(0)=h(θk)M_{k}(0)=h(\theta_{k}). But despite these nice properties, this choice will almost always overestimate the curvature in most directions, leading to updates that move unnecessarily slowly along directions of consistent low curvature.

While neural networks haven’t been closely studied by optimization researchers until somewhat recently, many of the local optimization issues related to neural network learning can be seen as special cases of problems which arise more generally in continuous optimization. For example, tightly coupled parameters with strong local dependencies, and large variations in scale along different directions in parameter space (which may arise due to the “vanishing gradient” phenomenon (Hochreiter et al., 2000)), are precisely the sorts of issues for which 2nd-order optimization is well suited. Gradient descent on the other hand is well known to be very sensitive to such issues, and in order to avoid large oscillations and instability must use a learning rate which is inversely proportional to L\mathcal{L}. 2nd-order optimization methods provide a much more powerful and elegant solution to the problem of variations in scale/curvature along different directions by selectively re-scaling the gradient along different eigen-directions of the curvature matrix BkB_{k} according to their associated curvature (eigenvalue), instead of employing a one-size-fits-all curvature estimate.

In the classical Newton’s method we take Bk=H(θk)B_{k}=H(\theta_{k}), in which case Mk(δ)M_{k}(\delta) becomes the 2nd-order Taylor-series approximation of hh centered at θk\theta_{k}. This choice gives us the most accurate local model of the curvature possible, and allows for rapid exploration of low-curvature directions and thus faster convergence.

Unfortunately, naive implementations of Newton’s method can run into numerous problems when applied to neural network training objectives, such as HH being sometimes indefinite (and thus Mk(δ)M_{k}(\delta) being unbounded below in directions of negative curvature) and related issues of “model trust”, where the method implicitly trusts its own local quadratic model of the objective too much, causing it to propose very large updates that may actually increase the hh. These problems are usually not encountered with first order methods, but only because they use a very conservative local model that is intrinsically incapable of generating large updates. Fortunately, using the Gauss-Newton approximation to the Hessian (as discussed in Section 8), and/or applying various update damping/trust-region techniques (as discussed in Section 10), the issue of model trust issue in 2nd-order methods can be mostly overcome.

Another important issue preventing the naive application of 2nd-order methods to neural networks is the typically very high dimensionality of the parameter space (nn), which prohibits the calculation/storage/inversion of the n2n^{2}-entry curvature matrix BkB_{k}. To address this, various approximate Newton methods have been developed within the optimization and machine learning communities. These methods work by approximating BkB_{k} with something easier to compute/store/invert such as a low-rank or diagonal matrix, or by performing only approximate/incomplete optimization of Mk(δ)M_{k}(\delta). A survey of such methods is outside the scope of this report, but many good references and reviews are available (e.g. Nocedal and Wright, 2006; Fletcher, 2013). Martens (2016) reviews these approaches specifically in the context of neural networks.

Finally, it is worth observing that the local optimality of the Hessian-based 2nd-order Taylor series approximation to hh won’t necessarily yield the fastest possible optimization procedure, as it is possible to imagine quadratic models that take a “longer view” of the objective. (As an extreme example, given knowledge of a global minimizer θ∗\theta^{*} of hh, one could construct a quadratic model whose minimizer is exactly θ∗\theta^{*} but which is a very poor local approximation to h(θ)h(\theta).) It is possible that the Fisher might give rise to such quadratic models, which would help explain its observed superiority to the Hessian in neural network optimization (Schraudolph, 2002; Martens, 2010; Vinyals and Povey, 2012). We elaborate more on this speculative theory in Section 8.1.

The Generalized Gauss-Newton Matrix

This section discusses the Generalized Gauss-Newton matrix of Schraudolph (2002), and justifies its use as an alternative to the Hessian. Its relevance to our discussion of natural gradient methods will be made clear later in Section 9, where we establish a correspondence between this matrix and the Fisher.

The classical Gauss-Newton matrix (or more simply the Gauss-Newton matrix) is the curvature matrix GG which arises in the Gauss-Newton method for non-linear least squares problems (e.g. Dennis Jr and Schnabel, 1996; Ortega and Rheinboldt, 2000; Nocedal and Wright, 2006). It is applicable to our standard neural network training objective hh in the case where L(y,z)=12∥y−z∥2L(y,z)=\frac{1}{2}\|y-z\|^{2}, and is given by

where JfJ_{f} is the Jacobian of f(x,θ)f(x,\theta) w.r.t. the parameters θ\theta. It is usually defined as a modified version of the Hessian HH of hh (w.r.t. θ\theta), obtained by dropping the second term inside the sum in the following expression for HH:

where H[f]jH_{[f]_{j}} is the Hessian (w.r.t. θ\theta) of the jj-th component of f(x,θ)f(x,\theta). We can see from this expression that G=HG=H when y=f(x,θ)y=f(x,\theta). And more generally, if the yy’s are well-described by the model f(x,θ)+ϵf(x,\theta)+\epsilon for i.i.d. noise ϵ\epsilon then G=HG=H will hold approximately.

Beyond the fact that the resulting matrix is PSD and has other nice properties discussed below, there doesn’t seem to be any obvious justification for linearizing ff (or equivalently, dropping the corresponding term from the Hessian). It’s likely that the reasonableness of doing this depends on problem-specific details about LL and ff, and how the curvature matrix will be used by the optimizer. In Subsection 8.1.3 we discuss how linearizing ff might be justified, specifically for wide neural networks, by some recent theoretical analyses.

Schraudolph (2002) showed how the idea of the Gauss-Newton matrix can be generalized to the situation where L(y,z)L(y,z) is any loss function which is convex in zz. The generalized formula for GG is

where HLH_{L} is the Hessian of L(y,z)L(y,z) w.r.t. zz, evaluated at z=f(x,θ)z=f(x,\theta). Because L(y,z)L(y,z) is convex in zz, HLH_{L} will be PSD for each (x,y)(x,y), and thus so will GG. We will call this GG the Generalized Gauss-Newton matrix (GGN). (Note that this definition is sensitive to where we draw the dividing line between the loss function LL and the network itself (i.e. zz), in contrast to the definition of the Fisher, which is invariant to this choice.)

Analogously to the case of the classical Gauss-Newton matrix (which assumed L(y,z)=12∥y−z∥2L(y,z)=\frac{1}{2}\|y-z\|^{2}), the GGN can be obtained by dropping the second term inside the sum of the following expression for the Hessian HH:

Here ∇zL(y,z)∣z=f(x,θ)\left.\nabla_{z}L(y,z)\right|_{z=f(x,\theta)} is the gradient of L(y,z)L(y,z) w.r.t. zz, evaluated at z=f(x,θ)z=f(x,\theta). Note if we have for some local optimum θ∗\theta^{*} that [∇zL(y,z)∣z=f(x,θ∗)]j≈0\left[\left.\nabla_{z}L(y,z)\right|_{z=f(x,\theta^{*})}\right]_{j}\approx 0 for each (x,y)(x,y) and jj, which corresponds to the network making an optimal prediction for each training case over each dimension, then G(θ∗)=H(θ∗)G(\theta^{*})=H(\theta^{*}). In such a case, the behavior of a 2nd-order optimizer using GG will approach the behavior of standard Newton’s method as it converges to θ∗\theta^{*}. A weaker condition implying equivalence is that 1Sy(x)∑y∈Sy(x)[∇zL(y,z)∣z=f(x,θ∗)]j≈0\frac{1}{S_{y}(x)}\sum_{y\in S_{y}(x)}\left[\left.\nabla_{z}L(y,z)\right|_{z=f(x,\theta^{*})}\right]_{j}\approx 0 for all x∈Sxx\in S_{x} and jj, where Sy(x)S_{y}(x) denotes the set of yy’s s.t. (x,y)∈S(x,y)\in S, which corresponds to the network making an optimal prediction for each xx in the presence of intrinsic uncertainty about the target yy. (This can be seen by noting that H[f]jH_{[f]_{j}} doesn’t depend on yy.)

Like the Hessian, the GGN can be used to define a local quadratic model of hh, as given by:

In 2nd-order methods based on the GGN, parameter updates are computed by minimizing Mk(δ)M_{k}(\delta) w.r.t. δ\delta. The exact minimizerThis formula assumes G(θk)G(\theta_{k}) is invertible. If it’s not, the problem will either be unbounded, or the solution can be computed using the pseudo-inverse instead. δ∗=−G(θk)−1∇h(θk)\delta^{*}=-G(\theta_{k})^{-1}\nabla h(\theta_{k}) is often too difficult to compute, and so practical methods will often only approximately minimize Mk(δ)M_{k}(\delta) (e.g Dembo et al., 1982; Steihaug, 1983; Dennis Jr and Schnabel, 1996; Martens, 2010; Vinyals and Povey, 2012).

Since computing the whole matrix explicitly is usually too expensive, the GGN is typically accessed via matrix-vector products. To compute such products efficiently one can use the method of Schraudolph (2002), which is a generalization of the well-known method for computing such products with the classical Gauss-Newton (and is also related to the TangentProp method of Simard et al. (1992)). The method is similar in cost and structure to standard backpropagation, although it can sometimes be tricky to implement (see Martens and Sutskever (2012)).

Unlike the Hessian, the GGN is positive semi-definite (PSD). This means that it never models the curvature as negative in any direction. The most obvious problem with negative curvature is that the quadratic model will predict an unbounded improvement in the objective for moving in the associated directions. Indeed, without the use of some kind of trust-region or damping technique (as discussed in Section 10), or pruning/modification of negative curvature directions (Vinyals and Povey, 2012; Dauphin et al., 2014), or self-terminating Newton-CG scheme (Steihaug, 1983), the update produced by minimizing the quadratic model will be infinitely large in such directions.

However, attempts to use such methods in combination with the Hessian have yielded lackluster results for neural network optimization compared to methods based on the GGN (Martens, 2010; Martens and Sutskever, 2012; Vinyals and Povey, 2012). So what might be going on here? While the true curvature of h(θ)h(\theta) can indeed be negative in a local neighborhood (as measured by the Hessian), we know it must quickly become non-negative as we travel along any particular direction, given that our loss L(y,z)L(y,z) is convex in zz and bounded below. Meanwhile, positive curvature predicts a quadratic penalty, and in the worst case merely underestimates how badly the objective will eventually increase along a particular direction. We can thus say that negative curvature is somewhat less “trustworthy” than positive curvature for this reason, and speculate that a 2nd-order method based on the GGN won’t have to rely as much on trust-regions etc (which restrict the size of the update and slow down performance) to produce reliable updates.

There is also the issue of estimation from limited data. Because contributions made to the GGN for each training case and each individual component of f(x,θ)f(x,\theta) are PSD, there can be no cancellation between positive and negative/indefinite contributions. This means that the GGN can be more robustly estimated from subsets of the training data than the Hessian. (By analogy, consider how much harder it is to estimate the scale of the mean value of a variable when that variable can take on both positive and negative values, and has a mean close to .) This property also means that positive curvature from one case or component will never be cancelled out by negative curvature from another case or component. And if we believe that negative curvature is less trustworthy than positive curvature over larger distances, this is probably a good thing.

Despite these nice properties, the GGN is notably not an upper bound on the Hessian (in the PSD sense), as it fails to model all of the positive curvature contained in the latter. But crucially, it only fails to model the (positive or negative) curvature coming from the network function f(x,θ)f(x,\theta), as opposed to the curvature coming from the loss function L(y,z)L(y,z). (To see this, recall the decomposition of the Hessian from eqn. 6, noting that the term dropped from the Hessian depends only on the gradients of LL and the Hessian of components of ff.) Curvature coming from ff, whether it is positive or negative, is arguably less trustworthy/stable across long distance than curvature coming from LL, as argued below.

1.2 A More Detailed View of the Hessian vs the GGN

Consider the following decomposition of the Hessian, which is a generalization of the one given in eqn. 6:

Here, aia_{i}, ϕi\phi_{i} and sis_{i} are defined as in Section 2, ∇aiL(y,f)\nabla_{a_{i}}L(y,f) is the gradient of L(y,f)L(y,f) w.r.t. aia_{i}, H[ϕi(si)]jH_{[\phi_{i}(s_{i})]_{j}} is the Hessian of ϕi(si)\phi_{i}(s_{i}) (i.e. the function which computes aia_{i}) w.r.t. sis_{i}, JsiJ_{s_{i}} is the Jacobian of sis_{i} (viewed as a function of θ\theta and xx) w.r.t. θ\theta, and CC is given by

where ⊗\otimes denotes the Kronecker product.

Aside from C+C⊤C+C^{\top}, the contribution to the Hessian made by ff comes from a sum of terms of the form [∇aiL(y,f)]jJsi⊤H[ϕi(si)]jJsi\left[\nabla_{a_{i}}L(y,f)\right]_{j}J_{s_{i}}^{\top}H_{[\phi_{i}(s_{i})]_{j}}J_{s_{i}}. These terms represent the curvature of the activation functions, and will be zero in a linear network (since we would have H[ϕi(si)]j=0H_{[\phi_{i}(s_{i})]_{j}}=0). It seems reasonable to suspect that the sign of these terms will be subject to rapid and unpredictable change, resulting from sign changes in both H[ϕi(si)]jH_{[\phi_{i}(s_{i})]_{j}} and [∇aiL(y,f)]j\left[\nabla_{a_{i}}L(y,f)\right]_{j}. The former is the “local Hessian” of ϕi\phi_{i}, and will change signs as the function ϕi\phi_{i} enters its different convex and concave regions (ϕi\phi_{i} is typically non-convex). [∇aiL(y,f)]j\left[\nabla_{a_{i}}L(y,f)\right]_{j} meanwhile is the loss derivative w.r.t. that unit’s output, and depends on the behavior of all of the layers above aia_{i}, and on which “side” of the training target the network’s current prediction is (which may flip back and forth at each iteration).

This is to be contrasted with the term Jf⊤HLJfJ_{f}^{\top}H_{L}J_{f}, which represents the curvature of the loss function LL, and which remains PSD everywhere (and for each individual training case). Arguably, this term will be more stable w.r.t. changes in the parameters, especially when averaged over the training set.

1.3 Some Insights From Other Works

In the case of the squared error loss L(y,z)=12∥y−z∥2L(y,z)=\frac{1}{2}\|y-z\|^{2} (which means that the GGN reduces to the standard Gauss-Newton matrix) with m=1m=1, Chen (2011) established that the GGN is the unique matrix which gives rise to a local quadratic approximation of L(y,f(x,θ))L(y,f(x,\theta)) which is both non-negative (as LL itself is), and vanishing on a subspace of dimension n−1n-1 (which is the dimension of the manifold on which LL itself vanishes). Notably, the quadratic approximation produced using the Hessian need not have either of these properties. By summing over output components and averaging over the training set SS, one should be able to generalize this result to the entire objective h(θ)h(\theta) with m≥1m\geq 1. Thus, we see that the GGN gives rise to a quadratic approximation which shares certain global characteristics with the true h(θ)h(\theta) that the 2nd-order Taylor series doesn’t, despite being a less precise approximation to h(θ)h(\theta) in a strictly local sense.

Botev et al. (2017) observed that for networks with piece-wise linear activation functions, such as the popular RELUs (given by [ϕi(si)]j=max⁡([si]j,0)[\phi_{i}(s_{i})]_{j}=\max([s_{i}]_{j},0)), the GGN and the Hessian will coincide on the diagonal blocks whenever the latter is well-defined. This can be seen from the above decomposition of HH by noting that C+C⊤C+C^{\top} is zero on the diagonal blocks, and that for piece-wise linear activation functions we have H[ϕi(si)]j=0H_{[\phi_{i}(s_{i})]_{j}}=0 everywhere that this quantity exists (i.e. everywhere except the “kinks” in the activation functions).

Finally, under certain realistic assumptions on the network architecture and initialization point, and a lower bound on the width of the layers, recent results have shown that the ff function for a neural network behaves very similarly to its local linear approximation (taken at the initial parameters) throughout the entirety of optimization. This happens both for gradient descent (Du et al., 2018; Jacot et al., 2018; Lee et al., 2019), and natural gradient descent / GGN-based methods (Zhang et al., 2019; Cai et al., 2019), applied to certain choices for LL. Not only does this allow one to prove strong global convergence guarantees for these algorithms, it lends support to the idea that modeling the curvature in ff (which is precisely the part of the Hessian that the GGN throws out) may be pointless for the purposes of optimization in neural networks, and perhaps even counter-productive.

Computational Aspects of the Natural Gradient and Connections to the Generalized Gauss-Newton Matrix

where JfJ_{f} is the Jacobian of f(x,θ)f(x,\theta) w.r.t. θ\theta, and ∇zlog⁡r(y∣z)\nabla_{z}\log r(y|z) is the gradient of log⁡r(y∣z)\log r(y|z) w.r.t. zz, evaluated at z=f(x,θ)z=f(x,\theta) (with rr defined as near the end of Section 4).

As was first shown by Park et al. (2000), the Fisher information matrix is thus given by

where FRF_{R} is the Fisher information matrix of the predictive distribution Ry∣zR_{y|z} at z=f(x,θ)z=f(x,\theta). FRF_{R} is itself given by

where Hlog⁡r(y∣z)H_{\log r(y|z)} is the Hessian of log⁡r(y∣z)\log r(y|z) w.r.t. zz, evaluated at z=f(x,θ)z=f(x,\theta).

Note that even if QxQ_{x}’s density function q(x)q(x) is known, and is relatively simple, only for certain choices of Ry∣zR_{y|z} and f(x,θf(x,\theta) will it be possible to analytically evaluate the expectation w.r.t. QxQ_{x} in the above expression for FF. For example, if we take Qx=N(0,I)Q_{x}=\mathcal{N}(0,I), Ry∣z=N(z,σ2)R_{y|z}=\mathcal{N}(z,\sigma^{2}), and ff to be a simple neural network with no hidden units and a single tan-sigmoid output unit, then both FF and its inverse can be computed efficiently (Amari, 1998). This situation is exceptional however, and for even slightly more complex models, such as neural networks with one or more hidden layers, it has never been demonstrated how to make such computations feasible in high dimensions.

Fortunately the situation improves significantly if QxQ_{x} is replaced by Q^x\hat{Q}_{x}, as this gives

which is easy to compute assuming FRF_{R} is easy to compute. Moreover, this is essentially equivalent to the expression in eqn. 5 for the generalized Gauss-Newton matrix (GGN), except that we have the Fisher FRF_{R} of the predictive distribution (Ry∣zR_{y|z}) instead of Hessian HLH_{L} of the loss (LL) as the “inner” matrix.

Eqn. 7 also suggests a straightforward and efficient way of computing matrix-vector products with FF, using an approach similar to the one in Schraudolph (2002) for computing matrix-vector products with the GGN. In particular, one can multiply by JfJ_{f} using a linearized forward pass (aka forward-mode automatic differentiation), then multiply by FRF_{R} (which will be easy if Ry∣zR_{y|z} is sufficiently simple), and then finally multiply by Jf⊤J_{f}^{\top} using standard backprop.

2 Qualified Equivalence of the GNN and the Fisher

As we shall see in this subsection, the connections between the GGN and Fisher run deeper than just similar expressions and algorithms for computing matrix-vector products.

Heskes (2000) showed that the Fisher and the classical Gauss-Newton matrix are equivalent in the case of the squared error loss, and proposed using the Fisher as an alternative to the Hessian in more general contexts. Concurrently with this work, Pascanu and Bengio (2014) showed that for several common loss functions like cross-entropy and squared error, the GGN and Fisher are equivalent.

We will show that in fact there is a much more general equivalence between the two matrices, starting from the observation that the expressions for the GGN in eqn. 5 and Fisher in eqn. 7 are identical up to the equivalence of HLH_{L} and FRF_{R}.

First, note that L(y,z)L(y,z) might not even be convex in zz, so that it wouldn’t define a valid GGN matrix. But even if L(y,z)L(y,z) is convex in zz, it won’t be true in general that FR=HLF_{R}=H_{L}, and so the GGN and Fisher will differ. However, there is an important class of Ry∣zR_{y|z}’s for which FR=HLF_{R}=H_{L} will hold, provided that we have L(y,z)=−log⁡r(y∣z)L(y,z)=-\log r(y|z) (putting us in the framework of Section 4).

Notice that FR=−E⁡Ry∣f(x,θ)[Hlog⁡r(y∣z)]F_{R}=-\operatorname{E}_{R_{y|f(x,\theta)}}[H_{\log r(y|z)}], and HL=−Hlog⁡r(y∣z)H_{L}=-H_{\log r(y|z)} (which follows from L(y,z)=−log⁡r(y∣z)L(y,z)=-\log r(y|z)). Thus, the two matrices being equal is equivalent to the condition

While this condition may seem arbitrary, it is actually very natural and holds in the important case where Ry∣zR_{y|z} corresponds to an exponential family model with “natural” parameters given by zz. Stated in terms of equations this condition is

for some function T(y)T(y), where Z(z)Z(z) is the normalizing constant/partition function. In this case we have Hlog⁡r(y∣z)=−Hlog⁡ZH_{\log r(y|z)}=-H_{\log Z} (which doesn’t depend on yy), and so eqn. 8 holds trivially.

multivariate normal distributions where zz parameterizes only the mean μ\mu

multivariate normal distributions where zz is the concatenation of Σ−1μ\Sigma^{-1}\mu and the vectorization of Σ−1\Sigma^{-1}

multinomial distributions where the softmax of zz is the vector of probabilities for each class

Note that the loss function LL corresponding to the multivariate normal is the familiar squared error, and the loss corresponding to the multinomial distribution is the familiar cross-entropy.

Interestingly, the relationship observed by Ollivier et al. (2018) between natural gradient descent and methods based on the extended Kalman filter for neural network training relies on precisely the same condition on Ry∣zR_{y|z}. This makes intuitive sense, since the extended Kalman filter is derived by approximating ff as affine and then applying the standard Kalman filter for linear/Gaussian systems (which implicitly involves computing a Hessian of a linear model under a squared loss), which is the same approximation that can be used to derive the GGN from the Hessian (see Section 8).

As discussed in Section 8, when constructing the GGN one must pay attention to how ff and LL are defined with regards to what parts of the neural network’s computation are performed by each function (this choice is irrelevant to the Fisher). For example, the softmax computation performed at the final layer of a classification network is usually considered to be part of the network itself and hence to be part of ff. The output f(x,θ)f(x,\theta) of this computation are normalized probabilities, which are then fed into a cross-entropy loss of the form L(y,z)=−∑jyjlog⁡zjL(y,z)=-\sum_{j}y_{j}\log z_{j}. But the other way of doing it, which Schraudolph (2002) recommends, is to have the softmax function be part of LL instead of ff, which results in a GGN which is slightly closer to the Hessian due to “less” of the computational pipeline being linearized before taking the 2nd-order Taylor series approximation. The corresponding loss function is L(y,z)=−∑jyjzj+log⁡(∑jexp⁡(zj))L(y,z)=-\sum_{j}y_{j}z_{j}+\log(\sum_{j}\exp(z_{j})) in this case. As we have established above, doing it this way also has the nice side effect of making the GGN equivalent to the Fisher, provided that Ry∣zR_{y|z} is an exponential family model with zz as its natural parameters.

This (qualified) equivalence between the Fisher and the GGN suggests how the GGN can be generalized to cases where it might not otherwise be well-defined. In particular, it suggests formulating the loss as the negative log density for some distribution, and then taking the Fisher of this distribution. Sometimes, this might be as simple as defining r(y∣z)∝exp⁡(−L(y,z))r(y|z)\propto\exp(-L(y,z)) as per the discussion at the end of Section 4.

For example, suppose our loss is defined as the negative log probability of a multi-variate normal distribution Ry∣z=N(μ,σ2)R_{y|z}=N(\mu,\sigma^{2}) parameterized by μ\mu and γ=log⁡σ2\gamma=\log\sigma^{2} (so that z=[μγ]z=\begin{bmatrix}\mu\\ \gamma\end{bmatrix}). In other words, suppose that

In this case the loss Hessian is equal to

It is not hard to verify that this matrix is indefinite for certain settings of xx and zz (e.g. x=2x=2, μ=γ=0\mu=\gamma=0). Therefore, LL is not convex in zz and we cannot define a valid GGN matrix from it.

To resolve this problem we can use the Fisher FRF_{R} in place of HLH_{L} in the formula for the GGN, which by eqn. 7 yields FF. Alternatively, we can insert reparameterization operations into our network to transform μ\mu and γ\gamma into the natural parameters μσ2=μexp⁡(γ)\frac{\mu}{\sigma^{2}}=\frac{\mu}{\exp(\gamma)} and −12σ2=−12exp⁡(γ)-\frac{1}{2\sigma^{2}}=-\frac{1}{2\exp(\gamma)}, and then proceed to compute the GGN as usual, noting that HL=FRH_{L}=F_{R} in this case, so that HLH_{L} will be PSD. Either way will yield the same curvature matrix, due to the above discussed equivalence of the Fisher and GGN matrix for natural parameterizations.

Constructing Practical Natural Gradient Methods, and the Critical Role of Damping

Assuming that it is easy to compute, the simplest way to use the natural gradient in optimization is to substitute it in place of the standard gradient within a basic gradient descent approach. This gives the iteration

where {αk}k\{\alpha_{k}\}_{k} is a schedule of step-sizes/learning-rates.

Choosing the step-size schedule can be difficult. There are adaptive schemes which are largely heuristic in nature (Amari, 1998) and some non-adaptive prescriptions such as αk=ρ/k\alpha_{k}=\rho/k for some constant ρ\rho, which have certain theoretical convergence guarantees in the stochastic setting, but which won’t necessarily work well in practice.

In principle, we could apply the natural gradient method with infinitesimally small steps and produce a smooth idealized path through the space of realizable distributions. But since this is usually impossible in practice, and we don’t have access to any other simple description of the class of distributions parameterized by θ\theta that we could work with more directly, our only option is to take non-negligible discrete steps in the given parameter spaceIn principle, we could move to a much more general class of distributions, such as those given by some non-parametric formulation, where we could work directly with the distributions themselves. But even assuming such an approach would be practical from a computational efficiency standpoint, we would lose the various advantages that we get from working with powerful parametric models like neural networks. In particular, we would lose their ability to generalize to unseen data by modeling the “computational process” which explains the data, instead of merely using smoothness and locality to generalize..

The fundamental problem with simple schemes such as the one in eqn. 9 is that they implicitly assume that the natural gradient is a good direction to follow over non-negligible distances in the original parameter space, which will not be true in general. Traveling along a straight line in the original parameter space will not yield a straight line in distribution space, and so the resulting path may instead veer far away from the target that the natural gradient originally pointed towards. This is illustrated in Figure 1.

Fortunately, we can exploit the (qualified) equivalence between the Fisher and the GGN in order to produce natural gradient-like updates which will often be appropriate to take with αk=1\alpha_{k}=1. In particular, we know from the discussion in Section 8 that the GGN matrix GG can serve as a reasonable proxy for the Hessian HH of hh, and may even be superior in certain contexts. Meanwhile, the update δ\delta produced by minimizing the GGN-based local quadratic model Mk(δ)=12δ⊤G(θk)δ+∇h(θk)⊤δ+h(θk)M_{k}(\delta)=\frac{1}{2}\delta^{\top}G(\theta_{k})\delta+\nabla h(\theta_{k})^{\top}\delta+h(\theta_{k}) is given by −G(θk)−1∇h(θk)-G(\theta_{k})^{-1}\nabla h(\theta_{k}), which will be equal to the negative natural gradient when F=GF=G. Thus, the (negative) natural gradient, with scaling factor α=1\alpha=1, can be seen as the optimal update according to a particular local 2nd-order approximation of hh. And just as in the case of other 2nd-order methods, the break-down in the accuracy of this quadratic approximation over long distances, combined with the potential for the natural gradient to be very large (e.g. when FF contains some very small eigenvalues), can often lead to very large and very poor update proposals. Simply re-scaling the update by reducing α\alpha may be too crude a mechanism to deal with this subtle problem, as it will affect all eigen-directions (of FF) equally, including those in which the natural gradient is already sensible, or even overly conservative.

Instead, the connection between natural gradient descent and 2nd-order methods motivates the use of “update damping” techniques that have been developed for the latter, which work by constraining or penalizing the solution for δ\delta in various ways during the optimization of Mk(δ)M_{k}(\delta). Examples include Tikhonov regularization/damping and the closely related trust-region method (e.g. Tikhonov, 1943; Moré and Sorensen, 1983; Conn et al., 2000; Nocedal and Wright, 2006), and other ones such as the “structural damping” approach of Martens and Sutskever (2011), or the approach present in Krylov Subspace Descent (Vinyals and Povey, 2012). See Martens and Sutskever (2012) for an in-depth discussion of these and other damping techniques in the context of neural network optimization.

This idea is supported by practical experience in neural network optimization. For example, the Hessian-free optimization approach of Martens (2010) generates its updates using a Tikhonov damping scheme applied to the exact GGN matrix (which was equivalent to the Fisher in that work). These updates, which can be applied with a step-size of 1, make a lot more progress optimizing the objective than updates computed without any damping (which must instead rely on a carefully chosen step-size to even be feasible).

It is worth pointing out that other interpretations of natural gradient descent can also motivate the use of damping/regularization terms. In particular, Ollivier et al. (2018) has shown that online natural gradient descent, with a particular flavor of Tikhonov regularization, closely resembles a certain type of extended Kalman filter-based training algorithm for neural networks (Singhal and Wu, 1989; Ruck et al., 1992), where θ\theta is treated as an evolving hidden state that is estimated by the filter (using training targets as noisy observations and inputs as control signals).

The Empirical Fisher

An approximation of the Fisher known as the “empirical Fisher” (Schraudolph, 2002), which we denote by Fˉ\bar{F}, is commonly used in practical natural gradient methods. It is obtained by taking the inner expectation of eqn. 3 over the target distribution Qx,yQ_{x,y} (or its empirical surrogate Q^x,y\hat{Q}_{x,y}) instead of the model’s distribution Px,yP_{x,y}.

In the case where one uses Q^x,y\hat{Q}_{x,y}, this yields the following simple form:

This matrix is often incorrectly referred to as the Fisher, or even the Gauss-Newton, even though it is not equivalent to either of these matrices in general.

Like the Fisher FF, the empirical Fisher Fˉ\bar{F} is PSD. But unlike FF, it is essentially free to compute, provided that one is already computing the gradient of hh. And it can also be applied to objective functions which might not involve a probabilistic model in any obvious way.

Compared to FF, which is of rank ≤∣S∣rank⁡(FR)\leq|S|\operatorname{rank}(F_{R}), Fˉ\bar{F} has a rank of ≤∣S∣\leq|S|, which can make it easier to work with in practice. For example, the problem of computing the diagonal (or various blocks) is easier for the empirical Fisher than it is for higher rank matrices like the standard Fisher (Martens et al., 2012). This has motivated its use in optimization methods such as TONGA (Le Roux et al., 2008), and as the diagonal preconditioner of choice in the Hessian-free optimization method (Martens, 2010). Interestingly however, there are stochastic estimation methods (Chapelle and Erhan, 2011; Martens et al., 2012) which can be used to efficiently estimate the diagonal (or various blocks) of the standard Fisher FF, and these work quite well in practice. (These include the obvious method of sampling yy’s from the model’s conditional distribution and computing gradients from them, but also includes methods based on matrix factorization and random signs. See Martens et al. (2012) for comparative analysis of the variance of these methods.)

Despite the various practical advantages of using Fˉ\bar{F}, there are good reasons to use true Fisher FF instead of Fˉ\bar{F} whenever possible. In addition to Amari’s extensive theory developed for the exact natural gradient (which uses FF), perhaps the best reason for using FF over Fˉ\bar{F} is that FF turns out to be a reasonable approximation/substitute to the Hessian HH of hh in certain important special cases, which is a property that Fˉ\bar{F} lacks in general.

For example, as discussed in Section 5, when the loss is given by −log⁡p(y∣x)-\log p(y|x) (as in Section 4), FF can be seen as an approximation of HH, because both matrices have the interpretation of being the expected Hessian of the loss under some distribution. Due to the similarity of the expression for FF in eqn. 3 and the one above for Fˉ\bar{F}, it might be tempting to think that Fˉ\bar{F} is given by the expected Hessian of the loss under Q^x,y\hat{Q}_{x,y} (which is actually the formula for HH) in the same way that FF is given by eqn. 4. But this is not the case in general.

And as we saw in Section 9, given certain assumptions about how the GGN is computed, and some additional assumptions about the form of the loss function LL, FF turns out to be equivalent to the GGN. This is very useful since the GGN can be used to define a local quadratic approximation of hh, whereas FF normally doesn’t have such an interpretation. Moreover, Schraudolph (2002) and later Martens (2010) compared Fˉ\bar{F} to the GGN and observed that the latter performed much better as a curvature matrix within various neural network optimization methods.

As concrete evidence for why the empirical Fisher is, at best, a questionable choice for the curvature matrix, we will consider the following example. Set n=1n=1, f(x,θ)=θf(x,\theta)=\theta, Ry∣z=N(z,1)R_{y|z}=\mathcal{N}(z,1), and S={(0,0)}S=\{(0,0)\}, so that h(θ)h(\theta) is a simple convex quadratic function of θ\theta, given by h(θ)=12θ2h(\theta)=\frac{1}{2}\theta^{2}. In this example we have that ∇h=θ\nabla h=\theta, Fˉ=θ2\bar{F}=\theta^{2}, while F=1F=1. If we use Fˉξ\bar{F}^{\xi} as our curvature matrix for some exponent 12≤ξ≤1\frac{1}{2}\leq\xi\leq 1, then it is easy to see that an iteration of the form

will fail to converge to the minimizer (at θ=0\theta=0) unless ξ<1\xi<1 and the step-size αk\alpha_{k} goes to sufficiently fast. And even when it does converge, it will only be at a rate comparable to the speed at which αk\alpha_{k} goes to , which in typical situations will be either O(1/k)\mathcal{O}(1/k) or O(1/k)\mathcal{O}(1/\sqrt{k}). Meanwhile, a similar iteration of the form

which uses the exact Fisher FF as the curvature matrix, will experience very fast linear convergenceHere we mean “linear” in the classical sense that ∣θk−0∣≤∣θ0−0∣∣1−α∣k|\theta_{k}-0|\leq|\theta_{0}-0||1-\alpha|^{k}. with rate ∣1−α∣|1-\alpha|, for any fixed step-size αk=α\alpha_{k}=\alpha satisfying 0<α<20<\alpha<2.

It is important to note that this example uses a noise-free version of the gradient, and that this kind of linear convergence is (provably) impossible in most realistic stochastic/online settings. Nevertheless, we would argue that a highly desirable property of any stochastic optimization method should be that it can, in principle, revert to an optimal (or nearly optimal) behavior in the deterministic setting. This might matter a lot in practice, since the gradient may end up being sufficiently well estimated in earlier stages of optimization from only a small amount of data (which is a common occurrence in our experience), or in later stages provided that larger mini-batches or other variance-reducing procedures are employed (e.g. Le Roux et al., 2012; Johnson and Zhang, 2013). More concretely, the pre-asymptotic convergence rate of stochastic 2nd-order optimizers can still depend strongly on the choice of the curvature matrix, as we will show in Section 14.

2 A Discussion of Recent Diagonal Methods Based on the Empirical Fisher

Recently, a spate of stochastic optimization methods have been proposed that are all based on diagonal approximations of the empirical Fisher Fˉ\bar{F}. These include the diagonal version of AdaGrad (Duchi et al., 2011), RMSProp (Tieleman and Hinton, 2012), Adam (Ba and Kingma, 2015), etc. Such methods use iterations of the following form (possibly with some slight modifications):

where the curvature matrix BkB_{k} is taken to be a diagonal matrix diag⁡(uk)\operatorname{diag}(u_{k}) with uku_{k} adapted to maintain some kind of estimate of the diagonal of Fˉ\bar{F} (possibly using information from previous iterates/mini-batches), gk(θk)g_{k}(\theta_{k}) is an estimate of ∇h(θk)\nabla h(\theta_{k}) produced from the current mini-batch, αkk{\alpha_{k}}_{k} is a schedule of step-sizes, and 0<λ0<\lambda and 0<ξ≤10<\xi\leq 1 are hyperparameters (discussed later in this section).

There are also slightly more sophisticated methods (Schaul et al., 2013; Zeiler, 2013) which use preconditioners that combine the diagonal of Fˉ\bar{F} with other quantities (such as an approximation of the diagonal of the Gauss-Newton/Fisher in the case of Schaul et al. (2013)) in order to correct for how the empirical Fisher doesn’t have the right “scale” (which is ultimately the reason why it does poorly in the example given at the end of Section 11.1).

A diagonal preconditioner (Nash, 1985) of the form used in eqn. 10 was also used by (Martens, 2010) to accelerate the conjugate gradient (CG) sub-optimizations performed within a truncated-Newton method (using the GGN matrix). In the context of CG, the improper scale of Fˉ\bar{F} is not as serious an issue due to the fact that CG is invariant to the overall scale of its preconditioner (since it computes an optimal “step-size” at each step which automatically adjusts for the scale). However, it still makes more sense to use the diagonal of the true Fisher FF as a preconditioner, and thanks to the method proposed by Chapelle and Erhan (2011), this can be estimated efficiently and accurately.

The idea of using the diagonal of FF, Fˉ\bar{F}, or the Gauss-Newton as a preconditioner for stochastic gradient descent (SGD) and was likely first applied to neural networks with the work of Lecun and collaborators (Becker and LeCun, 1989; LeCun et al., 1998), who proposed an iteration of the form in eqn. 10 with ξ=1\xi=1 where uku_{k} approximates the diagonal of the Hessian or the Gauss-Newton matrix (which as shown in Section 9, is actually equivalent to FF for the common squared-error loss). Following this work, various neural network optimization methods have been developed over the last couple of decades that use diagonal, block-diagonal, low-rank, or Krylov-subspace based approximations of FF or Fˉ\bar{F} as a curvature matrix/preconditioner. In addition to methods based on diagonal approximations already mentioned, some methods based on non-diagonal approximations include the method of Park et al. (2000), TONGA (Le Roux et al., 2008), Natural Newton (Le Roux and Fitzgibbon, 2010), HF (Martens, 2010), KSD (Vinyals and Povey, 2012) and many more.

The idea of computing an estimate of the (empirical) Fisher using a history of previous iterates/mini-batches also appeared in various early works. The particular way of doing this proposed Duchi et al. (2011), which is to use an equally weighted average of all past gradients, was motivated from a regret-based asymptotic convergence analysis and tends not to work well in practice (Tieleman and Hinton, 2012). The traditional and more intuitive approach of using an exponentially decayed running average (e.g. LeCun et al., 1998; Park et al., 2000) works better, at least pre-asymptotically, as it is able to naturally “forget” very old contributions to the estimate (which are based on stale parameter values).

It is important to observe that the way Fˉ\bar{F} is estimated can affect the convergence characteristics of an iteration like eqn. 10 in subtle but important ways. For example, if Fˉ\bar{F} is estimated using gradients from previous iterations, and especially if it is the average of all past gradients (as in AdaGrad), it may shrink sufficiently slowly that the convergence issues seen in the example at the end of Section 11.1 are avoided. Moreover, for reasons related to this phenomenon, it seems likely that the proofs of regret bounds in Duchi et al. (2011) and the related work of Hazan et al. (2007) could not be modified to work if the exact Fˉ\bar{F}, computed only at the current θ\theta, were used. Developing a better understanding of this issue, and the relationship between methods developed in the online learning literature (such as AdaGrad), and classical stochastic 2nd-order methods based on notions of curvature, remains an interesting direction for future research.

3 The Constants λ𝜆\lambda and ξ𝜉\xi

The constants λ\lambda and ξ\xi present in eqn. 10 are often thought of as fudge factors designed to correct for the “poor conditioning” (Becker and LeCun, 1989) of the curvature matrix, or to guarantee boundedness of the updates and prevent the optimizer from “blowing up” (LeCun et al., 1998). However, these explanations are oversimplifications that reference the symptoms instead of the cause. A more compelling and functional explanation, at least in the case of λ\lambda, comes from viewing the update in eqn. 10 as being the minimizer of a local quadratic approximation Mk(δ)=12δ⊤Bkδ+∇h(θk)⊤δ+h(θk)M_{k}(\delta)=\frac{1}{2}\delta^{\top}B_{k}\delta+\nabla h(\theta_{k})^{\top}\delta+h(\theta_{k}) to h(θk+δ)h(\theta_{k}+\delta), as discussed in Section 10. In this view, λ\lambda plays the role of a Tikhonov damping parameter (Tikhonov, 1943; Conn et al., 2000; Nocedal and Wright, 2006; Martens and Sutskever, 2012) which is added to BkB_{k} in order to ensure that the proposed update stays within a certain region around zero in which Mk(δ)M_{k}(\delta) remains a reasonable approximation to h(θk+δ)h(\theta_{k}+\delta). Note that this explanation implies that no single fixed value of λ\lambda will be appropriate throughout the entire course of optimization, since the local properties of the objective will change, and so an adaptive adjustment scheme, such as the one present in HF (Martens, 2010) (which is based on the Levenberg-Marquardt method), should be used.

The use of the exponent ξ=3/4\xi=3/4 first appeared in HF as part of its diagonal preconditioner for CG, and was justified as a way of making the curvature estimate “more conservative” by making it closer to a multiple of the identity, to compensate for the diagonal approximation being made (among other things). Around the same time, Duchi et al. (2011) proposed to use ξ=1/2\xi=1/2 within an update of the form of eqn. 10, which was required in order to prove certain regret bounds for non-strongly-convex objectives.

However, it is important to note that Hazan et al. (2007) also proves a O(log⁡(k))\mathcal{O}(\log(k)) bound on the regret for a basic version of SGD, and that what actually differentiates the various methods they analyze is the constant hidden in the big-O notation, which is much larger for the version of SGD they consider than for their approximate Newton method. In particular, the former depends on a quantity which grows with the condition number of the Hessian HH at θ∗\theta^{*} while the latter does not, in a way that echos the various analyses performed on stochastic gradient descent and stochastic approximations of Newton’s method in the more classical “local-convergence” setting (e.g. Murata, 1998; Bottou and LeCun, 2005).

A Critical Analysis of Parameterization Invariance

One of the main selling points of the natural gradient method is its invariance to reparameterizations of the model. In particular, the smooth path through the space of distributions generated by the idealized natural gradient method with infinitesimally small steps will be invariant to any smooth invertible reparameterization of the ff.

In this section we will examine this “smooth path parameterization invariance” property more closely in order to answer the following questions:

How can we characterize it using only basic properties of the curvature matrix?

Is there an elementary proof that can be applied in a variety of settings?

What other kinds of curvature matrices give rise to it, and is the Hessian included among these?

Will this invariance property imply that practical optimization algorithms based on the natural gradient (i.e. those that use large steps) will behave in a way that is invariant to the parameterization?

Let ζ\zeta be as above, and let dθd_{\theta} and dγd_{\gamma} be updates given in θ\theta-space and γ\gamma-space (resp.). Additively updating γ\gamma by dγd_{\gamma} and translating it back to θ\theta-space via ζ\zeta gives ζ(γ+dγ)\zeta(\gamma+d_{\gamma}). Measured by some non-specific norm ∥⋅∥\|\cdot\|, this differs from θ+dθ\theta+d_{\theta} by:

where JζJ_{\zeta} is the Jacobian of ζ\zeta, and we have used θ=ζ(γ)\theta=\zeta(\gamma).

The first term on the RHS of eqn. 11 measures the extent to which ζ(γ+dγ)\zeta(\gamma+d_{\gamma}) fails to be predicted by the first-order Taylor series approximation of ζ\zeta centered at γ\gamma (i.e. the local affine approximation of ζ\zeta at γ\gamma). This quantity will depend on the size of dγd_{\gamma}, and the amount of curvature in γ\gamma. In the case where ζ\zeta is affine, it will be exactly . We can further bound it by applying Taylor’s theorem for each component of ζ\zeta, which gives

for some ci∈(0,1)c_{i}\in(0,1). If we assume that there is some C>0C>0 so that for all ii and γ\gamma, ∥H[ζ]i(γ)∥2≤C\|H_{[\zeta]_{i}}(\gamma)\|_{2}\leq C, then using the fact that ∣dγ⊤H[ζ]i(γ+cndγ)dγ∣≤12∥H[ζ]i(γ+cidγ)∥2∥dγ∥2|d_{\gamma}^{\top}H_{[\zeta]_{i}}(\gamma+c_{n}d_{\gamma})d_{\gamma}|\leq\frac{1}{2}\|H_{[\zeta]_{i}}(\gamma+c_{i}d_{\gamma})\|_{2}\|d_{\gamma}\|^{2}, we can further upper bound this by 12Cn∥dγ∥2\frac{1}{2}C\sqrt{n}\|d_{\gamma}\|^{2}.

The second term on the RHS of eqn. 11 will be zero when

which (as we will see) is a condition that is satisfied in certain natural situations. A slightly weakened version of this condition is that Jζdγ∝dθJ_{\zeta}d_{\gamma}\propto d_{\theta}. Because we have

this condition can thus be interpreted as saying that dγd_{\gamma}, when translated appropriately via ζ\zeta, points in the same direction away from θ\theta that dθd_{\theta} does. In the smooth path case, where the optimizer only moves an infinitesimally small distance in the direction of dγd_{\gamma} (or dθd_{\theta}) at each iteration before recomputing it at the new γ\gamma (or θ\theta), this condition is sufficient to establish that the path in γ\gamma space, when mapped back to θ\theta space via the ζ\zeta function, will be the same as the path which would have been taken if the optimizer had worked directly in θ\theta space.

However, for a practical update scheme where we move the entire distance of dγd_{\gamma} or dθd_{\theta} before recomputing the update vector, such as the one in eqn. 9, this kind of invariance will not strictly hold even when Jζdγ=dθJ_{\zeta}d_{\gamma}=d_{\theta}. But given that Jζdγ=dθJ_{\zeta}d_{\gamma}=d_{\theta}, the per-iteration error will be bounded by the first term on the RHS of eqn. 11, and will thus be small provided that dγd_{\gamma} is sufficiently small and ζ\zeta is sufficiently smooth (as shown above).

Now, suppose we generate the updates dθd_{\theta} and dγd_{\gamma} from curvature matrices BθB_{\theta} and BγB_{\gamma} according to dθ=−αBθ−1∇hd_{\theta}=-\alpha B_{\theta}^{-1}\nabla h and dγ=−αBγ−1∇γhd_{\gamma}=-\alpha B_{\gamma}^{-1}\nabla_{\gamma}h, where ∇γh\nabla_{\gamma}h is the gradient of h(ζ(γ))h(\zeta(\gamma)) w.r.t. γ\gamma. Then noting that ∇γh=Jζ⊤∇h\nabla_{\gamma}h=J_{\zeta}^{\top}\nabla h, the condition in eqn. 13 becomes equivalent to

For this to hold, a sufficient condition is that Bθ−1=JζBγ−1Jζ⊤B_{\theta}^{-1}=J_{\zeta}B_{\gamma}^{-1}J_{\zeta}^{\top}. Since JζJ_{\zeta} is invertible (because ζ\zeta is) an equivalent condition is

The following theorem summarizes our results so far.

Suppose that θ=ζ(γ)\theta=\zeta(\gamma) and BθB_{\theta} and BγB_{\gamma} are invertible matrices satisfying

Then we have that additively updating θ\theta by dθ=−αBθ−1∇hd_{\theta}=-\alpha B_{\theta}^{-1}\nabla h is approximately equivalent to additively updating γ\gamma by dγ=−αBγ−1∇γhd_{\gamma}=-\alpha B_{\gamma}^{-1}\nabla_{\gamma}h, in the sense that ζ(γ+dγ)≈θ+dθ\zeta(\gamma+d_{\gamma})\approx\theta+d_{\theta}, with error bounded according to

Moreover, this error can be further bounded as in eqn. 12, and will be exactly if ζ\zeta is affine. And if there is a C≥0C\geq 0 such that ∥H[ζ]i(γ)∥2≤C\|H_{[\zeta]_{i}}(\gamma)\|_{2}\leq C for all ii and γ\gamma, then we can even further bound this as 12Cn∥dγ∥2\frac{1}{2}C\sqrt{n}\|d_{\gamma}\|^{2}.

Because the error bound is zero when ζ\zeta is affine, this result will trivially extend to entire sequences of arbitrary number of steps for such ζ\zeta’s. And in the more general case, since the error scales as α2\alpha^{2}, we can obtain equivalence of sequences of T/αT/\alpha steps in the limit as α→0\alpha\to 0. Because the length of the updates scale as α\alpha, and we have T/αT/\alpha of them, the sequences converges to smooth paths of fixed length in the limit. The following corollary establishes this result, under a few additional (mild) hypotheses. Its proof is in Appendix E.

Suppose that BθB_{\theta} and BγB_{\gamma} are invertible matrices satisfying

for all values of θ\theta. Then the path followed by an iterative optimizer working in θ\theta-space and using additive updates of the form dθ=−αBθ−1∇hd_{\theta}=-\alpha B_{\theta}^{-1}\nabla h is the same as the path followed by an iterative optimizer working in γ\gamma-space and using additive updates of the form dγ=−αBγ−1∇γhd_{\gamma}=-\alpha B_{\gamma}^{-1}\nabla_{\gamma}h, provided that the optimizers use equivalent starting points (i.e. θ0=ζ(γ0)\theta_{0}=\zeta(\gamma_{0})), and that either

or dθ/αd_{\theta}/\alpha is uniformly continuous as a function of θ\theta, dγ/αd_{\gamma}/\alpha is uniformly bounded (in norm), there is a CC as in the statement of Theorem 1, and α→0\alpha\to 0.

Note that in the second case we allow the number of steps in the sequences to grow proportionally to 1/α1/\alpha so that the continuous paths they converge to have non-zero length as α→0\alpha\to 0.

So from these results we see that natural gradient-based methods that take finite steps will not be invariant to smooth invertible reparameterizations ζ\zeta, although they will be approximately invariant, and in a way that depends on the degree of curvature of ζ\zeta and the size α\alpha of the step-size.

Suppose the curvature matrix BθB_{\theta} has the form

To obtain the analogous curvature matrix BγB_{\gamma} for the γ\gamma parameterization we replace ff by f∘ζf\circ\zeta which gives

Then noting that Jf∘ζ=JfJζJ_{f\circ\zeta}=J_{f}J_{\zeta}, where JζJ_{\zeta} is the Jacobian of ζ\zeta, we have

(Here we have used the fact that the reparameterization function ζ\zeta is independent of xx and yy.) Thus, this type of curvature matrix satisfies the sufficient condition in eqn. 14.

The Hessian on the other hand does not satisfy this sufficient condition, except in certain special cases. To see this, note that taking the curvature matrix to be the Hessian gives

where H=BθH=B_{\theta} is the Hessian of hh w.r.t. θ\theta. Thus, when the curvature matrix is the Hessian, the sufficient condition Jζ⊤BθJζ=Jζ⊤HJζ∝BγJ_{\zeta}^{\top}B_{\theta}J_{\zeta}=J_{\zeta}^{\top}HJ_{\zeta}\propto B_{\gamma} holds if and only if

where ∇L\nabla L is the gradient of L(y,z)L(y,z) w.r.t. zz (evaluated at z=f(x,θ)z=f(x,\theta)), and we allow a proportionality constant of . Rearranging this gives

This relation is unlikely to be satisfied unless the left hand side is equal to . One situation where this will occur is when H[ζ]j=0H_{[\zeta]_{j}}=0 for each jj, which holds when [ζ]j[\zeta]_{j} is an affine function of γ\gamma. Another situation is where we have ∇h=0\nabla h=0 for each (x,y)∈S(x,y)\in S.

A New Interpretation of the Natural Gradient

As discussed in Section 10, the negative natural gradient is given by the minimizer of a local quadratic approximation M(δ)M(\delta) to hh whose curvature matrix is the Fisher FF. And if we have that the gradient ∇h\nabla h and FF are computed on the same set SS of data points, M(δM(\delta) can be written as

where FRF_{R} is the Fisher of the predictive distribution Ry∣zR_{y|z} (as originally defined in Section 9), ∥v∥FR=v⊤FRv\|v\|_{F_{R}}=\sqrt{v^{\top}F_{R}v}, and c=h(θ)−12(∑(x,y)∈S∇zlog⁡r(y∣z)⊤FR−1∇zlog⁡r(y∣z))/∣S∣c=h(\theta)-\frac{1}{2}(\sum_{(x,y)\in S}\nabla_{z}\log r(y|z)^{\top}F_{R}^{-1}\nabla_{z}\log r(y|z))/|S| is a constant (independent of δ\delta).

Note that for a given (x,y)∈S(x,y)\in S, FR−1∇zlog⁡r(y∣z)F_{R}^{-1}\nabla_{z}\log r(y|z) can be interpreted as the natural gradient direction in zz-space for an objective corresponding to the KL divergence between the predictive distribution Ry∣zR_{y|z} and a delta distribution on the given yy. In other words, it points in the direction which moves Ry∣zR_{y|z} most quickly towards to said delta distribution, as measured by the KL divergence (see Section 6). And assuming that the GGN interpretation of FF holds (as discussed in Section 9), we know that it also corresponds to the optimal change in zz according to the 2nd-order Taylor series approximation of the loss function L(y,z)L(y,z).

Thus, M(δ)M(\delta) can be interpreted as the sum of squared distances (as measured using the Fisher metric tensor) between these “optimal” changes in the zz’s, and the changes in the zz’s which result from adding δ\delta to θ\theta, as predicted using 1st-order Taylor-series approximations to ff.

In addition to giving us a new interpretation for the natural gradient, this expression also gives us an easy-to-compute bound on the largest possible improvement to hh (as predicted by M(δ)M(\delta)). In particular, since the squared error terms are non-negative, we have

Given FR=HLF_{R}=H_{L}, this quantity has the simple interpretation of being the optimal improvement in hh (as predicted by a 2nd-order order model of L(y,z)L(y,z) for each case in SS) achieved in the hypothetical scenario where we can change the zz’s independently for each case.

The existence of this bound shows that the natural gradient can be meaningfully defined even when F−1F^{-1} may not exist, provided that we compute FF and ∇h\nabla h on the same data, and that each FRF_{R} is invertible. In particular, it can be defined as the minimizer of M(δ)M(\delta) that has minimum norm (which must exist since M(δ)M(\delta) is bounded below), which in practice could be computed by using the pseudo-inverse of FF in place of F−1F^{-1}. Other choices are possible, although care would have to be taken to ensure invariance of the choice with respect to parameterization.

Asymptotic Convergence Speed

A property of natural gradient descent which is frequently referenced in the literature is that it is “Fisher efficient”. In particular, Amari (1998) showed that an iteration of the form

which is (asymptotically) the smallestWith the usual definition of ⪯\preceq for matrices: A⪯CA\preceq C iff C−AC-A is PSD. possible variance matrix that any unbiased estimator computed from kk training cases can have, according to the Cramér-Rao lower boundNote that to apply the Cramér-Rao lower bound in this context one must assume that the training data set, on which we compute the objective (and which determines θ∗\theta^{*}), is infinitely large, or more precisely that its conditional distribution over yy has a density function. For finite training sets one can easily obtain an estimator with exactly zero error for a sufficiently large kk (assuming a rich enough model class), and so these requirements are not surprising. If we believe that there is a true underlying distribution of the data that has a density function, and from which the training set is just a finite collection of samples, then Cramér-Rao can be thought of as applying to the problem of estimating the true parameters of this distribution from said samples (with FF computed using the true distribution), and will accurately bound the rate of convergence to the true parameters until we start to see samples repeat. After that point, convergence to the true parameters will slow down and eventually stop, while convergence on the training objective may start to beat the bound. This of course implies that any convergence on the training set that happens faster than the Cramér-Rao bound will necessarily correspond to over-fitting (since this faster convergence cannot happen for the test loss)..

This result can also be straightforwardly extended to handle the case where gk(θk)g_{k}(\theta_{k}) is computed using a mini-batch of size mm (which uses mm independently sampled cases at each iteration), in which case the above asymptotic variance bound becomes

which again matches the Cramér-Rao lower bound.

This result applies to the version of natural gradient descent where FF is computed using the training distribution Q^x\hat{Q}_{x} and the model’s conditional distribution Py∣xP_{y|x} (see Section 5). If we instead consider the version where FF is computed using the true data distribution QxQ_{x}, then a similar result will still apply, provided that we sample xx from QxQ_{x} and yy from Qy∣xQ_{y|x} when computing the stochastic gradient gk(θk)g_{k}(\theta_{k}), and that θ∗\theta^{*} is defined as the minimum of the idealized objective KL⁡(Qx,y∥Px,y(θ))\operatorname{KL}(Q_{x,y}\|P_{x,y}(\theta)) (see Section 4).

While this Fisher efficiency result would seem to suggest that natural gradient descent is the best possible optimization method in the stochastic setting, it unfortunately comes with several important caveats and conditions, which we will discuss. (Moreover, as we will later, it is also possessed by much simpler methods, and so isn’t a great justification for the use of natural gradient descent by itself.)

Firstly, the proof assumes that the iteration in eqn. 15 eventually converges to the global optimum θ∗\theta^{*} (at an unspecified speed). While this assumption can be justified when the objective hh is convex (provided that αk\alpha_{k} is chosen appropriately), it won’t be true in general for non-convex objectives, such as those encountered in neural network training. In practice however, a reasonable local optimum θ∗\theta^{*} might be a good enough surrogate for the global optimum, in which case a property analogous to Fisher efficiency may still hold, at least approximately.

Secondly, it is assumed in Amari’s proof that FF is computed using the full training distribution Q^x\hat{Q}_{x}, which in the case of neural network optimization usually amounts to an entire pass over the training set SS. So while the proof allows for the gradient ∇h\nabla h to be stochastically estimated from a mini-batch, it doesn’t allow this for the Fisher FF. This is a serious challenge to the idea that (stochastic) natural gradient descent gives an estimator which makes optimal use of the training data that it sees. And note that while one can approximate FF using minibatches from SS, which is a solution that often works well in practice (especially when combined with a decayed-averaging schemeBy this we mean a scheme which maintains an estimate where past contributions decay exponentially at some fixed rate. In other words, we estimate FF at each iteration as (1−β)Fnew⁡+βFold⁡(1-\beta)F_{\operatorname{new}}+\beta F_{\operatorname{old}} for some 0<β<10<\beta<1 where Fnew⁡F_{\operatorname{new}} is the Fisher as computed on the current mini-batch (for the current setting of θ\theta), and Fold⁡F_{\operatorname{old}} is the old estimate (which will be based on stale θ\theta values).), a Fisher efficiency result like the one proved by Amari (1998) will likely no longer hold. Investigating the manner and degree in which it may hold approximately when FF is estimated in this way is an interesting direction for future research.

A third issue with Amari’s result is that it is given in terms of the convergence of θk\theta_{k} (as measured by the Euclidean norm) instead of the objective function value, which is arguably much more relevant. Fortunately, it is straightforward to obtain the former from the latter. In particular, by applying Taylor’s theorem and using ∇h(θ∗)=0\nabla h(\theta^{*})=0 we have

where H∗=H(θ∗){H^{*}}=H(\theta^{*}) and O((θk−θ∗)3)\mathcal{O}\left((\theta_{k}-\theta^{*})^{3}\right) is short-hand to mean a function which is cubic in the entries of θk−θ∗\theta_{k}-\theta^{*}. From this it followsThe last line of this derivation uses E⁡[O((θk−θ∗)3)]=o(1/k)\operatorname{E}\left[\mathcal{O}\left((\theta_{k}-\theta^{*})^{3}\right)\right]=o(1/k), which is an (unjustified) assumption that is used in Amari’s proof. This assumption has intuitive appeal since E⁡[O((θk−θ∗)2)]=O(1/k)\operatorname{E}\left[\mathcal{O}\left((\theta_{k}-\theta^{*})^{2}\right)\right]=\mathcal{O}(1/k), and so it makes sense that E⁡[O((θk−θ∗)3)]\operatorname{E}\left[\mathcal{O}\left((\theta_{k}-\theta^{*})^{3}\right)\right] would shrink faster. However, extreme counterexamples are possible which involve very heavy-tailed distributions on θk\theta_{k} over unbounded regions. By adding some mild hypotheses such as θk\theta_{k} being restricted to some bounded region, which is an assumption frequently used in the convex optimization literature, it is possible to justify this assumption rigorously. Rather than linger on this issue we will refer the reader to Bottou and LeCun (2005), which provides a more rigorous treatment of these kinds of asymptotic results, using various generalizations of the big-O notation. that

where we have used H∗=F(θ∗){H^{*}}=F(\theta^{*}), which follows from the “realizability” hypothesis used to prove the Fisher efficiency result (see below). Note that while this is the same convergence rate (O(1/k)\mathcal{O}(1/k)) as the one which appears in Hazan et al. (2007) (see our Section 11), the constant is much better. However, the comparison is slightly unfair, as Hazan et al. (2007) doesn’t require that the curvature matrix be estimated on the entire data set (as discussed above).

The fourth and final caveat of Amari’s Fisher efficiency result is that Amari’s proof assumes that the training distribution Q^x,y\hat{Q}_{x,y} and the optimal model distribution Px,y(θ∗)P_{x,y}(\theta^{*}) coincide, a condition called “realizability” (which is also required in order for the Cramér-Rao lower bound to apply). This essentially means that the model perfectly captures the training distribution at θ=θ∗\theta=\theta^{*}. This assumption is used in Amari’s proof of the Fisher efficiency result to show that the Fisher FF, when evaluated at θ=θ∗\theta=\theta^{*}, is equal to both the empirical Fisher Fˉ\bar{F} and the Hessian HH of hh. (These equalities follow immediately from Q^x,y=Px,y(θ∗)\hat{Q}_{x,y}=P_{x,y}(\theta^{*}) using the forms of the Fisher presented in Section 5.) Note that realizability is a subtle condition. It can fail to hold if the model isn’t powerful enough to capture the training distribution. But also if the training distribution is a finite set of pairs (x,y)(x,y) and the model is powerful enough to perfectly capture this (as a Delta distribution), in which case F(θ∗)F(\theta^{*}) is no longer well-defined (because its associated density function isn’t), and convergence faster than the Cramér-Rao bound becomes possible.

It is not clear from Amari’s proof what happens when this correspondence fails to hold at θ=θ∗\theta=\theta^{*}, and whether a (perhaps) weaker asymptotic upper bound on the variance might still be provable. Fortunately, various authors (Murata, 1998; Bottou and LeCun, 2005; Bordes et al., 2009) building on early work of Amari (1967), provide some further insight into this question by studying asymptotic behavior of general iterations of the formNote that some authors define BkB_{k} to be the matrix that multiplies the gradient, instead of its inverse (as we do instead).

where Bk=BB_{k}=B is a fixedNote that for a non-constant BkB_{k} where Bk−1B_{k}^{-1} converges sufficiently quickly to a fixed B−1B^{-1} as θk\theta_{k} converges to θ∗\theta^{*}, these analyses will likely still apply, at least approximately. curvature matrix (which is independent of θk\theta_{k} and kk), and where gk(θk)g_{k}(\theta_{k}) is a stochastic estimate of ∇h(θk)\nabla h(\theta_{k}).

In particular, Murata (1998) gives exact (although implicit) expressions for the asymptotic mean and variance of θk\theta_{k} in the above iteration for the case where αk=1/(k+1)\alpha_{k}=1/(k+1) or αk\alpha_{k} is constant. These expressions describe the (asymptotic) behavior of this iteration in cases where the curvature matrix BB is not the Hessian HH or the Fisher FF, covering the non-realizable case, as well as the case where the curvature matrix is only an approximation of the Hessian or Fisher. Bordes et al. (2009) meanwhile gives expressions for E⁡[h(θk)]\operatorname{E}[h(\theta_{k})] in the case where αk\alpha_{k} shrinks as 1/k1/k, thus generalizing eqn. 18 in a similar manner.

In the following subsections we will examine these results in more depth, and improve on those of Bordes et al. (2009) (at least in the quadratic case) by giving an exact asymptotic expression for E⁡[h(θk)]\operatorname{E}[h(\theta_{k})]. We will also analyze iterate averaging (aka Polyak averaging ; see Section 14.3) in the same setting.

Some interesting consequences of this analysis are discussed in Sections 14.2.1 and 14.3.1. Of particular note is that for any choice of BB, E⁡[h(θk)]−h(θ0)\operatorname{E}[h(\theta_{k})]-h(\theta_{0}) can be expressed as a sum of two terms: one that scales as O(1/k)\mathcal{O}(1/k) and doesn’t depend on the starting point θ0\theta_{0}, and one that does depend on the starting point and scales as O(1/k2)\mathcal{O}(1/k^{2}) or better. Moreover, the first term, which is asymptotically dominant, carries all the dependence on the noise covariance, and crucially isn’t improved by the use of a non-trivial choices for BB such as FF or HH, assuming the use of Polyak averaging. Indeed, if Polyak averaging is used, this term matches the Cramér-Rao lower bound, and thus even plain stochastic gradient descent becomes Fisher efficient! (This also follows from the analysis of Polyak and Juditsky (1992).) Meanwhile, if learning rate decay is used instead of Polyak averaging, one can improve the constant on this term by using 2nd-order methods, although not the overall 1/k1/k rate.

While these results strongly suggest that 2nd-order methods like natural gradient descent won’t be of much help asymptotically in the stochastic setting, we argue that the constant on the starting point dependent O(1/k2)\mathcal{O}(1/k^{2}) term can still be improved significantly through the use of such methods, and this term may matter more in practice given a limited iteration budget (despite being negligible for very large kk).

2 Some New Results Concerning Asymptotic Convergence Speed of General Stochastic 2nd-order Methods

In this subsection we will give two results which characterize the asymptotic convergence of the stochastic iteration in eqn. 19 as applied to the convex quadratic objective h(θ)=12(θ−θ∗)⊤H∗(θ−θ∗)h(\theta)=\frac{1}{2}(\theta-\theta^{*})^{\top}{H^{*}}(\theta-\theta^{*}) (whose minimizer is θ∗\theta^{*}). The proofs of both results are in Appendix B.

where g(θ)g(\theta) denotes the random variable whose distribution coincides with the conditional distribution of gk(θk)g_{k}(\theta_{k}) given θk\theta_{k}. Note that this notation is well-defined as long as gk(θk)g_{k}(\theta_{k}) depends only on the value of θk\theta_{k}, and not on kk itself. (This will be true, for example, if the gk(θk)g_{k}(\theta_{k})’s are generated by sampling a fixed-size mini-batch of iid training data.)

To simplify our analysis we will assume that Σg(θ)\Sigma_{g}(\theta) is constant with respect to θ\theta, allowing us to write it simply as Σg\Sigma_{g}. While somewhat unrealistic, one can reasonably argue that this assumption will become approximately true as θ\theta converges to the optimum θ∗\theta^{*}. It should be noted that convergence of stochastic optimization methods can happen faster than in our analysis, and indeed than is allowed by the Cramér-Rao lower bound, if Σg(θ)\Sigma_{g}(\theta) approaches sufficiently fast as θ\theta goes to θ∗\theta^{*} . This can happen if the model can obtain zero error on all cases in the training distribution (e.g Loizou and Richtárik, 2017), a situation which is ruled out by the hypothesis that this distribution has a density function (as is required by Cramér-Rao). But it’s worth observing that this kind of faster convergence can’t happen on the test data distribution (assuming it satisfies Cramér-Rao’s hypotheses), and thus will only correspond to faster over-fitting.

Before stating our first result we will define some additional notation. We denote the variance of θk\theta_{k} by

And we define the following linear operatorsNote that these operators are not n×nn\times n matrices themselves, although they can be represented as n2×n2n^{2}\times n^{2} matrices if we vectorize their n×nn\times n matrix arguments. Also note that such operators can be linearly combined and composed, where we will use the standard ±\pm notation for linear combination, multiplication for composition, and where II will be the identity operator. So, for example, (I+Ξ2)(X)=X+Ξ(Ξ(X))(I+\Xi^{2})(X)=X+\Xi(\Xi(X)). that map square matrices to matrices of the same size:

for notational brevity, as this is an expression which will appear frequently. Finally, for an nn-dimensional symmetric matrix AA we will denote its ii-th largest eigenvalue by λi(A)\lambda_{i}(A), so that λ1(A)≥λ2(A)≥…≥λn(A)\lambda_{1}(A)\geq\lambda_{2}(A)\geq\ldots\geq\lambda_{n}(A).

The following theorem represents a more detailed and rigorous treatment of the type of asymptotic expressions for the mean and variance of θk\theta_{k} given by Murata (1998), although specialized to the quadratic case. Note that symbols like V∞V_{\infty} have a slightly different meaning here than in Murata (1998).

Suppose that θk\theta_{k} is generated by the stochastic iteration in eqn. 19 while optimizing a quadratic objective h(θ)=12(θ−θ∗)⊤H∗(θ−θ∗)h(\theta)=\frac{1}{2}(\theta-\theta^{*})^{\top}{H^{*}}(\theta-\theta^{*}).

If αk\alpha_{k} is equal to a constant α\alpha satisfying αλ1(B−1H∗)≤1\alpha\lambda_{1}(B^{-1}H^{*})\leq 1, then the mean and variance of θk\theta_{k} are given by

where Λ=Ψα\Lambda=\Psi_{\alpha} and V∞=α2(I−Λ)−1(U)V_{\infty}=\alpha^{2}\left(I-\Lambda\right)^{-1}(U).

If on the other hand we have αk=1/(k+a+1)\alpha_{k}=1/(k+a+1) for some a≥1a\geq 1, with b≡λn(B−1H∗)>12b\equiv\lambda_{n}\left(B^{-1}{H^{*}}\right)>\frac{1}{2} and λ1(B−1H∗)≤a+1\lambda_{1}\left(B^{-1}{H^{*}}\right)\leq a+1, then the mean and variance of θk\theta_{k} are given by

where EkE_{k} is a matrix valued “error” that shrinks as 1/k21/k^{2}.

Due to the properties of quadratic functions, and the assumptions of constant values for BB and Σg\Sigma_{g}, one could state and/or prove this theorem (and the ones that follow) while taking one of H∗{H^{*}}, BB, or Σg\Sigma_{g} to be the identity matrix, without any loss of generality. This is due to the fact that optimizing with a preconditioner is equivalent to optimizing a linearly-reparameterized version of the objective with plain stochastic gradient descent.

One interesting observation that we can immediately make from Theorem 3 is that, at least in the case where the objective is a convex quadratic, E⁡[θk]\operatorname{E}[\theta_{k}] progresses in a way that is fully independent of the distribution of noise in the gradient estimate (which is captured by the Σg\Sigma_{g} matrix). Indeed, it proceeds as θk\theta_{k} itself would in the case of fully deterministic optimization. It is only the variance of θk\theta_{k} around E⁡[θk]\operatorname{E}[\theta_{k}] that depends on the gradient estimator’s noise.

To see why this happens, note that if h(θ)h(\theta) is quadratic then ∇h(θ)\nabla h(\theta) will be an affine function, and thus will commute with expectation. This allows us to write

Provided that αk\alpha_{k} doesn’t depend on θk\theta_{k} in any way (as we are implicitly assuming), we then have

which is precisely the deterministic version of eqn. 19, where we treat E⁡[θk]\operatorname{E}[\theta_{k}] as the parameter vector being optimized].

While Theorem 3 provides a detailed picture of how well θ∗\theta^{*} is estimated by θk\theta_{k}, it doesn’t tell us anything directly about how quickly progress is being made on the objective, which is arguably a much more relevant concern in practice. Fortunately, as observed by Murata (1998), we have the basic identity (proved for completeness in Appendix A):

which allows us to relate the convergence of E[θk]E[\theta_{k}] (which behaves like θk\theta_{k} in the deterministic version of the algorithm) and the size/shape of the variance of θk\theta_{k} to the convergence of E⁡[h(θk)]\operatorname{E}[h(\theta_{k})]. In particular, we see that in this simple case where h(θ)h(\theta) is quadratic, E⁡[h(θk)]−h(θ∗)\operatorname{E}[h(\theta_{k})]-h(\theta^{*}) neatly decomposes as the sum of two independent terms that quantify the roles of these respective factors in the convergence of E⁡[h(θk)]\operatorname{E}[h(\theta_{k})] to h(θ∗)h(\theta^{*}).

In the proof of the following theorem (which is in the appendix), we will use the above expression and Theorem 3 to precisely characterize the asymptotic convergence of E⁡[h(θk)]\operatorname{E}[h(\theta_{k})]. Note that while Murata (1998) gives expressions for this as well, they cannot be directly evaluated except in certain special cases (such as when B=HB=H), and only include the asymptotically dominant terms.

Suppose that θk\theta_{k} is generated by the stochastic iteration in eqn. 19 while optimizing a quadratic objective h(θ)=12(θ−θ∗)⊤H∗(θ−θ∗)h(\theta)=\frac{1}{2}(\theta-\theta^{*})^{\top}{H^{*}}(\theta-\theta^{*}).

If αk\alpha_{k} is equal to a constant α\alpha satisfying αλ1(B−1H∗)≤1\alpha\lambda_{1}(B^{-1}H^{*})\leq 1, then the expected objective E⁡[h(θk)]\operatorname{E}[h(\theta_{k})] satisfies

with ϵ1=λ1(C)=αλ1(B−1H∗)\epsilon_{1}=\lambda_{1}(C)=\alpha\lambda_{1}\left(B^{-1}{H^{*}}\right) and ϵ2=λn(C)=αλn(B−1H∗)\epsilon_{2}=\lambda_{n}(C)=\alpha\lambda_{n}\left(B^{-1}{H^{*}}\right).

If on the other hand we have αk=1/(k+a+1)\alpha_{k}=1/(k+a+1) for some a≥1a\geq 1, with b≡λn(B−1H∗)>12b\equiv\lambda_{n}\left(B^{-1}{H^{*}}\right)>\frac{1}{2} and λ1(B−1H∗)≤a+1\lambda_{1}\left(B^{-1}{H^{*}}\right)\leq a+1, then the expected objective satisfies

In the case of a fixed step-size αk=α\alpha_{k}=\alpha, Theorem 5 shows that E⁡[h(θk)]\operatorname{E}[h(\theta_{k})] will tend to the constant

The size of this extra additive factor is correlated with the step-size α\alpha and gradient noise covariance Σg\Sigma_{g}. If the covariance or step-sizes are small enough, it may not be very large in practice.

Moreover, one can use the fact that the iterates {θk}k=1∞\{\theta_{k}\}_{k=1}^{\infty} are (non-independent) asymptotically unbiased estimators of θ∗\theta^{*} to produce an asymptotically unbiased estimator with shrinking variance by averaging them together. This is done in the Polyak Averaging method (e.g. Polyak and Juditsky, 1992), which we analyze in Section 14.3.

In the scenario where αk=1/(k+a+1)\alpha_{k}=1/(k+a+1), if one performs stochastic 2nd-order optimization with B=H∗B=H^{*} (so that b=1b=1) and any a≥1a\geq 1, Theorem 5 gives that

(where we have used the fact that Ψ1=0\Psi_{1}=0 when B=H∗B=H^{*}). And if one considers the scenario corresponding to 1st-order optimization where we take B=λn(H∗)IB=\lambda_{n}(H^{*})I (so that b=1b=1) and a=κ(H∗)a=\kappa(H^{*}), where κ(H∗)=λ1(H∗)/λn(H∗)\kappa(H^{*})=\lambda_{1}({H^{*}})/\lambda_{n}({H^{*}}) is the condition number of H∗H^{*}, we get

In deriving this we have applied Lemma 20 while exploiting the fact that Ψ1(U)⪯U\Psi_{1}(U)\preceq U (i.e. U−Ψ1(U)U-\Psi_{1}(U) is PSD).

These two bounds can be made more similar looking by choosing a=κ(H∗)a=\kappa(H^{*}) in the first one. (However this is unlikely to be the optimal choice in general, and the extra freedom in choosing aa seems to be one of the advantages of using B=H∗B=H^{*}.) In this case, the starting-point dependent terms (which are noise independent) seem to exhibit the same asymptotics, although this is just an artifact of the analysis, and it is possible to obtain tighter bounds on these terms by considering the entire spectrum instead of just the most extreme eigenvalue (as was done in eqn. 37 while applying Lemma 18).

The noise-dependent terms, which are the ones that dominate asymptotically as k→∞k\to\infty and were derived using a very tight analysis (and indeed we have a matching lower bound for these), exhibit a more obvious difference in the above expressions. To compare their sizes we can apply Lemma 18 to obtain the following bounds (see Appendix C):

Because the lower bound is much smaller in the B=H∗B=H^{*} case, these bounds thus allow for the possibility that the noise dependent term will be much smaller in that case. A necessary condition for this to happen is that H∗H^{*} is ill-conditioned (so that λ1(H∗)≫λn(H∗)\lambda_{1}\left({H^{*}}\right)\gg\lambda_{n}\left({H^{*}}\right)), although this alone is not sufficient.

To provide an actual concrete example where the noise-dependent term is smaller, we must make further assumptions about the nature of the gradient noise covariance matrix Σg\Sigma_{g}. As an important example, we consider the scenario where the stochastic gradients are computed using (single) randomly sampled cases from the training set SS, and where we are in the realizable regime (so that H∗=F∗ˉ=ΣgH^{*}=\bar{F^{*}}=\Sigma_{g}; see Section 14.1). When B=H∗B=H^{*}, the constant on the noise dependent term will thus scale as

while if B=λn(H∗)IB=\lambda_{n}({H^{*}})I it will scale as

where we have defined ri=λi(H∗)/λn(H∗)r_{i}=\lambda_{i}({H^{*}})/\lambda_{n}({H^{*}}). (To go from the first to the second line we have used the general fact that for any rational function gg the ii-th eigenvalue of g(H∗)g(H^{*}) is given by g(λi)g(\lambda_{i}). And also that the trace is the sum of the eigenvalues.)

Observing that 1≤ri1\leq r_{i}, we thus have ri≤ri/(1−1/(2ri))r_{i}\leq r_{i}/(1-1/(2r_{i})), from which it also follows that

From these bounds we can see that noise scaling in the B=H∗B=H^{*} case is no worse than twice that of the B=λn(H∗)IB=\lambda_{n}({H^{*}})I case. And it has the potential to be much smaller, such as when tr⁡(H∗)λn(H∗)≫n\frac{\operatorname{tr}(H^{*})}{\lambda_{n}(H^{*})}\gg n, or when the spectrum of H∗{H^{*}} covers a large range. For example, if λi(H∗)=n−i+1\lambda_{i}({H^{*}})=n-i+1 then the noise scales as Ω(n2/k)\Omega(n^{2}/k) in the B=λn(H∗)IB=\lambda_{n}({H^{*}})I case.

2.2 Related Results

The related result most directly comparable to Theorem 5 is Theorem 1 of Bordes et al. (2009), which provides upper and lower bounds for E⁡[h(θk)]−h(θ∗)\operatorname{E}[h(\theta_{k})]-h(\theta^{*}) in the case where αk=1/(k+a+1)\alpha_{k}=1/(k+a+1) and λn(B−1H∗)>1/2\lambda_{n}\left(B^{-1}{H^{*}}\right)>1/2. In particular, using a different technique from our own, Bordes et al. (2009) show thatNote that the notation ‘BB’ as it is used by Bordes et al. (2009) means the inverse of the matrix BB as it appears in this paper. And while Bordes et al. (2009) presents their bounds with Fˉ\bar{F} in place of Σg\Sigma_{g}, these are the same matrix when evaluated at θ=θ∗\theta=\theta^{*} as we have E⁡[g(θ∗)]=0\operatorname{E}[g(\theta^{*})]=0 (since θ∗\theta^{*} is a local optimum).

This result is more general in the sense that it doesn’t assume the objective is quadratic. However, it is also far less detailed than our result, and in particular doesn’t describe the asymptotic value of E⁡[h(θk)]−h(θ∗)\operatorname{E}[h(\theta_{k})]-h(\theta^{*}), instead only giving (fairly loose) upper and lower bounds on it. It can be obtained from our Theorem 5, in the quadratic case, by a straightforward application of Lemma 18.

There are other relevant results in the vast literature on general strongly convex functions, such as Kushner and Yin (2003) and the references therein, and Moulines and Bach (2011). These results, while usually only presented for standard stochastic gradient descent, can be applied to the same setting considered in Theorem 5 by performing a simple linear reparameterization. A comprehensive review of such results would be outside the scope of this report, but to the best of our knowledge there is no result which would totally subsume Theorem 5 for convex quadratics. The bounds in Moulines and Bach (2011) for example, are more general in a number of ways, but also appear to be less detailed than ours, and harder to interpret.

3 An Analysis of Averaging

In this subsection we will extend the analysis from Subsection 14.2 to incorporate basic iterate averaging of the standard type (e.g. Polyak and Juditsky, 1992). In particular, we will bound E⁡[h(θˉk)]\operatorname{E}[h(\bar{\theta}_{k})] where

Note that while this type of averaging leads to elegant bounds (as we will see), a form of averaging based on an exponentially-decayed moving average typically works much better in practice. This is given by

for βk=min⁡{1−1/k,βmax⁡}\beta_{k}=\min\{1-1/k,\beta_{\max}\} with 0<βmax⁡<10<\beta_{\max}<1 close to 1 (e.g. βmax⁡=0.99\beta_{\max}=0.99). This type of averaging has the advantage that it more quickly “forgets” the very early θi\theta_{i}’s, since their “weight” in the average decays exponentially. However, the cost of doing this is that the variance will never converge exactly to zero, which arguably matters more in theory than it does in practice.

The main result of this subsection, which is proved in Appendix B, is stated as follows:

Suppose that θk\theta_{k} is generated by the stochastic iteration in eqn. 19 with constant step-size αk=α\alpha_{k}=\alpha while optimizing a quadratic objective h(θ)=12(θ−θ∗)⊤H∗(θ−θ∗)h(\theta)=\frac{1}{2}(\theta-\theta^{*})^{\top}{H^{*}}(\theta-\theta^{*}). Further, suppose that αλ1(B−1H∗)<1\alpha\lambda_{1}(B^{-1}{H^{*}})<1, and define θˉk=1k+1∑i=0kθi\bar{\theta}_{k}=\frac{1}{k+1}\sum_{i=0}^{k}\theta_{i}. Then we have the following bound:

Note that this bound can be written asymptotically (k→∞k\to\infty) as

which notably doesn’t depend on either α\alpha or BB.

This is a somewhat surprising property of averaging to be sure, and can be intuitively explained as follows. Increasing the step-size along any direction dd (as measured by αd⊤B−1d\alpha d^{\top}B^{-1}d) will increase the variance in that direction for each iterate (since the step-size multiplies the noise in the stochastic gradient estimate), but will also cause the iterates to decorrelate faster in that direction (as can be seen from eqn. 39). Increased decorrelation in the iterates leads to lower variance in their average, which counteracts the aforementioned increase in the variance. As it turns out, these competing effects will exactly cancel in the limit, which the proof of Theorem 6 rigorously establishes.

In the case of stochastic 2nd-order optimization of a convex quadratic objective where we take B=H∗B={H^{*}} (which allows us to use an α\alpha close to 11) this gives

Then choosing the maximum allowable value of α\alpha this becomes

which is a similar bound to the one described in Section 14.2.1 for stochastic 2nd-order optimization (with B=H∗B=H^{*}) using an annealed step-size αk=1/(k+1)\alpha_{k}=1/(k+1).

For the sake of comparison, applying Theorem 6 with B=IB=I gives

under the assumption that αλ1(H∗)<1\alpha\lambda_{1}({H^{*}})<1. For the maximum allowable value of α\alpha this becomes

An interesting observation we can make about these bounds is that they do not demonstrate any improvement through the use of 2nd-order optimization on the asymptotically dominant noise-dependent term in the bound (a phenomenon first observed by Polyak and Juditsky (1992) in a more general setting). Moreover, in the case where the stochastic gradients (the gk(θk)g_{k}(\theta_{k})’s) are sampled using random training cases in the usual way so that Σg=Fˉ(θ)\Sigma_{g}=\bar{F}(\theta), and the realizability hypothesis is satisfied so that H∗=F(θ∗)=Fˉ(θ∗)H^{*}=F(\theta^{*})=\bar{F}(\theta^{*}) (see Section 14.1), we can see that simple stochastic gradient descent with averaging achieves a similar asymptotic convergence speed (given by n/(k+1)+o(1/k)n/(k+1)+o(1/k)) to that possessed by Fisher efficient methods like stochastic natural gradient descent (c.f. eqn. 18), despite not involving the use of curvature matrices!

Moreover, in the non-realizable case, 1/(2k)tr⁡(H∗−1Σg)1/(2k)\operatorname{tr}\left({H^{*}}^{-1}\Sigma_{g}\right) turns out to be the same asymptotic rate as that achieved by the “empirical risk minimizer” (i.e. the estimator of θ\theta that minimizes the expected loss over the training cases processed thus far) and is thus “optimal” in a certain strong sense for infinite data sets. See Frostig et al. (2014) for a good recent discussion of this.

However, despite these observations, these bounds do demonstrate an improvement to the noise-independent term (which depends on the starting point θ0\theta_{0}) through the use of 2nd-order optimization. When H∗H^{*} is ill-conditioned and θ0−θ∗\theta_{0}-\theta^{*} has a large component in the direction of eigenvectors of H∗H^{*} with small eigenvalues, we will have

Crucially, this noise-independent term may often matter more in practice (despite being asymptotically negligible), as the LHS expression may be very large compared to Σg\Sigma_{g}, and we may be interested in stopping the optimization long before the more slowly shrinking noise-dependent term begins to dominate asymptotically (e.g. if we have a fixed iteration budget, or are employing early-stopping). This is especially likely to be the case if the gradient noise is low due to the use of large mini-batches.

It is also worth pointing out that compared to standard stochastic 2nd-order optimization with a fixed step-size (as considered by the first part of Theorem 5), the noise-independent term shrinks much more slowly when we use averaging (quadratically vs exponentially), or for that matter when we use an annealed step-size αk=1/(k+1)\alpha_{k}=1/(k+1) with b>1b>1. This seems to be the price one has to pay in order to ensure that the noise-dependent term shrinks as 1/k1/k. (Although in practice one can potentially obtain a more favorable dependence on the starting point by adopting the “forgetful” exponentially-decaying variant of averaging discussed previously.)

3.2 Related Results

Under weaker assumptions about the nature of the stochastic gradient noise, Polyak and Juditsky (1992) showed that

which using the first line of eqn. 20 yields

While consistent with Theorem 6, this bound gives a less detailed picture of convergence, and in particular fails to quantify the relative contribution of the noise-dependent and independent terms, and thus doesn’t properly distinguish between the behavior of stochastic 1st or 2nd-order optimization methods (i.e. B=IB=I vs B=H∗B={H^{*}}).

Assuming a model for the gradient noise which is consistent with linear least-squares regression and B=IB=I, Défossez and Bach (2014) showed that

holds in the asymptotic limit as α→0\alpha\to 0 and k→∞k\to\infty.

This expression is similar to the one generated by Theorem 6 (see eqn. 21), although it only holds in the asymptotic limit of small α\alpha and large kk, and assumes a particular θ\theta-dependent form for the noise (arising in least-squares linear regression), which represents neither a subset nor a super-set of our general θ\theta-independent formulation. An interesting question for future research is whether Theorem 3 could be extended in way that would allow Σg\Sigma_{g} to vary with θ\theta, and whether this would allow us to prove a more general version of Theorem 6 that would cover the case of linear least-squares.

A result which is more directly comparable to our Theorem 6 is “Theorem 3” of Flammarion and Bach (2015), which when applied to the same general case considered in Theorem 6 gives the following upper bound (assuming that B=IB=INote that the assumption that B=IB=I doesn’t actually limit this result since stochastic 2nd-order optimization of a quadratic using a fixed BB can be understood as stochastic gradient descent applied to a transformed version of the original quadratic (with an appropriately transformed gradient noise matrix Σg\Sigma_{g}). and αλ1(H∗)≤1\alpha\lambda_{1}({H^{*}})\leq 1):

Unlike the bound proved in Theorem 6, this bound fails to establish that E⁡[h(θkˉ)]\operatorname{E}[h(\bar{\theta_{k}})] even converges, since the term 4αtr⁡(Σg)4\alpha\operatorname{tr}(\Sigma_{g}) is constant in kk.

There are other older results in the literature analyzing averaging in general settings, such as those contain in Kushner and Yin (2003) and the references therein. However, to the best of our knowledge there is no result in the literature which would totally subsume Theorem 6 for the case of convex quadratics, particularly with regard to the level of detail in the non-asymptotically-dominant terms of the bound (which is very important for our purposes here).

Conclusions and Open Questions

In this report we have examined several aspects of the natural gradient method, such as its relationship to 2nd-order methods, its local convergence speed, and its invariance properties.

The link we have established between natural gradient descent and (stochastic) 2nd-order optimization with the Generalized Gauss-Newton matrix (GGN) provides intuition for why it might work well with large step-sizes, and gives prescriptions for how to make it work robustly in practice. In particular, we advocate viewing natural gradient descent as a GGN-based 2nd-order method in disguise (assuming the equivalence between the Fisher and GGN holds), and adopting standard practices from the optimization literature to ensure fast and robust performance, such as trust-region/damping/Tikhonov regularization, and Levenberg-Marquardt adjustment heuristics (Moré, 1978).

However, even in the case of squared loss, where the GGN becomes the standard Gauss-Newton matrix, we don’t yet have a completely rigorous understanding of 2nd-order optimization with the GGN. A completely rigorous account of its global convergence remains elusive (even if we can assume convexity), and convergence rate bounds such as those proved in Section 14 don’t even provide a complete picture of its local convergence properties.

Another issue with these kinds of local convergence bounds, which assume the objective is quadratic (or is well-approximated as such), is that they are always improved by using the Hessian instead of the GGN, and thus fail to explain the empirically observed superiority of the GGN over the Hessian for neural network training. This is because they assume that the objective function has constant curvature (given by the Hessian at the optimum), so that optimization could not possibly be helped by using an alternative curvature matrix like the GGN. And for this reason they also fail to explain why damping methods are so crucial in practice.

Moreover, even just interpreting the constants in these bounds can be hard when using the Fisher or GGN. For example, if we pay attention only to the noise-independent/starting point-dependent term in the bound from Theorem 6, which is given by

and plug in B=FB=F and the maximum-allowable learning rate α=1/λ1(B−1H∗)\alpha=1/\lambda_{1}(B^{-1}{H^{*}}), we get the somewhat opaque expression

It’s not immediately obvious how we can further bound this expression in the non-realizable case (i.e. where we don’t necessarily have F=H∗F=H^{*}) using easily accessible/interpretable properties of the objective function. This is due to the complicated nature of the relationship between the GGN and Hessian, which we haven’t explored in this report beyond the speculative discussion in Section 8.1.

Finally, we leave the reader with a few open questions.

Can the observed advantages of the GGN vs the Hessian be rigorously justified for neural networks (assuming proper use of damping/trust-regions in both cases to deal with issues like negative curvature)?

Are there situations where the Fisher and GGN are distinct and one is clearly preferable over the other?

When will be pre-asymptotic advantage of stochastic 2nd-order methods vs SGD with Polyak averaging matter in practice? And can this be characterized rigorously using accessible properties of the target objective?

Acknowledgments

We gratefully acknowledge support from Google, DeepMind, and the University of Toronto. We would like to thank Léon Bottou, Guillaume Desjardins, Alex Botev, and especially the very thorough anonymous JMLR reviewers for their useful feedback on earlier versions of this manuscript.

A Proof of Basic Identity from Murata (1998)

Given the definitions of Section 14 we have

where we have used E⁡[(θk−E⁡[θk])]=E⁡[θk]−E⁡[θk]=0\operatorname{E}\left[(\theta_{k}-\operatorname{E}[\theta_{k}])\right]=\operatorname{E}[\theta_{k}]-\operatorname{E}[\theta_{k}]=0.

B Proofs of Convergence Theorems

In this section we will prove Theorems 3, 5, and 6.

To begin, we recall the following linear operator definitions from the beginning of Section 14.2:

and so Ω\Omega and Ξ\Xi commute as operators. And because the remaining operators defined above are all linear combinations of these, it follows that they all commute with each other.

where we have defined ϵk(θk)=gk(θk)−∇h(θk)\epsilon_{k}(\theta_{k})=g_{k}(\theta_{k})-\nabla h(\theta_{k}) and used ∇h(θk)=H∗(θk−θ∗)\nabla h(\theta_{k})={H^{*}}(\theta_{k}-\theta^{*}). Taking the expectation of both sides while using E⁡[ϵk(θk)]=0\operatorname{E}\left[\epsilon_{k}(\theta_{k})\right]=0 we get

Then observing that Var⁡(θk−θ∗)=Var⁡(θk)=Vk\operatorname{Var}(\theta_{k}-\theta^{*})=\operatorname{Var}(\theta_{k})=V_{k} for all kk, and exploiting the uncorrelatedness of θk\theta_{k} and ϵk(θk)\epsilon_{k}(\theta_{k}), we can take the variance of both sides of eqn. 22 to get that VkV_{k} evolves according to

This recursion for VkV_{k} will be central in our analysis.

In this subsection we will prove the claims made in Theorems 3 and 5 pertaining to the case where:

αk=α\alpha_{k}=\alpha for a constant α\alpha, and

To begin, we define the notation Λ=Ψα\Lambda=\Psi_{\alpha}.

The operator I−ΛI-\Lambda has all positive eigenvalues and is thus invertible. Moreover, we have

And so if XX is a PSD matrix then (I−Λ)−1(X)\left(I-\Lambda\right)^{-1}(X) is as well.

Proof Let D=I−αB−1H∗D=I-\alpha B^{-1}H^{*}, so that Λ(X)=DXD⊤\Lambda(X)=DXD^{\top}.

The eigenvalues of B−1H∗B^{-1}H^{*} are the same as those of B−1/2H∗B−1/2B^{-1/2}H^{*}B^{-1/2} (since the matrices differ by a similarity transform), and are thus real-valued and positive. Moreover, the minimum eigenvalue of DD is λn(D)=1−αλ1(B−1H∗)≥0\lambda_{n}(D)=1-\alpha\lambda_{1}(B^{-1}H^{*})\geq 0, and the maximum eigenvalue is λ1(D)=1−αλn(B−1H∗)<1\lambda_{1}(D)=1-\alpha\lambda_{n}(B^{-1}H^{*})<1, where we have used λn(B−1H∗)=λn(B−1/2H∗B−1/2)>0\lambda_{n}(B^{-1}H^{*})=\lambda_{n}(B^{-1/2}H^{*}B^{-1/2})>0 (both H∗H^{*} and BB are positive definite).

The claim then follows by an application of Lemma 21.

The variance matrix VkV_{k} is given by the formula

where V∞=α2(I−Λ)−1(U)V_{\infty}=\alpha^{2}(I-\Lambda)^{-1}(U).

Proof By expanding the recursion for VkV_{k} we have

For any appropriately sized matrix XX we have

Let Y=(I−Λ)−1(X)Y=\left(I-\Lambda\right)^{-1}(X), so that (I−Λ)(Y)=X\left(I-\Lambda\right)(Y)=X. Written as a matrix equation this is

Left and right multiplying both sides by BB we have

This can be written as A⊤P+PA+Q=0A^{\top}P+PA+Q=0, where

In order to compute tr⁡(H∗Y)\operatorname{tr}({H^{*}}Y) we can thus apply Lemma 17. However, we must first verify that our PP is invertible. To this end we will show that B−α2H∗B-\frac{\alpha}{2}{H^{*}} is positive definite. This is equivalent to the condition that B−1/2(B−α2H∗)B−1/2=I−α2B−1/2H∗B−1/2B^{-1/2}(B-\frac{\alpha}{2}{H^{*}})B^{-1/2}=I-\frac{\alpha}{2}B^{-1/2}{H^{*}}B^{-1/2} is positive definite, or in other words that λ1(B−1/2H∗B−1/2)=λ1(B−1H∗)<2\lambda_{1}(B^{-1/2}{H^{*}}B^{-1/2})=\lambda_{1}(B^{-1}{H^{*}})<2. This is true by hypothesis (indeed, we are assuming αλ1(B−1H∗)<1\alpha\lambda_{1}(B^{-1}{H^{*}})<1).

with ϵ1=λ1(C)=αλ1(B−1H∗)\epsilon_{1}=\lambda_{1}(C)=\alpha\lambda_{1}\left(B^{-1}{H^{*}}\right) and ϵ2=λn(C)=αλn(B−1H∗)\epsilon_{2}=\lambda_{n}(C)=\alpha\lambda_{n}\left(B^{-1}{H^{*}}\right).

Proof Note that for any appropriately sized matrix XX we have

Then, using the expression for VkV_{k} from Lemma 9, it follows that

Because the eigenvalues of a product of square matrices are invariant under cyclic permutation of those matrices, we have λ1(C)=λ1(αH∗1/2B−1H∗1/2)=αλ1(B−1H∗)≤1\lambda_{1}(C)=\lambda_{1}(\alpha{H^{*}}^{1/2}B^{-1}{H^{*}}^{1/2})=\alpha\lambda_{1}(B^{-1}{H^{*}})\leq 1 so that I−CI-C is PSD, and it thus follows that λi((I−C)2k)=(1−λn−i+1(C))2k\lambda_{i}((I-C)^{2k})=(1-\lambda_{n-i+1}(C))^{2k}. Then, assuming that XX is also PSD, we can use Lemma 18 to get

Applying this to eqn. 25 we thus have the upper bound

From Lemma 9, V∞V_{\infty} is given by V∞=α2(I−Λ)−1(B−1ΣgB−1)V_{\infty}=\alpha^{2}(I-\Lambda)^{-1}(B^{-1}\Sigma_{g}B^{-1}). Thus, by Proposition 10 we have

Next, we will compute/bound the term tr⁡(H∗(E⁡[θk]−θ∗)(E⁡[θk]−θ∗)⊤)\operatorname{tr}\left({H^{*}}(\operatorname{E}[\theta_{k}]-\theta^{*})(\operatorname{E}[\theta_{k}]-\theta^{*})^{\top}\right).

and applying this recursively, it follows that

Applying Lemma 18 in a similar manner to before, and using the fact that

Combining eqn. 20, eqn. 27, eqn. 28, eqn. B.1, eqn. 31, and eqn. 32 yields the claimed bound.

𝑘𝑎1\alpha_{k}=1/(k+a+1) Case In this subsection we will prove the claims made in Theorems 3 and 5 pertaining to the case where

b=λn(B−1H∗)>1/2b=\lambda_{n}\left(B^{-1}{H^{*}}\right)>1/2, and

λ1(B−1H∗)≤a+1\lambda_{1}\left(B^{-1}{H^{*}}\right)\leq a+1.

The operator Ξ−I\Xi-I has all positive eigenvalues and is thus invertible. Moreover, if XX is a PSD matrix then (Ξ−I)−1(X)\left(\Xi-I\right)^{-1}(X) is as well.

Proof We note that the operator Ω(X)=B−1H∗XH∗B−1\Omega(X)=B^{-1}H^{*}XH^{*}B^{-1} is represented by the matrix B−1H∗⊗B−1H∗B^{-1}H^{*}\otimes B^{-1}H^{*}. Because Kronecker products respect eigenvalue decompositions, the eigenvalues of this matrix are given by {λi(B−1H∗)λj(B−1H∗) ∣ 0≤i,j≤n}\{\lambda_{i}(B^{-1}H^{*})\lambda_{j}(B^{-1}H^{*})\>|\>0\leq i,j\leq n\}, and are thus all positive. (Because both H∗H^{*} and BB are positive definite, the eigenvalues of B−1H∗B^{-1}H^{*} are all positive.) Thus, Ω−1\Omega^{-1} exists and has all positive eigenvalues. And observing that (Ω−1)(X)=H∗−1BXBH∗−1(\Omega^{-1})(X)={H^{*}}^{-1}BXB{H^{*}}^{-1}, we see that Ω−1\Omega^{-1} preserves PSD matrices.

Define the operator Φ(X)=Ω−1((Ξ−I)(X))\Phi(X)=\Omega^{-1}\left((\Xi-I)(X)\right). Because Ω−1\Omega^{-1} has all positive eigenvalues and commutes with Ξ\Xi, Φ\Phi will have all positive eigenvalues if and only if Ξ−I\Xi-I does. Moreover, because Ω−1\Omega^{-1} is a bijection from the set of PSD matrices to itself, Φ−1\Phi^{-1} will map PSD matrices to PSD matrices if and only if (Ξ−I)−1(\Xi-I)^{-1} does.

With these facts in hand it suffices to prove our various claims about the operator Φ\Phi.

where we have defined D=I−H∗−1BD=I-{H^{*}}^{-1}B.

The eigenvalues of H∗−1B{H^{*}}^{-1}B are the same as those of B1/2H∗−1B1/2B^{1/2}{H^{*}}^{-1}B^{1/2} (since the matrices differ by a similarity transform), and are thus real-valued and positive. Moreover, they are the inverse of those of B−1H∗B^{-1}H^{*}. So the minimum eigenvalue of DD is λn(D)=1−λ1(H∗−1B)=1−1/λn(B−1H∗)≥1−1/0.5=−1\lambda_{n}(D)=1-\lambda_{1}({H^{*}}^{-1}B)=1-1/\lambda_{n}(B^{-1}{H^{*}})\geq 1-1/0.5=-1. And the maximum eigenvalue of DD is just λn(D)=1−λn(H∗−1B)≤1\lambda_{n}(D)=1-\lambda_{n}({H^{*}}^{-1}B)\leq 1.

Lemma 21 is therefore applicable to Φ\Phi and the claim follows.

where EkE_{k} is a matrix-valued “error” defined by the recursion

with Z=(Ξ−I)−1Ψ1(U)Z=\left(\Xi-I\right)^{-1}\Psi_{1}(U).

Proof We will proceed by induction on kk.

Observe that V0=Var⁡(θ0)=0V_{0}=\operatorname{Var}(\theta_{0})=0, and that this agrees with our claimed expression for VkV_{k} when evaluated at k=0k=0:

For the inductive case, suppose that Vk=1k+a(Ξ−I)−1(U)+EkV_{k}=\frac{1}{k+a}\left(\Xi-I\right)^{-1}(U)+E_{k} for some kk.

By definition, we have Ψ1=I−Ξ+Ω\Psi_{1}=I-\Xi+\Omega, which implies

and so Z=((Ξ−I)−1Ω−I)(U)Z=\left(\left(\Xi-I\right)^{-1}\Omega-I\right)(U).

Using the above expressions and the fact that the various linear operators commute we have

our previous expression for Vk+1V_{k+1} simplifies to

For any appropriately sized matrix XX we have

Let Y=(Ξ−I)−1(X)Y=\left(\Xi-I\right)^{-1}(X), so that (Ξ−I)(Y)=X\left(\Xi-I\right)(Y)=X. Written as a matrix equation this is

which is of the form A⊤P+PA+Q=0A^{\top}P+PA+Q=0 with

In order to compute tr⁡(H∗Y)\operatorname{tr}({H^{*}}Y) we can thus apply Lemma 17. However, we must first verify that our PP is invertible. To this end we will show that B−1−12H∗−1B^{-1}-\frac{1}{2}{H^{*}}^{-1} is positive definite. This is equivalent to the condition that H∗1/2(B−1−12H∗−1)H∗1/2=H∗1/2B−1H∗1/2−12I{H^{*}}^{1/2}(B^{-1}-\frac{1}{2}{H^{*}}^{-1}){H^{*}}^{1/2}={H^{*}}^{1/2}B^{-1}{H^{*}}^{1/2}-\frac{1}{2}I is positive definite, or in other words that λn(H∗1/2B−1H∗1/2)=λn(B−1H∗)>1/2\lambda_{n}({H^{*}}^{1/2}B^{-1}{H^{*}}^{1/2})=\lambda_{n}(B^{-1}{H^{*}})>1/2, which is true by hypothesis.

For EkE_{k} as defined in Lemma 13 we have the following upper and lower bounds:

Recall that E0=−1a(Ξ−I)−1(U)E_{0}=-\frac{1}{a}\left(\Xi-I\right)^{-1}(U) and Z=(Ξ−I)−1Ψ1(U)Z=\left(\Xi-I\right)^{-1}\Psi_{1}(U).

Observing that Ψ1\Psi_{1} preserves PSD matrices, that UU is PSD, and that if a linear operator preserves PSD matrices it also preserves negative semi-definite (NSD) matrices (which follows directly from linearity), we can then apply Corollary 12 to get that E0E_{0} is NSD and ZZ is PSD.

Because Λk\Lambda_{k} preserves PSD (and NSD) matrices like Ψ1\Psi_{1} does, and PSDness is preserved under non-negative linear combinations, it’s straightforward to show that Dk⪯Ek⪯FkD_{k}\preceq E_{k}\preceq F_{k} and Fk⪰0⪰DkF_{k}\succeq 0\succeq D_{k} for all kk (where X⪯YX\preceq Y means that Y−XY-X is PSD). It thus follows that tr⁡(H∗Dk)≤tr⁡(H∗Ek)≤tr⁡(H∗Fk)\operatorname{tr}(H^{*}D_{k})\leq\operatorname{tr}(H^{*}E_{k})\leq\operatorname{tr}(H^{*}F_{k}).

Note that for any appropriately sized matrix XX we have

Because the eigenvalues of a product of square matrices are invariant under cyclic permutation of those matrices, we have λ1(Ck)=λ1(αkH∗1/2B−1H∗1/2)=αkλ1(B−1H∗)≤1a+1λ1(B−1H∗)≤1\lambda_{1}(C_{k})=\lambda_{1}(\alpha_{k}{H^{*}}^{1/2}B^{-1}{H^{*}}^{1/2})=\alpha_{k}\lambda_{1}(B^{-1}{H^{*}})\leq\frac{1}{a+1}\lambda_{1}(B^{-1}{H^{*}})\leq 1 so that I−CkI-C_{k} is PSD, and it thus follows that λi((I−Ck)2)=(1−λn−i+1(Ck))2\lambda_{i}((I-C_{k})^{2})=(1-\lambda_{n-i+1}(C_{k}))^{2}. Then assuming XX is also PSD we can use Lemma 18 to get

where we have defined b=λn(B−1H∗)b=\lambda_{n}(B^{-1}H^{*}).

Iterating this inequality and using the fact that F0=0F_{0}=0 we thus have

Then applying Proposition 23 we can further upper bound this by

Recalling the definition Z=(Ξ−I)−1Ψ1(U)Z=\left(\Xi-I\right)^{-1}\Psi_{1}(U) and applying Proposition 14, we have

It remains to establish the claimed lower bound.

For NSD matrices XX, Corollary 19 tells us that

Iterating this inequality and using the fact that D0=E0D_{0}=E_{0} we thus have

Then applying Proposition 23 we can further lower bound this by

By the definition of E0E_{0} and Proposition 14 we have

By the expression for VkV_{k} from Lemma 13 we have that

Applying Proposition 14 we have that the first term above is given by

And by Lemma 15, the second term is lower and upper bounded as follows:

It remains to compute/bound the term tr⁡(H∗(E⁡[θk]−θ∗)(E⁡[θk]−θ∗)⊤)\operatorname{tr}\left({H^{*}}(\operatorname{E}[\theta_{k}]-\theta^{*})(\operatorname{E}[\theta_{k}]-\theta^{*})^{\top}\right). From eqn. 23 we have

where ψk\psi_{k} is a polynomial defined by

In the domain 0≤x≤a+10\leq x\leq a+1 we have that ψk(x)\psi_{k}(x) is a decreasing function of xx. Moreover, for xx’s in this domain Proposition 23 says that

So because the eigenvalues of ψk(X)\psi_{k}(X) for any matrix XX are given by {ψk(λi(X))}i\{\psi_{k}(\lambda_{i}(X))\}_{i}, and λ1(B−1H∗)≤a+1\lambda_{1}(B^{-1}{H^{*}})\leq a+1 by hypothesis, it thus follows that

Combining eqn. 33, eqn. 34, eqn. 35, eqn. B.2 and the above bound the claimed result follows.

B.3 Proof of Theorem 6

Suppose that θk\theta_{k} is generated by the stochastic iteration in eqn. 19 with constant step-size αk=α\alpha_{k}=\alpha while optimizing a quadratic objective h(θ)=12(θ−θ∗)⊤H∗(θ−θ∗)h(\theta)=\frac{1}{2}(\theta-\theta^{*})^{\top}{H^{*}}(\theta-\theta^{*}). Further more, suppose that αλ1(B−1H∗)<1\alpha\lambda_{1}(B^{-1}{H^{*}})<1, and define θˉk=1k+1∑i=0kθi\bar{\theta}_{k}=\frac{1}{k+1}\sum_{i=0}^{k}\theta_{i}. Then we have the following bound:

To begin, we observe that, analogously to eqn. 20,

Our first major task is to find an expression for Vˉk\bar{V}_{k} in order to bound the term 12tr⁡(H∗Vˉk)\frac{1}{2}\operatorname{tr}\left({H^{*}}\bar{V}_{k}\right). To this end we observe that

Here we have used the fact that gj−1(θj−1)g_{j-1}(\theta_{j-1}) is conditionally independent of θi\theta_{i} given θj−1\theta_{j-1} for j−1≥ij-1\geq i (which allows us to take the conditional expectation over gj−1(θj−1)g_{j-1}(\theta_{j-1}) inside), and is an unbiased estimator of ∇h(θj−1)\nabla h(\theta_{j-1}).

Then, noting that E⁡[gj−1(θj−1)]=E⁡[∇h(θj−1)]=E⁡[H∗(θj−1−θ∗)]=H∗(E⁡[θj−1]−θ∗)\operatorname{E}[g_{j-1}(\theta_{j-1})]=\operatorname{E}[\nabla h(\theta_{j-1})]=\operatorname{E}[{H^{*}}(\theta_{j-1}-\theta^{*})]={H^{*}}(\operatorname{E}[\theta_{j-1}]-\theta^{*}), we have

Applying this recursively we have that for j≥ij\geq i

Taking transposes and switching the roles of ii and jj we similarly have for i≥ji\geq j that

Thus, we have the following expression for the variance Vˉk\bar{V}_{k} of the averaged parameter θˉk\bar{\theta}_{k}:

which by reordering the sums and re-indexing can be written as

Having computed Vˉk\bar{V}_{k} we now deal with the term 12tr⁡(H∗Vˉk)\frac{1}{2}\operatorname{tr}\left({H^{*}}\bar{V}_{k}\right). Observing that

where C=αH∗1/2B−1H∗1/2C=\alpha{H^{*}}^{1/2}B^{-1}{H^{*}}^{1/2}, we have

Because CC and I−CI-C are PSD (which follows from the hypothesis λ1(C)=αλ1(B−1H∗)<1\lambda_{1}(C)=\alpha\lambda_{1}(B^{-1}{H^{*}})<1), we have the following basic matrix inequalities:

where X⪯YX\preceq Y means that Y−XY-X is PSD.

As the right and left side of all the previously stated matrix inequalities are commuting matrices (because they are all linear combinations of powers of CC, and thus share their eigenvectors with CC), we can apply Lemma 20 to eqn. 40 to obtain various simplifying upper bounds on 12tr⁡(H∗Vˉk)\frac{1}{2}\operatorname{tr}\left({H^{*}}\bar{V}_{k}\right).

Applying Lemma 20 using eqn. 41 and then eqn. 43 gives the upper bound

where we have used H∗1/2C−1H∗1/2=H∗1/2(αH∗1/2B−1H∗1/2)−1H∗1/2=1αB{H^{*}}^{1/2}C^{-1}{H^{*}}^{1/2}={H^{*}}^{1/2}\left(\alpha{H^{*}}^{1/2}B^{-1}{H^{*}}^{1/2}\right)^{-1}{H^{*}}^{1/2}=\frac{1}{\alpha}B.

Or we can apply the lemma using eqn. 42 and then eqn. 43, which gives a different upper bound of

where we have used eqn. B.1 on the last line.

To compute tr⁡((1αB−12H∗)V∞)\operatorname{tr}\left(\left(\frac{1}{\alpha}B-\frac{1}{2}{H^{*}}\right)V_{\infty}\right), we begin by recalling the definition V∞=α2(I−Λ)−1(U)V_{\infty}=\alpha^{2}\left(I-\Lambda\right)^{-1}(U). Applying the operator (I−Λ)\left(I-\Lambda\right) to both sides gives (I−Λ)(V∞)=α2(U)\left(I-\Lambda\right)(V_{\infty})=\alpha^{2}(U), which corresponds to the matrix equation

Left and right multiplying both sides by 1αB\frac{1}{\alpha}B gives

This is of the form A⊤P+PA+Q=0A^{\top}P+PA+Q=0 where

It remains to bound the term 12tr⁡(H∗(E⁡[θˉk]−θ∗)(E⁡[θˉk]−θ∗)⊤)\frac{1}{2}\operatorname{tr}\left({H^{*}}(\operatorname{E}[\bar{\theta}_{k}]-\theta^{*})(\operatorname{E}[\bar{\theta}_{k}]-\theta^{*})^{\top}\right).

Similarly to eqn. 41–43 we have the following matrix inequalities

Applying Lemma 20 using eqn. 47 twice we obtain an upper bound on the RHS of eqn. 46 of

Applying the lemma using eqn. 47 and eqn. 48 gives a different upper bound of

And finally, applying the lemma using eqn. 48 twice gives an upper bound of

Combining these various upper bounds gives us

The result now follows from eqn. 38, eqn. 44, eqn. 45, and eqn. B.3.

C Derivations of Bounds for Section 14.2.1

where κ(H∗)=λ1(H∗)/λn(H∗)\kappa(H^{*})=\lambda_{1}(H^{*})/\lambda_{n}(H^{*}) is the condition number of H∗H^{*}. Similarly, by Lemma 18 we have

D Some Self-contained Technical Results

Suppose A⊤P+PA+Q=0A^{\top}P+PA+Q=0 is a matrix equation where PP is invertible. Then we have

Proof Pre-multiplying both sides of A⊤P+PA+Q=0A^{\top}P+PA+Q=0 by P−1P^{-1} and taking the trace yields tr⁡(P−1A⊤P)+tr⁡(A)+tr⁡(P−1Q)=0\operatorname{tr}(P^{-1}A^{\top}P)+\operatorname{tr}(A)+\operatorname{tr}(P^{-1}Q)=0. Then noting that tr⁡(P−1A⊤P)=tr⁡(PP−1A⊤)=tr⁡(A⊤)=tr⁡(A)\operatorname{tr}(P^{-1}A^{\top}P)=\operatorname{tr}(PP^{-1}A^{\top})=\operatorname{tr}(A^{\top})=\operatorname{tr}(A) this becomes 2tr⁡(A)+tr⁡(P−1Q)=02\operatorname{tr}(A)+\operatorname{tr}(P^{-1}Q)=0, from which the claim follows.

Suppose XX and SS are n×nn\times n matrices such that SS is symmetric and XX is PSD. Then we have

Suppose XX and SS are n×nn\times n matrices such that SS is symmetric and XX is negative semi-definite (NSD). Then we have

Proof Because XX is NSD, −X-X is PSD. We can therefore apply Lemma 18 to get that

If AA, SS, TT, and XX are matrices such that AA, SS and TT commute with each other, S⪯TS\preceq T (i.e. T−ST-S is PSD), and AA and XX are PSD, then we have

Proof Since AA, SS and TT are commuting PSD matrices they have the same eigenvectors, as does A1/2A^{1/2} (which thus also commutes).

Meanwhile, S⪯TS\preceq T means that T−ST-S is PSD, and thus so is A1/2(T−S)A1/2A^{1/2}(T-S)A^{1/2}. Because the trace of the product of two PSD matrices is non-negative (e.g. by Lemma 18), it follows that tr⁡((A1/2(T−S)A1/2)X)≥0\operatorname{tr}((A^{1/2}(T-S)A^{1/2})X)\geq 0. Adding tr⁡(A1/2SA1/2X)\operatorname{tr}(A^{1/2}SA^{1/2}X) to both sides of this we get tr⁡(A1/2TA1/2X)≥tr⁡(A1/2SA1/2X)\operatorname{tr}(A^{1/2}TA^{1/2}X)\geq\operatorname{tr}(A^{1/2}SA^{1/2}X). Because A1/2A^{1/2} commutes with TT and SS we have tr⁡(A1/2TA1/2X)=tr⁡(ATX)\operatorname{tr}(A^{1/2}TA^{1/2}X)=\operatorname{tr}(ATX) and tr⁡(A1/2SA1/2X)=tr⁡(ASX)\operatorname{tr}(A^{1/2}SA^{1/2}X)=\operatorname{tr}(ASX), and so the result follows.

Suppose DD is a matrix with real eigenvalues bounded strictly between −1-1 and 11. Define the operator Φ(X)=X−DXD⊤\Phi(X)=X-DXD^{\top}. Then Φ\Phi has positive eigenvalues and is thus invertible. Moreover, we have

And so if XX is a PSD matrix then Φ−1(X)\Phi^{-1}(X) is as well.

Proof The linear operator Φ\Phi can be expressed as a matrix using Kronecker product notation as I−D⊗DI-D\otimes D. See Van Loan (2000) for a discussion of Kronecker products and their properties.

Because Kronecker products respect eigenvalue decompositions, the eigenvalues of D⊗DD\otimes D are given by {λi(D)λj(D) ∣ 0≤i,j≤n}\{\lambda_{i}(D)\lambda_{j}(D)\>|\>0\leq i,j\leq n\}. By hypothesis, the eigenvalues of DD are real and bounded strictly between −1-1 and 11, and it therefore follows that the eigenvalues of D⊗DD\otimes D have the same property. From this it immediately follows that the eigenvalues of I−D⊗DI-D\otimes D are all >0>0, and thus I−D⊗DI-D\otimes D is invertible.

Moreover, because of these bounds on the eigenvalues for D⊗DD\otimes D, we have

Translating back to operator notation this is

For any PSD matrix XX this is a sum (technically a convergent series) of self-evidently PSD matrices, and is therefore PSD itself.

Let HnH_{n} be the nn-th Harmonic number, defined by Hn=∑i=1n1iH_{n}=\sum_{i=1}^{n}\frac{1}{i}. For any integers n1≥n2≥1n_{1}\geq n_{2}\geq 1 we have

Proof An inequality for HnH_{n} due to Young (1991) is

where γ\gamma is the Euler-Mascheroni constant.

Taking the difference of the two inequalities yields

Noting that min⁡{n2+1,n1}=n1\min\{n_{2}+1,n_{1}\}=n_{1} if and only if n1=n2n_{1}=n_{2}, and that in such a case we have Hn1−Hn2=0H_{n_{1}}-H_{n_{2}}=0, the result follows.

Suppose 0≤i≤k−10\leq i\leq k-1 for integers ii and kk, and bb is a non-negative real number.

For any non-negative integer ii such that b≤i+a+1b\leq i+a+1 we have

Proof It is a well-known fact that for 0≤y≤10\leq y\leq 1

For all j≥ij\geq i we have 0≤bj+a+1≤10\leq\frac{b}{j+a+1}\leq 1 (since 0≤b≤i+a+1≤j+a+10\leq b\leq i+a+1\leq j+a+1), and so

From this inequality and Proposition 22 it follows that

Squaring both sides of the penultimate version of the above inequality it follows that

where ν(a)=(a+2)3/(a(a+1)2)\nu(a)=(a+2)^{3}/(a(a+1)^{2}), which is the second claimed inequality.

E Proof of Corollary 2

Suppose that BθB_{\theta} and BγB_{\gamma} are invertible matrices satisfying

for all values of θ\theta. Then the path followed by an iterative optimizer working in θ\theta-space and using additive updates of the form dθ=−αBθ−1∇hd_{\theta}=-\alpha B_{\theta}^{-1}\nabla h is the same as the path followed by an iterative optimizer working in γ\gamma-space and using additive updates of the form dγ=−αBγ−1∇γhd_{\gamma}=-\alpha B_{\gamma}^{-1}\nabla_{\gamma}h, provided that the optimizers use equivalent starting points (i.e. θ0=ζ(γ0)\theta_{0}=\zeta(\gamma_{0})), and that either

or dθ/αd_{\theta}/\alpha is uniformly continuous as a function of θ\theta, dγ/αd_{\gamma}/\alpha is uniformly bounded (in norm), there is a CC as in the statement of Theorem 1, and α→0\alpha\to 0.

Note that in the second case we allow the number of steps in the sequences to grow proportionally to 1/α1/\alpha so that the continuous paths they converge to have non-zero length as α→0\alpha\to 0.

Proof In the case where ζ\zeta is affine the result follows immediately from Theorem 1, and so it suffices to prove the second case.

We will denote by θ0,θ1,...\theta_{0},\theta_{1},..., and γ0,γ1,...\gamma_{0},\gamma_{1},... the sequences of iterates produced by each optimizer. Meanwhile, dθ0,dθ1,...d_{\theta_{0}},d_{\theta_{1}},... and dγ0,dγ1,...d_{\gamma_{0}},d_{\gamma_{1}},... will denote the sequences of their updates.

By Theorem 1, we can upper bound the first term on the RHS by 12Cn∥dγk∥2\frac{1}{2}C\sqrt{n}\|d_{\gamma_{k}}\|^{2}. Using the hypothesis ∥dγ/α∥≤D\|d_{\gamma}/\alpha\|\leq D for all γ\gamma for some universal constant DD, this is further bounded by 12α2CD2n≡α2E\frac{1}{2}\alpha^{2}CD^{2}\sqrt{n}\equiv\alpha^{2}E, where EE is a universal constant. And by the hypothesized uniform continuity of dθ/αd_{\theta}/\alpha (as a function of θ\theta) there exists a universal constant UU such that ∥dζ(γk)/α−dθk/α∥≤U∥ζ(γk)−θk∥\|d_{\zeta(\gamma_{k})}/\alpha-d_{\theta_{k}}/\alpha\|\leq U\|\zeta(\gamma_{k})-\theta_{k}\|, which gives a bound of αU∥ζ(γk)−θk∥\alpha U\|\zeta(\gamma_{k})-\theta_{k}\| on the third term.

Starting from ∥ζ(γ0)−θ0∥=0\|\zeta(\gamma_{0})-\theta_{0}\|=0 (which is true by hypothesis) and applying this formula recursively, we end up with the geometric series formula

Because each step scales as α\alpha, sequences of length T/αT/\alpha will converge to continuous paths of a finite non-zero length (that depends on TT) as α→0\alpha\to 0. Noting that lim⁡α→0(1+αU)T/α=exp⁡(UT)\lim_{\alpha\to 0}(1+\alpha U)^{T/\alpha}=\exp(UT) (which is a standard result), it follows that the RHS of eqn. 50 converges to zero as α→0\alpha\to 0 for k=T/αk=T/\alpha, and indeed for all natural numbers k≤T/αk\leq T/\alpha. Thus we have for all k≤T/αk\leq T/\alpha

References