The role of regularization in classification of high-dimensional noisy Gaussian mixture

Francesca Mignacco, Florent Krzakala, Yue M. Lu, Lenka Zdeborová

I Introduction

where both zi{\bf z}_{i} and v∗{\bf v^{*}} have components taken in N(0,1){\cal N}(0,1). The labels yi∈±1y_{i}\in{\pm 1} are generated randomly with a fraction ρ\rho of +1+1 (and 1−ρ1-\rho of −1-1). We focus on the high-dimensional limit where n,d ⁣→ ⁣∞n,d\!\to\!\infty while α=n/d\alpha=n/d, ρ\rho and Δ\Delta are fixed. The factor d\sqrt{d} in (1) is such that a classification better than random is possible, yet even the oracle-classifier that knows exactly the centroid v∗d\frac{{\bf v}^{*}}{\sqrt{d}} only achieves a classification error bounded away from zero. We focus on ridge regularized learning performed by the empirical risk minimization of the loss:

The unsupervised version of the problem is the standard Gaussian mixture modeling problem in statistics . For the supervised model considered here, recently computed rigorously the performance of the Bayes-optimal estimator (that knows the generative model of the data, but does not have access to the vector v∗{\bf v}^{*}) for the case of equally sized clusters. We generalize these results for arbitrary cluster sizes to provide a baseline for the estimators obtained by empirical risk minimization.

The model was recently under investigation in a number of papers. In , the authors study the same data generative model in the particular case of equally sized clusters, and analyze non-regularized losses under the assumption that the data are not linearly separable. They conclude that in that case the square loss is a universally optimal loss function. Our study of the regularized losses shows that the performance of the non-regularized square loss can be easily, and drastically improved. studied the logistic loss, again without regularization and for two clusters of equal size, and derive the linear separability condition in this case.

Secondly, we present a systematic investigation of the effects of regularization and of the cluster size, discussing in particular how far estimators obtained by empirical risk minimization fall short of Bayes-optimal one, with surprising conclusions where we illustrate the effect of strong and weak regularizations. In particular, when data are linearly separable, Rosset et al. proves that all monotone non-increasing loss functions depending on the margin find a solution maximizing the margin. This is indeed exemplified in our model by the fact that for α<α∗(Δ,ρ)\alpha<\alpha^{*}(\Delta,\rho) (the location of transition for linear separability) the hinge, and logistic losses converge to the same test error as the regularization tends to zero. This is related to the implicit regularization of gradient descent for the non-regularized minimization , and we discuss this in connection with the “double-descent” phenomenon that is currently the subject of intense studies .

The existence of a sharp transition for perfect separability in the model, with and without bias, is interesting in itself. Recently analyzed the maximum likelihood estimate (MLE) in high-dimensional logistic regression. While they analyzed Gaussian data (whereas we study Gaussian mixture) their results on the existence of the MLE being related to the separability of the data and having a sharp phase transition are of the same nature as ours, and similar to earlier works in statistical physics .

Finally, we note that the formulas proven here can also be obtained from the heuristic replica theory from statistical physics. Indeed, a model closely related to ours was studied in this literature and our rigorous solution thus provides a further example of a rigorous proof of a result obtained by this technique.

All these results show that the Gaussian mixtures model studied here allows to discuss, illustrate, and clarify in a unified fashion many phenomena that are currently the subject of intense scrutiny in high-dimensional statistics and machine learning.

II Main theoretical results

Our first result is a rigorous analytical formula for the generalization classification error obtained by the empirical risk minimization of (2). Define qq as the length of the vector w\bf w and mm as its overlap with v∗{\bf v^{*}}, both rescaled by the dimensionality dd

In the high dimensional limit when n,d→∞n,d\to\infty with a fixed ratio α=n/d\alpha=n/d, the length qq and overlap mm of the vector w{\bf w} obtained by the empirical risk minimization of (2) with a convex loss converge to deterministic quantities given by the unique fixed point of the system:

where h∼N(m+yb,Δq)h\sim{\cal N}(m+yb,\Delta q), ρ∈(0,1)\rho\in(0,1) is the probability with which yi=1y_{i}=1, and vv is the solution of

and the bias bb, defined in (2), is the solution of the equation

This is proven in the next section using Gordon’s minimax approach. Once the fixed point values of the overlap mm and length qq are known, then we can express the asymptotic values for the generalization error and the training loss:

In the same limit as in theorem 11, the generalization error expressed as fraction of wrong labeled instances is given by

where Q(x)=12π∫x∞e−t2/2dtQ(x)=\frac{1}{\sqrt{2\pi}}\int_{x}^{\infty}e^{-t^{2}/2}dt is the Gaussian tail function. The value of the training loss rescaled by the data dimension reads

The details on (12) and (13) are provided in Appendices A and C.

