Flatness is Necessary, Neural Collapse is Not: Rethinking Generalization via Grokking

Ting Han, Linara Adilova, Henning Petzka, Jens Kleesiek, Michael Kamp
9/22/2025
cs.LG

No official code found. Best implementation: TrustworthyMachineLearning-Lab/grokking_flatness (1 star, Apache-2.0, last commit 2026-02-05). 1 more below.

Abstract

Neural collapse, i.e., the emergence of highly symmetric, class-wise clustered representations, is frequently observed in deep networks and is often assumed to reflect or enable generalization. In parallel, flatness of the loss landscape has been theoretically and empirically linked to generalization. Yet, the causal role of either phenomenon remains unclear: Are they prerequisites for generalization, or merely by-products of training dynamics? We disentangle these questions using grokking, a training regime in which memorization precedes generalization, allowing us to temporally separate generalization from training dynamics and we find that while both neural collapse and relative flatness emerge near the onset of generalization, only flatness consistently predicts it. Models encouraged to collapse or prevented from collapsing generalize equally well, whereas models regularized away from flat solutions exhibit delayed generalization, resembling grokking, even in architectures and datasets where it does not typically occur. Furthermore, we show theoretically that neural collapse leads to relative flatness under classical assumptions, explaining their empirical co-occurrence. Our results support the view that relative flatness is a potentially necessary and more fundamental property for generalization, and demonstrate how grokking can serve as a powerful probe for isolating its geometric underpinnings.

View on arXivView PDF

Code Implementations(2)

MIT

Code implementation for NeurIPS'25 paper: Flatness is Necessary, Neural Collapse is Not: Rethinking Generalization via Grokking

00Oct 16, 20251 years agoMIT
Apache-2.0

[NeurIPS'25] Flatness is Necessary, Neural Collapse is Not: Rethinking Generalization via Grokking

11Shell, PythonOct 18, 20258 months agoApache-2.0

Similar Papers

Cite this paper

@article{han2025flatness,
  title  = {Flatness is Necessary, Neural Collapse is Not: Rethinking Generalization via Grokking},
  author = {Ting Han and Linara Adilova and Henning Petzka and Jens Kleesiek and Michael Kamp},
  year   = {2025},
  eprint = {2509.17738},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.17738v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.17738.svg)](https://codeofpaper.com/paper/2509.17738)

Discussion