potentialpaper

CASAM: Consistency-Anchored Sharpness-Aware Minimization for Improved Model Generalization

Chengli Tan, Tianyu Wang, Junmin Liu, Yong Xu

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. Apart from the implicit regularization of the gradient norm and the Hessian, SAM also secretly counteracts overfitting during training

Abstract. Many studies argue that the success of sharpness-aware minimization (SAM) is due to the implicit regularization of the gradient norm or the eigenvalues of the Hessian. However, they cannot fully explain why the flatness-based measures do not always correlate well with generalization. For instance, we can easily construct a counterexample by only optimizing with hard examples. In this paper, we propose to resolve such a contradiction from the perspective of anti-overfitting. First, we show that the sharpness at the mini-batch level approximately equals the sum of the gradient norm and the Kullback–Leibler (KL) divergence between the predictive distributions evaluated at the current point and its adversary. Second, we show that the \emph{gradient consistency}, which approximately quantifies the inner product between the mini-batch gradient and the per-example gradient, decreases consistently during training. This result explains why SAM is less likely to suffer from overfitting. At last, building on these insights, we further introduce CASAM, an algorithm that reweights each example according to gradient consistency to enhance the generalization performance. Extensive experiments on popular benchmarks such as ImageNet-1K and Clothing1M corroborate its efficacy.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
4 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 4 reviews · OpenReview

Updated 25 Nov 2026, 03:46 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

This paper revisits why SAM improves generalization, arguing that existing flatness/gradient norm/Hessian based explanations are incomplete. It introduces gradient consistency which is the alignment between per example gradients and the mini batch gradient, and theoretically decompose empirical sharpness into a gradient norm term and a KL-divergence term between predictions before/after perturbation. Motivated by this, it proposes CASAM, which reweights training examples by gradient consistency in the SAM descent step. The anti-overfitting/gradient consistency lens on SAM is an interesting and underexplored angle, and that CASAM is simple and cheap to integrate. However there are concerns regarding this work such as:

  1. Marginal/unclear empirical gains at scale: CASAM's improvements over SAM and other variants are small and it is not clear whether these differences are statistically meaningful. It would be helpful to add confidence interval to the reporting results and also comparision agains other baselines.

  2. Lack of principled selection guidance: CASAM introduces a hyperparameter and a squeezing function choice without a clear rule for setting them across tasks, noise levels, or training stages.

  3. Theoretical assumptions may not hold in realistic training regimes. It would be beneficial for the paper to disscuss more about their assumptions. Also the theoretial contribution or novelty of the work seems incremental.

  4. Incomplete Related work coverage: a bunch of related works are not covered by the paper.

  5. Justification for the main idea: the main idea of the paper i.e. increased angular separation between per-example and mini batch gradients should reduce overfitting needs more clarification and justification.

Final justification

Most reviewers agreed that the paper deserves acceptance. After carefully reading the rebuttal and subsequent discussion, I also share this view. However, I recommend that the authors address the reviewers’ feedback in the final version of the paper, with particular emphasis on:

1- Additional experiments demonstrating the significance and consistency of the gains achieved by the proposed method should be included.

2- The paper should provide a clearer discussion of the novelty of the proposed approach and its differences from existing methods.

3- The authors should incorporate the missing related work and provide a more comprehensive discussion of how the proposed method relates to and differs from prior approaches.

4- Additional experiments and discussion evaluating the robustness of the proposed method with respect to different hyperparameter choices should be included.

Area Chair UBim · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

This paper revisits why SAM improves generalization, arguing that existing flatness/gradient norm/Hessian based explanations are incomplete. It introduces gradient consistency which is the alignment between per example gradients and the mini batch gradient, and theoretically decompose empirical sharpness into a gradient norm term and a KL-divergence term between predictions before/after perturbation. Motivated by this, it proposes CASAM, which reweights training examples by gradient consistency in the SAM descent step. The anti-overfitting/gradient consistency lens on SAM is an interesting and underexplored angle, and that CASAM is simple and cheap to integrate. However there are concerns regarding this work such as:

  1. Marginal/unclear empirical gains at scale: CASAM's improvements over SAM and other variants are small and it is not clear whether these differences are statistically meaningful. It would be helpful to add confidence interval to the reporting results and also comparision agains other baselines.

  2. Lack of principled selection guidance: CASAM introduces a hyperparameter and a squeezing function choice without a clear rule for setting them across tasks, noise levels, or training stages.

  3. Theoretical assumptions may not hold in realistic training regimes. It would be beneficial for the paper to disscuss more about their assumptions. Also the theoretial contribution or novelty of the work seems incremental.

  4. Incomplete Related work coverage: a bunch of related works are not covered by the paper.

  5. Justification for the main idea: the main idea of the paper i.e. increased angular separation between per-example and mini batch gradients should reduce overfitting needs more clarification and justification.

Final justification

Most reviewers agreed that the paper deserves acceptance. After carefully reading the rebuttal and subsequent discussion, I also share this view. However, I recommend that the authors address the reviewers’ feedback in the final version of the paper, with particular emphasis on:

1- Additional experiments demonstrating the significance and consistency of the gains achieved by the proposed method should be included.

2- The paper should provide a clearer discussion of the novelty of the proposed approach and its differences from existing methods.

3- The authors should incorporate the missing related work and provide a more comprehensive discussion of how the proposed method relates to and differs from prior approaches.

4- Additional experiments and discussion evaluating the robustness of the proposed method with respect to different hyperparameter choices should be included.

1 comment
Authors · CommentOpenReview ↗

Dear AC,

Many thanks for handling our paper. In the rebuttal, we have responded to the raising concerns point-by-point, which can be summarized as follows.

(Q1): Marginal/unclear empirical gains at scale....It would be helpful to add confidence interval to the reporting results and also comparision agains other baselines.

(R1): We agree that random seed indeed affects the final accuracy. Our results are actually repeated with three different random seeds, and the gains are thus statistically reliable. Most results are already reported with confidence interval. In the revision, we have added the missing error bar to Figure 5a. Moreover, the improvement of CASAM over other SAM variants is also substantial. For example, compared to the recent VASSO optimizer, CASAM improves the ImageNet accuracy by ~0.5% and the noisy cifar10 accuracy by ~2%. Particularly, when integrating CASAM with other SAM variants, a preliminary experiment on CIFAR-100 shows that CASAM can further improve the accuracy by up to ~0.8%. This suggests that CASAM is not a replacement but a complement to other SAM variants.

(Q2): Lack of principled selection guidance...

(R2): We understand the concern regarding the introduction of new hyperparameters. Apart from the reported results on vision datasets, we also investigated the robustness of γ\gamma and the squeezing functions for LSTM on Penn Treebank. The results suggest that CASAM is robust to the choices of the hyperparameters. That is, without extensive dataset-specific tuning, a principled and safe selection strategy is to select γ\gamma from {-2, -1}, and use arctan as the default squeezing function.