II.2 MLE and Bayes-optimal estimator

The maximum likelihood estimation (MLE) for the considered model corresponds to the optimization of the non-regularized logistic loss. This follows directly from the Bayes formula:

where c=2Δy(1dv⊤x+Δ2log⁡ρ1−ρ)c=\frac{2}{\Delta}y\left(\tfrac{1}{\sqrt{d}}{\rm v}^{\top}{\rm x}+\frac{\Delta}{2}\log\frac{\rho}{1-\rho}\right), therefore a simple redefinition of the variables leads to the logistic cost function that turns out to be the MLE (or rather the maximum a posteriori estimator if one allows the learning of a bias to account for the possibility of different cluster sizes).

The Bayes-optimal estimator is the “best” possible one in the sense that it minimizes the number of errors for new labels. It can be computed as

where {X,y}\{\bf X,\bf y\} is the training set and xnew\bf x_{\text{new}} is a previously unseen data point. In the Bayes-optimal setting, the model generating the data (1) and the prior distributions py{\rm p}_{y}, pz{\rm p}_{\bf z}, pv∗{\rm p}_{\bf v^{*}} are known. Therefore, we can compute the posterior distribution in (15):

Hence, we can compute the Bayes-optimal generalization error using

where mBO=qBO=αΔ+αm_{BO}=q_{\rm BO}=\tfrac{\alpha}{\Delta+\alpha} and bBO=Δ2log⁡ρ1−ρb_{BO}=\tfrac{\Delta}{2}\log\tfrac{\rho}{1-\rho}. This formula is derived in the Appendix B. The case ρ=1/2\rho=1/2 was also discussed in .

Finally, it turns out that in this problem, one can reach the performances of the Bayes-optimal estimator, usually difficult to compute, efficiently using a simple plug-in estimator akin to applying the Hebb’s rule . Consider indeed the weight vector averaged over the training samples, each multiplied by its label and rescaled by d\sqrt{d}

It is straightforward to check that, for w^Hebb{\bf\hat{w}}_{\rm Hebb}, one has in large dimension m=1m=1 and q=(1+Δα)q=(1+\tfrac{\Delta}{\alpha}). If one further optimizes the bias (for instance by cross validation) and uses its optimal value b=Δq2mlog⁡ρ1−ρb=\tfrac{\Delta q}{2m}\log\tfrac{\rho}{1-\rho}, plugging these in eq. (12) one reaches Bayes-optimal performance εgenHebb=εgenBO\varepsilon_{\rm{gen}}^{\rm Hebb}=\varepsilon_{\rm{gen}}^{\rm BO}. Since there exists a plug-in estimator that reaches the Bayes-optimal performance, it is particularly interesting to see how the ones obtained by empirical risk minimization compare with the optimal results.

II.3 High-Dimensional Landscapes of Training Loss

Our analysis also leads to an analytical characterization of the high-dimensional landscapes of the training loss. First, we let

to denote the normalized training loss when we restrict the weight vector to satisfy the two conditions in (21). In what follows, we refer to Lλ(q,m,b){\cal L}_{\lambda}(q,m,b) as the “local training loss” at fixed values of q,mq,m and bb. The “global training loss” can then be obtained as

where the constraint that m2≤qm^{2}\leq q is due to the Cauchy-Schwartz inequality: ∣m∣=∣w⊤v∗∣d≤∥w∥d∥v∗∥d=q\lvert m\rvert=\frac{\lvert{\bf w}^{\top}{\bf v}^{\ast}\rvert}{d}\leq\frac{\lVert{\bf w}\rVert}{\sqrt{d}}\frac{\lVert{\bf v}^{\ast}\rVert}{\sqrt{d}}=\sqrt{q}.

In the high-dimensional limit when n,d→∞n,d\to\infty with a fixed ratio α=n/d\alpha=n/d, many properties of the local training loss can be characterized by a deterministic function, defined as

Here, for any γ≥0\gamma\geq 0, vγv_{\gamma} denotes a random variable whose cumulative distribution function is given by

Moreover, γ∗\gamma^{\ast} in (23) is the unique solution to the equation

Let Ω\Omega be an arbitrary compact subset of {(q,m,b):m2≤q}\left\{(q,m,b):m^{2}\leq q\right\}. We define

For any constant δ>0\delta>0 and as n,d→∞n,d\to\infty with α=n/d\alpha=n/d fixed, it holds that

where Lλ∗{\cal L}_{\lambda}^{\ast} is the global training loss defined in (22).

The characterization in (27) shows that the global training loss will concentrate around the fixed value Eλ∗{\cal E}_{\lambda}^{\ast}. Meanwhile, (26) implies that the deterministic function Eλ(q,m,b){\cal E}_{\lambda}(q,m,b) serves as a high-probability lower bound of the local training loss Lλ(Ω){\cal L}_{\lambda}(\Omega) over any given compact subset Ω\Omega. This latter property allows us to study the high-dimensional landscapes of the training loss as we move along the 3-dimensional space of the parameters q,mq,m and bb.

