The Robustness Geometry

Why the shape of a solution matters more that its quality.

Machine Learning · Neuroscience · Biocomputing · Software Engineering
The Geometry of Learning
How a strange new way of training neural networks is forcing computer scientists to think like biologists — and why the principle they are rediscovering is older than any of its implementations.
2026

By the time a neural network finishes learning, it has settled into a single point in a space of unimaginable size. For a modern language model, that space has hundreds of billions of dimensions, one for every adjustable parameter inside the machine. For most of deep learning's history, researchers cared about only one thing at that point: its altitude. Then, around 2020, a small group of researchers at Google began asking a different question. Forget altitude for a moment. What about the shape of the ground around you?

A network parked on the floor of a wide, gentle valley turns out to behave very differently from one balanced on the tip of a narrow spire, even when both have the exact same loss. Nudge the spire-dweller in any direction and it falls catastrophically. Nudge the valley-dweller and almost nothing happens. The two networks are equally good on paper. In practice, only one of them is trustworthy.

That observation, which feels almost too simple to matter, has set off five years of intense and occasionally bewildering work across machine learning, theoretical neuroscience, and the corners of software engineering that worry about reliability. It has revived an old and quiet paper from 1997 that nobody quite knew what to do with. And it has revealed a peculiar convergence: the principle that computer scientists are now trying to engineer into artificial neural networks looks suspiciously like a principle that evolution has been quietly engineering into biological ones for hundreds of millions of years. The principle, in a word, is flatness.

01 The landscape and the spire
Two networks, identical loss, completely different fates. The spire-dweller collapses at the smallest nudge. SAM's perturbation ball — the dashed circle — forces the optimizer away from spires and into wide, survivable basins.
Sharp minimum Standard gradient descent loss spikes loss spikes loss parameter space Fragile Tiny nudge = failure Flat minimum (SAM) Sharpness-aware minimization SAM search radius ρ stable stable loss parameter space Robust Perturbation changes nothing
Sharp minimum — fragile under perturbation
Flat minimum (SAM) — robust under perturbation
I. The landscape and the spire

To see why flatness matters, you have to picture the terrain. Imagine a hiker standing somewhere on an enormous, rumpled surface. The hiker's altitude at any given spot represents the network's loss for one particular setting of its parameters. Lower is better. The hiker's job is to walk downhill until she cannot find anywhere lower to go. Standard training algorithms, of which the most famous is stochastic gradient descent, are essentially recipes for that walk. Repeat a few million times, and the hiker comes to rest at the bottom of some valley. But which kind?

There is no rule that says it has to be wide. The terrain of a real neural network's loss function is shockingly nonconvex, full of basins of every shape and size. Pierre Foret, a researcher then at Google, working with his colleagues Ariel Kleiner, Hossein Mobahi, and Behnam Neyshabur, became fixated on the difference. In a paper they published in 2020, titled "Sharpness-Aware Minimization for Efficiently Improving Generalization," they proposed a small but radical change to the recipe. Instead of asking the hiker to find a low point, they would ask her to find a low region. The algorithm looks at every spot within a small ball around the hiker's current position, finds the worst point inside that ball, then moves in the direction that lowers that worst-case altitude. SAM is allergic to spires. She comes to rest only when the entire neighborhood is roughly the same low altitude.

The practical results confirmed the instinct. The most dramatic evidence came a year later, in 2021, when Xiangning Chen and colleagues at Google threw SAM at Vision Transformers, the architecture that had recently overtaken convolutional networks in some image tasks. A Vision Transformer jumped from around 75 percent accuracy to nearly 80 percent on ImageNet. A related architecture called the MLP-Mixer leapt by more than ten percentage points. The same trick, applied to a convolutional ResNet from 2015, produced gains of less than one percent. The disparity was revealing. Older architectures have structural assumptions baked in that act as natural smoothing. Vision Transformers have far fewer such assumptions. Without them, the optimizer routinely ends up on a spire. SAM, by refusing to settle for spires, rescues the architecture. By 2025, the idea had scaled to billion-parameter language models, with a variant called Functional-SAM consistently improving on the standard optimizer at model sizes spanning three orders of magnitude.