(Q3): Theoretical assumptions may not hold in realistic training regimes. It would be beneficial for the paper to disscuss more about their assumptions. Also the theoretial contribution or novelty of the work seems incremental.

(R3): In standard SAM applications, the perturbation radius ρ\rho is kept deliberately small because SAM with a large ρ\rho performs even worse than SGD. Under these small-perturbation regimes and particularly in the late training stages, second-order approximations remain a standard, reliable proxy for local landscape geometry.

Moreover, the novelty of our work are two-fold: on one hand, we build a quantitative relation between the sharpness and the first- and second-order information of the loss function. This is dramatically different from previous works that model SAM as an SDE, where the first- and second-order information (e.g. Hessian and covariance) are encoded in the drift and diffusion terms. In contrast, our work can quantify them and distinguish which one is dominating over another during training. On the other hand, C(z)\mathcal{C}(z) further quantifies to what extent each example contributes to the mini-batch gradient, which is quite useful for data reweighting. This decomposition paves the way to analyze dynamic gradient consistency at the instance level, rather than analyzing the average loss landscape flatness.

(Q4): Incomplete Related work coverage...

(R4): We agree that the related work appears incomplete as the SAM literature is quickly evolving. In the revision, we have included and discussed these papers. Particularly, we have included two out of them (namely, δ\delta-SAM and SANER ) as new baselines.

(Q5): Justification for the main idea: the main idea of the paper i.e. increased angular separation between per-example and mini batch gradients should reduce overfitting needs more clarification and justification.

(R5): To clarify, we can assume that the per-example gradient is composed of two parts: features shared across the mini-batch examples and features specific only to itself. Now we observe that SAM increases the angular separation. This indicates that SAM encourages the mini-batch gradient to be represented by the shared features and to eliminate those features that are sample-specific. As a result, it steers the updates to be less optimized for any individual example. This is particularly useful during late training, where clean examples tend to have small gradients and noisy or atypical examples often produce large, distinctive gradients. If those large or distinctive gradients remain highly aligned with the mini-batch update, the optimizer continues to adjust parameters to fit them. Increasing angular separation means those distinctive gradients contribute less to the update direction, slowing memorization of outliers or mislabeled samples. This aligns well with the idea that overfitting arises from fitting idiosyncratic patterns that do not generalize.

At last, we want to thank you once again for your time and effort. And, please let us know if you have further questions.

Reviewer papnOpenReview ↗
Rating
5/6
Confidence
5/5
Quality
4/4
Clarity
3/4
Significance
4/4
Originality
4/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper introduces CASAM, a variant of SAM, which puts more weight on important data samples when calculating the gradients for update. Specifically, CASAM attaches KL-divergence-based loss to the cross entropy loss so that the gradient consistency is taken into account when determining which data is important. The paper provide intriguing insights into how each sample affects generalization. The theoretical analysis explains interesting aspects of the inherent behaviors of SAM. Overall, I appreciate these contributions, and believe this work is worth being published.

Strengths and weaknesses

[Strengths]

  • A new intepretation of SAM's inherent behaviors. This novel analysis provides interesting insights into how individual sample affects the generalization of models.

  • Extensive theoretical analyses make the proposed arguments more convincing.

  • Informative illustrations such as Figure 1, 3, and 4. They effectively deliver key messages.

  • Thorough and explorative experiments such as performance comparison against different squeezing functions.

[Weaknesses]

Overall, I do not see many weak points in this paper. Please find my concerns as follows.

  • Some notations are difficult to find their definitions. E.g., what is FBF_{\mathcal{B}}? I believe this is the mini-batch loss, but there is no definition in the notation paragraph. Please check all the notations again whether they are defined well.

  • Theorems were not written in a reader-friendly manner. After each theorem, please add one or few remarks to summarize what kinds of insights are delivered from the results.

  • Introduction section explains some preliminaries that can be provided in Section 2 or at the beginning of Section 3. Especially, I believe the update rule of SAM should not necessarily be explained in the Introduction. To improve the readability, I suggest moving them to a separate Preliminary section or any other sections.

Questions

My questions and concerns are summarized in the above weakness part. Please carefully address them.

Limitations

yes

Final justification

I appreciate the contribution of this study, and have no remaining critical concerns.

Formatting concerns

No concerns

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We sincerely thank the reviewer for the careful reading and for catching these omissions. Below, we respond to your concerns point-by-point.

(Q1): Some notations are difficult to find their definitions. E.g., what is FB(w)F _ {\mathcal{B}}(\boldsymbol{w})? I believe this is the mini-batch loss, but there is no definition in the notation paragraph. Please check all the notations again to see whether they are defined well.

(R1): Thanks for the kind reminder. Just as you said, FB(w)F _ {\mathcal{B}}(\boldsymbol{w}) is the mini-batch loss. In the revision, we have carefully checked all the notations to avoid confusion.

(Q2): Theorems were not written in a reader-friendly manner. After each theorem, please add one or a few remarks to summarize what kinds of insights are delivered from the results.

(R2): We agree that translating the mathematical results into intuitive takeaways improves the paper's accessibility. Following your suggestion, we have appended a Remark block immediately after every theorem in the revised manuscript. For example, after Theorem 3.5 and Theorem 3.6, we added the following remarks:

Remark 1 : Theorem 3.5 provides key insight into the operational mechanics of easy examples. Since 0<py<p~y<10 < \mathbf{p} _ y < \mathbf{\tilde{p}} _ y < 1, the ascent step increases the probability of the correct class, yielding a negative gradient consistency C(z)<0\mathcal{C}(z) < 0. Furthermore, as p~y\mathbf{\tilde{p}} _ y increases towards 1—signifying that the model becomes increasingly confident on these easy instances—C(z)\mathcal{C}(z) drops monotonically. Geometrically, this means that for highly confident easy examples, the per-example gradient ∇fω(z)\nabla f _ {\boldsymbol{\omega}}(z) points in a direction that strongly opposes the aggregate mini-batch direction ∇FB(ω)\nabla F_ {\mathcal{B}}(\boldsymbol{\omega}). Consequently, during the descent step, updating parameters via these easy examples acts as a natural counterweight that prevents the model from overly committing to the dominant gradient directions, thereby serving as an intrinsic anti-overfitting mechanism.

Remark 2 : Theorem 3.6 examines the dynamics of hard examples in the regime where prediction confidence remains below the threshold e2e2+1≈0.88\frac{e^2}{e^2+1} \approx 0.88. For these examples, C(z)≥0\mathcal{C}(z) \geq 0, confirming that their individual gradients align constructively with the mini-batch gradient ∇FB(ω)\nabla F_{\mathcal{B}}(\boldsymbol{\omega}). Crucially, as the adversary decreases p~y\mathbf{\tilde{p}} _ y (making the loss higher), C(z)\mathcal{C}(z) increases. This implies that SAM dynamically amplifies the influence of those hard examples that suffer the greatest perturbation under adverse shift. As a result, hard examples primarily drive the optimization, ensuring efficient representation learning before the model reaches high-confidence regimes.