In particular, by studying Eλ(q,m,b){\cal E}_{\lambda}(q,m,b), we can obtain the phase transition boundary characterizing the critical value of α\alpha below which the training data become perfectly separable.

and f(x)f(x) is the probability density function of N(0,1){\cal N}(0,1).

III Proof Sketches

In this section, we sketch the proof steps behind our main results presented in Section II. The full technical details are given in the Appendix C.

Roughly speaking, our proof strategy consists of three main ingredients: (1) Using Gordon’s minimax inequalities , we can show that the random optimization problem associated with the local training loss in (21) can be compared against a much simpler optimization problem (see (32) in Section III.1) that is essentially decoupled over its coordinates; (2) we show in Section III.2 that the aforementioned simpler problem concentrates around a well-defined deterministic limit as n,d→∞n,d\to\infty; and (3) by studying properties of the deterministic function, we reach the various characterizations given in Theorem 11, Proposition 1 and Proposition 2.

For example, for the square, logistic, and hinge losses defined in Section I, their corresponding convex conjugates are given by

where H(u)=def−ulog⁡u−(1−u)log⁡(1−u)H(u)\overset{\text{def}}{=}-u\log u-(1-u)\log(1-u) is the binary entropy function, and

Substituting (29) into (21) and recalling the data model (1), we can rewrite (21) as the following minimax problem

where Sq,m=def{w:q=1d∥w∥2 and m=1dw⊤v∗}{\cal S}_{q,m}\overset{\text{def}}{=}\left\{{\bf w}:q=\frac{1}{d}\lVert{\bf w}\rVert^{2}\text{ and }m=\frac{1}{d}{\bf w}^{\top}{\bf v}^{\ast}\right\}.

For every (q,m,b)(q,m,b) satisfying q>m2q>m^{2}, let

where Δd=def(Qd/d)Δ\Delta_{d}\overset{\text{def}}{=}(Q_{d}/d)\Delta with Qd∼χd2Q_{d}\sim\chi^{2}_{d},

and s∼N(0,In)\bm{s}\sim\mathcal{N}(0,\bm{I}_{n}) is an i.i.d. Gaussian random vector. Then for any constant cc and δ>0\delta>0, we have

The proof of Proposition 3, which can be found in the Appendix C.1, is based on an application of Gordon’s comparison inequalities for Gaussian processes . Similar techniques have been used by the authors of to study the Gaussian mixture model for the non-regularized logistic loss for two clusters of the same size.

III.2 Asymptotic Characterizations

The definition of Eλ(d)(q,m,b){\cal E}^{(d)}_{\lambda}(q,m,b) in (32) still involves an optimization with an nn-dimensional vector u\bm{u}, but it can be simplified to a one-dimensional optimization problem with respect to a Lagrange multiplier γ\gamma:

One can show that the problem in (36) reaches its maximum at a point γ∗\gamma^{\ast} that is the unique solution to

In the asymptotic limit, as n,d→∞n,d\to\infty, both (38) and (39) converge towards their deterministic limits:

Substituting these identities into (40) and (41) then gives us the characterizations (25) and (23) as stated in Section II.

Finally, the fixed point characterizations given in Theorem 11 can be obtained by taking derivatives of Eλ(q,m,b){\cal E}_{\lambda}(q,m,b) with respect to q,m,bq,m,b and setting them to . Similarly, the phase transition curve given in Proposition 2 can be obtained by quantifying the conditions under which the deterministic function Eλ(q,m,b){\cal E}_{\lambda}(q,m,b) reaches its minimum at a finite point. We give more details in Appendix C.4 - C.5.

III.3 Interpretation from the replica method

These same equations can be independently derived from the non-rigorous replica methods from statistical physics , a technique that has proven useful in the study of high-dimensional statistical models, for instance following . Alternatively, these equations can also be seen as a special case of the State Evolution equation of the Approximate Message Passing algorithm . Both interpretations can be useful, since the various quantities enjoy additional heuristic interpretations that allow us to obtain further insight. For instance, the parameter γ\gamma in (6) is connected to the rescaled variance of the estimator w{\bf w}:

The zero temperature limit of the fixed point equations obtained with the replica method corresponds to the loss minimization . In this limit, the behaviour of the rescaled variance VV at zero penalty (λ=0\lambda=0) is an indicator of data separability. In the non-separable regime, the minimizer of the loss is unique and V→0V\rightarrow 0 at temperature T=0T=0. The parameter γ\gamma turns out to be simply γ=VT\gamma=\tfrac{V}{T}. However, in the regime where data are separable there is a degeneracy of solutions at λ=0\lambda=0, and the variance is finite: V>0V>0. Hence the parameter γ\gamma has a divergence at the transition, and this provides a very easy way to compute the location of the phase transition.