02 An old idea and a theoretical storm
The intellectual timeline of flat minima. Hochreiter's dormant 1997 argument, Keskar's large-batch discovery, Dinh's devastating reparameterization challenge, and the nuanced consensus that survived.
1997 Hochreiter & Schmidhuber "Flat Minima" — MDL argument Flat = simple = generalizable Unnoticed for 20 years 2016 Keskar et al. Large batches → sharp minima SGD noise = accidental flatness search all along 2017 Dinh, Bengio et al. "Sharp minima can generalize" Sharpness is a bookkeeping artifact 2020 → SAM — deliberate flatness search Scale-invariant flatness still tracks generalization in practice
Foundational insight (1997)
Empirical rediscovery (2016)
Theoretical challenge (2017)
Deliberate engineering (2020+)
II. An old idea and a theoretical storm

The strangest part of this story is that the central insight is not new. In 1997, a graduate student named Sepp Hochreiter, working with his advisor Jürgen Schmidhuber at the Technical University of Munich, published two papers. One introduced the long short-term memory network. The other, called simply "Flat Minima," went almost completely unnoticed. Its argument was the argument SAM would make 23 years later. If the same low loss is achieved across a wide region of parameter values, then the precise values do not matter very much. By a principle called minimum description length, that means the network is, in an information-theoretic sense, simple. Simple models generalize. Sharp minima require specifying parameters with extreme precision. They are complex, brittle, and overfit.

The connection finally surfaced in 2016, when Nitish Keskar and colleagues at Northwestern and Intel published "On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima." Small-batch training is noisy. The noise jiggles the hiker around, knocking her out of any narrow basin she might wander into. She comes to rest only in a basin wide enough to absorb the noise. Large-batch training, smooth and accurate, has no such jiggle. The hiker walks placidly into the first thumbtack she finds. The implication was pointed: ordinary gradient descent had been doing flatness search by accident. SAM made it deliberate.

But the theory was about to get complicated. In 2017, Laurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio showed that for any flat minimum of a typical neural network, you can construct a mathematically equivalent network whose minimum is arbitrarily sharp. Multiply one layer's weights by a constant, divide the next layer's by the same constant, and the input-output behavior is unchanged while the curvature of the landscape is transformed entirely. If sharpness can vanish or appear by bookkeeping, how can it cause anything? The most common response is that the standard measures of sharpness are simply the wrong measures. A 2021 variant called Adaptive SAM, from Samsung, rescales the perturbation neighborhood according to local weight magnitudes and consistently outperforms plain SAM, suggesting the symmetry concern is real. A 2025 paper constructed examples where flat empirical minima generalize badly while sharp ones generalize optimally. The slogan "flat minima generalize" is, strictly speaking, false. What survives is more nuanced: in the specific landscapes of deep networks trained on real data, flatness measured in suitable scale-invariant ways tracks generalization closely enough that biasing toward it pays off most of the time. SAM is not a theorem. It is a working hypothesis with a strong track record.

03 What biology has been doing all along
Four biological principles, each with a machine learning analogue. The resemblance is not metaphorical — both sides describe systems whose function is preserved across a broad swath of internal states.
Biology Machine learning analogue Neural degeneracy Different circuits, same function Tononi, Edelman — 1999 ≈ Flat minima Many weights, same function SAM basin — 2020 Homeostatic plasticity Neurons self-regulate firing rate Turrigiano — 1998 ≈ Loss regularization Training stays in stable region Weight decay, SAM — ongoing Waddington landscape Canalized developmental valleys Waddington — 1957 ≈ Loss landscape basin Broad valleys absorb perturbation Hopfield networks — 2023 Free energy principle Systems minimize surprise Friston — 2005 ≈ Out-of-distribution robustness Model is hard to surprise Flat minima — 2020 Both sides describe systems whose function is preserved across a broad swath of internal states
Biological principle
Machine learning analogue
III. What biology has been doing all along

Step away from machine learning for a moment and the convergence becomes hard to ignore. In 1999, three neuroscientists, Giulio Tononi, Olaf Sporns, and Gerald Edelman, introduced a concept they called degeneracy: the ability of elements that are structurally different to perform the same function. Degeneracy is not redundancy. Two identical backup copies would be redundant. Degeneracy is messier and more interesting: an ensemble of nonidentical components, any of which can pinch-hit for the others, none of which is doing exactly the same job as another. A flat region of weight space is one in which many configurations of parameters compute approximately the same function. A degenerate biological circuit is one in which many configurations of components perform approximately the same role. One is realized in synapses. The other in real numbers stored on a graphics card. Both describe systems whose function is preserved across a broad swath of internal states.

