How Data Augmentation affects Optimization for Linear Regression

1 Introduction . Data augmentation , a popular set of techniques in which data is augmented ( i.e . modified ) at every optimization step , has become increasingly crucial to training models using gradient-based optimization . However , in modern overparametrized settings where there are many different minimizers of the training loss , the specific minimizer selected by training and the quality of the resulting model can be highly sensitive to choices of augmentation hyperparameters . As a result , practitioners use methods ranging from simple grid search to Bayesian optimization and reinforcement learning [ 8 , 9 , 17 ] to select and schedule augmentations by changing hyperparameters over the course of optimization . Such approaches , while effective , often require extensive compute and lack theoretical grounding . These empirical practices stand in contrast to theoretical results from the implicit bias and stochastic optimization literature . The extensive recent literature on implicit bias [ 15 , 29 , 32 ] gives provable guarantees on which minimizer of the training loss is selected by GD and SGD in simple settings , but considers cases without complex scheduling . On the other hand , classical theorems in stochastic optimization , building on the Monro-Robbins theorem in [ 25 ] , give provably optimal learning rate schedules for strongly convex objectives . However , neither line of work addresses the myriad augmentation and hyperparameter choices crucial to gradient-based training effective in practice . The present work takes a step towards bridging this gap . We consider two main questions for a learning rate schedule and data augmentation policy : ∗Equal contribution 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . 1 . When and at what rate will optimization converge ? 2 . Assuming optimization converges , what point does it converge to ? To isolate the effect on optimization of jointly scheduling learning rate and data augmentation schemes , we consider these questions in the simple convex model of linear regression with MSE loss : L ( W ; D ) = 1 N ‖Y −WX‖2F . ( 1.1 ) In this setting , we analyze the effect of the data augmentation policy on the optimization trajectory Wt of augmented ( stochastic ) gradient descent2 , which follows the update equation Wt+1 = Wt − ηt∇WL ( W ; Dt ) ∣∣ W=Wt . ( 1.2 ) Here , the dataset D = ( X , Y ) contains N datapoints arranged into data matrices X ∈ Rn×N and Y ∈ Rp×N whose columns consist of inputs xi ∈ Rn and outputs yi ∈ Rp . In this context , we take a flexible definition data augmentation scheme as any procedure that consists , at every step of optimization , of replacing the dataset D by a randomly augmented variant which we denote by Dt = ( Xt , Yt ) . This framework is flexible enough to handle SGD and commonly used augmentations such as additive noise [ 14 ] , CutOut [ 12 ] , SpecAugment [ 23 ] , Mixup [ 35 ] , and label-preserving transformations ( e.g . color jitter , geometric transformations [ 26 ] ) ) . We give a general answer to Questions 1 and 2 for arbitrary data augmentation schemes . Our main result ( Theorem 3.1 ) gives sufficient conditions for optimization to converge in terms of the learning rate schedule and simple 2nd and 4th order moment statistics of augmented data matrices . When convergence occurs , we explicitly characterize the resulting optimum in terms of these statistics . We then specialize our results to ( S ) GD with modern augmentations such as additive noise [ 14 ] and random projections ( e.g . CutOut [ 12 ] and SpecAugment [ 23 ] ) . In these cases , we find learning rate and augmentation parameters which ensure convergence with rates to the minimum norm optimum for overparametrized linear regression . To sum up , our main contributions are : 1 . We analyze arbitrary data augmentation schemes for linear regression with MSE loss , obtaining explicit sufficient conditions on the joint schedule of the data augmentation policy and the learning rate for ( stochastic ) gradient descent that guarantee convergence with rates in Theorems 3.1 and 3.2 . The resulting augmentation-dependent optimum encodes the ultimate effect of augmentation on optimization , and we characterize it in Theorem 3.1 . Our results generalize Monro-Robbins theorems [ 25 ] to situations where the stochastic optimization objective may change at each step . 2 . We specialize our results to ( stochastic ) gradient descent with additive input noise ( §4 ) or random projections of the input ( §5 ) , a proxy for the popular CutOut and SpecAugment augmentations [ 12 , 23 ] . In each case , we find that jointly scheduling learning rate and augmentation strength is critical for allowing convergence with rates to the minimum norm optimizer . We find specific schedule choices which guarantee this convergence with rates ( Theorems 4.1 , 4.2 , and 5.1 ) and validate our results empirically ( Figure 4.1 ) . This suggests explicitly adding learning rate schedules to the search space for learned augmentations as in [ 8 , 9 ] , which we leave to future work . 2 Related Work . In addition to the extensive empirical work on data augmentation cited elsewhere in this article , we briefly catalog other theoretical work on data augmentation and learning rate schedules . The latter were first considered in the seminal work [ 25 ] . This spawned a vast literature on rates of convergence for GD , SGD , and their variants . We mention only the relatively recent articles [ 1 , 11 , 4 , 27 , 22 ] and the references therein . The last of these , namely [ 22 ] , finds optimal choices of learning rate and batch size for SGD in the overparametrized linear setting . A number of articles have also pointed out in various regimes that data augmentation and more general transformations such as feature dropout correspond in part to ` 2-type regularization on model parameters , features , gradients , and Hessians . The first article of this kind of which we are aware is [ 3 ] , 2Both GD and SGD fall into our framework . To implement SGD , we take Dt to be a subset of D. which treats the case of additive Gaussian noise ( see §4 ) . More recent work in this direction includes [ 5 , 30 , 19 , 21 ] . There are also several articles investigating optimal choices of ` 2-regularization for linear models ( cf e.g . [ 33 , 31 , 2 ] ) . These articles focus directly on the generalization effects of ridge-regularized minima but not on the dynamics of optimization . We also point the reader to [ 20 ] , which considers optimal choices for the weight decay coefficient empirically in neural networks and analytically in simple models . We also refer the reader to a number of recent attempts to characterize the benefits of data augmentation . In [ 24 ] , for example , the authors quantify how much augmented data , produced via additive noise , is needed to learn positive margin classifiers . [ 6 ] , in contrast , focuses on the case of data invariant under the action of a group . Using the group action to generate label-preserving augmentations , the authors prove that the variance of any function depending only on the trained model will decrease . This applies in particular to estimators for the trainable parameters themselves . [ 10 ] shows augmented k-NN classification reduces to a kernel method for augmentations transforming each datapoint to a finite orbit of possibilities . It also gives a second order expansion for the proxy loss of a kernel method under such augmentations and interprets how each term affects generalization . Finally , the article [ 34 ] considers both label preserving and noising augmentations , pointing out the conceptually distinct roles such augmentations play . 3 Time-varying Monro-Robbins for linear models under augmentation . We seek to isolate the impact of data augmentation on optimization in the simple setting of augmented ( stochastic ) gradient descent for linear regression with the MSE loss ( 1.1 ) . Since the augmented dataset Dt at time t is a stochastic function of D , we may view the update rule ( 1.2 ) as a form of stochastic optimization for the proxy loss at time t Lt ( W ) : = EDt [ L ( W ; Dt ) ] ( 3.1 ) which uses an unbiased estimate of the gradient of L ( W ; Dt ) from a single draw of Dt . The connection between data augmentation and this proxy loss was introduced in [ 3 , 5 ] , but we now consider it in the context of stochastic optimization . In particular , we consider scheduling the augmentation , which allows the distribution of Dt to change with t and thus enables optimization to converge to points which are not minimizers of the proxy loss Lt ( W ) at any fixed time . Our main results , Theorems 3.1 and 3.2 , provide sufficient conditions for jointly scheduling learning rates and general augmentation schemes to guarantee convergence of augmented gradient descent in the linear regression model ( 1.1 ) . Before stating them , we first give examples of augmentations falling into our framework , which we analyze using our general results in §4 and §5 . • Additive Gaussian noise : For SGD with batch size Bt and noise level σt > 0 , this corresponds to Xt = ct ( XAt + σt · Gt ) and Yt = ctY At , where Gt is a matrix of i.i.d . standard Gaussians , At ∈ RN×Bt has i.i.d . columns with a single non-zero entry equal to 1 chosen uniformly at random and ct = √ N/Bt is a normalizing factor . The proxy loss is Lt ( W ) = L ( W ; D ) + σ2t ‖W‖2F , ( 3.2 ) which adds an ` 2 penalty . We analyze this case in §4 . • Random projection : This corresponds to Xt = ΠtX and Yt = Y , where Πt is an orthogonal projection onto a random subspace . For γt = tr ( Πt ) /n , the proxy loss is Lt ( W ) = 1 N ‖Y − γtWX‖2F + 1 N γt ( 1− γt ) 1 n ‖X‖2F · ‖W‖2F +O ( n−1 ) , adding a data-dependent ` 2 penalty and applying Stein-type shrinkage on input data . We analyze this in §5 . In addition to these augmentations , the augmentations below also fit into our framework , and Theorems 3.1 and 3.2 apply . However , in these cases , explicitly characterizing the learned minimum beyond the general description given in Theorems 3.1 and 3.2 is more difficult , and we thus leave interpretion of these specializations to future work . ( a ) The time t proxy loss Lt is non-degenerate on V‖ with minimal norm minimizer W ∗t . The increment Wt+1 −Wt is in V‖ , so only the projection WtQ‖ of Wt onto V‖ changes . ( b ) The proxy losses Lt and Lt+1 at consecutive times will generally have different minimal norm minimizers W ∗t , W ∗t+1 . The increment Ξ∗t = W ∗t+1 − W ∗t measures this change . 3.1 A general time-varying Monro-Robbins theorem . Given an augmentation scheme for the overparameterized linear model ( 1.1 ) , the time t gradient update at learning rate ηt is Wt+1 : = Wt + 2ηt N · ( Yt −WtXt ) XTt , ( 3.3 ) where Dt = ( Xt , Yt ) is the augmented dataset at time t. The minimum norm minimizer of the corresponding proxy loss Lt ( see ( 3.1 ) ) is W ∗t : = E [ YtXTt ] E [ XtXTt ] + , ( 3.4 ) where E [ XtXTt ] + denotes the Moore-Penrose pseudo-inverse ( see Figure 3.1a ) . In this section we state a rigorous result , Theorem 3.1 , giving sufficient conditions on the learning rate ηt and distributions of the augmented matrices Xt , Yt under which augmented gradient descent converges . To state it , note that ( 3.3 ) implies that each row of Wt+1 −Wt is contained in the column span of the Hessian XtXTt of the augmented loss and therefore almost surely belongs to the subspace V‖ : = column span of E [ XtXTt ] ⊆ Rn , ( 3.5 ) as illustrated in Figure 3.1a . The reason is that , in the orthogonal complement to V‖ , the augmented loss L ( W ; Dt ) has zero gradient with probability 1 . To ease notation , we assume that V‖ is independent of t. This assumption holds for additive Gaussian noise , random projection , MixUp , SGD , and their combinations . It is not necessary in general , however , and we refer the interested reader to Remark B.2 in the Appendix for how to treat the general case . Let us denote by Q‖ : Rn → Rn the orthogonal projection onto V‖ ( see Figure 3.1a ) . As we already pointed out , at time t , gradient descent leaves the matrix of projections Wt ( Id−Q‖ ) of each row of Wt onto the orthogonal complement of V‖ unchanged . In contrast , ‖WtQ‖ −W ∗t ‖F decreases at a rate governed by the smallest positive eigenvalue λmin , V‖ ( E [ XtX T t ] ) of the Hessian for the proxy loss Lt , which is obtained by restricting its full Hessian E [ XtX T t ] to V‖ . Moreover , whether and at what rate WtQ‖ −W ∗t converges to 0 depends on how quickly the distance Ξ∗t : = W ∗ t+1 −W ∗t ( 3.6 ) between proxy loss optima at successive steps tends to zero ( see Figure 3.1b ) . Theorem 3.1 ( Special case of Theorem B.1 ) . Suppose that V‖ is independent of t , that the learning rate satisfies ηt → 0 , that the proxy optima satisfy ∞∑ t=0 ‖Ξ∗t ‖F < ∞ , ( 3.7 ) ensuring the existence of a limit W ∗∞ : = limt→∞W ∗ t , that ∞∑ t=0 ηtλmin , V‖ ( E [ XtX T t ] ) =∞ ( 3.8 ) and finally that ∞∑ t=0 η2tE [ ‖XtXTt − E [ XtXTt ] ‖2F + ‖YtXTt − E [ YtXTt ] ‖2F ] < ∞ . ( 3.9 ) Then , for any initialization W0 , we have that WtQ‖ converges in probability to W ∗∞ . If the same augmentation is applied with different strength parameters at each step t ( e.g . the noise level σ2t for additive Gaussian noise ) , we may specialize Theorem 3.1 to this augmentation scheme . More precisely , translating conditions ( 3.7 ) , ( 3.8 ) , ( 3.9 ) into conditions on the learning rate and augmentation strength gives conditions on the schedule for ηt and these strength parameters to ensure convergence . In §4 and §5 , we do this for additive Gaussian noise and random projections . When the augmentation scheme is static in t , Theorem 3.1 reduces to a standard Monro-Robbins theorem [ 25 ] for the ( static ) proxy loss Lt ( W ) . As in that setting , condition ( 3.8 ) enforces that the learning trajectory travels far enough to reach an optimum , and the summand in Condition ( 3.9 ) bounds the variance of the gradient of the augmented loss L ( W ; Dt ) to ensure the total variance of the stochastic gradients is summable . Condition ( 3.7 ) is new and enforces that the minimizers W ∗t of the proxy losses Lt ( W ) change slowly enough for augmented optimization procedure to keep pace .

Summary: This paper rigorously studies the sufficient conditions of the convergence of GD/SGD when data augmentation is applied to learn an overparameterized linear model. Some of the sufficient conditions are also necessary. In particular, the sufficient conditions are formulated in terms of the learning rate, 2nd and 4th moment of augmented data matrices.