Does Flatness imply Generalization for Logistic Loss in Univariate Two-Layer ReLU Network?

Dan Qiao, Yu-Xiang Wang · Submission to ICLR 2026 · Rejected

TL;DR

In neural networks trained with squared loss, flat minima (stable under gradient descent) provably cannot overfit. This paper reveals that for classification under logistic loss, this guarantee breaks down: arbitrarily flat, severely overfitted solutions exist at infinity. However, when flatness is paired with prediction uncertainty, flat solutions achieve near-optimal excess risk within the "uncertain" regions of the data distribution.

What Problem Does This Paper Address?

A popular hypothesis in deep learning theory is that gradient descent (GD) possesses an implicit bias toward "flat" or stable minima—regions of the loss landscape where the top eigenvalue of the Hessian satisfies $\lambda_{\max}(\nabla^2 L(\theta)) \le 2/\eta$ (the Edge of Stability regime, where $\eta$ is the learning rate). Prior work showed that for univariate two-layer ReLU networks under squared loss, flat minima are strictly smooth functions (possessing bounded first-order total variation, $\mathrm{TV}^{(1)}$) that provably cannot overfit, even with noisy labels.

Does this principle hold for classification tasks trained with logistic loss? In logistic regression, cross-entropy loss saturates as the model output tends to infinity. The authors investigate whether flatness still protects against overfitting under logistic loss when labels are noisy.

Methods

The authors analyze univariate, two-layer ReLU networks $f(x) = \sum_{i=1}^k w_i^{(2)} \phi(w_i^{(1)}x + b_i^{(1)}) + b^{(2)}$ with arbitrary width $k$:

  1. Hessian-to-Function Mapping: The Hessian is decomposed into a first-order outer product and a second-order term. Because logistic loss derivatives decay exponentially as $|f(x)| \to \infty$, the authors isolate an "uncertainty set" $A_\gamma = \{x_i : |f(x_i)| \le \gamma\}$ where loss curvature remains non-degenerate.
  2. Pathological Counterexample Construction: They analytically construct an interpolating, severely overfitting piecewise-linear network where predictions scale to $\pm \gamma_{\max}$.
  3. Metric Entropy & Generalization Bounds: By leveraging empirical process theory and the metric entropy of Besov/bounded-variation spaces ($\mathrm{BV}^{(1)}$), they derive excess risk bounds for flat solutions over intervals where prediction uncertainty is non-negligible.

Datasets

The paper does not use real-world benchmark datasets; it evaluates its theory using controlled synthetic simulations:

  • Synthetic 1D Classification: $n \in \{80, 160, 400\}$ equally spaced design points in $[-2, 2]$ (with an additional $n=10$ experiment demonstrating convergence to extreme interpolation).
  • Ground-Truth Generator: Target function $f_0(x) = (x+1)\mathbf{1}(x \le 0) + (-x+1)\mathbf{1}(x > 0)$, with noisy binary labels $y \in \{-1, 1\}$ drawn from $p = \sigma(f_0(x))$.

Key Insights and Ideas

  • Flatness alone does NOT imply generalization for logistic loss: Under squared loss, interpolating noisy labels requires wild, high-frequency oscillations that blow up Hessian curvature. Under logistic loss, a model can scale its weights to infinity: as predictions $y_i f(x_i) \to \infty$, the Hessian factor $e^{-y f(x)} / (1 + e^{-y f(x)})^2$ vanishes exponentially. Consequently, an interpolating solution can have a Hessian eigenvalue arbitrarily close to 0 (Theorem 3.2).
  • Smoothness requires Uncertainty: Flatness only constrains the function's second derivative $f''$ where predictions are uncertain ($|f(x)| \le \gamma$). In the interior of these uncertain regions, flatness forces the weighted total variation $\int |f''(x)| h_\gamma(x) dx$ to be small (Theorem 3.1).
  • Near-Optimal Rates in Uncertain Domains: When GD finds an "optimized" solution whose excess risk diminishes, the uncertainty set of $f_\theta$ approximates that of the true function $f_0$. Within the interior interval $I$ of this uncertain region, the excess risk achieves $\tilde{O}(n_I^{-2/5})$ (Theorem 3.7), matching the minimax optimal rate for estimating $\mathrm{BV}^{(1)}$ functions, independent of network width $k$.

Key Results

  • Arbitrarily Flat Overfitting: Theorem 3.2 proves the existence of a network interpolating all $n$ noisy labels such that $\lambda_{\max}(\nabla^2 L(\theta)) \le O((n^2 \gamma_{\max} + 1) e^{-\gamma_{\max}})$, approaching $0$ as confidence $\gamma_{\max} \to \infty$.
  • Excess Risk Guarantees: Under mild optimization assumptions, Theorem 3.7 establishes that for an interval $I$ where the weighting function $\tilde{h} \ge c > 0$, the excess risk scales as: $$\mathrm{ExcessRisk}_I(f) \le O\left( \left[ \frac{x_{\max}}{\eta} + x_{\max}^2(1+B) \right]^{1/5} n_I^{-2/5} \log^{2/5}(1/\delta) \right)$$
  • Empirical Validation: Experiments confirm that large step sizes ($\eta \approx 0.8 - 1.0$) converge near the Edge of Stability ($\lambda_{\max} \approx 2/\eta$), producing simpler, low-$\mathrm{TV}^{(1)}$ predictors. In contrast, smaller step sizes ($\eta = 0.01$) fit noise, showing a classical U-shaped generalization curve. When $n$ is very small ($n=10$), GD actually bypasses the Edge of Stability and drives $\lambda_{\max} \to 0$ by pushing outputs toward infinity.

Limitations and Future Work

  • Univariate Input Restriction: Analysis is limited to 1D two-layer ReLU networks; extending function-space curvature bounds to multivariate inputs remains technically challenging.
  • Solution Properties vs. GD Trajectory: The theoretical guarantees hold for candidate solutions that satisfy flatness and optimization conditions; the paper does not prove global convergence of GD to these states from arbitrary initializations.
  • Boundary Degeneracy: The smoothness guarantee weakens near the boundaries of the data support where $|f_0(x)|$ is large (high certainty).
  • Future Directions: Exploring training dynamics to analyze when GD chooses confidence (saturation) versus smoothness (flatness), and extending the framework to deeper architectures.

Summary updated

BibTeX
@misc{qiao2025does,
  author = {Dan Qiao and Yu-Xiang Wang},
  title = {{Does Flatness imply Generalization for Logistic Loss in Univariate Two-Layer ReLU Network?}},
  year = {2025},
  eprint = {2512.01473},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.01473},
}
Figure