Gina Turrigiano, a neuroscientist at Brandeis, puzzled over a destabilization problem. Hebbian learning, the rule by which neurons that fire together wire together, is a runaway process. If a neuron and its neighbor fire together a lot, their connection strengthens, which makes them more likely to fire together, which strengthens the connection further. Left unchecked, the loop should saturate the circuit. It does not. Turrigiano discovered that neurons monitor their own average firing rates over hours and days, and when those rates drift too high or too low, they globally rescale all incoming synapses to bring activity back inside a stable target band. The mechanism, called homeostatic plasticity, is the brain's flatness regularizer. It does not care about any individual synapse. It cares that the overall behavior of the circuit stays inside a region where small perturbations do not break it.

In 1957, Conrad Waddington drew a now-famous picture: a hilly landscape with a ball rolling down it, the ball representing a developing cell channeled toward becoming a neuron rather than a kidney cell through valleys he called canalized. Small perturbations push the ball out momentarily and it rolls back in. Mutation, environmental fluctuation, biochemical noise, all of it gets absorbed by the geometry. The ball arrives where it was supposed to arrive. Waddington's drawing is a flat minimum, slightly tilted. A 2023 paper from McGill modeled learning in modern Hopfield networks as a Waddington landscape and watched the same canalized valleys emerge. Karl Friston, the neuroscientist at University College London, frames the entire story through his free energy principle: any system that persists in an uncertain environment must minimize a quantity he calls variational free energy. A persisting system is one whose internal state is hard to surprise, one that has carved itself into a broad, stable basin of its own model of the world. Self-evidencing systems live in flat minima because there is no other way to keep existing.

04 The family tree and the fragile point
SAM branches into five variants, all converging on the same geometric insight. That insight then propagates outward: into neurosymbolic AI, biocomputing, and software engineering. The same instinct, different substrates.
SAM (2020) Min-max flatness search ASAM (2021) Adaptive scale invariant ESAM (2021) Efficient subset perturbation GSAM (2022) Surrogate gap minimization FisherSAM Geometry-aware curvature Functional-SAM Function-space sharpness (2025) Optimize for the basin, not the point Region over precision — robustness as geometry AI & neurosymbolic Flat symbolic rules OOD generalization Biocomputing Degeneracy as design Biological flatness Software engineering Chaos engineering Antifragility
SAM variants
Core geometric insight
AI applications
Biocomputing
Software engineering
Biological and computational flatness — the biology of robust learning

The same principle expressed in two substrates. Left: cortical neural tissue, where degeneracy and homeostatic plasticity keep function stable across a wide range of synaptic configurations. Right: a neural network's flat loss basin, where many weight configurations compute the same function. Both are systems that survive perturbation because they occupy a region, not a point. Image: IMAGE_CREDIT_HERE.

IV. The family tree and the fragile point

The original SAM had one undeniable cost: to take a single step, the algorithm computes a gradient, takes a short ascent toward the worst nearby point, computes a second gradient there, and uses that to update the weights. It roughly doubles the cost of training. The response was a rapid proliferation of variants. Adaptive SAM fixed the symmetry problem. GSAM defined a finer measure of sharpness to minimize explicitly. Efficient SAM reduced overhead from 100 percent to roughly 40 percent by perturbing only a subset of weights. Functional-SAM, arriving in 2025, identified a failure mode in which earlier variants flattened the loss surface cosmetically without making the underlying function more robust, and fixed it by restricting the sharpness penalty to function space. What this proliferation reveals is not merely engineering iteration. It is a community groping toward a cleaner definition of what flatness actually means for a system that generalizes.

For most of the history of computer science, we have built systems by aiming at points. The optimal route. The lowest loss. The shortest program. The fastest algorithm. A point in some space of possibilities, the very best one we could find, was the goal. The flatness story suggests we have been aiming at the wrong thing. A solution that is brittle is not really a solution, no matter how good its number on a benchmark. A solution that survives perturbation, that tolerates the noise of a real and changing world, that has neighbors which also work, is the kind of solution worth having.

