arXiv(opens in a new tab)cs.NEDec 2013Cited by 29 papers on PaperVantageClassic Paper

Manuscript Offprint

arXiv:1312.6120

Exact solutions to the nonlinear dynamics of learning in deep linear neural networks

Andrew M. Saxe, James L. McClelland, Surya Ganguli

Abstract

Despite the widespread practical success of deep learning methods, our theoretical understanding of the dynamics of learning in deep neural networks remains quite sparse. We attempt to bridge the gap between the theory and practice of deep learning by systematically analyzing learning dynamics for the restricted case of deep linear neural networks. Despite the linearity of their input-output map, such networks have nonlinear gradient descent dynamics on weights that change with the addition of each new hidden layer. We show that deep linear networks exhibit nonlinear learning phenomena similar to those seen in simulations of nonlinear networks, including long plateaus followed by rapid transitions to lower error solutions, and faster convergence from greedy unsupervised pretraining initial conditions than from random initial conditions. We provide an analytical description of these phenomena by finding new exact solutions to the nonlinear dynamics of deep learning. Our theoretical analysis also reveals the surprising finding that as the depth of a network approaches infinity, learning speed can nevertheless remain finite: for a special class of initial conditions on the weights, very deep networks incur only a finite, depth independent, delay in learning speed relative to shallow networks. We show that, under certain conditions on the training data, unsupervised pretraining can find this special class of initial conditions, while scaled random Gaussian initializations cannot. We further exhibit a new class of random orthogonal initial conditions on weights that, like unsupervised pre-training, enjoys depth independent learning times. We further show that these initial conditions also lead to faithful propagation of gradients even in deep nonlinear networks, as long as they operate in a special regime known as the edge of chaos.

Deep learning methods have realized impressive performance in a range of applications, from visual object classification [1, 2, 3] to speech recognition [4] and natural language processing [5, 6]. These successes have been achieved despite the noted difficulty of training such deep architectures [7, 8, 9, 10, 11]. Indeed, many explanations for the difficulty of deep learning have been advanced in the literature, including the presence of many local minima, low curvature regions due to saturating nonlinearities, and exponential growth or decay of back-propagated gradients [12, 13, 14, 15]. Furthermore, many neural network simulations have observed strikingly nonlinear learning dynamics, including long plateaus of little apparent improvement followed by almost stage-like transitions to better performance. However, a quantitative, analytical understanding of the rich dynamics of deep learning remains elusive. For example, what determines the time scales over which deep learning unfolds? How does training speed retard with depth? Under what conditions will greedy unsupervised pretraining speed up learning? And how do the final learned internal representations depend on the statistical regularities inherent in the training data?

Here we provide an exact analytical theory of learning in deep linear neural networks that quantitatively answers these questions for this restricted setting. Because of its linearity, the input-output map of a deep linear network can always be rewritten as a shallow network. In this sense, a linear network does not gain expressive power from depth, and hence will underfit and perform poorly on complex real world problems. But while it lacks this important aspect of practical deep learning systems, a deep linear network can nonetheless exhibit highly nonlinear learning dynamics, and these dynamics change with increasing depth. Indeed, the training error, as a function of the network weights, is non-convex, and gradient descent dynamics on this non-convex error surface exhibits a subtle interplay between different weights across multiple layers of the network. Hence deep linear networks provide an important starting point for understanding deep learning dynamics.

To answer these questions, we derive and analyze a set of nonlinear coupled differential equations describing learning dynamics on weight space as a function of the statistical structure of the inputs and outputs. We find exact time-dependent solutions to these nonlinear equations, as well as find conserved quantities in the weight dynamics arising from symmetries in the error function. These solutions provide intuition into how a deep network successively builds up information about the statistical structure of the training data and embeds this information into its weights and internal representations. Moreover, we compare our analytical solutions of learning dynamics in deep linear networks to numerical simulations of learning dynamics in deep non-linear networks, and find that our analytical solutions provide a reasonable approximation. Our solutions also reflect nonlinear phenomena seen in simulations, including alternating plateaus and sharp periods of rapid improvement. Indeed, it has been shown previously [16] that this nonlinear learning dynamics in deep linear networks is sufficient to qualitatively capture aspects of the progressive, hierarchical differentiation of conceptual structure seen in infant development. Next, we apply these solutions to investigate the commonly used greedy layer-wise pretraining strategy for training deep networks [17, 18], and recover conditions under which such pretraining speeds learning. We show that these conditions are approximately satisfied for the MNIST dataset, and that unsupervised pretraining therefore confers an optimization advantage for deep linear networks applied to MNIST. Finally, we exhibit a new class of random orthogonal initial conditions on weights that, in linear networks, provide depth independent learning times, and we show that these initial conditions also lead to faithful propagation of gradients even in deep nonlinear networks. We further show that these initial conditions also lead to faithful propagation of gradients even in deep nonlinear networks, as long as they operate in a special regime known as the edge of chaos. In this regime, synaptic gains are tuned so that linear amplification due to propagation of neural activity through weight matrices exactly balances dampening of activity due to saturating nonlinearities. In particular, we show that even in nonlinear networks, operating in this special regime, Jacobians that are involved in backpropagating error signals act like near isometries.