(Q3): The Introduction section explains some preliminaries that can be provided in Section 2 or at the beginning of Section 3. Especially, I believe the update rule of SAM should not necessarily be explained in the Introduction. To improve readability, I suggest moving them to a separate Preliminary section or any other sections.

(R3): Thanks for the suggestion. In revision, we have deferred this part to the beginning of Section 3. Moreover, we have also shrunk some of the Figures/Tables to include more experimental results (e.g., Appendix B) in the main body.

At last, we want to thank you once again for your time and effort. We hope that we have addressed most of your concerns, and please let us know if you have further questions.

Reviewer papn · CommentOpenReview ↗

Response to the rebuttal

I checked the rebuttal. I have no further concerns.

Authors · CommentOpenReview ↗

We are glad to hear that all concerns are addressed. Many thanks for your time and effort!

Reviewer tkKpOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
2/4
Significance
3/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper studies Sharpness-Aware Minimization (SAM) from the perspective of anti-overfitting. The authors argue that existing explanations of SAM based on flatness, gradient norm regularization, or Hessian eigenvalues do not fully explain its generalization behavior. To address this gap, they analyze mini-batch-level sharpness and relate it to the gradient norm and the KL divergence between predictions at the current parameters and at the SAM-perturbed parameters. They further introduce the notion of gradient consistency, intended to characterize the alignment between the mini-batch gradient and per-example gradients. Based on this analysis, the paper proposes CASAM, a SAM variant that reweights examples according to gradient consistency, and evaluates it on several image classification benchmarks, including noisy-label settings.

The paper addresses an interesting and relevant problem in the SAM literature, and the attempt to connect SAM’s behavior to per-example gradients and anti-overfitting is potentially valuable. The proposed CASAM algorithm is also a reasonable and interesting extension of the analysis. However, the current presentation significantly weakens the paper. The writing is difficult to follow, several key intuitions are insufficiently justified, and the experimental evidence is not organized effectively. In particular, some important results appear to be relegated to the appendix, while less central figures and toy experiments occupy space in the main paper. Overall, I believe the paper has potential, but its current form makes it difficult to fully assess the strength of the claims and the practical relevance of the proposed method.

Strengths and weaknesses

STRENGTHS:

  • The paper tackles an important and timely question: understanding why SAM improves generalization beyond standard flatness-based explanations.
  • The focus on per-example gradients and their relationship with the mini-batch gradient is interesting and could provide a useful perspective on SAM’s anti-overfitting behavior.
  • CASAM is a concrete algorithmic contribution derived from the proposed analysis, rather than only a diagnostic or theoretical observation.
  • The appendix appears to contain additional experimental comparisons across datasets, suggesting that the authors have performed more evaluation than what is immediately visible in the main paper.

WEAKNESSES:

  • The paper is not clearly written and is harder to understand than necessary, especially given that the core issue being studied should be accessible to readers familiar with SAM.
  • The interpretation of B+ samples as “hard” and B− samples as “easy” is not sufficiently justified. A positive or negative loss differential under the SAM perturbation does not necessarily correspond to intrinsic sample difficulty.
  • The connection between increased angular separation, gradient consistency, and reduced overfitting is not clearly explained. The paper states this intuition but does not sufficiently justify the mechanism.
  • The main-body experimental analysis feels limited and poorly organized. Some more relevant experiments are placed in the appendix, while less central material, such as the toy moon dataset experiment or some figures, occupies valuable main-paper space.
  • The performance improvements of CASAM over other SAM variants appear marginal, and it is unclear whether these gains are statistically reliable or practically significant given the added complexity.
  • The related work is somewhat incomplete for a fast-moving area such as SAM and should better account for recent work on memorization, privacy risks, late-training dynamics, and convergence/sample-complexity analyses.
Questions
  • Can the authors clarify the interpretation of B+ and B− as hard and easy samples? The paper seems to interpret B+ samples as hard examples and B− samples as easy examples. However, it is not clear that the sign of the SAM-induced loss differential is a reliable indicator of sample difficulty. A sample may be easy in the usual sense but still experience a positive loss change under a specific SAM perturbation, for example because the current solution is locally sharp.
  • What is the precise mechanism linking angular separation to reduced overfitting? The authors argue that SAM implicitly increases angular separation between per-example gradients and the mini-batch gradient, and that this alleviates overfitting. However, the paper does not clearly explain why this should be the case. Is the argument that this reduces memorization of individual examples, prevents outlier gradients from dominating, improves robustness, or changes the optimization trajectory in another way?
  • Some results, such as those in Figure 5.a, appear unstable, and it is not clear whether the authors ran multiple random seeds. Since the improvements of CASAM over other SAM variants seem relatively marginal, it is important to establish whether these differences are statistically meaningful rather than due to random fluctuations. Are the reported gains of CASAM statistically reliable?
  • CASAM appears to introduce additional complexity, including the computation of a KL-divergence-related quantity or additional per-example reweighting. However, the empirical gains over existing SAM variants seem marginal in several settings. Why should practitioners use CASAM over simpler SAM variants?
  • Can the experimental section be reorganized and expanded? The main paper presents only a limited subset of the experiments, while the appendix seems to contain additional comparisons across datasets. It is unclear why some of these more informative experiments were not included in the main body. The authors could improve the paper by shrinking some main-body tables/plots, moving less central figures such as Figures 3 and 4 or the toy moon dataset experiment to the appendix, and using the saved space for more relevant empirical comparisons.
  • Given that CASAM’s improvements appear modest, it is important to understand whether the method is robust to the choice of SAM radius, learning rate, batch size, architecture, and noise level. The appendix suggests that some additional evaluations exist, but the overall experimental coverage still seems limited compared to prior SAM-variant papers. Can the authors expand the hyperparameter and robustness analysis?
  • The paper does not sufficiently discuss possible limitations of the proposed reweighting mechanism. For instance, if CASAM modulates the angle between the ascent direction and per-example gradients, could it introduce a bias toward learning some features or classes over others? Could it systematically downweight rare, noisy, minority, or difficult-but-informative examples?
  • The related work appears somewhat incomplete, particularly given how quickly the SAM literature is evolving. The authors should better situate their contribution relative to recent work on memorization, membership privacy, sample complexity, and late-training flatness dynamics [1,2,3,4]. How do these related work relate to this paper?

[1]. Agiollo, Andrea, Young In Kim, and Rajiv Khanna. "Approximating memorization using loss surface geometry for dataset pruning and summarization." Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. 2024.

[2]. Kim, Young In, et al. "Membership Privacy Risks of Sharpness Aware Minimization." The Fourteenth International Conference on Learning Representations.

[3]. Zhou, Zhanpeng, et al. "Sharpness-aware minimization efficiently selects flatter minima late in training." International Conference on Learning Representations. Vol. 2025. 2025.

