Can Implicit Bias Explain Generalization? Stochastic Convex Optimization as a Case Study
Assaf Dauber, Meir Feder, Tomer Koren, Roi Livni
Introduction
One of the great mysteries of contemporary machine learning is the impressive success of unregularized and overparameterized learning algorithms. In detail, current machine learning practice is to train models with far more parameters than samples and let the algorithm fit the data, oftentimes without any type of regularization. In fact, these algorithms are so overcapacitated that they can even memorize and fit random data. Yet, when trained on real-life data, these algorithms show remarkable performance in generalizing to unseen samples (Neyshabur et al. 2015; Zhang et al. 2017).
This phenomenon is often attributed to what is described as the implicit-regularization of an algorithm (Neyshabur et al. 2015). Implicit regularization roughly refers to the learner’s preference to implicitly choosing certain structured solutions as if some explicit regularization term appeared in its objective. As a canonical example, in linear optimization one can show that various forms of gradient descent, an apriori unregularized algorithm, behaves identically as regularized risk minimization penalized with the squared Euclidean norm on the parameters (Shalev-Shwartz et al. 2011).
Understanding implicit regularization poses several interesting challenges. For example: how can we find the implicit bias of a given learning algorithm? what is the rate of convergence towards the biased solution? how (and if) does it govern the generalization of an algorithm? and, when and what types of regularizations can account for and explain the generalization in modern-days machine learning?
Towards answering these questions we revisit a fundamental setting that was extensively studied in recent years: Stochastic Convex Optimization (SCO), focusing on the SGD optimization algorithm. In contrast to most previous work, we do not attempt to identify the implicit bias in specific problems. Instead, we study these questions in the general case, and we construct examples which rule out the existence of potential regularizers in general. To some extent, these constructions demonstrate a behavior that might seem counter-intuitive or contradictory to the implicit-bias point of view.
Besides being a well-studied and well-understood model for learning, an important trait of SCO which makes it suitable for our investigation is that learning cannot in general be performed by naive Empirical Risk Minimization (ERM). In detail, the work of Shalev-Shwartz et al. 2009 showed the existence of SCO instances where naive-ERM fails but regularized-ERM succeeds. Thus, we view SCO as a natural test-bed for exploring the role of regularization and its relation to generalization. Compellingly, the generalization of SGD in SCO is well-established, and we are left with the question of how well can we account for generalization through an investigation of its bias.
We begin with a simple construction which demonstrates that SGD does not have any distribution-independent implicit bias. To show that, we construct a case where SGD does not converge to a Pareto-efficient (not even approximately) solution with respect to the empirical loss and a given regularization penalty. In fact, this result is also true for Gradient Descent over smooth functions. In other words, our construction here involves a distribution supported on a single smooth convex function.
Our result is general and rules out any (reasonable) regularizer from being the implicit bias of SGD in this distribution-independent setting. Since the Euclidean-norm distance is the immediate suspect for the implicit regularization of SGD, the first step towards achieving the result is to rule out that Euclidean norm is the implicit bias of SGD. We thus construct an example of a function with a plateau of minimizers where SGD does not converge to the closest point in Euclidean-norm sense. While the result might not seem surprising, it is the technical engine behind the further constructions we provide. Previous to this work, Suggala et al. 2018 showed that gradient descent with an infinitely small step size (that is, gradient flow), might diverge from the closest point, and we provide a complementary construction combined with a full rigorous analysis for fixed step-size gradient descent.
Having ruled out the possibility of a problem-independent regularizer, we proceed to study the more compelling distribution-dependent implicit regularization. The question here is whether for every distribution over convex functions, we can associate a regularizer such that SGD tries to (approximately) find a Pareto-efficient solution with respect to and the empirical loss (notice that we allow the regularizer to depend on the distribution, but not on the specific sample received by SGD.)
We first show that we can rule out the effect of strongly-convex regularizers in the relevant regime of learning (where the dimension and the number of training examples are of roughly the same order). In fact, we rule out a more general class of regularizers that have large range on sets with large diameters. Namely, in any ball with large diameter the regularizer shows preference towards a certain point.
We then continue and demonstrate a distribution where, given an input sample, there is a very large set of possible solutions that share the same empirical loss and the same regularization penalty, and yet, SGD chooses its solution arbitrarily within this set. Here, by “very large” we mean from a learning-theoretical point of view; namely, this set is large enough so that, in general, empirical risk minimization restricted to the set will fail (and yet, it appears that this is exactly what SGD does). In other words, no regularizer is sufficient for narrowing down the set of possible SGD solutions to the point where non-trivial generalization can be deduced without appealing to other properties of the specific problem.
Several of our constructions are given in high dimension, namely the number of parameters is larger than the number of examples. One could argue that this is the interesting regime, nevertheless it is still worthy to understand the role of implicit bias when the dimension of the problem is smaller than number of examples. Here we cannot rule out the role of implicit bias in a similar fashion to before - namely, due to uniform convergence, any algorithm that is constrained to the unit ball will generalize and this implicit bias is indeed the explanation to that. It is interesting though to understand the existence of specific regularizers (such as, e.g., strongly convex regularizers).
While we do not provide an answer to this question, we make an intermediate step. Our final construction is in a slightly relaxed model, where the instances are non-convex, but the expected loss function is convex. While this result may be limited, because of the non-convexity, we stress that the learning guarantees of SGD are completely applicable to this setting: namely, SGD does learn the problem (as it is convex in expectation). We show that for any strictly quasi-convex regularizer, namely a regularizer that has preference for a single point in any convex regime, the algorithm will not converge to the optimal solution with optimal regularization penalty (even though it converges to a convex domain where seemingly it can improve its parameter choice towards the regularized solution).
2 Related work
Understanding the implicit bias of learning algorithms and its importance in generalization is a central theme in machine learning, and in the study of many classical algorithms (Bühlmann and Yu 2003; Schapire et al. 1998; Wei et al. 2017). Recently, implicit bias has received considerable attention in the past few years. Starting with Neyshabur et al. 2015; Zhang et al. 2017, it was suggested that implicit regularization might explain the success of networks to improve test error by increasing network size beyond what is needed to achieve zero training error. Subsequently, a line of work has focused on identifying implicit regularization in various problems and domains, e.g., linear and non parametric regression (Ali et al. 2019; Raskutti et al. 2014; Wei et al. 2017) matrix factorization (Gunasekar et al. 2017; Arora et al. 2019), linearly separable data (Soudry et al. 2018; Gunasekar et al. 2018b), as well as deep networks (Neyshabur 2017; Neyshabur et al. 2017) and others (Nacson et al. 2019; Nakajima and Sugiyama 2010; Lin et al. 2016; Gunasekar et al. 2018a). Our work here can be seen as an attempt to investigate the limitations of implicit regularization. Most similarly to this work, Suggala et al. 2018 provides an example of a problem where gradient flow does not converge to closest Euclidean solution. Here we focus on the more concrete SGD algorithm with a fixed step size, and give finite-time analysis. We are also able to harness our example to construct further new constructions that rule out a richer class of implicit-type regularization schemes.
This work can also be seen as an attempt towards separation between learnability and regularization. Besides regularization, several other useful notions have been suggested as surrogates of learnability. Most classically, uniform convergence (Blumer et al. 1989) has been shown to be equivalent to learnability in the binary, distribution-independent model of PAC learning (Valiant 1984). As discussed, Shalev-Shwartz et al. 2009 showed that in the stochastic convex setting naive-ERM fails (but not regularized-ERM), hence learnability and uniform convergence are no longer equivalent. The constructions of Shalev-Shwartz et al. 2009 were later substantially strengthened by Feldman 2016. More recently, Nagarajan and Kolter 2019 also provided an example that rules out uniform convergence, perhaps in the strictest sense. Their construction, though, does exhibit tangible implicit regularization, which account to the generalization of the algorithm.
Another useful notion is the stability of a learning algorithm. Stability is very much related to regularization: e.g., regularizing empirical risk minimization with a strongly convex function induces stability (Bousquet and Elisseeff 2002), and smoothness can also be harnessed to argue for stability (Hardt et al. 2016). As such, constructing a convex problem where an algorithm is unstable could also serve as a means to rule out certain types of implicit regularizers. Our examples are in fact stable, and as such, could also be interpreted as a certain weak separation between stability and regularization.
Preliminaries
The goal of the learner, given a sample of i.i.d. examples from the distribution , is to return a parameter vector such that
for a desired target accuracy . (The sample size may be determined based on .)
We make the following assumptions throughout. We will generally assume that the functions are also -Lipschitz. Specifically, in all our constructions we will have for all values of and . We will mostly be concerned with the case that is a bounded unit ball of radius around . For concreteness we will mostly take . This is just for convenience and clearly our results apply to any constant radius ball. Since our main focus in this paper is on impossibility results, fixing the Lipschitz constant and the diameter does not harm the generality of the setup.
We will also discuss strongly-convex functions (or regularizers): we say that a convex function is -strongly convex if for any we have: .
2 Gradient Descent and Stochastic Gradient Descent
The main focus of this paper is the well-known Stochastic Gradient Descent (SGD) algorithm. Given a sample and a step-size parameter , SGD initializes at and performs iterations:
where is defined to be the projection of over the convex set . The standard SGD analysis guarantees the following (see, e.g., Shalev-Shwartz and Ben-David 2014):
Let . Le , and assume that is convex and for all and . Suppose that SGD is run for iterations on the sample with step size . Then,
where here .
We will also discuss in this paper the procedure of Gradient Descent (GD). Given an objective function GD obtains the following update steps:
In our context, given a sample , the gradient descent algorithm takes steps using the full gradient with respect to the empirical loss defined as follows . We will then write in shorthand for
While the above version of SGD is perhaps the most standard one, there are other variants that can be considered. For example, it is common to consider, instead of a fixed step-size, a decaying step-size (where may depend on ), as well as taking the last SGD iterate rather than the average iterate. We focus on the version in Eq. 2 for several reasons. First, taking the last iterate is not always justified and attains suboptimal rates (see Shamir and Zhang 2013). Second, the algorithm in Eq. 2 is also the more challenging variant to argue about, in the sense that averaging and taking small fixed step size induces bias towards initialization, and as such, is more strongly regularized (and indeed, the constructions we provide here can be readily modified to address a decaying step-size or the last iterate. In fact, the proofs will be significantly simpler; for example, in the proof overview we actually consider the last iterate for simplicity.) Another variant to consider is unprojected gradient descent. Convergence bounds can be derived for this variant that depend on the norm of the benchmark solution (Shalev-Shwartz and Ben-David 2014; Shalev-Shwartz et al. 2011). Again, we note that in all of our constructions we pick domain large enough so that projections in fact don’t take place.
Nevertheless, it could be an interesting future work to derive a natural variant of SGD whose implicit regularization properties induce the desired generalization guarantees.
3 Regularized (Structural) Risk Minimization
Another well studied approach to perform learning is through regularization, Regularized Empirical Risk Minimization (ERM) solves the following minimization problem:
Regularization
We next discuss the different classes of regularizers we will consider in this paper. While some of the results we provide make little to no assumptions on the regularizers, sometimes we would like to add further structure and rule out specific classes as the implicit bias of SGD, in other cases we would like to formally explain in what sense we might assume that the regularizer does not allow a comprehensive explanation of the implicit bias.
Most generally, a regularizer is any function . We will however make the following basic assumptions on the regularizers, to avoid degenerate cases:
is non-constant at ;
is upper semi-continuous; namely, for every point and every there exists a neighborhood for which if .
Any regularizer that satisfies these properties will be said to be an admissible regularizer (or shortly, a regularizer). The first assumption above is only for normalization. For the second assumption, the algorithms we will consider are all initialized at zero and may prefer the zero solution if it is a minimizer of the empirical error. But we are mostly concerned with the implicit bias in more involved cases then that.
The last assumption is perhaps somewhat strongest, but it is intended to rule out pathological examples. For example, one could consider a regularizer which is on almost all points, but is on the negligible, dense, set of real numbers that SGD would never reach. One could argue that is an implicit bias of SGD. However, this does not capture our intuition of a regularizer. Thus, we add an assumption that a point penalized by the regularizer should also be penalized under small perturbations.
While some of the results we will present are given for general (admissible) regularizers, it is natural and expected to study more structured classes of regularizers and ask if they induce the generalization properties of a certain algorithm. One natural family of such regularizers is the class of -strongly-convex functions, which we will also assume are -Lipschitz. As discussed in length, many of the prominent generalization results are provided in the context of strongly convex regularizers (Bousquet and Elisseeff 2002; Shalev-Shwartz et al. 2009).
Strongly-convex regularizers come with a very natural property which allows us to rule out such regularizers on certain problems: a strongly convex function always attains a unique minimizer on any convex set. As such we can always identify if the output of an algorithm minimizes (approximately) the strongly-convex regularizer, by comparing the output to the minimizer of the regularizer over the given empirical risk.
2 General (Admissible) Regularizers
Studying implicit bias that does not stem from a strongly convex regularizer is no less important; however, it becomes much more subtle to rule out the latter. Once the regularizer is allowed to have non-unique minima we should be more careful in stating what we mean when we say it does not explain generalization. In fact, almost any plausible algorithm can be said to be implicitly biased on any given distribution. For example, the fact that the regularizer is constrained to the unit ball is a form of algorithmic bias—but as was shown by Shalev-Shwartz et al. 2009, it cannot explain generalization in the SCO setting.
Towards clarifying what we mean by “explain generalization”, let us consider the following: given a regularizer and an algorithm that outputs a solution on a sample , define the set of “competitive” solutions
For shorthand, we will also use the notation instead of .
In words, is the set of solutions that are comparable with (or better than) the output of , with respect to both the empirical loss and the regularization penalty. For example, consider a regularized ERM, as in Eq. 5, then depicts all minimizers of Eq. 5 with comparable regularization penalty. For example, with a strongly-convex regularizer one can observe that the set is in fact a set of a single unique solution.
More generally, if a regularizer is said to be the implicit bias of an algorithm , and as such it explains the generalization of the algorithm, it is expected that the set would be “small” in the sense that choosing an arbitrary solution from it should provide principled guarantees. If we cannot attain such guarantees without further investigation of the problem and algorithm, we argue that the regularizer does not provide a comprehensive explanation of generalization. This motivates the following definition for studying more general regularizers than, say, strongly convex ones:
Note that the statistical complexity of the set is measured with respect to an arbitrary distribution over convex functions: this captures our requirement that the set should explain generalization, without further investigation of the problem. In other words, it could be that for a correct choice of a regularizer, on a specific problem, all the models in will generalize. However, what we want is to ensure that the generalization does not stem from any further structure in the problem that is not captured by the regularizer. Thus, we require that this set will be “simple” in the sense that on any arbitrary distribution over convex functions we can choose an arbitrary solution that minimizes the empirical risk.
Results
We start with the natural question, whether there is some distribution independent implicit regularization being promoted by SGD. As a warm-up we begin by ruling out the existence of a distribution-independent strongly convex regularizer that plays the role of the implicit bias of SGD. This family of regularizers is already very interesting, and has been studied extensively in the literature of stochastic convex optimization (Bousquet and Elisseeff 2002; Shalev-Shwartz et al. 2009).
Let . For every -Lipschitz and -strongly convex , there is a distribution over -Lipschitz and -smooth functions over , and such that, with probability , SGD with any step size over an input sample of size outputs such that:
In words, for any strongly convex regularizer there exists an instance problem where SGD chooses a solution that is sub-optimal in terms of both empirical error, and regularization penalty.
The last result can be extended to general (admissible) regularizers. Here, the rate of divergence from a Pareto optimal solution depends on the structure of the regularizer . This dependence of the divergence-rate on the regularizer is unavoidable. Indeed if we consider a regularizer such that , it is not hard to be convinced that it would take SGD longer to become -suboptimal.
Let . For every admissible regularizer , there are constants , a distribution (over -Lipschitz and -smooth convex functions), and such that, with probability over the input sample , SGD with any step size and sample size outputs such that:
The notation hides constant that may depend on the regularizer . The dependence on the regularizer is expected here, as we would need a very strong level of accuracy if we want to rule out a nearly-constant regularizer, for example.
2 Distribution-Dependent Implicit Regularization
Having ruled out a class of implicit regularizers in the distribution-independent model, we next move on to discuss the possibility of distribution dependent regularizers.
For every , a constant and dimension : there exists a distribution over -Lipschitz convex functions over , such that if we run SGD with learning rate over a sample set of size , then for any -Lipschitz, -strongly convex regularizer , with probability over the sample, SGD outputs for which there is , such that
Utilizing a construction of a statistically complex set due to Feldman 2016, we can also obtain the following result:
For every , a constant and dimension : there exists a distribution over convex -Lipschitz functions over , such that if we run SGD with stepsize over a sample set of size , then for any regularizer we have that with probability at least over the sample, the set is -statistically complex.
In words, Theorem 4 asserts that for a certain given distribution the output of SGD cannot be interpreted as coming from a “small” structured family of solutions that would generalize regardless of other specialized properties of the particular learning problem.
The requirement that is tight. Note that for a sample of order , by a standard covering argument, we can show that the set is not statistically complex (see, for example, Theorem 5 of Shalev-Shwartz et al. 2009). In particular, since we obtain an upper bound of the statistical complexity of the given set.
3 Implicit Bias in Constant Dimension
In the results above we provided constructions in spaces with more parameters than samples. We next discuss the case , which is interesting for certain contexts.
Regarding Theorem 4, we again point out that such a result cannot hold in the aforementioned regime. Indeed, in this case uniform convergence over the unit-ball applies. In that sense, restricting an algorithm to choose a solution in the unit ball provides an inductive bias that provides generalization guarantees. But what about Theorem 3? It is interesting to know if one can rule out regularizers that are not benign like the unit ball. We treat a set as a regularizer by identifying with a regularizer such that if and otherwise. We do not know the answer to this question and we leave it as an open problem. Nevertheless, we can provide the following intermediate result in a slightly more relaxed setting, where the instances may be non-convex, (and in fact non-Lipschitzian) but the expected loss function is indeed convex, and at each iteration the learner observes a bounded gradient Thus, SGD’s learning guarantee still apply.
We will state the next result for a slightly larger class of regularizers than merely convex regularizers. Recall that a function is called quasi-convex if for every and , and strictly quasi-convex if .
Constructions
Here we give a high level description of the constructions as well as the proofs of the main results. We note that for simplicity of exposition, the following description refers to the last iterate, but our full proofs refers to Eq. 2 (i.e., the algorithm that outputs ) .
Our constructions build upon the following class of functions in 2. Let be a set of the form , where are parameters of the set and is a PSD matrix. We then consider the function defined as follows:
One can observe that these functions are convex, and further the gradient of at point will equal
We start by showing how we can construct a function (of the type in Eq. 7) that does not converge to minimal norm solution. Let us take a concrete case where
We will suppress dependence on and , and simply write . The main observation is that the trajectory of is characterized by two phases.
At the first phase the closest point to (with respect to the -norm) is at the boundary of (i.e ). At this phase, can be seen to move “towards” the center of the interval, namely is increasing (see Eq. 8). At the end of this phase, , is sufficiently large irrespective of the step size . The second phase, starts when stops being the closest point, and the closest point to is at the interior of the interval. One can show that at this phase, the gradient moves upward hence does not decrease and overall the trajectory will converge to a point away from : the Euclidean closest minimizer to .
To see that when is at the interior of then , consider the following scalar function Our assumption is that attains its minimum at . Taking the derivative at and equating to (because the minimum is attained at the interior), we can see that Hence, . We depicted here the trajectory of GD without the projection step, however one can observe that throughout, the algorithm never escapes the -ball, hence projections are indeed never implemented. The trajectory of is illustrated in Fig. 1 (green line).
The construction above is the heart of most of our results. Let us illustrate how it rules out a strongly convex regularizer (in the distribution-independent setting) and attain Theorem 1.
The key property of strongly-convex regularizers is that in any convex set they have a unique minimum. Moreover, two far away points cannot simultaneously attain close-to-minimal value. This is in fact the only property we will use. Thus, our result can in fact be extended to any regularizer that is a “tie-breaker”—namely, it always prefers a single unique solution amongst a class of possible solutions with large diameter.
The construction above will allow us to generate two instances of convex learning problems, where SGD converges to two far away points. The first instance is the standard Euclidean distance. Namely, we take a function of the form in Eq. 7, with the identity and with boundaries . In this case, SGD is biased towards the nearest solution . The second instance, , is the construction above where SGD is biased towards another point on the interval (see Figs. 2(b), 2(c) and 2(d)).
Now both points are global minima, for both and , hence if SGD is implicitly biased towards solutions with minimum regularization penalty , we must have that , where is the choice of SGD when it observes . However, if is strongly convex, because , there has to be a point on the interval between them that attain a strictly lesser regularization penalty, moreover it also attains minimal loss value. This contradicts the existence of such an .
Our second result (Theorem 2) rules out the existence of any distribution-independent regularizer. In contrast with the strongly-convex case we can not give uniform bounds that depend on parameters of strong convexity. As such, the rates depend on the regularizer.
But the construction here is similar. We basically start with the assumption that there are two points and with different regularization penalty, and we want to construct two functions that maps to the same empirical loss. It might seem that through a simple linear transformation that maps, say, to and to we can reduce this case to the case above. However, there is some subtlety since gradient descent is not invariant to linear transformations. We note though that it can be turned to an affine invariant optimization algorithm (Koren and Livni 2017).
Towards this, we extend the construction above by constructing a more general example, where we can tune the point of convergence of SGD to any point on the interval between and . This allows us to avoid scaling, and use only rotations (which SGD is invariant to) in order to reduce the problem to the former case. This is done by changing the set from allowing and , to adding a second boundary condition on the right and also scaling . In Fig. 2 we illustrate how changing the boundary condition changes the trajectory.
2 Distribution-Dependent Implicit Bias
We next discuss our second sets of results that argue about distribution-dependent regularization. Here we want to study if, for a given distribution, the set of solutions on which SGD converges has some meaningful structure on which we can argue why it generalizes.
Note that so far, our problem instances considered only a single function and the results were applicable to GD also. Here, though, in the distribution dependent setting such an example cannot work. Indeed, given a single function as an instance problem, SGD behaves deterministically and the solution it chooses is a unique solution which trivially generalizes.
We next discuss our argument that rules out a strongly convex regularizer, even if it may depend on the distribution at hand. We again utilize the property that a strongly convex regularizer obtains approximately minimum solutions only on a small diameter around the unique minimum.
Our strategy is as follows: assume that there are two samples and such that, when SGD observes it converges to and when it observes it converges to . However, assume also that , and that the empirical loss of and is comparable, on both samples: namely , and similarly with
In the case above, as we argued in the distribution-independent case, clearly the algorithm failed to choose the minimizer of the regularization penalty, in at least one of the realization or . So if and are equally likely, we obtain that with probability half (conditioned on the event that we saw or ) the algorithm failed to minimize . Now, if the probability to observe one of such couple of samples is positive, then we obtain the desired result.
To generate this setting, we rely on the following auxiliary construction in 2. We construct two functions such that, if SGD observes the first function, at the first iteration, then the gradient points upward and right. But if SGD observes the second function, at the first iteration, then the gradient points upward. This ensures that in each case SGD will move towards a different solution. If the size of the gradient is constant then the gap between the two iterations will be .
We will also construct the examples in such a way that both points enter a regime where all points obtain the same empirical loss on both functions. This construction can in fact be done using piece-wise linear functions and it is illustrated in Fig. 3. We also give the formal statement here:
For every constant , there are two -Lipschitz functions over 2 such that if and and then and for any .
We next utilize the above construction to generate the problem in d. Note that the construction above generates a problem where SGD will converge to two different solutions with distance but same empirical loss (after one step). Indeed, we just need to randomly pick one of these functions.
We next want to amplify the distance. To do that, we consider Cartesian copies of 2. Then at each example, we show one of the functions above, at one of the products. Assuming enough coordinates were seen only once (which is going to happen w.h.p.), the variance on each sub-plane will be : if we have such coordinates, the overall variance is going to be which ensures that we will converge to far away solutions on different realizations of the problem, if .
Next, we derive Theorem 4 which addresses implicit regularization in a much broader setting. As discussed, here we cannot rule out the existence of an implicit bias; indeed, some form of an implicit bias always exists. We attempt, though, to understand how the implicit bias can explain generalization.
The result shows that for any regularizer: the set which is the set of comparable solutions to the one outputted by SGD, given the empirical loss and regularization penalty, can be large up to the fact that choosing an arbitrary solution from this set can, in principle, lead to over-fitting (over general convex problems). Thus, to argue that the algorithm did generalize, further structure in the problem needs to be taken into account. And this is true for any regularizer.
Our construction is similar to the previous case in Theorem 3 up to some modification. Therefore, let us show that in the construction above will be -statistically complex. This is less than what we actually desire. We, in fact, observed examples and not . Indeed, in the construction above, we showed that if we project the output of SGD to the observed coordinates, we obtain a solution of the form , where are as in Lemma 1. By projecting this set, it can be seen to be a copy of (up to some rescaling) the normalized unit cube . This is true since .
Here, we rely on a construction by Feldman 2016. In order to show that uniform convergence is not equivalent to learnability in the convex optimization setting, Feldman showed (in our terminology) that the set is statistically complex, if .
As discussed, this is less than what we want, as we actually want a set that is at least statistically complex. To tackle this, on each iteration we show the learner a loss function over multiple pairs of coordinates. Namely, if in the example above we drew at each iteration where , now in each iteration we show the algorithm , where are i.i.d. This will reduce the step-size on each coordinate a little bit but if is constant we will still present a constant loss. On the other hand, now projecting on observed coordinates, SGD will converge to a solution in Thus we only need a constant so that the algorithm will converge to a -statistically complex set.
3 Implicit Bias in Constant Dimension
We next provide a construction in 2 that again rules out a class of regularizers, in particular strongly convex regularizers (and more generally, strictly quasi-convex regularizers).
In a similar fashion to previous constructions, we make SGD choose from a set of solutions, that exhibit comparable empirical loss. While the dimension of previous constructions depended on , this construction does not. However, for the construction we relax the assumption that are convex, but remains convex. Note that the learning guarantees of SGD are completely applicable to this setting.
Our construction relies on a 2-dimensional square, centered at the origin. Inside the square, SGD makes a simple 2-dimensional random walk, while when it exits from the square, it continues to perform a random walk in just one dimension (denoted as ), while the other coordinate (denoted as ) remains the same. As a result, the optimizer of is independent of .
We study the event that will stay inside the square for enough iterations to ensure that the variance of will be larger than some constant, but eventually exit from the square to make independent of . This will result with a set of solutions that share the same empirical error and also SGD can converge to each one of them.
References
Appendix A Technical Background
A key technical tool in the proof of Theorem 4 is a construction by Feldman, Feldman 2016, of a statistically complex set in d. While Feldman’s construction is not the first to show that the sample complexity of an ERM algorithm may scale with the dimension, it greatly improved over previous construction Shalev-Shwartz et al. 2009, and showed that the dependence may be linear in the dimension.
We will exploit here Feldman’s set in order to construct an example where SGD essentially picks arbitrarily an element from a statistically complex set, akin to ERM, and we will need the following statement due to Feldman
Let There exists a distribution over -Lipschitz convex functions such that given a sample drawn i.i.d from then w.p. (over the sample ) there exists such that
We will need a slightly stronger version of the theorem which is an immediate corollary
Let , such that , then is -statistically complex.
For two vectors and an element let be the pointwise product between and , i.e.
Let be the distribution from Theorem 6 and consider a distribution where we draw uniformly an elements and a sample of size d/6 i.i.d from . One can show that with probability we have that there exists an elements such that
In particular, there exists a such that with probability , Eqs. 11 and 12 holds for some over the random sample . Thus, we can define a convex Lipschitz mapping parameterized by such that
From the above discussion if we draw we can see that this distribution demonstrates that is (d/6,1/4)-statistically complex
A.2 Berry-Esseen Theorem
A very important and valuable tool for analysing the behavior of random walks that we will use is the well-known Berry-Esseen Theorem, discovered independently in Berry 1941; Esseen 1942.
where is an absolute constant, and is the CDF of a unit variate zero-mean Gaussian random variable.
For a bound of the absolute constant see, for example, van Beek 1972. We will need the following technical Lemma which is derived via Theorem 7:
Let , and assume . If is a random variables such that
where is the error function.
First, we lower bound , and obtain that:
Appendix B Proofs: Distribution Independent Regularizers
As discussed, the main technical gadget behind our distribution-independent-regularization results is a construction of a convex function on which GD does not converge to the minimal norm solution:
Let . For every , and , there exists a a non-negative, convex, –smooth, and –Lipschitz function such that, if we run GD (as defined in Eq. 4) with step size over then GD outputs that satisfies the following
In words, even though and are both minimizers of , GD converges closer to the latter despite it having the larger norm (that is, despite being farther away from the initial point—recall that we assume here that GD is initialized at the origin).
The proof of Theorem 8 is provided at the end of this section and we continue with the proof of Theorem 1.
For every regularizer we will choose a distribution that is concentrated on a single function (dependent on ). Note that in this case, the iterates of SGD are completely equivalent to the iterates of GD with input function . That is, Theorem 1 in fact holds even for deterministic GD, and we continue with the analysis assuming we run GD over a fixed function .
We now proceed to choose the function for a given -strongly convex regularization . Denote and . Consider the set , and let
We now want to choose function such that and that , the output of GD over , will satisfy the following:
.
If is the projection of on then
This will conclude the proof. Indeed, by strong convexity:
and for we would get as claimed.
We now demonstrate how to choose an appropriate . We will consider two possible cases: , or .
First assume that . We then choose
which can be seen to be -smooth and Lipschitz on . A simple analysis of the update step shows that for , we have that . Hence,
Next we assume that . We now apply Theorem 8 with and and consider as in the theorem’s statement. Then, we have that , and we obtain as before that and that , as required.∎
B.2 Proof of Theorem 8
It will be more convenient to construct a function that is convex, -smooth and -Lipschitz such that if we run GD with step-size over then GD outputs that satisfies Eq. 14 and
Then, by re-scaling , and observing that running GD on with step size is equivalent to running GD on with stepsize , we obtain the desired result.
Next, we construct . For and let us define the set: . In turn, we define the function to be:
We start with showing that is indeed convex, -smooth and -Lipschitz as required (As discussed at the beginning, then we obtain the desired result by rescaling).
It is a standard fact that a function of the above form is indeed convex (see, e.g., Example 3.1 in Boyd and Vandenberghe 2004). We will next show that is also -smooth and -Lipschitz. first, one can show that from Eq. 15), that the gradient is given by
where we denote . Next, observe that for any we have as is the projection of onto with respect to the norm , and since projections are contracting distances. Then,
Also, since . We obtain that . Thus from smoothness we also get that for any , we have that . This proves that indeed is convex, -smooth and -Lipschitz.
To next prove the statement, we begin with the following analysis for trajectory of GD over the function .
Let be the sequence defined by running unprojected GD (i.e., with ) over with step size , starting from for iterations. Then there exist s.t.:
Lemma 3 is the most technical part of the proof, and follows a careful step-by-step analysis of the trajectory of GD over the function ; we defer its proof to later in this section and proceed with the proof of Theorem 8. We also complement the proof with a “proof by picture” and a schematic description of the trajectory in Fig. 4
We next set out to show that if we run GD on with any step-size , then
and . Then, as discussed at the beginning the result follows by rescaling to obtain a -Lipschitz and smooth function .
We thus proceed with the proof. The fact that is immediate from definitions.
Next, we bound the sizes for the setting depicted in Lemma 3. In particular when and no projection steps occur. One can easily observe that . Following the trajectory path of , provided in Lemma 3, we can also provide a bound on :
if we have that ;
if , then ;
and if we have that .
Taken together we have that . As such, one can show that for any set , not necessarily , as long as then Lemma 3 holds. Indeed, in any such case running GD or GD without projection is completely equivalent.
Finally, by simple calculation we can show that the singular values of are and . Hence,
where denotes the spectral (operator) norm. We are now ready to show that converges to :
Computing , and from Eq. 16 we obtain the following expressions for the gradient
We thus obtain two boundary conditions that governs the behavior of the trajectory:
Given , we claim that Lemma 3 holds if we let denote the first iterate such that violates Eq. 22, when running GD, and if denotes the first iterate for which satisfies Eq. 23. We will split the proof into 3 parts, according to GD’s trajectory, i.e. .
There exists such that is the first iterate that violates Eq. 22. Further, for any , can be calculated by Eq. 17. And finally, .
First note that satisfies Eq. 22, hence . Now, following the calculation of the derivative provided in, Eq. 21 we obtain the update step which we can rewrite as
By induction one can show that for :
This shows that for any , can be calculated by Eq. 17. We proceed with the proof to show that . Considering the singular value decomposition of one can show that:
Plugging this in Eq. 25, we obtain that for any :
To obtain the lower bound on observe that satisfies:
Plugging Eq. 27 and dividing by we obtain that:
which for , can be rewritten as:
Next we provide an upper bound for . Again, for every Eq. 22 is satisfied, which, as we already saw (recall Eq. 28) means that for every :
Using the inequality , we obtain
In particular for Eq. 29 is violated and hence .
Finally, we provide a lower bound for . Namely, we want to show that . First, by rearranging terms at Eq. 28 we obtain that is sufficiently large so that . Again applying the formula for in Eq. 27 we have that:
This concludes the analysis of the first phase of the trajectory. ∎
We next move on to the case .
Let . Then can be calculated by Eq. 18. Moreover .
We again apply the calculation of the derivative provided in Eq. 21 at and obtain :
Note that this proves that . For , we have that
which leads by induction to the following:
This shows that for any Eq. 18 holds.
We next bound . Recall that is defined to be the first iterate for which Eq. 23 is satisfied. Let us show that for any s.t holds, Eq. 23 is satisfied and hence . Equivalently we will show that for , the following equation holds:
Next assume that , then
We now move to the last phase of the trajectory. ∎
Let , then can be calculated by Eq. 19.
Let be such that Eq. 23 holds. Then again, we consider the formula of the derivative (see Eq. 21) and have that
We obtain the following recursive formula for if Eq. 23 holds for all :
This shows that can be calculated via Eq. 19. It remains thus to show that for any , Eq. 23 always holds. We prove this by induction. Note that for the base case, this follows from the definition of . We can thus assume by induction hypothesis that satisfies Eq. 33, and we want to prove that
We will denote also Then using Eq. 26 and Eq. 33 we have that
where the last inequality is true since for and we also have that . This concludes the proof of Lemma 3. ∎
B.3 Proof of Theorem 2
For a vector let us denote by . In particular, we have that and . Our proof relies on the following claim which we prove at the end of this section.
Let be an admissible regularizer over 2. There are two points and in the unit ball such that for some we have
and
Let and be as in 8.4. First, because GD is invariant to rotations, we can assume w.l.o.g that , and hence . We now set . To choose and we now look at two cases: if and if .
First suppose . By upper-semicontinuity there exists a neighborhood such that for every s.t. , satisfies . We thus set , and . We are left with choosing . Note that in this case, the regularizer prefers a point with large Euclidean norm over a point with smaller Euclidean norm. Thus, to show it is not the implicit bias of SGD we only need to construct a distribution that is biased towards smaller Euclidean norms: Indeed, consider the set we set
Our distribution is defined to choose w.p. . Having defined and we now set out to prove the result. A simple analysis of the update step of SGD shows that for we have for every that . Hence,
By property of we have that . But because is optimal (i.e. attain zero on ), we also have . This proves the case .
Next, assume that . As before we have a neighborhood such that if then we are guaranteed that . We choose then and . To define , we now use the function from Theorem 8. We assume w.l.o.g that , if this is not the case we can use that function . Let us set and . Again, we consider a deterministic distribution that chooses w.p. . Recall that we assume that , hence and . Hence, by Theorem 8, if we run over a sample of size , we obtain that
In particular . But again , because is optimal.∎
First, let us assume that there are such that and (at the end we will show that for admissible regularizer we always have such two points). We will also assume that . If this was not the case we can cover the sphere with balls with radius , and have a constant function at every ball, concluding that is constant on the sphere (which contradicts our assumption). Next, we also assume that , (either or , and the proof is similar in both cases so we will analyse only the later case). Then, since , one can show that
So, by choosing we have that:
Using the first equality we can show that Similarly we can show that Taken together we obtain that
In particular . Since , we either have , or . In the former case we choose , whereas in the latter case we choose .
Finally, so far we assume we can find two points on a sphere with different regularization penalty. Next, we assume that on every sphere is constant. Assume also to the contrary that for every :
It is not hard to show that in this case is constant everywhere except maybe , making it in-admissible. ∎
Appendix C Proofs II: Distribution Dependent Regularization
We start this section by proving the existence of the auxiliary construction in Lemma 1.
See 1 Before we continue with the proof, notice the following immediate corollary of Lemma 1:
For every constants , there is a distribution over a pair of convex functions , such that is a -Lipschitz convex function in 2 and, for every denote Then the following holds:
For every we have that ;
For every , ;
.
To derive Corollary 8.1 from Lemma 1, take a distribution that w.p. picks from Lemma 1, and with probability picks . One can observe that the result holds.
Let us define as follows. Denote , and let
It is easy to check that and that , and that . Next, note that if then
Similarly, . Note that, because the above also proves that . ∎
C.2 Proof of Theorem 3
Theorem 3 is an immediate corollary of the following theorem:
Let . For every and constant , there exists a distribution over -Lipschitz convex functions over d where such that if we run SGD with step size , the following holds: for any regularizer , w.p. at least over the sample there is such that
To see how Theorem 3 follows, Let be the minimizer of amongst all with then by strong convexity
Now if we are done. If not, then
which leads to . Using this, we get by strong convexity:
Choose . Let be the distribution over convex functions in 2 whose existence follows from Corollary 8.1 with and .
We now define a distribution over convex functions in d as follows: at each iteration pick uniformly from the set and let:
To prove the result we proceed as follows: given a sample drawn i.i.d from the distribution , let us call a sample point good if and if appears only once in the sample (i.e. for any , ). Denote by the set of good samples.
Next for a sample define a sample to be a sample that differ from only at good sample points, and for every good sample point if then . It is not hard to see that and are identically distributed (though dependent).
Now first, we want to show that w.p. and that w.p. we have that
If we can show that, then we are done. Indeed, by symmetry, we have with probability . We can then take . Taken together we have that with probability all the requirements of the theorem hold.
Fix a sample . To avoid cumbersome notations, and because , are fixed, we will denote here and . Next, for a vector and coordinate let us also denote .
We first analyze the trajectory of SGD over a sequence . One can prove, by induction, that at step the algorithm chooses point as follows:
Indeed, for this follows from initialization at . For we have that
Now first assume that for some , we have that , then by assumption we have that in the notation of Corollary 8.1. Also by Corollary 8.1 we have that .
Next, if no such exists we have by induction hypothesis that , the result will now clearly follow if we can show that
But since depends only on the tuple in we have that and we obtain that
Next, the value depends only on (i.e. independent of the other coordinates). Also, for any and , we have that depends only on ’s such that and . In particular, for any we have that , hence
Next, we want to show that for a good coordinate we also have that . For this, as in Corollary 8.1 let us denote for any and by . Then, for any good coordinate we can show that
where . Indeed, recall that we chose . Thus, from Corollary 8.1 we obtain that and in particular
Again we will use the notation and . Note that by Corollary 8.1, as well as Eqs. 35 and 36 we have that
for any good sample point . Now:
C.3 Proof of Theorem 4
Theorem 4 follows from the following refined statement:
Let . For every and constant , there exists a distribution over -Lipschitz convex functions over d where such that if we run SGD with step size , the following holds: for any regularizer , w.p. at least over the sample there is a set such that
Moreover is statistically complex.
Note that since we derive as a corollary Theorem 4
Again, let be the distribution from Corollary 8.1 with , for some constant (to be determined later) and . We define a distribution over d, where we let . as follows: pick r.v and distinct coordinates (chosen uniformly from all possible distinct -tuples), set
Analogously to Theorem 9 the statement holds once we prove the following two facts: first we show that for every we have that and secondly, we show that is - statistically complex (claims 10.1 and 10.2 respectively). Thus, by setting we obtain the desired result.
For every we have that .
The proof is very similar to the analog case in Theorem 9, and by a similar argument (which we omit) we can show that for every
Next we prove the statistical complexity of :
The set is –statistically complex.
One can show that if we randomly pick and then pick uniformly an elements from then and are identically distributed. As a corollary if we pick a random sample then w.p. 0.5 we have that
We next argue that any set such that , then is - statistically complex
Indeed, fix . Similar to the argument in 9.2, we have that with probability , that . We claim that if this event occurred then every subset of size will be statistically complex.
It can be seen from Eq. 38 and Eq. 39 and Corollary 8.1 that , hence we can define to be -Lipschitz where
Combining this with Corollary 6.1, we get that there exists a distribution over -Lipschitz convex functions such that, given elements from , with probability there is such that
Appendix D Proof of Theorem 5
We begin the construction by the definition of the distribution :
Note that by symmetry , and indeed in expectation this is a convex function.
For the proof we will define two “good" events, set , and let:
where we write , and is a parameter sufficiently small so that.
Note that depends only on .
Let us denote by , then we will rely on the following claim that lower bounds the probability of the event . We deter the proof of the claim to the end of the section and continue with the proof:
Let and suppose that then, for our choice of , and sufficiently large
Taking 10.3 into account, Fix a random sample . Let and be as in 10.3 and assume that event occurred. Throughout, let us denote .
To show that the statement holds, we define and . We will show that for one of these candidate vectors the statement holds.
First we want to show that if , then . Indeed, note that since occurred
Similarly .
Next we want to show that , or . Note that for every such that , for every , depends only on the second coordinate, namely . In particular, if we obtain by the construction that . Thus, due to event we obtain the desired result.
Finally, we want to show , w.p probability at least . First, assume that with probability we have that . By symmetry one can show that in this case we have that with probability . Next, assume that with probability at least . In this case, we obtain that:
We will bound each event separately. We begin by bounding the event :
where is the CDF of a mean zero unit variate normally distributed random variable, and erf is the error function, namely .
Note that if , given the above bound, the probability that is a constant.
and one can observe that equals w.p. , , w.p and w.p , independently of for .
Hence, applying Lemma 2, with , and we obtain that
Let us consider a random sample that is generated by picking a random sample i.i.d distributed according to , and then for every such that with probability half we let and with probability half we let . It can be seen that is an i.i.d sequence drawn according to the distribution .
Next, let us denote , and a parameter (to be chosen later). Define the event
For our choice of we claim that for every
Indeed, Given , let and set and denote
where are i.i.d random variables such that w.p. equals , w.p. equals and w.p. equals . Due to symmetry we have that:
Thus applying again Lemma 2 with , with, and , we obtain the desired result.
Next, we want to bound . Now assume that for some , we have that .
Let and let , be i.i.d copies of a random variable such that . Then
where the last inequality is by symmetry (reflection principle). Next, by applying Hoeffding’s inequality we obtain that
Choosing sufficiently small, one can see that for large enough and we obtain the desired result.