1 General learning dynamics of gradient descent

Figure

Figure 1: The three layer network analyzed in this section.

We begin by analyzing learning in a three layer network (input, hidden, and output) with linear activation functions (Fig 1). We let NiN_{i} be the number of neurons in layer ii. The input-output map of the network is y=W32W21xy={W^{32}}{W^{21}}x. We wish to train the network to learn a particular input-output map from a set of PP training examples {xμ,yμ},μ=1,…,P\left\{x^{\mu},y^{\mu}\right\},\mu=1,\ldots,P. Training is accomplished via gradient descent on the squared error ∑μ=1P∥yμ−W32W21xμ∥2\sum_{\mu=1}^{P}\left\|y^{\mu}-{W^{32}}{W^{21}}x^{\mu}\right\|^{2} between the desired feature output, and the network’s feature output. This gradient descent procedure yields the batch learning rule

ΔW21=λ∑μ=1PW32T(yμxμT−W32W21xμxμT),ΔW32=λ∑μ=1P(yμxμT−W32W21xμxμT)W21T,\Delta{W^{21}}=\lambda\sum_{\mu=1}^{P}{W^{32}}^{T}\left(y^{\mu}x^{\mu T}-{W^{32}}{W^{21}}x^{\mu}x^{\mu T}\right),\qquad\Delta{W^{32}}=\lambda\sum_{\mu=1}^{P}\left(y^{\mu}x^{\mu T}-{W^{32}}{W^{21}}x^{\mu}x^{\mu T}\right){W^{21}}^{T},

where λ\lambda is a small learning rate. As long as λ\lambda is sufficiently small, we can take a continuous time limit to obtain the dynamics,

τddtW21=W32T(Σ31−W32W21Σ11),τddtW32=(Σ31−W32W21Σ11)W21T,\tau\frac{d}{dt}{W^{21}}={W^{32}}^{T}\left({\Sigma^{31}}-{W^{32}}{W^{21}}\Sigma^{11}\right),\qquad\tau\frac{d}{dt}{W^{32}}=\left({\Sigma^{31}}-{W^{32}}{W^{21}}\Sigma^{11}\right){W^{21}}^{T},

where Σ11≡∑μ=1PxμxμT\Sigma^{11}\equiv\sum_{\mu=1}^{P}x^{\mu}x^{\mu T} is an N1×N1N_{1}\times N_{1} input correlation matrix, Σ31≡∑μ=1PyμxμT{\Sigma^{31}}\equiv\sum_{\mu=1}^{P}y^{\mu}x^{\mu T} is an N3×N1N_{3}\times N_{1} input-output correlation matrix, and τ≡1λ.\tau\equiv\frac{1}{\lambda}. Here tt measures time in units of iterations; as tt varies from 0 to 1, the network has seen PP examples corresponding to one iteration. Despite the linearity of the network’s input-output map, the gradient descent learning dynamics given in Eqn (2) constitutes a complex set of coupled nonlinear differential equations with up to cubic interactions in the weights.

References (21)

  • ImageNet Classification with Deep Convolutional Neural Networks
  • Building high-level features using large scale unsupervised learning
  • Multi-column Deep Neural Networks for Image Classification
  • Acoustic Modeling Using Deep Belief Networks
  • A Unified Architecture for Natural Language Processing: Deep Neural Networks with Multitask Learning
  • Parsing with Compositional Vector Grammars
  • Learning Long-Term Dependencies with Gradient Descent is Difficult
  • Efficient BackProp
  • Scaling learning algorithms towards AI. In L. Bottou, O. Chapelle, D. DeCoste, and J. Weston, editors, Large-Scale Kernel Machines, number 1, pages 1–41
  • The Difficulty of Training Deep Architectures and the Effect of Unsupervised Pre-Training
  • Understanding the difficulty of training deep feedforward neural networks
  • Why does unsupervised pre-training help deep learning? Journal of Machine Learning Research, 11:625–660, 2010
  • Big Neural Networks Waste Capacity
  • Learning hierarchical category structure in deep neural networks
  • Reducing the dimensionality of data with neural networks
  • Greedy Layer-Wise Training of Deep Networks
  • Neural networks and principal component analysis: Learning from examples without local minima
  • Improved Preconditioner for Hessian Free Optimization
  • On the importance of initialization and momentum in deep learning
  • On the difficulty of training recurrent neural networks
  • Important gains from supervised fine-tuning of deep architectures on large labeled sets

Cited by (29)