[4]. Oikonomou, Dimitris, and Nicolas Loizou. "Sharpness-aware minimization: General analysis and improved rates." arXiv preprint arXiv:2503.02225 (2025).

Limitations

The authors do not adequately discuss the limitations and potential implications of their work. For example, the authors should consider whether the proposed reweighting mechanism could introduce unintended biases in the learning process. Modulating the ascent direction based on gradient consistency may favor certain types of samples, features, or classes over others. This could be especially relevant in noisy-label, imbalanced, or subgroup-sensitive settings. A more transparent discussion of these limitations would improve the paper substantially.

Final justification

During the rebuttal, the authors provided a more detailed explanation of the contribution's central concept as well as additional experiments to show the effectiveness and statistical reliability of the approach. Therefore, I would like to raise my score.

Formatting concerns

None

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We appreciate your careful review, and the comments are really constructive. Below, we respond to your concerns point-by-point.

(Q1): The paper is not clearly written...the main-body experimental analysis feels limited and poorly organized...

(R1): Thanks for the comment. To better organize our work, we have deferred the SAM formula in Introduction to the beginning of Section 3 and shrunk the figures/tables to include more experiments, particularly the results on realistic noisy datasets (Appendix B).

(Q2): The interpretation of B+\mathcal{B} _ + as “hard” and B−\mathcal{B} _ - as “easy” is not sufficiently justified...A sample may be easy in the usual sense but still experience a positive loss change under a specific SAM perturbation, for example because the current solution is locally sharp.

(R2): We thank the reviewer for pointing out this issue. We agree that the loss differential under SAM perturbation does not fully equate to intrinsic sample difficulty. While there is no single universal definition of "hard" and "easy" examples, it is generally acceptable to assume that hard examples correspond to having large gradients. In this case, the ascent direction of SAM is dominated by the large gradients and the loss differential of these examples is more likely to be positive. In contrast, for an easy example with a small gradient, even when the solution is locally sharp, its loss differential is less likely to be positive. So, in this sense, we can view B+\mathcal{B} _ + as hard and B−\mathcal{B} _ - as easy. But it is worth noting that this distinction is not fixed because it is only valid within one iteration. To avoid confusion, we have added one sentence after Line 50 to clarify this subtle difference.

(Q3): The precise mechanism between increased angular separation and reduced overfitting is not clearly explained...

(R3): This is a very nice question. For simplicity, we can assume that the per-example gradient is composed of two parts: features shared across the mini-batch examples and features specific only to itself. Now we observe that SAM increases the angular separation. This indicates that SAM encourages the mini-batch gradient to be represented by the shared features and to eliminate those features that are sample-specific. As a result, it steers the updates to be less optimized for any individual example. This is particularly useful during late training, where clean examples tend to have small gradients and noisy or atypical examples often produce large, distinctive gradients. If those large or distinctive gradients remain highly aligned with the mini-batch update, the optimizer continues to adjust parameters to fit them. Increasing angular separation means those distinctive gradients contribute less to the update direction, slowing memorization of outliers or mislabeled samples. This aligns well with the idea that overfitting arises from fitting idiosyncratic patterns that do not generalize. To improve readability, we have added a few sentences after Line 216 to provide an explicit explanation.

(Q4): Some results, such as those in Figure 5.a, appear unstable...It is not clear whether the authors ran multiple random seeds and whether these gains are statistically reliable....CASAM appears to introduce additional complexity...why should practitioners use CASAM over simpler SAM variants?

(R4): Thanks for the comment. We agree that random seed indeed affects the final accuracy. Our results are essentially repeated with three different random seeds, and the gains are thus statistically reliable. While Figure 5a looks a little bit unstable, it basically reflects how the test accuracy changes with γ\gamma. Note that when γ=0\gamma=0, CASAM degenerates to the vanilla SAM. Therefore, we can observe that γ<0\gamma<0 often promotes generalization while γ>0\gamma>0 impedes generalization, which is more pronounced for ρ=0.2\rho=0.2. In the revision, we have run with more seeds and added the missing error bar to make the change trend more convincing.

Moreover, the incurred memory cost is almost negligible. At each iteration, we only need to store the one-dimensional prediction probability vector p\mathbf{p} and p~\widetilde{\mathbf{p}} for the mini-batch. Consider a mini-batch of one million examples; this vector only costs 4 Mb of GPU memory. On the other hand, the computation overhead is almost negligible as well. Notice that the KL-divergence term in C(z)\mathcal{C}(z) (Eq. 3) is for Bernoulli distribution and elementwise. So, the overall computational cost only involves several basic operations on the one-dimensional vectors p\mathbf{p} and p~\widetilde{\mathbf{p}}. To demonstrate this, we measured the computational footprint on ImageNet using ResNet-18/50 architecture on a 4xPro5000 GPU node. Compared to vanilla SAM, CASAM requires almost negligible memory and computational cost, as shown in the Table below (averaged over 5 epochs).

wall-clock time(s/epoch) Peak Allocated Memory (Mb) Throughput(images/s)
ResNet-18 SAM 199.68 6962.81 6416.08
CASAM 201.34 6963.68 6363.12 (-0.82%)
ResNet-50 SAM 529.59 22639.02 2424.51
CASAM 530.96 22640.11 2414.28 (-0.42%)

Furthermore, the improvement of CASAM over other SAM variants is also substantial. For example, compared to the recent VASSO optimizer, CASAM improves the ImageNet accuracy by ~0.5% and the noisy cifar10 accuracy by ~2%. This suggests that CASAM is particularly useful for noisy datasets. Moreover, since CASAM only modifies the objective function of the descent step, it can be easily integrated with other SAM variants. In a preliminary experiment on CIFAR-100 with ResNet-56, we can observe that CASAM is not a replacement but a complement to other SAM variants.

Test accuracy (%) Test accuracy (%)
ASAM 73.36 ASAM+CASAM 74.94 (+0.58)
VaSSO 74.73 VaSSO+CASAM 75.22 (+0.49)
GASAM 74.18 GASAM+CASAM 74.99 (+0.81)
EigenSAM 74.42 EigenSAM+CASAM 75.16 (+0.74)

(Q5): It is important to understand whether the method is robust...Can the authors expand the hyperparameter and robustness analysis?

(R5): Thanks for the question. We understand your concern regarding the introduction of new hyperparameters. However, our sensitivity studies demonstrate that CASAM is robust to these choices. Apart from the reported results on vision datasets, we also investigated the robustness of γ\gamma and the squeezing functions for LSTM on Penn Treebank (Average PPL over three runs).

