arXiv:2609.31101cond-mat.dis-nnSep 2026

Manuscript Offprint

arXiv:2609.31101

A Flatness-Generalization Relation in the Teacher-Student Tree-Committee Machine

Brandon Livio Annesi, Davide Straziota, Enrico Maria Malatesta

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Brandon Livio Annesi, 1^{1} Davide Straziota, 2,∗^{2,*} and Enrico M. Malatesta 2,3^{2,3}

1^{1}Department of Quantitative Life Sciences, ICTP Trieste, Italy

2^{2}Department of Computing Sciences, Bocconi University, 20136 Milano, Italy

3^{3}Bocconi Institute for Data Science and Analytics (BIDSA), Bocconi University, 20136 Milano, Italy (Dated: September 28, 2026)

The flatness of the loss landscape at a minimizer is a widely used heuristic for reasoning about neural-network generalization, yet evidence for this relation is mostly empirical and controversial. We study this relation in a teacher-student tree committee machine, where both the ERM estimator and the Hessian spectrum are analytically tractable in the proportional high-dimensional limit. First, we use a zero-temperature Gibbs formulation to obtain predictions for the observables of the typical minimizers of the empirical loss. Secondly, we use Edwards-Jones formalism to derive the limiting Hessian resolvent around these typical minimizers. All predictions agree with finite-size gradient-descent simulations. Finally, we study three measures of flatness, namely the left and right edges and the spectral mean, and check if a decrease in generalization error as the dataset size is increased corresponds to an increase in flatness. We find that the answer strongly depends on the learning task and on the ratio of the number of parameters to the number of data points. In regression, the spectral mean and right edge correlate with the generalization error, while the left edge does so only in the overparametrized regime. In classification this correlation reliably holds only in the highly overparametrized phase, while for underparametrized networks it can even reverse.

I. INTRODUCTION

Why do overparametrized neural networks generalize after fitting high-dimensional training data? Among the many theoretical approaches that theoreticians have proposed to answer this question, a classic one has been to study the geometry of the loss landscape, in particular relating the generalization capacity of a network to the flatness of the minimizer [1–4]. The simple and heuristic argument is that if the difference between the population and empirical loss is not too big, then a function that minimizes the empirical loss and is also flat should also perform well on the population. This argument has been supported by many empirical works. For example [5] show that increasing the batch size of SGD leads to both worse generalization and sharper minima. Furthermore, the notion of flatness has been used to propose new optimization algorithms that favor flat solutions, which typically perform better in terms of generalization [6, 7].

Although this flatness-generalization relation is deeply rooted in machine learning lore, many subsequent works have found settings where this relation is broken [8–10]. For example [11] show that fully connected networks with ReLU activations can be reparametrized in a way that keeps the output invariant but varies many Hessian-based measures of flatness, thus potentially breaking this relation for any such measure. In an attempt to restore the relation, many works have come up with alternative measures of flatness that are invariant to this rescaling [9, 12–15]. Another line of research has compared the flatness of all minimizers of a loss, showing in some cases that minimizers with bad generalization properties can never be the flattest, even under reparametrization [16, 17].

A widely used tool for quantifying local flatness is the Hessian of the empirical loss. Its largest eigenvalue measures the curvature along the sharpest direction and arises from a quadratic approximation to worst-case neighborhood-based sharpness, whereas its trace measures the average curvature over parameter-space directions. Early empirical investigations found that the Hessian spectra of trained neural networks typically consist of a highly degenerate bulk concentrated near zero together with a small number of isolated eigenvalues [18, 19]. Subsequent work developed scalable methods for estimating the entire spectrum and studied its evolution during training, revealing that the gradient can become strongly aligned with the eigenspaces associated with the largest eigenvalues [20]. Other studies connected these spectral structures to batch size and robustness [21], and showed that outliers and secondary bulks can encode class and cross-class structure in the data [22, 23]. A unified phenomenological model proposed by [24] connected several of these observations: the emergence of a small number of directions with large positive curvature, the alignment of the gradient with the corresponding eigenspace, and the non-monotonic evolution of the largest

∗^{*} This work was conducted prior to the author’s employment at Amazon and is unrelated to his Amazon role.

Hessian eigenvalue during training.

On the theoretical side, random-matrix methods have been used to characterize the Hessian spectrum of simple neural network models [25–29]. In the case of networks with quadratic activations, related analyses have shown that spectral transitions of the Hessian can mark changes in the stability or informativeness of stationary points [30–32]. However, in none of these works has the Hessian been studied from a flatness-generalization perspective.

The advantage of these models is that they offer a controlled setting in which macroscopic observables can be characterized analytically. For example, in teacher-student settings, data is labeled by a teacher network and used to train a student, so that generalization is determined by a small number of teacher-student and student-student overlaps. Statistical-mechanics methods have long been used in this setting to derive learning curves, phase transitions, and asymptotically exact dynamical equations [33–36]. Among the architectures studied in this framework, committee machines are particularly useful because they combine analytical tractability with important features of more complex models, including non-convexity and hidden-unit specialization. Both classical and modern works have used the replica method to uncover interesting learning phenomena such as SAT/UNSAT transitions [37–42], specialization [43–46], and statistical-to-computational gaps [47].

Contributions. In this work, we investigate the flatness–generalization relation in teacher–student tree committee machines in the proportional high-dimensional limit for two different learning tasks, regression and classification. We first use the replica method to characterize typical minimizers of the loss and derive analytical predictions for the order parameters that describe them. Depending on the learning task, the dataset size and dimensionality, and the regularization strength, we find that the solution is either replica symmetric (RS) or exhibits full replica symmetry breaking (FRSB). Intuitively, this means that in the first case the set of minimizers is connected, while in the latter, the low-loss configurations are organized into a continuous hierarchy of clusters characterized by different mutual overlaps, as in Parisi's solution of mean-field spin glasses [48]. Although we are able to solve the FRSB equations for a set of parameters of the model, we then approximate it with a 1RSB solution, which is numerically easier to handle, and which we confirm to be a good approximation of FRSB observables [40].

Secondly, we use the Edwards-Jones replica formalism [49] to derive the spectrum of the Hessian matrix calculated on these minimizers. For square loss the resolvent is obtained from a scalar cubic equation whose coefficients are functions of the same order parameters that describe learning. From this, we calculate a set of scalar observables which are commonly used in the literature to quantify the flatness of a minimum, mainly the edges of the spectral distribution and its mean. Then, by varying dataset size, we check if a flatness-generalization correlation holds for some of these observables.

We find that whether this relation holds or not is highly dependent on the observable, the learning task, and the parameters. For regression, we find that the relation holds both for the right edge (known in the literature as sharpness) and for the trace, while it holds for the left edge only in the overparametrized phase. For classification instead, we find that it holds for all three observables only in the overparametrized phase: in all other phases the relation is broken, and in some cases flatness can also anticorrelate with generalization.

Finally, we validate all our theoretical predictions with an extensive set of gradient descent simulations. We find good agreement with the theory even in the replica symmetry broken regime, where the exact equilibrium sampling is known to be challenging for stable algorithms in related mean field spin glass models [50].