Bilateral Sharpness-Aware Minimization for Flatter Minima
summary
The gist
The gist The proposed Bilateral Sharpness-Aware Minimization (BSAM) method enhances generalization performance by combining Max-Sharpness (MaxS) and Min-Sharpness (MinS) to find flatter minima than
In short
Bilateral Sharpness-Aware Minimization (BSAM) improves model generalization by combining Max-Sharpness (MaxS) and Min-Sharpness (MinS). Standard SAM fails due to a 'Flatness Indicator Problem' because it only checks flatness in one direction. BSAM uses both measures to find flatter minima, leading to superior performance across various tasks like classification and quantization.
Key concepts
- Max-Sharpness (MaxS)
- This is the sharpness metric used in standard SAM. It measures how quickly the training loss can decrease when moving from the current weight to a nearby point in the direction of gradient ascent. It focuses on finding a minimum that is flat along this specific ascent path.
- Flatness Indicator Problem (FIP)
- This problem occurs because MaxS only considers flatness in one direction—the gradient ascent direction. This leads to a next minimization region that is not sufficiently flat, limiting the generalization benefits of standard SAM.
- Min-Sharpness (MinS)
- MinS addresses the FIP by measuring how quickly the training loss decreases when moving from the current weight to a nearby point in any direction. It captures flatness by considering both ascent and descent directions, providing a more balanced view of the parameter space.
Terminology used across episodes
This episode discusses
- Bilateral Sharpness-Aware Minimization for Flatter Minima · Paper Radio
- Fantastic Generalization Measures and Where to Find Them
- A Diffusion Theory For Deep Learning Dynamics: Stochastic Gradient Descent Exponentially Favors Flat Minima
- Randomized Sharpness-Aware Training for Boosting Computational Efficiency in Deep Learning
- K-SAM: Sharpness-Aware Minimization at the Speed of SGD
- Momentum-SAM: Sharpness Aware Minimization without Computational Overhead
- Wide Residual Networks
The paper
Bilateral Sharpness-Aware Minimization for Flatter Minima · Read on arXiv
Jiaxin Deng, Junbiao Pang, Baochang Zhang, Qingming Huang
Beijing University of Technology · Beihang University · University of Chinese Academy of Sciences
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: Hi, I'm Tom.
Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.
Tom: We're looking at the paper: "Bilateral Sharpness-Aware Minimization for Flatter Minima".
Jane: Here's the gist of the paper. The gist The proposed Bilateral Sharpness-Aware Minimization (BSAM) method enhances generalization performance by combining Max-Sharpness (MaxS) and Min-Sharpness (MinS) to find flatter minima than standard Sharpness-Aware Minimization (SAM).
Tom: Sharpness-Aware Minimization (SAM) is an optimization technique that seeks a flat minimum associated with improved generalization performance by minimizing both the loss value and the loss sharpness.
Jane: The optimization objective of SAM is defined as min w max ε≤ρ L(w + ε) − L(w) + L(w) + λw2 squared, (1).
Tom: The sharpness in SAM is defined as h max(w) = max ε≤ρ L(w + ε) − L(w), which captures the sharpness of the loss by measuring how quickly the training loss can be decreased by moving from w to a nearby parameter value.
Paper summary: Tom: So we're looking at this paper called "Bilateral Sharpness-Aware Minimization for Flatter Minima." It talks about improving generalization by finding flatter minima than what standard Sharpness-Aware Minimization, or SAM, finds.
Jane: That sounds like a fancy way of saying they want models that are more robust when the data changes a little bit. What's the core idea here?
Tom: The paper starts by saying that SAM uses Max-Sharpness, or MaxS, to find flatter minima and improve generalization. But they found a problem with that approach, which is what they call the Flatness Indicator Problem, or FIP.
Lu: Exactly. The FIP is that SAM only looks at flatness in the direction of gradient ascent when it's trying to minimize loss >
Jane: So, if it only looks in one direction, it might not find a really flat region for the model to settle into. What does this mean for us?
Tom: It means the next spot SAM suggests might not be as flat as we hope. And because SAM is a greedy search method, they felt we needed a better way to measure flatness.
Meng: From an engineering standpoint, if you're doing this on production models, you need confidence that the optimization process is actually converging to a good solution, not just getting stuck in a shallow local minimum.
Jane: So how do they fix this flatness issue? What new idea are they proposing to make the indicator better?
Tom: They introduce Min-Sharpness, or MinS. This measures something different—the difference between the training loss and the minimum loss over a neighborhood around the current weight. It tells you how fast the loss decreases in both directions.
Lu: That’s interesting because they propose merging MaxS and MinS into something new, called Bilateral Sharpness, or BilS. This new indicator should show a flatter direction during optimization >
Jane: So this Bilateral Sharpness, this combination of MaxS and MinS, is supposed to give them a better guide than just the old MaxS when searching for minima >
Tom: Right. They say BSAM uses this combined indicator to find a more flat minimum than SAM does. They even have a formula for the gradient update in BSAM that tries to resolve a conflict between finding the training loss and finding these flatter regions >
Meng: That sounds complex for deployment. If you're running this on millions of parameters, how much overhead is there for calculating that MinS and then balancing it against MaxS? What breaks at scale?
Lalam: Based on the literature, BSAM aims to find a loss landscape after training with BSAM that shows both MaxS and MinS combined >
Jane: But what about the numbers? What did they actually show in their experiments to prove this method works better than vanilla SAM or even SGD?
Tom: They did extensive experiments across classification, transfer learning, human pose estimation, and network quantization. On image classification with ResNet-eighteen on CIFAR-one hundred trained for two hundred epochs, BSAM achieved an accuracy of eighty-five point five one plus or minus zero point fourteen >
Lu: That's better than SAM's accuracy of eighty-four point seven two plus or minus zero point eleven on the same task, which is a tangible improvement >
Jane: And they also showed that BSAM finds a smaller maximum eigenvalue on the test set compared to SGD and SAM, which is another way to show it finds flatter minima >
Tom: They also demonstrated robustness against label noise; models trained with BSAM maintained over seventy percent accuracy even when the noise rate reached eighty percent for CIFAR-ten and CIFAR-one hundred >
Meng: Robustness to noise is good, but I worry about generalization on new, unseen data. Does this flatness improvement translate reliably outside of these specific tasks?
Lalam: The theoretical analysis proves that BSAM converges to local minima >
Jane: So the authors are confident that this method consistently finds a good minimum across different types of tasks, not just those they tested on >
Tom: They also showed that for 2D Human Pose Estimation, BSAM performed better on key body joints like the Elbow, Wrist and Hip > <ref:2409.13173#pg2>
Jane: It sounds like the Bilateral SAM method is designed to be more thorough in exploring the parameter space than previous methods because it looks at both ascent and descent directions simultaneously >
Tom: So to wrap up this paper, they propose Bilateral SAM to find flatter minima by combining MaxS and MinS, and their experiments show it's superior to vanilla SAM across several tasks >
Jane: And the authors conclude that BSAM outperforms SGD and SAM on various test datasets, suggesting it genuinely improves model generalization >
Tom: It seems like a solid piece of work for anyone trying to push the limits of what optimization techniques can do for deep learning models >
Conclusion: Tom: So we're wrapping up on this paper about Bilateral Sharpness-Aware Minimization for Flatter Minima by Foret, Kleiner, Mobahi, and Neyshabur.
Jane: It basically boils down to taking the standard Sharpness-Aware Minimization SAM and making it smarter by looking at both how fast the loss goes down in one direction and how fast it goes down in another direction.
Lu: The authors found that SAM’s way of measuring flatness, MaxS, only looked in one direction during optimization, which they called the Flatness Indicator Problem.
Meng: Which means the next parameter point SAM suggests might not be as flat as we need it to be for good generalization when you deploy it on real traffic.
Lalam: They fixed this by introducing Min-Sharpness, MinS, which measures how quickly the training loss drops over a neighborhood around the current weight.
Tom: And they merged that with MaxS to create this Bilateral Sharpness indicator, BilS, which they claim gives a much better picture of flatness during optimization.
Jane: So what does this actually mean for a developer or someone using deep learning models? It means we’re trying to find parameter settings that are more stable and less sensitive to small changes in the input data.
Lu: The authors showed through experiments on classification, transfer learning, and even human pose estimation that BSAM finds these flatter minima consistently across different types of tasks.
Meng: But what about the practical side? The paper shows it converges to local minima, which is good for theory, but does that translate to a stable training run without needing super long training times?
Tom: They did show convergence bounds, specifically Theorem one which gives us some mathematical proof about how fast BSAM settles into a minimum.
Jane: It’s about making the model more robust when it sees data it hasn't seen before, which is the main goal of generalization in AI.
Lalam: BSAM consistently outperforms vanilla SAM and even standard SGD on various test sets, proving that this approach actually helps models generalize better across different scenarios.
Tom: So for anyone building a model where generalization matters most, this suggests we can get a more reliable result by looking at the whole landscape instead of just one side of it.
Jane: It opens up a new way to optimize neural networks by considering multiple aspects of the loss surface simultaneously, and we need to see if this idea pops up in other areas soon.
More episodes
- 2509.10528-STM-Graph: A Python Framework for Spatio-Temporal Mapping and Graph Neural Network Predictions
- 2509.25045-Hyperdimensional Probe: Decoding LLM Representations via Vector Symbolic Architectures
- 2510.06383-Protecting De-identified Documents from Search-based Linkage Attacks
- 2510.11953-Sculpting the Latent Space: Disentanglement with WAE-MMD and Programmable Priors
- 2510.16511-Structured Temporal Causality for Interpretable Multivariate Time Series Anomaly Detection
- 2511.14130-PRISM: Prompt-Refined In-Context System Modelling for Financial Retrieval
- 2512.02088-Comparing Baseline and Day-1 Diffusion MRI Using Multimodal Deep Embeddings for Stroke Outcome Prediction
- 2512.06746-Align, Don't Blend: Orthogonal Supervision Disentanglement As the Key to Generalizable AI-Generated Image Detection
- 2512.08945-Algorithmic Reflectivity in Large Language Models: Methodological Study of Linguistic Structure in Mentalization
- 2601.13235-RubRIX: Rubric-Driven Risk Mitigation in Caregiver-AI Interactions