squeezing function γ=−4.0\gamma=-4.0 -3.0 -2.0 -1.0 1.0 2.0
ρ\rho=0.05 sigmoid 66.95 65.24 64.84 65.02 69.77 69.92
arctan 66.88 65.27 64.76 65.03 69.85 70.30
hyperbolic 67.76 65.43 64.87 65.11 69.35 70.38
min-max 67.41 66.21 65.77 66.17 69.75 70.43
ρ\rho=0.2 sigmoid 66.93 66.38 65.68 65.85 70.64 70.70
arctan 66.02 65.55 65.49 65.69 70.68 70.77
hyperbolic 66.72 65.88 65.89 66.71 70.21 70.46
min-max 68.11 67.36 66.09 66.85 70.39 70.48

Again, we can observe that when γ>0\gamma>0 generlly performs worse than γ<0\gamma<0, and γ=−3,−4\gamma=-3, -4 generally performs worse than γ=−2,−1\gamma=-2, -1. This suggests that γ\gamma should be smaller than 0 and should not be too small. Furthermore, the min-max squeezing function generally performs much worse than other functions. And, the arctan function is most recommended, just as in the vision task. Therefore, without extensive dataset-specific tuning, a principled and robust selection strategy is to select γ\gamma from {-2, -1}, and arctan can be used as the squeezing function by default.

(Q6): The paper does not sufficiently discuss possible limitations of the proposed reweighting mechanism...Could it systematically downweight rare, noisy, minority, or difficult-but-informative examples?

(R6): We thank the reviewer for raising this insightful point. We highlight that while CASAM excels at suppressing non-systematic noise and memorization, applying it to severely long-tailed/class-imbalanced datasets requires careful calibration of the parameter γ\gamma. For example, in long-tailed or minority-class distributions, rare or hard-but-clean examples may also produce gradients that diverge from the majority mini-batch trajectory. Because minority-class gradients contribute less to the overall mini-batch average, CASAM with γ<0\gamma<0 could inadvertently downweight these minority-class or fine-grained feature updates during early training, potentially slowing down their representation learning relative to dominant classes. In this case, letting γ>0\gamma>0 may be a better choice if our primary goal is to learn the minority.

In the revision, we have added a paragraph to explicitly discuss the possible limitations.

(Q7): The related work appears somewhat incomplete...should better situate their contribution relative to recent work on memorization, membership privacy, sample complexity, and late-training flatness dynamics [1,2,3,4].

(R7): Thanks for recommending these papers. [1] shows how to use the solutions of SAM and SGD to measure to which degree each example is memorized, therefore enabling dataset pruning. [2] demonstrates that SAM increases model vulnerability to membership inference attacks. [3] and [4] are more focused on the learning dynamics and the convergence analysis. Different from them, our work provides an explanation of why SAM is robust to overfitting and how it can be used to guide the design of new optimizers. For completeness, we have included and discussed these papers in the revision.

At last, we want to thank you once again for your time and effort. We hope that we have addressed most of your concerns, and please let us know if you have further questions.

Reviewer tkKp · CommentOpenReview ↗

I would like to thank the author for the detailed rebuttal. They have addressed most of my concerns, making the core inutition behind their contribution much clearer. Moreover, the extended experimental analysis and the proof they provided on the computational complexity of CASAM are fundamentally improving the contribution. Therefore, I will raise my score and argue for paper acceptance.

Authors · CommentOpenReview ↗

Dear reviewer,

We are glad to hear that most of your concerns are addressed. Many thanks for your time and effort!

Best wishes

Reviewer QmMXOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper studies why SAM improves model generalization, and argues that existing explanations based on “gradient-norm regularization” or “reducing Hessian eigenvalues / finding flat minima” are not sufficient. The authors find that training only on the hard examples whose losses increase under SAM perturbations can lead to smaller Hessian eigenvalues, but worse generalization, suggesting that flatness alone cannot fully explain the effectiveness of SAM.

The paper reanalyzes SAM from the perspective of overfitting prevention. First, the authors approximately decompose the empirical sharpness of SAM into two terms: the mini-batch gradient norm and the KL divergence between the model’s predictive distributions before and after perturbation. This indicates that SAM not only penalizes the gradient norm, but also implicitly constrains the sensitivity of the predictive distribution to parameter perturbations. Based on this observation, the authors propose CASAM, which reweights samples in the descent step of SAM according to gradient consistency.

Strengths and weaknesses

Strengths:

  1. The paper addresses a valuable question. It points out the limitations of flatness- or Hessian-based explanations of SAM, and uses a hard-example-only counterexample to show that “being flatter” does not necessarily imply better generalization.

  2. The sample-level perspective is novel. Gradient consistency explains the effect of SAM by examining the relationship between per-sample gradients and the mini-batch gradient, which is more fine-grained than analyzing the overall loss landscape alone.

  3. The proposed method is simple and practical, incurs relatively small additional overhead, and is supported by fairly comprehensive experiments across multiple datasets and settings.

Weaknesses:

  1. The theoretical approximation relies on fairly strong assumptions. The sharpness decomposition depends on small perturbations, Taylor expansion, and the Hessian-Fisher approximation, which may not hold under model misspecification, in the early stage of training, or under strong label noise.

  2. The hyperparameter γ\gamma requires tuning. Although the authors suggest using a negative γ\gamma in the overfitting stage, it remains unclear how γ\gamma should be selected or dynamically adjusted across different tasks, training stages, and noise levels.

  3. The paper lacks discussion of other SAM variants based on sample reweighting, such as Sharpness-Aware Minimization with Dynamic Reweighting, Improving Resistance to Noisy Label Fitting by Reweighting Gradient in SAM, and Unveiling mm-Sharpness Through the Structure of Stochastic Gradients.

Questions
  1. The paper decomposes sharpness into a gradient-norm term and a KL term, but this relies on a local second-order expansion and the Hessian-Fisher relationship. When does this approximation hold in practical training?

  2. The paper shows that test accuracy decreases as γ\gamma increases within [−2,2][-2, 2], but it does not explain whether further decreasing γ\gamma would lead to additional improvement, nor why γ=−1\gamma = -1 is chosen for ImageNet instead of γ=−2\gamma = -2. This makes the choice of γ\gamma appear empirical.

  3. The authors argue that γ>0\gamma > 0 is suitable for the underfitting regime, while γ<0\gamma < 0 is suitable for the overfitting regime. However, how can one know before running the experiment whether the model is underfitting or overfitting? Could a dynamic schedule for γ\gamma be designed?

  4. Is the method effective on a broader range of tasks, such as fine-tuning, NLP, and LLM training?

  5. Have the authors conducted an ablation that removes the KL term in C(z)C(z) and uses only first-order information?

Limitations

yes

Final justification

The rebuttal substantially strengthens the empirical evaluation through additional ablations, broader task coverage, dynamic scheduling experiments, and comparisons with related methods. These results address several of my earlier concerns. However, the theoretical interpretation still relies on restrictive local approximations, the hyperparameter choice remains partly empirical, and the LLM evidence is preliminary. I therefore maintain my score of 4, with increased confidence in the positive assessment.

Formatting concerns