IV Consequences of the formulas

In this section we evaluate the above formulas and investigate how does the test error depend on the regularization parameter λ\lambda, the fraction taken by the smaller cluster ρ\rho, the ratio between the number of samples and the dimension α\alpha and the cluster variance Δ\Delta. The details on the evaluation and iteration of the fixed point equations in Theorem 11 are provided in Appendices D and F respectively. Keeping in mind that minimization of the non-regularized logistic loss corresponds in the considered model to the maximum likelihood estimation (MLE), we thus pay a particular attention to it as a benchmark of what the most commonly used method in statistics would achieve in this problem. Another important benchmark is the Bayes-optimal performance that provides a threshold that no algorithm can improve.

Fig. 1 summarizes how the regularization parameter λ\lambda and the cluster size ρ\rho influence the generalization performances. The left panel of Fig. 1 is for the symmetric case ρ ⁣= ⁣0.5\rho\!=\!0.5, the right panel for the non-symmetric case ρ=0.2\rho=0.2. Let us define as α∗\alpha^{*} the value of α\alpha such that for α<α∗\alpha<\alpha^{*} the training loss for hinge and logistic goes to zero (in other words, the data are linearly separable . In the left part of Fig. 1 we depict (in green) the performance of the non-regularized logistic loss a.k.a. the maximum likelihood. For α>α∗(ρ,Δ)\alpha>\alpha^{*}(\rho,\Delta) the training data are not linearly separable and the minimum training loss is bounded away from zero. For α<α∗(ρ,Δ)\alpha<\alpha^{*}(\rho,\Delta) the data are linearly separable, in which case properly speaking the maximum likelihood is ill-defined , the curve that we depict is the limiting value reached as λ→0+\lambda\to 0^{+}. The points are results of simulations with a standard scikitlearn package. As shown in , even though the logistic estimator does not exist, gradient descent actually converges to the max-margin solution in this case, or equivalently to the least norm solution corresponding to λ ⁣→ ⁣0+\lambda\!\to\!0^{+}, a phenomenon coined “implicit regularization”, which is well illustrated here.

Another interesting phenomenon is the non-monotonicity of the curve. This is actually an avatar of the so-called “double descent” phenomenon where the generalization “peaks” to a bad value and then decays again. This was observed and discussed recently in several papers , but similar observations appeared as early as 1996 in Opper and Kinzel . Indeed, we observed that the generalization error of the non-regularized square loss (in red) has a peak at α=1\alpha=1 at which point the data matrix in the non-regularized square loss problem becomes invertible. It is interesting that for α>α∗\alpha>\alpha^{*} the generalization performance of the non-regularized square loss is better than the one of the maximum likelihood. This has been proven recently in , who showed that among all the convex non-regularized losses, the square loss is optimal.

Fig. 1 further depicts (in purple) the Bayes-optimal error eq. (19). We have also evaluated the performance of both the logistic and square loss at optimal value of the regularization parameter λ\lambda. This is where the symmetric case (left panel) differs crucially from the non-symmetric one (right panel). While in the high-dimensional limit of the symmetric case the optimal regularization λopt ⁣→ ⁣∞\lambda_{\rm opt}\!\to\!\infty and the corresponding error matches exactly the Bayes-optimal error, for the non-symmetric case 0<λopt<∞0<\lambda_{\rm opt}<\infty and the error for both losses is bounded away from the Bayes-optimal one for any α ⁣> ⁣0\alpha\!>\!0.

We give a fully analytic argument in the Appendix E for the perhaps unexpected property of achieving the Bayes-optimal generalization at λopt→∞\lambda_{\rm opt}\to\infty and ρ=0.5\rho=0.5 for any loss that has a finite 2nd derivative at the origin. In simulations for finite value of dd we use a large but finite value of λ\lambda, details on the simulation are provided in the Appendix F.

Regularization and the interpolation peak —

In Fig. 2 we depict the dependence of the generalization error on the regularization λ\lambda for the symmetric ρ=0.5\rho=0.5 case for the square, hinge and logistic loss. The curves at small regularization show the interpolation peak/cusp at α=1\alpha=1 for the square loss and α∗\alpha^{*} for all the losses that are zero whenever the data are linearly separable. We observe a smooth disappearance of the peak/cusp as regularization is added, similarly to what has been observed in other models that present the interpolation peak in the case of the square loss. Here we thus show that a similar phenomena arises with the logistic and hinge losses as well; this is of interest as this effect has been observed in deep neural networks using a logistic/cross-entropy loss . In fact, as the regularization increases, the error gets better in this model with equal-size cluster, and one reaches the Bayes-optimal values for large regularization.

Max-margin and weak regularization —

Fig. 3 illustrates the generic property that all non-regularized monotone non-increasing loss functions converge to the max-margin solution for linearly separable data . Fig. 3 depicts a very slow convergence towards this result as a function of regularization parameter λ\lambda for the logistic loss. While for α>α∗\alpha>\alpha^{*} both the hinge and logistic losses performance is basically indistinguishable from the asymptotic one already at log⁡λ≈−3\log\lambda\approx-3, for α<α∗\alpha<\alpha^{*} the convergence of the logistic loss still did not happen even at log⁡λ≈−10\log\lambda\approx-10.

Cluster sizes and regularization —

In Fig. 4 we study in greater detail the dependence of the generalization error both on the regularization λ\lambda and ρ\rho as ρ→0.5\rho\to 0.5. We see that the optimality of λ→∞\lambda\to\infty holds only strictly at ρ=0.5\rho=0.5 and at any ρ\rho only close to 0.50.5 the error at λ→∞\lambda\to\infty is very large and there is a well delimited region of λ\lambda for which the error is close to (but strictly above) the Bayes-optimal error. As ρ→0.5\rho\to 0.5 this interval is getting longer and longer until it diverges at ρ=0.5\rho=0.5. It needs to be stressed that this result is asymptotic, holding only when n,d→∞n,d\to\infty while n/d=αn/d=\alpha is fixed. The finite size fluctuations cause that finite size system behaves rather as if ρ\rho was close but not equal to 0.50.5, and at finite size if we set λ\lambda arbitrarily large then we reach a high generalization error. We instead need to optimize the value of λ\lambda for finite sizes either by cross-validation or otherwise.

Separability phase transition —

The position of the “interpolation” threshold when data become linearly separable has a well defined limit in the high-dimensional regime as a function of the ratio between the number of samples nn and the dimension dd. The kink in generalization indeed occurs at a value α∗\alpha^{*} when the training loss of logistic and hinge losses goes to zero (while for the square loss the peak appears at d=nd=n when the system of nn linear equations with dd parameters becomes solvable). The position of α∗\alpha^{*}, given by Proposition 2 is shown in Fig. 5 as a function of the cluster variance for different values of ρ\rho. For very large cluster variance, the data become random and hence α=2\alpha=2 for equal-sized cluster, as famously derived in classical work by . When ρ<1/2\rho<1/2, however, it is easier to separate linearly the data points and the limiting value of α∗\alpha^{*} gets larger and differ from Cover’s. For finite Δ\Delta, the two Gaussian distributions become distinguishable, and the data acquires structure. Consequently, the α∗\alpha^{*} is growing as the correlations make data easier to linearly separate again, similarly as described . This phenomenology of the separability phase transition, or equivalently of the existence of the maximum likelihood estimator, thus seems very generic.

Acknowledgements

We thank Pierfrancesco Urbani, Federica Gerace, and Bruno Loureiro for many clarifying discussions related to this project. This work is supported by the ERC under the European Union’s Horizon 2020 Research and Innovation Program 714608-SMiLe, by the French Agence Nationale de la Recherche under grant ANR-17-CE23-0023-01 PAIL and ANR-19-P3IA-0001 PRAIRIE, and by the US National Science Foundation under grants CCF-1718698 and CCF-1910410. We also acknowledge support from the chaire CFM-ENS “Science des données”. Part of this work was done when Yue Lu was visiting Ecole Normale as a CFM-ENS “Laplace” invited researcher. We thank Google Cloud for providing us access to their platform through the Research Credits Application program.

References

Appendix A Derivation of the generalization error formula

The generalization error is defined as the average fraction of mislabeled instances

where ynewy_{\text{new}} is the label of a new observation xnew{\bf x}_{\text{new}}, and the estimator y^new\hat{y}_{\text{new}} is computed as

Eq. (A.2) holds for every vector w=w(X,y){\bf w}={\bf w}\left({\bf X},{\bf y}\right) and bias b=b(X,y)b=b\left({\bf X},{\bf y}\right) computed on the training set {X,y}\left\{{\bf X},{\bf y}\right\}. Using the fact that ynew,y^new=±1y_{\text{new}},\hat{y}_{\text{new}}=\pm 1, it is easy to show that (A.1) can be rewritten as

Let us consider the last term in (A.3). Using again ynew=±1y_{\text{new}}=\pm 1, we can move ynewy_{\text{new}} inside the argument of the sign function and rewrite

The term ynewxnewy_{\text{new}}{\bf x}_{\text{new}} can be rewritten as

where znew′=ynewznew∼N(0,Id){\bf z}^{\prime}_{\text{new}}=y_{\text{new}}{\bf z}_{\text{new}}\sim\mathcal{N}({\bf 0},{\bf I}_{d}) has the same distribution as znew{\bf z}_{\text{new}}, since ynewy_{\text{new}} and znew{\bf z}_{\text{new}} are independent. Hence

The estimator w{\bf w} only depends on the training set, hence w{\bf w} and znew′{\bf z}^{\prime}_{\text{new}} are independent. We call their rescaled scalar product ς\varsigma, a random variable distributed as a standard normal

where we have used that Δd∥w∥>0\sqrt{\frac{\Delta}{d}}\lVert{\bf w}\rVert>0 to rescale the argument of the sign function. Finally, we obtain

where Q(x)=12π∫x∞e−t2/2dtQ(x)=\frac{1}{\sqrt{2\pi}}\int_{x}^{\infty}e^{-t^{2}/2}dt is the Gaussian tail function, and we have defined

In the large dd limit, the overlaps concentrate to deterministic quantities:

where ρ∈(0,1)\rho\in(0,1) is the probability that ynew=+1y_{\text{new}}=+1.

Appendix B Derivation of the Bayes-optimal error

In order to compute the Bayes-optimal error, we consider the posterior distribution of a new label ynewy_{\text{new}}, given the corresponding new data point xnew\bf x_{\text{new}} and the estimate v\bf v of the true centroid v∗\bf v^{*}

where “∝\propto” takes into account the normalization over ynewy_{\text{new}}. Similarly, the posterior on v{\bf v} given the training data is

where we remind that v{\bf v} has i.i.d. components taken in N(0,1)\mathcal{N}(0,1), and “∝\propto” takes into account the normalization over v{\bf v}. We would like to find an explicit expression for

where in the product over μ\mu on the right-hand side we have used the notation y0=ynewy_{0}=y_{\text{new}}, x0=xnew{\bf x}_{0}={\bf x}_{\text{new}}. Let us call IvI_{\text{v}} the integral over v\bf v in (B.5).

where in the last equality we have dropped the index ii from the components of v\bf v for simplicity, since they are all independent. Computing the integral over v, we obtain

Using the fact that yμxμ=v∗d+Δzμy_{\mu}{\bf x}_{\mu}=\frac{{\bf v}^{*}}{\sqrt{d}}+\sqrt{\Delta}{\bf z}_{\mu}, zμ∼N(0,Id){\bf z}_{\mu}\sim\mathcal{N}(0,{\bf I}_{d}) and v∗{\bf v}^{*} is the true realization of v\bf v, the first term in (B.8) in the limit where n,d→∞n,d\rightarrow\infty can be rewritten as

where znew′∼N(0,1)z^{\prime}_{\text{new}}\sim\mathcal{N}(0,1). Therefore, in the large dd limit we find that

It is useful to rewrite the generalization error as

where Q(x)=12π∫x∞e−t2/2dtQ(x)=\frac{1}{\sqrt{2\pi}}\int_{x}^{\infty}e^{-t^{2}/2}dt is the Gaussian tail function. If ynew=−1y_{\text{new}}=-1, (B.12) gives

Using the fact that ρ=py(1)\rho={\rm p}_{y}(1) and 1−ρ=py(−1)1-\rho={\rm p}_{y}(-1), we get that

It is worth noting that the optimal error in (B.15) can be achieved by the plug-in estimator

This result was already shown in for the case of symmetric clusters. The optimal bias is obtained from the minimization of the generalization error (A.13) with respect to bb, at fixed m,qm,q. This yields:

Substituting (B.16) in the definition of the overlaps (3) in the main text, we obtain that the values of mm and qq associated to the plugin estimator are

Hence, the generalization error of the plug-in estimator is

where we have used (B.9) in the last equality. The probability in (B.19) is the same as in (B.12). Hence, the plug-in estimator achieves the Bayes-optimal error.

Appendix C Details of proofs

In what follows, we provide more technical details for several key results stated in Section III. They serve as the basis of the proof of Proposition 1.

where in reaching the second equality we have used the fact that any w∈Sq,m{\bf w}\in{\cal S}_{q,m} satisfies the equality m=1dw⊤v∗m=\frac{1}{d}{\bf w}^{\top}{\bf v}^{\ast}. Introduce an auxiliary problem

where g=(g1,g2,…,gd)⊤{\bf g}=(g_{1},g_{2},\ldots,g_{d})^{\top} and s=(s1,s2,…,sn){\bf s}=(s_{1},s_{2},\ldots,s_{n}) are two independent random vectors whose entries are drawn from the i.i.d. standard normal distribution, and hi=Δq(yisi)+m+byih_{i}=\sqrt{\Delta q}(y_{i}s_{i})+m+by_{i}. As yi∈{±1}y_{i}\in\left\{\pm 1\right\}, independent of sis_{i}, we note that hih_{i} has the same probability distribution as the quantity defined in (33) in the main text.

Gordon’s minimax inequalities allow us to make the following comparison: For any constants cc and δ>0\delta>0, we have

To connect this to the statements in Proposition 3, we note that

Combining this inequality with (C.1) gives us the first inequality in Proposition 3. To obtain the second inequality in the proposition, we use the fact that the unconstrained optimization problem in (22) for the global training loss L∗{\cal L}^{\ast} is convex. Following exactly the same strategy as used in , we can interchange the order of min⁡\min and max⁡\max in the dual formulation of (22), which then allows us to reach the two-sided inequality in (35).

C.2 Proof of Lemma 1

We first rewrite the optimization problem in (32) as

For the inner maximization, the constraint on the squared norm ∥u∥2\lVert{\bf u}\rVert^{2} weakly couples different coordinates of u\bm{u} together. To fully decouple these coordinates, we introduce a Lagrangian function

Since there is a one-to-one correspondence between the Lagrange multiplier γ\gamma and the normalized squared norm μ=∥uγ∥2/d\mu=\lVert\bm{u}_{\gamma}\rVert^{2}/d, it is thus equivalent to solve (C.2) in terms of

C.3 Proof of Proposition 1

We first establish (26) for the special case where the subset Ω\Omega is a singleton. In this case, we just need to show

for any fixed q,mq,m and bb. Recall the characterization of Eλ(d)(q,m,b){\cal E}^{(d)}_{\lambda}(q,m,b) given in Lemma 1. The problem in (36) reaches its maximum at a point γd∗\gamma^{\ast}_{d} where the derivative of the function to be maximized is equal to 0. In calculating this derivative, we need the quantity duγ,idγ\frac{du_{\gamma,i}}{d\gamma}, which can be obtained as

Substituting these identities, we can characterize vγ,iv_{\gamma,i} via the implicit equation

and more importantly, (C.5) can be simplified as

Let vγv_{\gamma} be a random variable defined via the implicit equation

where h=Δqs+m+byh=\sqrt{\Delta q}s+m+by with S∼N(0,1)S\sim\mathcal{N}(0,1) and yy being a random variable independent of ss such that

uniformly over any compact subset of γ\gamma. It follows that γd∗\gamma^{\ast}_{d} as defined in (C.7) converges to γ∗\gamma^{\ast}, which is the unique solution of (25). Moreover, we have

For any δ>0\delta>0, we can apply Proposition 3 to get

As the right-hand side tends to due to (C.9), we have (C.3).

Let Ω\Omega be an arbitrary compact subset of {(q,m,b):m2≤q}\left\{(q,m,b):m^{2}\leq q\right\}. We denote by ΩK\Omega_{K} a finite subset of Ω\Omega consisting of KK points, i.e., ΩK={(qk,mk,bk)∈Ω:1≤k≤K}\Omega_{K}=\left\{(q_{k},m_{k},b_{k})\in\Omega:1\leq k\leq K\right\}.

C.4 Proof of Proposition 2

It follows that the cumulant distribution function of uγu_{\gamma} is given by

where Q(⋅)Q(\cdot) is the distribution function of a standard normal random variable. Writing (25) in terms of uγu_{\gamma}, we have

We further denote by γ^∗(q,θ)\widehat{\gamma}^{\ast}(q,\theta) the solution to (C.11). We can show that, for any fixed γ~\widetilde{\gamma} and θ\theta, the function S(γ~,q,θ)S(\widetilde{\gamma},q,\theta) is monotonically decreasing as we increase qq. Moreover,

Clearly, S∗(γ~,θ)S^{\ast}(\widetilde{\gamma},\theta) is monotonic with respect to γ~\widetilde{\gamma}, but it has a finite limit as γ~→∞\widetilde{\gamma}\to\infty, i.e.,

where f(⋅)f(\cdot) is the probability density function of N(0,1)\mathcal{N}(0,1). An implication of this limit being finite is that, although the Lagrange multiplier γ^∗(q,θ)\widehat{\gamma}^{\ast}(q,\theta) remains finite for any fixed qq, it tends to ∞\infty as q→∞q\to\infty if

This characterization can be interpreted as follows: If there exists a θ\theta that satisfies (C.12), then as we move along the “ray” of constant slope θ=m/q\theta=m/\sqrt{q}, the training loss Eλ=0(q,m,b){\cal E}_{\lambda=0}(q,m,b) will tend to . The critical threshold α∗\alpha^{\ast} can then be obtained by maximizing the right-hand side of (C.12), which gives us the final expression as stated in Proposition 2.

C.5 Derivation of Theorem 11 from Gordon’s characterization

In this section, we show that the fixed point equations in Theorem 11 can be mapped to Gordon’s characterization, namely (25) and (27) in the main text. First of all, we observe that (25) is trivially satisfied by the solution of system (4)-(9). Then, we consider the minimization of Eλ(q,m,b){\cal E}_{\lambda}(q,m,b), derived in (C.9), with respect to q,m,bq,m,b. This simply amounts to setting the derivatives to zero. Note that the partial derivatives of vv and γ∗\gamma^{*} can be computed by taking the derivatives of both sides of (C.6) and (25) respectively. The minimization leads to the following system of equations:

where s∼N(0,1)s\sim\mathcal{N}(0,1), y=+1y=+1 with probability ρ∈(0,1)\rho\in(0,1) and y=−1y=-1 otherwise. We observe that (C.15) is the same as (11) and (C.14) is equivalent to (4) and (6). Using again (6), we can rewrite (C.13) as

which leads to an identity if we substitute the definition of γ^\hat{\gamma} provided in (9).

Appendix D Evaluation of the fixed point equations

In this section we will compute the fixed-point equations for the square and hinge loss. The equations for the logistic loss cannot be computed analytically and require numerical integration.

where h∼N(m+yb,Δq)h\sim\mathcal{N}(m+yb,\Delta q). Hence, we obtain

To compute the bias bb, we have to solve

We can plug (D.3)-(D.5) in the equations for m,q,γm,q,\gamma to obtain

D.2 Hinge loss

Appendix E Bayes-optimality at λ=∞𝜆\lambda=\infty, for ρ=12𝜌12\rho=\tfrac{1}{2}

In this section we will show how the result on Bayes-optimality for balanced clusters at large regularization arises. First we start by considering the square loss. At ρ=1/2\rho=1/2, it is straightforward to check from (11) that b=0b=0 and the generalization error, given by (12) in the main text, is

where mm and qq are given by (D.9)-(D.10), evaluated at ρ=12\rho=\tfrac{1}{2}. The Bayes-optimal error for this problem is given by (19) in the main text and reads

Therefore, in order to reach Bayes-optimality, we need a weight vector w\bf w with an overlap mm and a length qq such that

By using (D.3)-(D.4) evaluated at ρ=12\rho=\tfrac{1}{2}, (E.3) can be rewritten as

Eq. (E.4) is verified by the fixed point equations only at λ→∞\lambda\to\infty. Indeed in this limit we find that

so that any loss will behave like the square one. This is the origin of the peculiar behavior of Bayes optimally observed at λ→∞\lambda\to\infty for the symmetric case ρ=1/2\rho=1/2. We observed numerically that this result is not valid anymore as soon as ρ≠1/2\rho\neq 1/2. This peculiar behaviour is shown in Fig. 6, which depicts the generalization error, computed from the solution of (4)-(11) in the main text, as a function of ρ\rho at zero, infinite and optimal regularization for the square and hinge losses.

Appendix F Details on the numerics

The solution (q,m,b,γ)(q,m,b,\gamma) of the fixed point equations (4)-(9) can be obtained analytically only in the case of square loss. For the hinge and logistic loss, the equations have to be iterated until convergence. In our codes we used initialization (qt=0,γt=0,mt=0,bt=0)=(0.5,0.5,0.01,0)(q^{t=0},\gamma^{t=0},m^{t=0},b^{t=0})=(0.5,0.5,0.01,0). The stopping criterion for convergence consists in checking if the values of the generalization error at two consecutive iterations differ less than a threshold epseps. In all figures, we used eps≤10−8eps\leq 10^{-8}.

F.2 Simulations

In order to check the validity of the fixed point equations (4)-(9) we computed numerically the solution of the optimization problem defined in (2), and we averaged over multiple realizations of the noise. In the case of square loss, the solution is simply

In the case of logistic and hinge loss, the solution can be computed by a standard gradient descent algorithm. In particular, in Fig. 1 we used the Logistic Regression classifier provided by the scikitlearn package linear_modellinear\_model . In particular, we used the “lbfgs” solver, with L2-penalty, tolerance tol=10−5tol=10^{-5} for the stopping criterion and maximum number of iterations max_iter=10−5max\_iter=10^{-5}. It is important to remind that all our analytic results are computed in the infinite-dimensional limit d,n→∞d,n\rightarrow\infty, while the ratio α=n/d\alpha=n/d remains finite. Therefore, all the simulations involve errors due to finite size effects. However, we found a very good agreement bewteen theory and simulations already at relatively small dimensionality (d≤5000d\leq 5000). The only case in which finite size effects prevent simulations to match our theoretical predictions is the behaviour of the generalization error at large regularization λ\lambda, at ρ=1/2\rho=1/2. Since at all finite dimensions dd the effective clusters size is ρ≠1/2\rho\neq 1/2, the result of reaching Bayes-optimality at λ→∞\lambda\rightarrow\infty cannot be obtained in simulations, since it holds strictly at ρ=1/2\rho=1/2. However, we obtain greater and greater precision, i.e. the minimum of the generalization error moving towards higher values of λ\lambda (see Fig. 4), as dd increases.