This is not an accident of machine learning. Engineers who build bridges have long known that the strongest bridge is not the one exactly stiff enough to hold its design load but the one with redundant load paths and graceful failure modes. Biologists know that the most evolutionarily stable phenotype is rarely the locally optimal one in any single environment but the one that performs adequately across many. The discipline of chaos engineering, pioneered at Netflix, deliberately injects faults into running production systems to ensure the system as a whole occupies a flat region of its configuration space. Antifragility, graceful degradation, redundancy, chaos engineering, homeostatic regulation, degeneracy, flat minima: these are all names for slightly different versions of the same instinct. Stop optimizing for the point. Optimize for the basin.

05 A theory still being built
Three pillars converge on a working consensus. Each carries honest open questions at its base. The final message beneath the convergence is the one the article has been building toward the whole time.
ML theory SAM and variants Scale-invariant flatness Generalization bounds Counterexamples remain open Neuroscience Degeneracy, homeostasis Waddington, Friston Free energy principle Analogies still loosely formal Software engineering Chaos engineering Fault tolerance Antifragile design Formal bridge unbuilt Working consensus Shape matters as much as altitude Find the flat place. Stay there. A theory unfinished. A principle already universal.
ML theory — open questions remain
Neuroscience — analogies still loose
Software — formal bridge unbuilt
Working consensus across all three
V. A theory still being built

It would be misleading to end without noting how unfinished all of this is. The formal status of flatness as a guarantee of generalization remains genuinely unsettled. The 2025 counterexamples showing flatness and generalization can come apart have not been refuted. The biological analogies are suggestive but loose; in some cases the underlying mathematics is known to differ in important ways. The most powerful recent variants of SAM are expensive enough at the largest model scales that researchers are actively searching for cheaper substitutes, including the possibility that careful data curation might replicate SAM's training dynamics without the computational overhead.

But the working consensus has shifted, and it is unlikely to shift back. The shape of a solution matters as much as its quality. Robustness is not a luxury feature added on top of a finished system; it is a property of the geometry of the system itself, something that has to be sought deliberately from the beginning. Researchers building hybrid neurosymbolic systems have begun to ask whether the geometric instinct that animates SAM applies to their architectures as well. A symbolic component that hard-codes a single rigid rule is, in effect, a sharp minimum. One embedded in a neural network's flat region of weight space, where many slightly different rule realizations compute approximately the same thing, is a flat minimum. Yoshua Bengio has framed the central unsolved problem as one of out-of-distribution generalization. That is exactly what flatness is supposed to deliver.

Five years ago, that was a niche claim from a handful of researchers at a single industrial lab. Today it is appearing in image classifiers and billion-parameter language models, in cortical circuits and developing embryos, in distributed databases and bridge engineering. Wherever a system has to function under uncertainty, the same pressure reasserts itself. Aim for the basin, not the point. The valley, not the peak. The region, not the spot. It is a small reframing of an old idea. But it carries consequences the field is only beginning to absorb. Whatever else artificial intelligence becomes in the coming decade, it is increasingly likely to look, in this one important respect, like the biological intelligence that came before it. Both are systems trying to solve a hard problem in a world that will not stop perturbing them. Both, it seems, have arrived at the same answer. Find the flat place. Stay there.

Key references: Foret, P. et al., "Sharpness-Aware Minimization for Efficiently Improving Generalization," ICLR 2021. Hochreiter, S. and Schmidhuber, J., "Flat Minima," Neural Computation 9(1), 1997. Keskar, N. et al., "On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima," ICLR 2017. Dinh, L. et al., "Sharp Minima Can Generalize For Deep Nets," ICML 2017. Kwon, J. et al., "ASAM: Adaptive Sharpness-Aware Minimization for Scale-Invariant Learning of Deep Neural Networks," ICML 2021. Zhuang, J. et al., "Surrogate Gap Minimization Improves Sharpness-Aware Training," ICLR 2022. Singh, S.P. et al., "Avoiding Spurious Sharpness Minimization Broadens Applicability of SAM," arXiv 2025. Tononi, G., Sporns, O. and Edelman, G., "Measures of Degeneracy and Redundancy in Biological Networks," PNAS 96(6), 1999. Friston, K., "The Free-Energy Principle: A Unified Brain Theory?" Nature Reviews Neuroscience 11, 2010. Chen, X. et al., "When Vision Transformers Outperform ResNets without Pre-training or Strong Data Augmentations," ICLR 2022. Schliserman, M. et al., "Flat Minima and Generalization: Insights from Stochastic Convex Optimization," arXiv 2025.