no

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We appreciate your careful review, and the comments are really helpful. Below, we addressed your concerns point-by-point.

(Q1): The theoretical approximation relies on fairly strong assumptions. The sharpness decomposition depends on small perturbations, Taylor expansion, and the Hessian-Fisher approximation, which may not hold under model misspecification, in the early stage of training, or under strong label noise. When does this approximation hold in practical training?

(R1): We thank the reviewer for this question. We agree that the Hessian-Fisher approximation and local second-order expansions are strongest when the model is near a local minimum and the gradients are small. In early training stages or under severe label noise, the exact mathematical equivalence naturally loosens. However, in standard SAM applications, the perturbation radius ρ\rho is kept deliberately small (e.g., ρ≈\rho\approx 0.05 for vision tasks and ≈\approx 0.01 for LLM training). Under these small-perturbation regimes and particularly in the late training stages (where SAM actually works as suggested by Zhou et al., 2025), second-order approximations remain a standard, reliable proxy for local landscape geometry, as established by prior literature (Wu et al., 2024; Zhou et al., 2025; Wang et al., 2026).

  • Wu et al., CR-SAM: Curvature regularized sharpness-aware minimization, AAAI, 2024.
  • Zhou et al., Sharpness-aware minimization efficiently selects flatter minima late in training, ICLR, 2025.
  • Wang et al., Fix the Loss, Not the Radius: Rethinking the Adversarial Perturbation of Sharpness-Aware Minimization, ICML, 2026.

(Q2): The hyperparameter requires tuning. Although the authors suggest using a negative in the overfitting stage, it remains unclear how should be selected or dynamically adjusted across different tasks, training stages, and noise levels. The paper shows that test accuracy decreases as γ\gamma increases within [-2,2], but it does not explain whether further decreasing γ\gamma would lead to additional improvement, nor why γ=−1\gamma=-1 is chosen for ImageNet instead of γ=−2\gamma=-2. This makes the choice appear empirical.

(R2): Thanks for the nice question. Since deep neural networks are prone to overfitting the training datasets (Zhang et al., 2017), just as depicted in Figure 5a, it is always recommended to select γ<0\gamma<0. Apart from the reported results on vision datasets, we also investigated the robustness of γ\gamma and the squeezing functions for LSTM on Penn Treebank (Average PPL over three runs).

squeezing function γ=−4.0\gamma=-4.0 -3.0 -2.0 -1.0 1.0 2.0
ρ\rho=0.05 sigmoid 66.95 65.24 64.84 65.02 69.77 69.92
arctan 66.88 65.27 64.76 65.03 69.85 70.30
hyperbolic 67.76 65.43 64.87 65.11 69.35 70.38
min-max 67.41 66.21 65.77 66.17 69.75 70.43
ρ\rho=0.2 sigmoid 66.93 66.38 65.68 65.85 70.64 70.70
arctan 66.02 65.55 65.49 65.69 70.68 70.77
hyperbolic 66.72 65.88 65.89 66.71 70.21 70.46
min-max 68.11 67.36 66.09 66.85 70.39 70.48

Again, we can observe that when γ>0\gamma>0 generlly performs worse than γ<0\gamma<0, and γ=−3,−4\gamma=-3, -4 generally performs worse than γ=−2,−1\gamma=-2, -1. This suggests that γ\gamma should not be too small. Furthermore, min-max squeezing function generally performs much worse than other functions. And, the arctan function is most recommended, just as in the vision task.

  • Zhang et al., Understanding deep learning requires rethinking generalization, ICLR, 2017.

Why not γ=−2\gamma = -2 on ImageNet? Actually, γ\gamma is best selected from {-0.5, -1, -2}. While decreasing γ\gamma strongly suppresses memorization of sharp examples, pushing it to −2-2 on highly complex datasets like ImageNet over-penalizes informative but difficult examples, leading to optimization stagnation. γ=−1\gamma = -1 provides the optimal balance between regularization and maintaining sufficient learning capacity.

(Q3): The authors argue that γ>0\gamma>0 is suitable for the underfitting regime, while γ<0\gamma<0 is suitable for the overfitting regime. However, how can one know before running the experiment whether the model is underfitting or overfitting? Could a dynamic schedule for γ\gamma be designed?

(R3): This is an excellent point. Typically, the early epochs of training correspond to underfitting (feature learning), while late stages correspond to overfitting (memorization). Inspired by this question, we implemented a dynamic schedule where γ\gamma changes in a cosine way. The Table below shows how the test accuracy changes with the schedule (ResNet-56 on CIFAR-100, mean over three runs).

Init γ\gamma End γ\gamma Test accuracy(%)
-1 -1 73.39
0 -1 73.83
1 1 72.91
1 0 73.21
1 -1 73.54
-1 1 73.18

Once again, we observe that a negative γ\gamma is preferred for improving generalization. And, a dynamic scheduling from large γ=0\gamma=0 to small γ=−1\gamma=-1 (73.83%) slightly exceeds the performance of a static γ=−1\gamma=-1 (73.39%). This preliminary result indicates that we can remove the need for prior knowledge of the regime to design such a decaying schedule, but the effectiveness requires to be extensively verified in future work.

(Q4): Is the method effective on a broader range of tasks, such as fine-tuning, NLP, and LLM training?

(R4): Actually, CASAM is still effective on NLP tasks, for example, see Appendix A. In the revision, we also conducted full-parameter fine-tuning experiments on CIFAR-10 and CIFAR-100 using an ImageNet-1K pretrained ViT-B/16.

Method CIFAR-10 (%) CIFAR-100 (%)
SGD 98.08 88.53
SAM 98.23 89.19
ASAM 98.32 89.29
VaSSO 98.33 89.26
GA-SAM 98.06 89.21
LE-SAM 98.39 89.36
CASAM 98.45 89.57

On CIFAR-10, CASAM obtains 98.45%, outperforming SGD and SAM by 0.37 and 0.22 percentage points, respectively. On the more challenging CIFAR-100 dataset, CASAM reaches 89.57%, improving upon SGD by 1.04 percentage points and standard SAM by 0.38 percentage points. These results indicate that CASAM can be effectively extended from training models from scratch to full-parameter fine-tuning of pretrained vision transformers.

Finally, for NanoGPT-124M (block_size is truncated to 256 for a quick run), the best validation losses of AdamW, SAM, and CASAM are 3.6232, 3.6199, 3.6095. This implies that CASAM can be applied to LLM training as well.

(Q5): Have the authors conducted an ablation that removes the KL term in C(z)\mathcal{C}(z) and uses only first-order information?

(R5): Thanks for the suggestion. In the revision, we use LD-SAM to denote this variant, and also include two other variants, δ\delta-SAM [1] and SANER [2]. On the noisy cifar10, we can observe that LD-SAM substantially performs worse than CASAM. This confirms the claim: it is not merely the loss differential that matters, but the gradient consistency relative to the mini-batch update direction that drives the anti-overfitting effect.

τ=0.1\tau=0.1 τ=0.3\tau=0.3 τ=0.5\tau=0.5 τ=0.7\tau=0.7
Asymmetric SAM 90.82 87.76 68.13 57.83
CASAM 92.02 89.66 75.65 58.99
LASAM 90.76 88.92 65.01 56.68
SANER 91.57 89.22 74.98 57.66
δ\delta-SAM 89.88 87.79 71.71 56.35
IDN SAM 88.9 84.38 78.48 40.24
CASAM 89.75 85.85 78.72 46.25
LASAM 89.02 84.86 77.31 44.08
SANER 89.31 84.96 78.52 45.73
δ\delta-SAM 88.60 83.81 78.05 40.27

(Q6): The paper lacks discussion of other SAM variants based on sample reweighting, such as

  • [1] Zhou et al., Sharpness-Aware Minimization with Dynamic Reweighting, ACL, 2022.
  • [2] Luong et al., Improving Resistance to Noisy Label Fitting by Reweighting Gradient in SAM, AISTATS, 2026.
  • [3] Luo et al., Unveiling mm-Sharpness Through the Structure of Stochastic Gradient Noise, NeurIPS, 2025.

(R6): We thank the reviewer for directing us to these papers. [1] proposes δ\delta-SAM to reweight each example during the ascent step, while [2] designs SANER to deliberately reduce the magnitudes of the gradient components during the descent step to slow noisy learning. Note δ\delta-SAM requires two extra forward propagations to obtain the weights for each example, which, as a result, is much slower than SAM. In contrast, SANER additionally needs to save the gradient state at the ascent step and thus increases the memory usage. Moreover, [3] proposes RW-SAM to mimic the generalization benefits of mm-sharpness while being parallelizable. In the revision, we have added δ\delta-SAM and SANER as two additional baselines in the noisy training. The results are reported in the previous Table of (Q5), while [3] is only included in the Related works because it is more targeted for multi-GPU training.

At last, we want to thank you once again for your time and effort. We hope that we have addressed most of your concerns, and please let us know if you have further questions.

Reviewer QmMX · CommentOpenReview ↗

Thank you for the detailed response and the substantial additional results. The new ablations, broader evaluations, and scheduling experiment have addressed several of my concerns and strengthened the empirical support for the work. Some limitations remain in the generality of the theoretical analysis and hyperparameter selection, so I will maintain my score of 4.

Authors · CommentOpenReview ↗

Dear reviewer,

We are glad to hear that most of your concerns are addressed. In the revision, we will give more clarifications on the remaining aspects. Many thanks for your time and effort!

Best wishes

Reviewer Y9WoOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper revisits the mechanism behind Sharpness-Aware Minimization (SAM) and argues that existing explanations based solely on flatness, gradient norm regularization, or Hessian eigenvalues are insufficient to explain its generalization ability. The authors analyze SAM from an anti-overfitting perspective by introducing the notion of gradient consistency, which measures the alignment between per-example gradients and the mini-batch gradient. They theoretically show that empirical sharpness can be approximately decomposed into a gradient norm term and a KL-divergence term, and that gradient consistency decreases during training. Motivated by these observations, they propose CASAM, which reweights training examples according to gradient consistency. Experiments on CIFAR, ImageNet-1K, and several noisy-label benchmarks demonstrate consistent improvements over SAM and several recent variants.

Strengths and weaknesses

Strengths:

  • The paper provides a novel anti-overfitting interpretation of SAM through gradient consistency, complementing existing flatness-based explanations.
  • CASAM is straightforward to implement, introduces only one additional hyperparameter, and can be easily integrated into existing SAM implementations.
  • The method is evaluated across multiple architectures, datasets, and noisy-label settings, consistently outperforming SAM and several recent variants.

Weaknesses:

  • The novelty of the theoretical insights is somewhat incremental. While the gradient consistency perspective is interesting, the decomposition of sharpness into gradient norm and KL-divergence appears closely related to existing first- and second-order analyses of SAM, making the conceptual novelty somewhat limited.
  • Limited analysis of computational overhead. Although CASAM is claimed to incur almost no additional cost, the paper does not report wall-clock training time, memory consumption, or scalability on large models, particularly considering the additional per-example weighting computations.
  • The method introduces additional hyperparameters without sufficient guidance. CASAM requires selecting both the weighting parameter γ and the squeezing function. Although sensitivity studies are included, it remains unclear how robust these choices are across different tasks and whether they require dataset-specific tuning.
  • Lack of a comprehensive discussion of related works. There are some theoretical works of SAM, such as generalization bound, adversarial training, and understanding, that need to be incorporated and discussed to strengthen the contribution in the field:
    • Zou et al., Towards robust out-of-distribution generalization bounds via sharpness, in ICLR 2024.
    • Huang et al., Robust generalization against photon-limited corruptions via worst-case sharpness minimization, in CVPR 2023.
    • Lyu et al., Understanding the generalization benefit of normalization layers: Sharpness reduction, NeurIPS 2022.
Questions
  • Most theoretical results rely on second-order Taylor approximations and small-perturbation assumptions. How well do these approximations hold in modern deep networks with highly non-convex loss landscapes and relatively large perturbation radii?
  • The paper states that CASAM introduces almost no computational overhead. Could the authors report actual wall-clock training time, GPU memory usage, and throughput compared with vanilla SAM on ImageNet-scale experiments?
  • CASAM introduces both the weighting parameter γ and the squeezing function. How sensitive is the method to these choices across different architectures and datasets? Is there a principled strategy for selecting these hyperparameters without extensive tuning?
Limitations

Yes

Final justification

After rebuttal, the authors justified their main novelty while distinguishing their approach from prior SAM analyses. They justify their theory under SAM's small perturbation setting, show negligible computational overhead, and demonstrate robust hyperparameter choices with recommended defaults. Hence, I am satisfied with their rebuttal for now.

Formatting concerns

NA

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We sincerely thank the reviewer for the careful reading and the helpful comments. Below, we respond to your concerns point-by-point.

(Q1): The novelty of the theoretical insights is somewhat incremental. While the gradient consistency perspective is interesting, the decomposition of sharpness into gradient norm and KL-divergence appears closely related to existing first- and second-order analyses of SAM, making the conceptual novelty somewhat limited...Most theoretical results rely on second-order Taylor approximations and small-perturbation assumptions. How well do these approximations hold in modern deep networks with highly non-convex loss landscapes and relatively large perturbation radii?

(R1): We thank the reviewer for the thoughtful comment. The novelty of our work are two-fold: on one hand, we build a quantitative relation between the sharpness and the first- and second-order information of the loss function (emprically verfied in Figure E.1). This is dramatically different from previous works such as (Compagnoni et al., 2023) and (Luo et al., 2025) that model SAM as an SDE, where the first- and second-order information (e.g. Hessian and covariance) are encoded in the drift and diffusion terms. In contrast, our work can quantify them and distinguish which one is dominating over another during training. On the other hand, C(z)\mathcal{C}(z) further quantifies to what extent each example contributes to the mini-batch gradient, which is quite useful for data reweighting. This decomposition paves the way to analyze dynamic gradient consistency at the instance level, rather than analyzing the average loss landscape flatness. Furthermore, we acknowledge that modern deep networks have highly non-convex loss landscapes. However, in standard SAM applications, the perturbation radius ρ\rho is kept deliberately small (e.g., ρ=0.05\rho = 0.05) because SAM with a large ρ\rho performs even worse than SGD. Under these small-perturbation regimes and particularly in the late training stages, second-order approximations remain a standard, reliable proxy for local landscape geometry, as established by prior literature (Wu et al., 2024; Zhou et al., 2025; Wang et al., 2026).

  • Compagnoni et al., A. An SDE for modeling SAM: Theory and insights, ICML, 2023.
  • Luo et al., Unveiling mm-Sharpness Through the Structure of Stochastic Gradient Noise, NeurIPS, 2025.
  • Wu et al., CR-SAM: Curvature regularized sharpness-aware minimization, AAAI, 2024.
  • Zhou et al., Sharpness-aware minimization efficiently selects flatter minima late in training, ICLR, 2025.
  • Wang et al., Fix the Loss, Not the Radius: Rethinking the Adversarial Perturbation of Sharpness-Aware Minimization, ICML, 2026.

(Q2): Limited analysis of computational overhead....Could the authors report actual wall-clock training time, GPU memory usage, and throughput compared with vanilla SAM on ImageNet-scale experiments?

(R2): We appreciate the opportunity to make our efficiency claims concrete. Because CASAM only leverages the one-dimensional loss vector computed during the standard SAM forward/backward passes, the per-example weighting and squeezing function computations actually introduce lightweight scalar operations.

To demonstrate this, we measured the computational footprint on ImageNet using ResNet-18/50 architecture on a 4xPro5000 GPU node. Compared to vanilla SAM, CASAM requires almost negligible memory and computational cost, as shown in the Table below (averaged over 5 epochs).

wall-clock time(s/epoch) Peak Allocated Memory (Mb) Throughput(images/s)
ResNet-18 SAM 199.68 6962.81 6416.08
CASAM 201.34 6963.68 6363.12 (-0.82%)
ResNet-50 SAM 529.59 22639.02 2424.51
CASAM 530.96 22640.11 2414.28 (-0.42%)

(Q3): The method introduces additional hyperparameters without sufficient guidance. CASAM requires selecting both the weighting parameter γ\gamma and the squeezing function. Although sensitivity studies are included, it remains unclear how robust these choices are across different tasks and whether they require dataset-specific tuning. How sensitive is the method to these choices across different architectures and datasets? Is there a principled strategy for selecting these hyperparameters without extensive tuning?

(R3): Thanks for the question. We understand your concern regarding the introduction of new hyperparameters. However, our sensitivity studies demonstrate that CASAM is robust to these choices. Apart from the reported results on vision datasets, we also investigated the robustness of γ\gamma and the squeezing functions for LSTM on Penn Treebank (Average PPL over three runs).

squeezing function γ=−4.0\gamma=-4.0 -3.0 -2.0 -1.0 1.0 2.0
ρ\rho=0.05 sigmoid 66.95 65.24 64.84 65.02 69.77 69.92
arctan 66.88 65.27 64.76 65.03 69.85 70.30
hyperbolic 67.76 65.43 64.87 65.11 69.35 70.38
min-max 67.41 66.21 65.77 66.17 69.75 70.43
ρ\rho=0.2 sigmoid 66.93 66.38 65.68 65.85 70.64 70.70
arctan 66.02 65.55 65.49 65.69 70.68 70.77
hyperbolic 66.72 65.88 65.89 66.71 70.21 70.46
min-max 68.11 67.36 66.09 66.85 70.39 70.48

Again, we can observe that when γ>0\gamma>0 generlly performs worse than γ<0\gamma<0, and γ=−3,−4\gamma=-3, -4 generally performs worse than γ=−2,−1\gamma=-2, -1. This suggests that γ\gamma should be smaller than 0 and should not be too small. Furthermore, the min-max squeezing function generally performs much worse than other functions. And, the arctan function is most recommended, just as in the vision task. Therefore, without extensive dataset-specific tuning, a principled and safe selection strategy is to select γ\gamma from {-2, -1}, and arctan can be used as the squeezing function by default.

(Q4): Lack of a comprehensive discussion of related works. There are some theoretical works of SAM, such as generalization bound, adversarial training, and understanding, that need to be incorporated and discussed to strengthen the contribution in the field:

  • Zou et al., Towards robust out-of-distribution generalization bounds via sharpness, ICLR, 2024.
  • Huang et al., Robust generalization against photon-limited corruptions via worst-case sharpness minimization, CVPR, 2023.
  • Lyu et al., Understanding the generalization benefit of normalization layers: Sharpness reduction, NeurIPS, 2022.

(R4): We are very grateful to the reviewer for pointing out these works. In the revision, we have updated our Related Work section to incorporate them. Moreover, we have also included several papers such as δ\delta-SAM (ACL, 2022) and SANER (AISTATS, 2026) suggested by other reviewers to further strengthen our work.

  • [1] Zhou et al., Sharpness-Aware Minimization with Dynamic Reweighting, ACL, 2022.
  • [2] Luong et al., Improving Resistance to Noisy Label Fitting by Reweighting Gradient in SAM, AISTATS, 2026.

At last, we want to thank you once again for your time and effort. We hope that we have addressed most of your concerns, and please let us know if you have further questions.

Reviewer Y9Wo · CommentOpenReview ↗

Thank you for the rebuttal

Dear Authors,

Thank you for the detailed rebuttal. I am happy with the justifications and willing to vote for acceptance.

Just one further question: can the proposed framework be adapted across architectures such as language models and scaled to LLMs?

Best, Reviewer.

Authors · CommentOpenReview ↗

Dear reviewer,

Many thanks for the positive reply and we are glad to hear that your conerns are addressed. Regarding to your question, we believe the answer is yes. In Appendix A, we have trained a LSTM network on Penn Treebank and a T5 network on BoolQ datasets. Tables A.1 and A.2 indicate that CASAM outperms SAM, for exmple, by reducing the PPL from 67.31 to 65.66 for Adam and from 67.35 to 64.91 for AdaBelief. Moreover, for the popular transformer-based model, NanoGPT-124M (block_size is truncated to 256 for a quick run), the best validation losses of AdamW, SAM, and CASAM are 3.6232, 3.6199, 3.6095. This implies that CASAM remains to be effective in LLM training. But, it is worth noting that SAM and CASAM both need to backpropagate the gradient twice for each parameter update, which poses a great challenge for practical LLM training.

Best wishes

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…