WorksComputer Science
Probing SAM Perturbations Through Statistical Replay
Abstract
Sharpness Aware Minimization (SAM) updates model parameters using gradients evaluated at adversarially perturbed weights, but it remains unclear which aspects of this procedure are sufficient to reproduce its generalization behavior. In our ResNet 18 experiments on CIFAR 10, simple curvature regularizers based on the Hessian trace and largest eigenvalue remain below SAM in validation accuracy, motivating a direct examination of its perturbations. We introduce statistical replay, a diagnostic that summarizes perturbations from reference SAM trajectories using elementwise means and standard deviations over local windows and constructs new perturbations during independent SGD training. Pure replay uses only these summaries, whereas mixed replay adds isotropic Gaussian noise. Pure replay does not reproduce SAM's validation behavior, while mixed replay and pure isotropic perturbations can approach its validation performance at selected scales without reproducing its training dynamics. An equal radius random direction within SAM performs similarly to SGD, and source, temporal, and layer interventions further suggest that replay behavior depends on perturbation construction. Together, these preliminary results weaken several simple explanations of SAM while leaving an important part of its mechanism unexplained.
Introduction
Sharpness-Aware Minimization (SAM) is designed to improve generalization by minimizing an approximate worst-case loss within a local parameter neighborhood, rather than optimizing only the empirical loss at the model’s current parameters [6]. It was originally motivated by the geometric intuition that flat solutions, whose training loss remains low under small parameter perturbations, tend to generalize [9].
At each training step, SAM first computes an approximate adversarial parameter perturbation that increases the minibatch loss within a fixed radius neighborhood, and then updates the original parameters using the gradient evaluated at the perturbed point. Although SAM often improves generalization, it remains unclear which aspects of this procedure are sufficient to reproduce its generalization behavior.
Analyses of SAM emphasize loss landscape geometry, relating its behavior to curvature regulation and movement toward flatter regions [20, 5, 2]. However, final solution sharpness does not consistently account for SAM’s generalization behavior [17]. Motivated by these geometric accounts, we first test simple curvature regularizers based on the Hessian trace and largest eigenvalue. In our preliminary experiments, neither reproduces SAM’s validation behavior, as reported in Appendix § 8. This motivates us to examine perturbation construction more directly. Minibatch stochastic gradient noise within SAM perturbations can play an important role in generalization [11]. Random parameter perturbations provide only marginal improvements in some settings [3], whereas carefully constructed random weight perturbations can achieve strong generalization performance [10]. The allocation of SAM perturbations across model layers can also affect optimization [7]. These studies analyze or modify perturbations within the training trajectory being optimized. Our work takes a complementary diagnostic perspective by examining which information remains useful when local statistics of recorded SAM perturbations are transferred to an independent trajectory.
To study this question, we treat SAM’s adversarial parameter perturbation, , as a diagnostic object. We record perturbations from reference SAM trajectories and summarize them using elementwise means and standard deviations over local training windows. During independent SGD training, we sample new perturbations from these summaries and apply them during gradient evaluation, a procedure we call statistical replay. This discards the exact recorded directions and their coupling to the source trajectory. We examine two variants: pure statistical replay uses only the recorded summaries, whereas mixed statistical replay supplements their elementwise variation with an isotropic Gaussian component. To determine whether the effect of mixed replay requires the recorded statistics, we also compare it with pure isotropic perturbations. We vary the source and temporal assignment of the recorded statistics and the layers receiving the perturbations. Replay examines what remains useful outside SAM, but it does not determine whether an arbitrary direction is sufficient within the original SAM update. We therefore include a complementary control that substitutes an equal radius random direction while leaving the remaining procedure unchanged. These interventions are intended as preliminary diagnostics rather than proposed replacements or a complete explanation of SAM.
In experiments using ResNet 18 on CIFAR 10, pure statistical replay maintains nearly perfect training accuracy but does not reproduce SAM’s validation performance. Mixed replay produces stronger regularization, while suitably scaled pure isotropic perturbations achieve comparable validation performance without using recorded SAM statistics. Neither alternative reproduces SAM’s combination of late validation performance and nearly perfect training accuracy. Source, temporal, and layer interventions further suggest that the effect of the recorded statistics depends on replay construction. Mixed replay is more consistently sensitive to source and temporal alignment, while layer restriction does not improve pure replay and some broad residual layer groups maintain mixed replay performance. The equal radius random direction control performs similarly to SGD and does not reproduce SAM’s validation behavior. Taken together, our preliminary curvature regularization and perturbation experiments weaken several simple explanations of SAM in the setting studied here, while leaving an important part of its mechanism unexplained.
Controlled Analysis of SAM Perturbations
SAM perturbations and random direction control. For minibatch , standard nonadaptive SAM computes
For the random direction control, we replace with
The first gradient evaluation is retained, but the normalized gradient direction is replaced by the random direction above. All other components of SAM remain unchanged.
Along a reference SAM trajectory, we record and compute its elementwise mean and standard deviation separately for each parameter tensor. By default, statistics are computed over consecutive windows of minibatches.
Statistical replay. During an independent SGD run, we sample
where are sampled independently for each minibatch. The parameters and scale the recorded mean and random components, respectively, while controls the contributions of the recorded variation and isotropic noise. The parameter sets the scale of the isotropic component. We refer to as pure statistical replay and as mixed statistical replay. We use as the pure isotropic baseline. As in SAM, the sampled perturbation is temporarily added to the current parameters. After evaluating the gradient at the perturbed parameters, we restore the original parameters and use the gradient for the SGD update.
Results
Our main experiments use ResNet-18 on CIFAR-10. Unless otherwise stated, replay uses statistics computed over consecutive windows of minibatches. Table 1 compares standard SAM with random direction SAM under matched weight decay and evaluates pure statistical replay, mixed statistical replay, and isotropic perturbations against SGD. Table 2 examines temporal ordering and layer selection for pure and mixed statistical replay. Additional experiments on source replacement, weight decay, epoch aggregation, and replay component ablations, together with full experimental settings, hyperparameters, and seed level results are in Appendix § 7. The tested curvature regularizers reach 79% validation accuracy more frequently than SGD but remain substantially below SAM (Appendix § 8).
| Method | WD | Late Train | Late Val. | Late (%) |
| Standard SAM | 99.996 | 80.474 | 93.33 | |
| Random direction SAM | 99.031 | 76.475 | 0.00 | |
| Standard SGD | 99.032 | 76.693 | 0.00 | |
| Standard SGD | 0 | 99.959 | 78.077 | 0.00 |
| Isotropic (1.25, 0.05) | 0 | 98.483 | 79.523 | 6.67 |
| Isotropic (1.50, 0.05) | 0 | 95.665 | 80.109 | 64.00 |
| Isotropic (1.75, 0.05) | 0 | 89.845 | 79.610 | 12.67 |
| Pure replay (1.25, 1.50) | 0 | 99.964 | 78.486 | 0.00 |
| Pure replay (1.50, 1.00) | 0 | 99.966 | 78.371 | 0.00 |
| Pure replay (1.75, 1.50) | 0 | 99.981 | 78.637 | 0.00 |
| Mixed replay (1.25, 1.50) | 0 | 99.405 | 79.771 | 18.00 |
| Mixed replay (1.50, 1.00) | 0 | 98.706 | 79.832 | 14.67 |
| Mixed replay (1.75, 1.50) | 0 | 96.908 | 80.118 | 69.33 |
Table 1. Perturbation experiments on CIFAR-10, averaged over three seeds. Late Train and Late Val. are averaged over epochs 201–250. Late is the percentage of these epochs with validation accuracy . The first block compares SAM with its random direction control under matched weight decay. For pure and mixed replay, parentheses denote . Mixed replay uses . For isotropic perturbations, parentheses denote .
| (a) Temporal ordering | (b) Layer selection | ||||||||
| Ordering | Pure replay | Mixed replay | Layers | Pure replay | Mixed replay | ||||
| Train | Val. | Train | Val. | Train | Val. | Train | Val. | ||
| Batch | All | 99.981 | 78.637 | 96.908 | 80.118 | ||||
| 99.981 | 78.066 | 99.391 | 79.622 | L1-L4 | 99.961 | 78.415 | 97.983 | 80.177 | |
| 99.976 | 78.278 | 98.726 | 79.529 | L1-L4 + FC | 99.978 | 78.246 | 97.782 | 79.734 | |
| 99.965 | 78.281 | 97.230 | 79.281 | FC only | 99.973 | 78.117 | 99.957 | 76.002 | |
| Epoch | |||||||||
| 99.972 | 77.897 | 99.388 | 79.601 | ||||||
| 99.985 | 78.674 | 98.700 | 79.609 | ||||||
| 99.969 | 78.626 | 97.233 | 79.588 |
Table 2. Temporal ordering and layer selection for pure and mixed statistical replay with weight decay 0, averaged over three seeds. Train and Val. are averaged over epochs 201–250. Mixed replay uses throughout. Aligned results for the temporal comparison are reported in Table 1. In (a), Batch permutes the batch windows within each epoch, while Epoch permutes the source epochs. Layer selection in (b) uses .
Matched direction control. Under matched weight decay, replacing the SAM ascent direction with an equal radius random direction reduces late validation accuracy by approximately 4%. Random direction SAM performs similarly to SGD, and neither method reaches 80% validation accuracy, whereas standard SAM maintains this level for most of this period. Thus, an arbitrary direction with the same radius does not reproduce the generalization benefit of SAM.
Pure replay, mixed replay, and isotropic perturbations. With weight decay 0, pure statistical replay gives only a modest increase in late validation accuracy over SGD while maintaining nearly perfect training accuracy. None of the pure replay configurations reaches 80% validation accuracy at the late training. Mixed replay produces stronger regularization, with some configurations maintaining validation accuracy above 80% with reduced training performance. A similar pattern is observed for isotropic perturbations. The recorded means and standard deviations alone do not reproduce the stronger regularization of mixed replay, and neither mixed replay nor suitably scaled isotropic perturbations consistently outperforms the other.
Temporal ordering. Table 2(a) examines two forms of temporal alignment for pure and mixed statistical replay. For pure replay, permuting the batch windows within each source epoch reduces late validation accuracy across all three configurations, whereas permuting the source epochs has no consistent effect. For mixed replay, both forms of permutation generally reduce late validation accuracy relative to aligned replay. A similar pattern is observed under source replacement, as reported in Appendix § 7.§ 2. Mixed replay is therefore more consistently sensitive to the source and temporal alignment of the recorded statistics than pure replay.
Layer selection. Table 2(b) examines layer selection for pure and mixed statistical replay (full results in Appendix § 7.§ 10). For pure replay, perturbing all parameters gives the highest late validation accuracy, while restricting the perturbations to the tested layer groups slightly reduces validation accuracy without materially changing training accuracy. For mixed replay, perturbing L1–L4 gives validation performance comparable to perturbing all parameters. In contrast, restricting mixed replay to the classifier substantially reduces late validation accuracy and restores nearly perfect training accuracy. Thus, the effect of layer selection depends on the construction of the replay perturbation.
Discussion and Conclusion
In the setting studied here, the tested trace and largest eigenvalue regularizers generally improve validation over SGD but remain substantially below SAM (Appendix § 8). The replay experiments provide a complementary result. Pure statistical replay produces only modest regularization, whereas mixed replay produces substantially stronger effects. At selected scales, pure isotropic perturbations achieve validation performance comparable to mixed replay without using recorded SAM statistics, suggesting that these statistics are not uniquely required for such improvements. When their validation performance approaches SAM, mixed replay and isotropic perturbations exhibit more slowly increasing and lower training accuracy, with weight decay further widening this gap (Appendix § 7.§ 11). The equal radius random direction control also performs similarly to SGD rather than SAM, suggesting that an arbitrary direction is insufficient within the original update.
These experiments do not identify a complete mechanism for SAM. Our experimental scope is limited to ResNet 18 on CIFAR 10 without data augmentation. The curvature controls are limited to trace and largest eigenvalue penalties on the classifier head, while replay effectiveness depends on the scale and composition of its random component. The strongest mixed replay and isotropic results therefore show that validation performance comparable to SAM is achievable at selected settings, not that it is robust across hyperparameter choices. The effects of replay composition, temporal organization, and layer support may also differ across architectures, datasets, augmentation settings, and SAM variants.
Overall, these preliminary results weaken explanations based solely on the tested curvature penalties, perturbation radius, elementwise perturbation statistics, or tested restrictions of layer support. They leave unresolved which directional correlations, minibatch dependencies, trajectory effects, or interactions between SAM’s two gradient evaluations account for its generalization behavior.
Acknowledgement
This research work is supported by the Federal Ministry of Education and Research of Germany and the state of North Rhine-Westphalia as part of the Lamarr Institute for Machine Learning and Artificial Intelligence, and by the German Federal Ministry of Research, Technology and Space (DECIPHER-M, 01KD2420C).
Related Work
SAM and generalization. Sharpness-Aware Minimization (SAM) optimizes neighborhood loss using gradients evaluated at adversarially perturbed parameters [6]. Its behavior has been studied through curvature and optimization dynamics: SAM has been connected to alignment between gradients and leading Hessian eigendirections, dynamical regulation of large Hessian eigenvalues, and trajectory dependent motion toward lower curvature regions [20, 2, 5]. However, final solution sharpness does not consistently predict generalization across practical settings, and sharpness minimizing algorithms can generalize through effects beyond sharpness reduction [4, 19]. Other analyses explain SAM through its implicit bias or the perturbation induced forgetting of undesirable model biases [3, 17].
Structure and stochasticity of parameter perturbations. Prior work studies how perturbation direction, randomness, temporal reuse, and parameter support affect SAM and related training procedures. Random parameter directions provide limited improvements in some settings [3], whereas Random Sharpness-Aware Minimization instead uses Gaussian initialization before adversarial ascent [13], and random weight perturbation shows that suitably scaled stochastic parameter noise can itself provide strong regularization [10]. These methods differ in whether randomness replaces or supplements the adversarial direction and whether the SAM ascent step is retained. Friendly SAM examines the contribution of minibatch specific stochastic gradient noise [11]. LookSAM periodically computes the SAM update and reuses its component orthogonal to the current SGD gradient across nearby optimization steps [12]. Within the original SAM update, sparse and normalization only variants restrict which parameters are perturbed, while layerwise analyses modify perturbation scaling [14, 15, 7]. Our work takes a complementary diagnostic perspective: we summarize perturbations recorded from reference SAM trajectories and replay them during independent SGD training while varying their source, temporal assignment, and layer support.
Method and Implementation Details
Dataset and model. All main experiments use CIFAR-10 with ResNet-18 trained from scratch. We use the standard ImageNet-style ResNet-18 architecture, retaining the 7 × 7 first convolutional layer and the initial max-pooling layer. No data augmentation is used.
Optimization. All trajectories are trained for 250 epochs with batch size 64. All methods use a learning rate of 0.01, momentum 0.9, and no learning-rate scheduler. Standard SGD and replay trajectories use weight decay 0. Reference SAM trajectories use perturbation radius and weight decay . All experiments were run on NVIDIA H100 GPUs, each with 80 GB of memory.
Random seeds. Unless otherwise stated, multi-seed results use Seeds 1, 42, and 15213. Single-seed intervention experiments use Seed 42 unless stated otherwise.
Default perturbed layers. Unless otherwise stated, replay perturbations are applied to all trainable parameters. Layer-wise experiments explicitly restrict the set of parameters receiving the perturbation.
Representative replay configurations. We first evaluate 375 mixed replay configurations using Seed 42, with , , and . From this sweep, we select three representative configurations that achieve relatively high late validation accuracy while spanning different levels of late training accuracy: (1.25, 1.50, 0.10, 0.40), (1.50, 1.00, 0.10, 0.40), and (1.75, 1.50, 0.10, 0.40), where each tuple denotes (, , , ). We evaluate these configurations using Seeds 1, 42, and 15213. The corresponding pure replay experiments use the same (, ) values with . Additional configurations are specified in the corresponding experiments.
Batch-window statistics. The main experiments use SAM perturbations recorded at every minibatch of a reference SAM trajectory. Each source epoch is divided into consecutive, non-overlapping windows of minibatches. If the number of minibatches is not divisible by , the final window contains the remaining minibatches. For each parameter tensor, we compute the elementwise mean and standard deviation of the recorded perturbations within each window, denoted by and for source epoch and window .
In aligned batch-window replay, target epoch and target window use the corresponding statistics . The same statistics are used for all target minibatches within that window, while the Gaussian variables in the replay perturbation are resampled independently for every minibatch. Replay uses only these stored statistics and does not reuse the individual recorded SAM perturbations. Results for individual seeds for the mixed and pure replay configurations reported in Table 1 are provided in Table 3 and Table 4, respectively.
| Seed | Train Acc. | Val. Acc. | Best Val. | Late | |
| (1.25, 1.50, 0.10, 0.40) | 1 | 99.408 | 79.671 | 80.020 | 2/50 |
| (1.25, 1.50, 0.10, 0.40) | 42 | 99.397 | 79.979 | 80.290 | 25/50 |
| (1.25, 1.50, 0.10, 0.40) | 15213 | 99.410 | 79.665 | 80.010 | 0/50 |
| (1.50, 1.00, 0.10, 0.40) | 1 | 98.695 | 79.839 | 80.320 | 8/50 |
| (1.50, 1.00, 0.10, 0.40) | 42 | 98.761 | 79.782 | 80.560 | 2/50 |
| (1.50, 1.00, 0.10, 0.40) | 15213 | 98.662 | 79.876 | 80.340 | 12/50 |
| (1.75, 1.50, 0.10, 0.40) | 1 | 96.981 | 79.858 | 80.330 | 9/50 |
| (1.75, 1.50, 0.10, 0.40) | 42 | 96.799 | 80.272 | 80.650 | 47/50 |
| (1.75, 1.50, 0.10, 0.40) | 15213 | 96.944 | 80.225 | 80.560 | 48/50 |
Table 3. Seed-level results for the three representative replay configurations reported in Table 1. Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late is the number of epochs among epochs 201–250 with validation accuracy .
| Seed | Train Acc. | Val. Acc. | Best Val. | Late | |
| (1.25, 1.50) | 1 | 99.965 | 78.576 | 79.290 | 0/50 |
| (1.25, 1.50) | 42 | 99.965 | 78.304 | 79.010 | 0/50 |
| (1.25, 1.50) | 15213 | 99.963 | 78.579 | 79.110 | 0/50 |
| (1.50, 1.00) | 1 | 99.966 | 78.565 | 79.450 | 0/50 |
| (1.50, 1.00) | 42 | 99.977 | 78.396 | 79.070 | 0/50 |
| (1.50, 1.00) | 15213 | 99.956 | 78.152 | 78.960 | 0/50 |
| (1.75, 1.50) | 1 | 99.980 | 78.552 | 79.430 | 0/50 |
| (1.75, 1.50) | 42 | 99.989 | 79.036 | 79.700 | 0/50 |
| (1.75, 1.50) | 15213 | 99.973 | 78.324 | 79.300 | 0/50 |
Table 4. Seed-level results for the three representative pure replay configurations. Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late is the number of epochs among epochs 201–250 with validation accuracy .
Replay implementation. The replay perturbation and update rule are defined in § 2. For each target minibatch, the sampled replay perturbation is temporarily added to the current parameters. The gradient is evaluated at the perturbed parameters, after which the perturbation is removed and the gradient is used to update the original parameters.
Replay does not perform the SAM ascent step on the target trajectory. Therefore, even aligned replay does not reproduce the original SAM perturbation sequence or the corresponding SAM training trajectory.
For source replacement, all replay runs use Seed 42 for SGD training, including model initialization, minibatch ordering, and perturbation sampling. Aligned replay uses statistics recorded from the Seed 42 SAM trajectory, whereas cross source replay uses statistics from the Seed 1 or Seed 15213 SAM trajectory. Thus, each matched comparison changes only the SAM trajectory supplying the recorded means and standard deviations.
For batch window permutation, the recorded windows within each source epoch are randomly reassigned to the SGD windows of the corresponding epoch. Each source window is used exactly once, while the source epoch and the recorded statistics themselves remain unchanged. The perturbation for epoch is generated by a separate local random number generator with seed , where is zero indexed. This local generator does not alter the global random states controlling SGD training and perturbation sampling.
For epoch permutation, we generate one permutation of the recorded SAM epochs using a separate local random number generator with Seed 42. During SGD epoch , replay uses all windows from the assigned SAM epoch in their original order. Each SAM epoch is used exactly once, so the intervention changes the correspondence between SAM and SGD epochs while preserving the ordering of windows within each source epoch. Generating the permutation does not alter the global random states controlling SGD training and perturbation sampling.
For each minibatch, we first perform a forward pass without gradient computation at the unperturbed parameters to update the batch normalization running statistics. We then save the updated batch normalization state, apply the replay perturbation, and compute the loss and gradients at the perturbed parameters. Before the SGD update, we restore the original parameters and the saved batch normalization state. Thus, the update uses gradients evaluated at the perturbed parameters, while the batch normalization running statistics are updated only at the unperturbed parameters.
Standard SAM results. Table 5 reports the seed-level results for standard SAM. Across Seeds 1, 42, and 15213, SAM maintains near-perfect late-stage training accuracy, ranging from 99.992% to 99.999%. Late-stage validation accuracy ranges from 80.280% to 80.693%, and Late ranges from 45/50 to 50/50. These results show that the strong late-stage validation behavior of SAM is consistent across the three seeds.
| Method | Seed | Train Acc. | Val. Acc. | Best Val. | Late |
| Standard SAM | 1 | 99.999 | 80.280 | 80.810 | 45/50 |
| Standard SAM | 42 | 99.998 | 80.693 | 81.270 | 50/50 |
| Standard SAM | 15213 | 99.992 | 80.449 | 80.920 | 45/50 |
Table 5. Seed-level results for standard SAM reported in Table 1. Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late is the number of epochs among epochs 201–250 with validation accuracy .
Random SAM results. Table 6 reports the seed-level results for the random-direction SAM control. Across Seeds 1, 42, and 15213, late-stage training accuracy remains close to 99%, while late-stage validation accuracy stays below 77%. None of the three runs reaches 80% validation accuracy in the final 50 epochs. Compared with standard SAM, replacing the ascent direction with a random direction therefore substantially reduces validation performance while leaving training fit high.
| Method | Seed | Train Acc. | Val. Acc. | Best Val. | Late |
| Random-direction SAM | 1 | 99.035 | 76.377 | 78.070 | 0/50 |
| Random-direction SAM | 42 | 99.023 | 76.424 | 77.870 | 0/50 |
| Random-direction SAM | 15213 | 99.036 | 76.625 | 78.190 | 0/50 |
Table 6. Seed-level results for random-direction SAM with weight decay . Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late is the number of epochs among epochs 201–250 with validation accuracy .
SGD results. Table 7 reports the seed-level results for standard SGD with weight decay 0 and . Without weight decay, late-stage training accuracy remains near 100%, while late-stage validation accuracy stays below 79%. Adding weight decay reduces both training and validation accuracy, and none of the runs reaches 80% validation accuracy in the final 50 epochs. Thus, weight decay alone does not produce the validation behavior observed for SAM, replay, or isotropic perturbations.
| Method | Seed | Train Acc. | Val. Acc. | Best Val. | Late |
| SGD | 1 | 99.962 | 77.878 | 78.930 | 0/50 |
| 42 | 99.968 | 78.411 | 79.210 | 0/50 | |
| 15213 | 99.946 | 77.943 | 78.640 | 0/50 | |
| SGD + WD | 1 | 99.036 | 76.983 | 78.150 | 0/50 |
| 42 | 99.021 | 76.529 | 77.560 | 0/50 | |
| 15213 | 99.040 | 76.567 | 77.760 | 0/50 |
Table 7. Seed-level results for standard SGD with weight decay 0 and . Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late is the number of epochs among epochs 201–250 with validation accuracy .
Pure Isotropic Control
The isotropic noise is sampled as below:
A fresh perturbation is sampled independently for every minibatch and applied to all trainable parameters. We do not use the SAM-derived mean or standard deviation, and we do not apply perturbation-norm matching.
We first evaluate 60 pure isotropic configurations using Seed 42, with and .
From this sweep, we select three representative configurations that achieve relatively high late validation accuracy while spanning different levels of late training accuracy: , , and . We evaluate these configurations using Seeds 1, 42, and 15213. The seed-level results are reported in Table 8.
| Seed | Train Acc. | Val. Acc. | Best Val. | Late | |
| 1 | 98.457 | 79.301 | 79.810 | 0/50 | |
| 42 | 98.523 | 79.859 | 80.340 | 10/50 | |
| 15213 | 98.470 | 79.408 | 79.980 | 0/50 | |
| 1 | 95.930 | 80.082 | 80.430 | 36/50 | |
| 42 | 95.605 | 79.834 | 80.440 | 10/50 | |
| 15213 | 95.460 | 80.412 | 80.850 | 50/50 | |
| 1 | 90.550 | 79.404 | 79.870 | 0/50 | |
| 42 | 89.857 | 79.931 | 80.380 | 19/50 | |
| 15213 | 89.128 | 79.496 | 79.870 | 0/50 |
Table 8. Seed-level results for the three pure isotropic settings reported in Table 1. Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late is the number of epochs among epochs 201–250 with validation accuracy .
Among the three configurations, gives the highest multi-seed late-stage validation accuracy at 80.109%, with 96 of the 150 final seed-epochs reaching validation accuracy at least 80%. Increasing the isotropic perturbation strength reduces late-stage training accuracy: the three-seed average decreases from 98.483% for to 95.665% for and 89.845% for . The corresponding late-stage validation accuracies are 79.523%, 80.109%, and 79.610%, respectively. Thus, stronger isotropic perturbations reduce training fit, while the validation improvement is not monotonic.
Compared with standard SGD, the tested isotropic perturbations improve late-stage validation performance and can reach the 80% validation regime. However, this improvement is associated with lower training accuracy, especially for the stronger perturbation settings.
Source Intervention
In aligned replay, the SAM statistics are extracted from a reference SAM trajectory with the same random seed as the SGD training run. For cross-source replay, we keep the SGD training seed, optimization settings, and replay hyperparameters unchanged, but use SAM statistics from a trajectory generated with a different random seed. We evaluate the three representative configurations for both pure and mixed replay, using Seed 42 for SGD training and Seeds 1 and 15213 as alternative SAM sources. This gives 12 cross-source trajectories in total. For mixed replay, . The results are presented in Table 9.
| Replay | SAM Source | Late Train | Late Val. | Best Val. | Late N | |
| Pure | (1.25, 1.50) | Seed 1 | 99.987 | 78.193 | 78.910 | 0/50 |
| Pure | (1.25, 1.50) | Seed 15213 | 99.994 | 78.347 | 78.680 | 0/50 |
| Pure | (1.50, 1.00) | Seed 1 | 99.984 | 78.477 | 79.110 | 0/50 |
| Pure | (1.50, 1.00) | Seed 15213 | 99.983 | 78.436 | 79.000 | 0/50 |
| Pure | (1.75, 1.50) | Seed 1 | 99.960 | 78.147 | 78.790 | 0/50 |
| Pure | (1.75, 1.50) | Seed 15213 | 99.956 | 78.107 | 79.070 | 0/50 |
| Mixed | (1.25, 1.50) | Seed 1 | 99.385 | 79.429 | 79.760 | 0/50 |
| Mixed | (1.25, 1.50) | Seed 15213 | 99.368 | 79.536 | 79.970 | 0/50 |
| Mixed | (1.50, 1.00) | Seed 1 | 98.695 | 79.506 | 79.890 | 0/50 |
| Mixed | (1.50, 1.00) | Seed 15213 | 98.618 | 79.270 | 79.950 | 0/50 |
| Mixed | (1.75, 1.50) | Seed 1 | 96.971 | 79.781 | 80.030 | 4/50 |
| Mixed | (1.75, 1.50) | Seed 15213 | 97.022 | 79.867 | 80.170 | 9/50 |
Table 9. Cross-source replay using target Seed 42. The SAM source is either Seed 1 or Seed 15213. Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late N is the number of epochs among epochs 201–250 with validation accuracy . For mixed replay, .
For pure replay, source replacement has a configuration-dependent effect. Relative to the aligned Seed 42 results, late validation accuracy decreases in three of the six cross-source comparisons and increases in the other three. The largest reductions occur for , where late validation accuracy decreases from 79.036% to 78.147% and 78.107%. Late training accuracy remains near 100%, and none of the cross-source runs reaches 80% validation accuracy during the final 50 epochs.
For mixed replay, changing the SAM source has little effect on late-stage training accuracy but reduces validation performance relative to the aligned Seed-42 results for all three representative configurations. For , aligned replay reaches 79.979% late-stage validation accuracy and Late , whereas Source Seeds 1 and 15213 reach 79.429% and 79.536%, respectively, with Late for both. For , the aligned validation accuracy of 79.782% decreases to 79.506% and 79.270%, with neither cross-source run reaching 80% validation accuracy in the final 50 epochs. For , aligned replay reaches validation accuracy and Late , while the two cross-source runs reach and , with Late and , respectively.
Thus, for the three representative mixed replay configurations, replacing the aligned SAM source reduces late-stage validation performance and high-validation persistence while leaving late-stage training accuracy largely unchanged.
Temporal Interventions
We evaluate the three representative configurations for both pure and mixed replay using Seeds 1, 42, and 15213. For mixed replay, . Within each source SAM epoch, the recorded batch-window statistics are randomly permuted before being assigned to the corresponding windows of the SGD training trajectory. The source SAM epoch and the corresponding SGD training epoch remain aligned, and all batch-window statistics from the source epoch are retained. Batch shuffling therefore preserves epoch-level alignment between the SAM source trajectory and the SGD training trajectory, while removing the original within-epoch alignment between their batch windows. The results are reported in Table 10.
| Replay | Setting | Train Acc. | Val. Acc. | Best Val. | Late N (%) | |
| Pure | (1.25, 1.50) | Aligned | 99.964 ± 0.001 | 78.486 ± 0.158 | 79.137 ± 0.142 | 0.00 ± 0.00 |
| Pure | (1.25, 1.50) | Batch shuffle | 99.981 ± 0.015 | 78.066 ± 0.415 | 78.720 ± 0.627 | 0.00 ± 0.00 |
| Pure | (1.50, 1.00) | Aligned | 99.966 ± 0.011 | 78.371 ± 0.208 | 79.160 ± 0.257 | 0.00 ± 0.00 |
| Pure | (1.50, 1.00) | Batch shuffle | 99.976 ± 0.029 | 78.278 ± 0.820 | 78.807 ± 0.751 | 0.00 ± 0.00 |
| Pure | (1.75, 1.50) | Aligned | 99.981 ± 0.008 | 78.637 ± 0.363 | 79.477 ± 0.204 | 0.00 ± 0.00 |
| Pure | (1.75, 1.50) | Batch shuffle | 99.965 ± 0.020 | 78.281 ± 0.372 | 78.950 ± 0.265 | 0.00 ± 0.00 |
| Mixed | (1.25, 1.50) | Aligned | 99.405 ± 0.007 | 79.771 ± 0.180 | 80.107 ± 0.159 | 18.00 ± 27.78 |
| Mixed | (1.25, 1.50) | Batch shuffle | 99.391 ± 0.008 | 79.622 ± 0.403 | 80.000 ± 0.350 | 22.00 ± 38.11 |
| Mixed | (1.50, 1.00) | Aligned | 98.706 ± 0.050 | 79.832 ± 0.047 | 80.407 ± 0.133 | 14.67 ± 10.07 |
| Mixed | (1.50, 1.00) | Batch shuffle | 98.726 ± 0.062 | 79.529 ± 0.254 | 80.070 ± 0.304 | 1.33 ± 1.15 |
| Mixed | (1.75, 1.50) | Aligned | 96.908 ± 0.096 | 80.118 ± 0.227 | 80.513 ± 0.165 | 69.33 ± 44.47 |
| Mixed | (1.75, 1.50) | Batch shuffle | 97.230 ± 0.148 | 79.281 ± 0.276 | 80.003 ± 0.201 | 0.67 ± 1.15 |
Table 10. Comparison of aligned and batch-shuffled replay over Seeds 1, 42, and 15213. Results are reported as mean ± sample standard deviation. Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late N is the percentage of epochs among epochs 201–250 with validation accuracy . For mixed replay, .
Across the three pure replay configurations, batch shuffling decreases the mean late-stage validation accuracy from to , from to , and from to , respectively. Late-stage training accuracy changes little, and none of the pure replay configurations reaches validation accuracy in the final 50 epochs either before or after shuffling.
For mixed replay, batch shuffling also decreases the mean late-stage validation accuracy for all three representative configurations. The changes are from to , from to , and from to , respectively. The largest reduction occurs for , for which Late decreases from to . Overall, the three-seed results show that disrupting within-epoch window alignment reduces validation performance for both pure and mixed replay, with a larger effect for some mixed replay configurations.
Epoch shuffle. We evaluate the three representative configurations for both pure and mixed replay using Seeds 1, 42, and 15213. For mixed replay, . The source SAM epochs are randomly permuted. For SGD training epoch , the batch-window statistics are taken from the corresponding permuted source SAM epoch, while the batch-window index within the epoch is unchanged. Thus, SGD window continues to use source window , but from a different SAM epoch. Epoch shuffling therefore changes the epoch-level alignment between the SAM source trajectory and the SGD training trajectory while preserving the within-epoch batch-window ordering. The results are presented in Table 11.
| Replay | Setting | Train Acc. | Val. Acc. | Best Val. | Late (%) | |
| Pure | (1.25, 1.50) | Aligned | 99.964 ± 0.001 | 78.486 ± 0.158 | 79.137 ± 0.142 | 0.00 ± 0.00 |
| Pure | (1.25, 1.50) | Epoch shuffle | 99.972 ± 0.022 | 77.897 ± 0.492 | 78.540 ± 0.567 | 0.00 ± 0.00 |
| Pure | (1.50, 1.00) | Aligned | 99.966 ± 0.011 | 78.371 ± 0.208 | 79.160 ± 0.257 | 0.00 ± 0.00 |
| Pure | (1.50, 1.00) | Epoch shuffle | 99.985 ± 0.012 | 78.674 ± 0.566 | 79.193 ± 0.488 | 0.00 ± 0.00 |
| Pure | (1.75, 1.50) | Aligned | 99.981 ± 0.008 | 78.637 ± 0.363 | 79.477 ± 0.204 | 0.00 ± 0.00 |
| Pure | (1.75, 1.50) | Epoch shuffle | 99.969 ± 0.009 | 78.626 ± 0.123 | 79.130 ± 0.141 | 0.00 ± 0.00 |
| Mixed | (1.25, 1.50) | Aligned | 99.405 ± 0.007 | 79.771 ± 0.180 | 80.107 ± 0.159 | 18.00 ± 27.78 |
| Mixed | (1.25, 1.50) | Epoch shuffle | 99.388 ± 0.011 | 79.601 ± 0.056 | 80.047 ± 0.164 | 0.67 ± 1.15 |
| Mixed | (1.50, 1.00) | Aligned | 98.706 ± 0.050 | 79.832 ± 0.047 | 80.407 ± 0.133 | 14.67 ± 10.07 |
| Mixed | (1.50, 1.00) | Epoch shuffle | 98.700 ± 0.029 | 79.609 ± 0.239 | 80.067 ± 0.296 | 8.00 ± 12.17 |
| Mixed | (1.75, 1.50) | Aligned | 96.908 ± 0.096 | 80.118 ± 0.227 | 80.513 ± 0.165 | 69.33 ± 44.47 |
| Mixed | (1.75, 1.50) | Epoch shuffle | 97.233 ± 0.123 | 79.588 ± 0.086 | 80.130 ± 0.200 | 0.67 ± 1.15 |
Table 11. Comparison of aligned and epoch-shuffled replay over Seeds 1, 42, and 15213. Results are reported as mean ± sample standard deviation. Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late is the percentage of epochs among epochs 201–250 with validation accuracy . For mixed replay, .
For pure replay, the effect of epoch shuffling is small and varies across the three configurations. The mean late-stage validation accuracy changes from 78.486% to 77.897%, from 78.371% to 78.674%, and from 78.637% to 78.626%, respectively. Late-stage training accuracy changes little, and none of the pure replay configurations reaches 80% validation accuracy in the final 50 epochs either before or after epoch shuffling.
For mixed replay, epoch shuffling reduces the mean late-stage validation accuracy for all three representative configurations. The changes are from 79.771% to 79.601%, from 79.832% to 79.609%, and from 80.118% to 79.588%, respectively. The corresponding Late values decrease from 18.00% to 0.67%, from 14.67% to 8.00%, and from 69.33% to 0.67%. Overall, changing the epoch-level alignment has a limited and configuration-dependent effect for pure replay, while it consistently reduces validation performance and high-validation persistence for the three mixed replay configurations.
Epoch-Wise Aggregation
For epoch-wise aggregation, we compute the replay statistics over an entire source SAM epoch rather than over consecutive windows of minibatches. Let denote the recorded SAM perturbation for minibatch in epoch . We compute the elementwise epoch-level statistics
where is the number of minibatches in epoch .
During SGD training epoch , the same pair is used for every minibatch. The random variables in the replay perturbation are still resampled independently for each minibatch. Epoch-wise aggregation therefore preserves the epoch-level correspondence between the source SAM trajectory and the SGD training trajectory, but removes the within-epoch batch-window information.
We evaluate the three representative configurations for both pure and mixed replay using Seed 42. For mixed replay, . The results are reported in Table 12.
For pure replay, all three epoch-wise configurations maintain near-perfect late-stage training accuracy, while late-stage validation accuracy ranges from 78.202% to 78.645%. None reaches 80% validation accuracy in the final 50 epochs.
Mixed replay gives higher validation accuracy than pure replay for all three representative configurations. The late-stage validation accuracies are 79.498%, 79.790%, and 79.542% for (1.25, 1.50), (1.50, 1.00), and (1.75, 1.50), respectively. Only (1.50, 1.00) reaches 80% validation accuracy in the final 50 epochs, with Late . Compared with the corresponding aligned batch-window results, epoch-wise aggregation reduces the high-validation persistence for (1.25, 1.50) and (1.75, 1.50), while (1.50, 1.00) remains similar. Thus, removing within-epoch batch-window information generally weakens the validation behavior of mixed replay at these representative configurations, although the effect depends on the configuration.
We separately evaluate the mean-only setting . It reaches 99.983% late-stage training accuracy, 78.446% late-stage validation accuracy, and 79.080% Best Val., with no epoch reaching 80% validation accuracy.
Layer-Wise Intervention
To study where the replay perturbation is effective, we restrict perturbation injection to selected layers while leaving all remaining parameters unperturbed. We evaluate the three representative configurations for both pure and mixed replay using Seeds 1, 42, and 15213. For mixed replay, . Table 13 reports results for perturbing all trainable parameters, L1–L4, L1–L4 + FC, and FC only.
| Replay | Layers | Late Train | Late Val. | Best Val. | Late (%) | |
| Pure | (1.25, 1.50) | All | 99.964 ± 0.001 | 78.486 ± 0.158 | 79.137 ± 0.142 | 0.00 ± 0.00 |
| Pure | (1.25, 1.50) | L1–L4 | 99.966 ± 0.013 | 78.459 ± 0.256 | 79.230 ± 0.298 | 0.00 ± 0.00 |
| Pure | (1.25, 1.50) | L1–L4 + FC | 99.984 ± 0.007 | 78.497 ± 0.124 | 79.157 ± 0.064 | 0.00 ± 0.00 |
| Pure | (1.25, 1.50) | FC only | 99.982 ± 0.011 | 78.471 ± 0.148 | 79.003 ± 0.208 | 0.00 ± 0.00 |
| Pure | (1.50, 1.00) | All | 99.966 ± 0.011 | 78.371 ± 0.208 | 79.160 ± 0.257 | 0.00 ± 0.00 |
| Pure | (1.50, 1.00) | L1–L4 | 99.964 ± 0.011 | 78.607 ± 0.282 | 79.417 ± 0.306 | 0.00 ± 0.00 |
| Pure | (1.50, 1.00) | L1–L4 + FC | 99.978 ± 0.008 | 78.221 ± 0.111 | 78.907 ± 0.099 | 0.00 ± 0.00 |
| Pure | (1.50, 1.00) | FC only | 99.972 ± 0.0005 | 78.245 ± 0.261 | 78.873 ± 0.301 | 0.00 ± 0.00 |
| Pure | (1.75, 1.50) | All | 99.981 ± 0.008 | 78.637 ± 0.363 | 79.477 ± 0.204 | 0.00 ± 0.00 |
| Pure | (1.75, 1.50) | L1–L4 | 99.961 ± 0.004 | 78.415 ± 0.471 | 79.133 ± 0.398 | 0.00 ± 0.00 |
| Pure | (1.75, 1.50) | L1–L4 + FC | 99.978 ± 0.004 | 78.246 ± 0.336 | 79.097 ± 0.292 | 0.00 ± 0.00 |
| Pure | (1.75, 1.50) | FC only | 99.973 ± 0.011 | 78.117 ± 0.502 | 78.727 ± 0.433 | 0.00 ± 0.00 |
| Mixed | (1.25, 1.50) | All | 99.405 ± 0.007 | 79.771 ± 0.180 | 80.107 ± 0.159 | 18.00 ± 27.78 |
| Mixed | (1.25, 1.50) | L1–L4 | 99.506 ± 0.010 | 80.308 ± 0.384 | 80.817 ± 0.469 | 80.00 ± 21.07 |
| Mixed | (1.25, 1.50) | L1–L4 + FC | 99.468 ± 0.033 | 79.726 ± 0.269 | 80.197 ± 0.242 | 19.33 ± 17.01 |
| Mixed | (1.25, 1.50) | FC only | 99.968 ± 0.005 | 75.944 ± 0.116 | 76.740 ± 0.098 | 0.00 ± 0.00 |
| Mixed | (1.50, 1.00) | All | 98.706 ± 0.050 | 79.832 ± 0.047 | 80.407 ± 0.133 | 14.67 ± 10.07 |
| Mixed | (1.50, 1.00) | L1–L4 | 99.031 ± 0.059 | 80.691 ± 0.260 | 81.233 ± 0.217 | 99.33 ± 1.15 |
| Mixed | (1.50, 1.00) | L1–L4 + FC | 98.937 ± 0.028 | 79.846 ± 0.232 | 80.327 ± 0.211 | 32.67 ± 32.02 |
| Mixed | (1.50, 1.00) | FC only | 99.972 ± 0.006 | 76.412 ± 0.299 | 77.167 ± 0.336 | 0.00 ± 0.00 |
| Mixed | (1.75, 1.50) | All | 96.908 ± 0.096 | 80.118 ± 0.227 | 80.513 ± 0.165 | 69.33 ± 44.47 |
| Mixed | (1.75, 1.50) | L1–L4 | 97.983 ± 0.136 | 80.177 ± 0.369 | 80.713 ± 0.351 | 69.33 ± 48.01 |
| Mixed | (1.75, 1.50) | L1–L4 + FC | 97.782 ± 0.071 | 79.734 ± 0.318 | 80.197 ± 0.386 | 22.00 ± 26.91 |
| Mixed | (1.75, 1.50) | FC only | 99.957 ± 0.012 | 76.002 ± 0.592 | 76.740 ± 0.443 | 0.00 ± 0.00 |
Table 13. Layer-wise replay results over Seeds 1, 42, and 15213. Results are reported as mean ± sample standard deviation. Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late is the percentage of epochs among epochs 201–250 with validation accuracy . For mixed replay, .
For pure replay, changing the perturbed layers has limited effect on validation performance. Across all three configurations, late-stage validation accuracy remains between 78.117% and 78.607%, and Late remains 0% for every tested layer group. Late-stage training accuracy remains close to 100% in all cases.
The layer choice has a substantially larger effect for mixed replay. Perturbing L1–L4 gives higher late-stage validation accuracy than perturbing all parameters for all three representative configurations. The corresponding validation accuracies increase from 79.771% to 80.308%, from 79.832% to 80.691%, and from 80.118% to 80.177%. Late also increases from 18.00% to 80.00% and from 14.67% to 99.33% for the first two configurations, while remaining 69.33% for (1.75, 1.50).
Adding FC to L1–L4 reduces validation performance relative to L1–L4 for all three mixed replay configurations. FC-only replay performs substantially worse, with late-stage validation accuracies of 75.944%, 76.412%, and 76.002%, while Late is 0% in all three cases. These results show that the effect of layer selection is specific to mixed replay in the tested configurations, with perturbations applied to L1–L4 giving the strongest validation performance among the reported layer groups.
Effect of weight decay.
We evaluate weight decay values of 0, , and for SGD, statistical replay, and pure isotropic perturbations in Table 14. Results are averaged over Seeds 1, 42, and 15213. For most replay and isotropic configurations, increasing weight decay reduces late-stage training accuracy while improving late-stage validation accuracy and Late . At weight decay , five of the six perturbation configurations reach Late , with late-stage validation accuracies between 81.059% and 81.695%. For these five configurations, late-stage training accuracies range from 82.999% to 93.631%, compared with 99.996% for standard SAM.
| Method | WD | Late Train | Late Val. | Best Val. | Late (%) |
| Standard SAM | 99.996 0.004 | 80.474 0.208 | 81.000 0.240 | 93.33 5.77 | |
| SGD | 0 | 99.959 0.011 | 78.077 0.291 | 78.927 0.285 | 0.00 0.00 |
| 99.795 0.186 | 78.421 0.758 | 79.460 0.217 | 0.00 0.00 | ||
| 99.032 0.010 | 76.693 0.252 | 77.823 0.300 | 0.00 0.00 | ||
| Pure Iso (1.25, 0.05) | 0 | 98.483 0.035 | 79.523 0.296 | 80.043 0.271 | 6.67 11.55 |
| 96.169 0.026 | 80.374 0.248 | 80.937 0.287 | 93.33 11.55 | ||
| 88.319 0.284 | 81.616 0.165 | 82.037 0.130 | 100.00 0.00 | ||
| Pure Iso (1.50, 0.05) | 0 | 95.665 0.241 | 80.109 0.290 | 80.573 0.240 | 64.00 40.60 |
| 91.854 0.047 | 80.728 0.023 | 81.077 0.025 | 100.00 0.00 | ||
| 82.999 0.400 | 81.395 0.148 | 81.873 0.136 | 100.00 0.00 | ||
| Pure Iso (1.75, 0.05) | 0 | 89.845 0.711 | 79.610 0.281 | 80.040 0.294 | 12.67 21.94 |
| 85.194 0.592 | 80.284 0.078 | 80.683 0.100 | 90.67 5.77 | ||
| 77.665 0.471 | 79.916 0.191 | 80.703 0.310 | 45.33 19.43 | ||
| Replay (1.25, 1.50, 0.10, 0.40) | 0 | 99.405 0.007 | 79.771 0.180 | 80.107 0.159 | 18.00 27.79 |
| 98.021 0.005 | 79.961 0.251 | 80.370 0.282 | 44.67 41.10 | ||
| 93.631 0.147 | 81.059 0.036 | 81.603 0.127 | 100.00 0.00 | ||
| Replay (1.50, 1.00, 0.10, 0.40) | 0 | 98.706 0.050 | 79.832 0.047 | 80.407 0.133 | 14.67 10.07 |
| 96.790 0.070 | 80.560 0.111 | 81.020 0.113 | 100.00 0.00 | ||
| 89.806 0.083 | 81.660 0.197 | 82.063 0.183 | 100.00 0.00 | ||
| Replay (1.75, 1.50, 0.10, 0.40) | 0 | 96.908 0.096 | 80.118 0.227 | 80.513 0.165 | 69.33 44.47 |
| 93.886 0.091 | 80.647 0.346 | 81.063 0.359 | 96.67 5.77 | ||
| 84.927 0.363 | 81.695 0.376 | 82.067 0.375 | 100.00 0.00 |
Table 14. Effect of weight decay on standard SGD, pure isotropic perturbations, SAM-derived replay, and standard SAM. Train Acc. and Val. Acc. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late is the percentage of epochs among epochs 201–250 with validation accuracy . Results are reported as mean standard deviation over Seeds 1, 42, and 15213.
The largest isotropic perturbation setting, (1.75, 0.05), is an exception. Increasing weight decay from to reduces its late-stage validation accuracy from 80.284% to 79.919% and Late from 90.67% to 45.33%. Figure 1 also shows that replay and isotropic training accuracy increases more slowly than standard SAM as weight decay increases, while their late-stage validation
Figure 1. Training and validation accuracy trajectories for pure isotropic perturbations, statistical replay, and standard SAM under weight decay. Replay and isotropic results are shown for weight decay and . Results are averaged over Seeds 1, 42, and 15213.
performance remains comparable. In contrast, standard SGD has Late = 0% for all three tested weight decay values. These results show that weight decay changes the tradeoff between training fit and validation performance for replay and isotropic perturbations, but does not reproduce SAM’s combination of near-perfect training fit and high validation performance.
Curvature-Regularization Baselines
We use preliminary curvature baselines to test whether direct regularization of classifier head curvature can reproduce SAM in the setting studied here. We consider a trace based RF style regularizer [16, 1, 8, 18] and a spectral variant based on the largest eigenvalue of the classifier head Hessian. Both quantities are computed from the current minibatch and differentiated through the full network.
Trace-Based RF-Style Regularization
Let denote the classifier-head weight matrix and let
denote the Hessian of the minibatch cross-entropy loss with respect to . We use
For a minibatch of size , with penultimate representation and softmax probabilities , the trace used in our implementation is
We do not normalize , detach , or apply a logarithmic transformation to .
Fixed coefficient. The first variant uses
The regularizer is active from the first epoch and is optimized by standard backpropagation.
Adaptive coefficient with gradient clipping. We also test an adaptive variant. For each minibatch, we set
This makes the scalar value of approximately equal to . The coefficient is treated as constant when computing gradients.
Let
We limit the norm of the trace-regularization gradient to at most 30% of the cross-entropy gradient norm:
The optimizer update uses
Spectral RF-Style Regularization
We next replace the Hessian trace by its largest eigenvalue. The spectral regularizer is
and the training objective is
Our main spectral experiment uses
The largest eigenvalue is recomputed from the current logits and penultimate representations for every minibatch. No adaptive weighting or gradient clipping is used for this baseline.
Results
Table 15 summarizes the classifier head curvature baselines. We treat the reported coefficients and gradient cap as representative preliminary settings rather than the result of an exhaustive hyperparameter search. For reference, standard SGD and SAM obtain mean late validation accuracies of 78.077% and 80.474%, respectively, as reported in Table 1. All three curvature controls obtain higher mean late validation accuracy than SGD but remain closer to SGD than to SAM. Spectral regularization obtains the highest value of 78.595 0.181%, which remains 1.879 percentage points below SAM.
| Method | Late Train | Late Val. | Best Val. | Late N (%) |
| Fixed Trace () | 99.974 0.019 | 78.511 0.456 | 79.213 0.577 | 0.00 0.00 |
| Adaptive Trace (30% cap) | 99.756 0.025 | 78.438 0.383 | 78.987 0.325 | 0.00 0.00 |
| Spectral () | 99.975 0.005 | 78.595 0.181 | 79.107 0.251 | 0.00 0.00 |
Table 15. Classifier-head curvature baselines on CIFAR-10 with ResNet-18 without data augmentation. Late Train and Late Val. are averaged over epochs 201–250. Best Val. is the maximum validation accuracy over all 250 epochs. Late N is the percentage of epochs among epochs 201–250 with validation accuracy . Results are reported as mean sample standard deviation over Seeds 1, 42, and 15213.
Across the complete trajectories, validation accuracy reaches at least 79% in 84, 21, and 66 of the 750 seed epochs for fixed trace, adaptive trace, and spectral regularization, respectively, compared with 3 epochs for SGD. These occurrences are seed dependent: fixed trace reaches this threshold only for Seed 15213, adaptive trace only for Seed 1, and spectral regularization for Seeds 1 and 42. Moreover, Late is zero for all three controls. Thus, the tested classifier head curvature regularizers show modest but seed dependent improvements over SGD and are insufficient to reproduce SAM in this setting.
NeurIPS Paper Checklist
Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
Answer: [Yes]
Justification: We provide detailed results for the claims in both introduction and abstract.
Guidelines:
The answer [N/A] means that the abstract and introduction do not include the claims made in the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A [No] or [N/A] answer to this question will not be perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.
It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.
Limitations
Question: Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification: We have a limitation discussion in Section 4.
Guidelines:
The answer [N/A] means that the paper has no limitation while the answer [No] means that the paper has limitations, but those are not discussed in the paper.
The authors are encouraged to create a separate “Limitations” section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren’t acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
Theory assumptions and proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?
Answer: [N/A]
Justification: Not related to theory.
Guidelines:
The answer [N/A] means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross-referenced.
All assumptions should be clearly stated or referenced in the statement of any theorems.
The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
Experimental result reproducibility
Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
Answer: [Yes]
Justification: We include all the implementation details in appendix.
Guidelines:
The answer [N/A] means that the paper does not include experiments.
If the paper includes experiments, a [No] answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general, releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.
While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example, (a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm. (b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.
(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.
Open access to data and code
Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?
Answer: [No]
Justification: We use the publicly available CIFAR-10 dataset and provide implementation details in the appendix. The code will be released after publication.
Guidelines:
The answer [N/A] means that paper does not include experiments requiring code.
Please see the NeurIPS code and data submission guidelines (https://neurips.cc/public/guides/CodeSubmissionPolicy) for more details.
While we encourage the release of code and data, we understand that this might not be possible, so [No] is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines (https://neurips.cc/public/guides/CodeSubmissionPolicy) for more details.
The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.
Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer) necessary to understand the results?
Answer: [Yes]
Justification: We have all required implementation details in appendix.
Guidelines:
The answer [N/A] means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, or as supplemental material.
Experiment statistical significance
Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Answer: [Yes]
Justification: Yes, we run experiments for three random seeds for all necessary experiments. Guidelines:
The answer [N/A] means that the paper does not include experiments.
The authors should answer [Yes] if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
The assumptions made should be given (e.g., Normally distributed errors).
It should be clear whether the error bar is the standard deviation or the standard error of the mean.
It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.
For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g., negative error rates).
If error bars are reported in tables or plots, the authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.
Experiments compute resources
Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Answer: [Yes]
Justification: We specify the type of GPU we use to conduct experiments.
Guidelines:
The answer [N/A] means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn’t make it into the paper).
Code of ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?
Answer: [Yes]
Justification: We have read the code and we honor the code.
Guidelines:
The answer [N/A] means that the authors have not reviewed the NeurIPS Code of Ethics.
If the authors answer [No], they should explain the special circumstances that require a deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).
Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed? Answer: [N/A]
Justification: We do not use sensitive data.
Guidelines:
The answer [N/A] means that there is no societal impact of the work performed.
If the authors answer [N/A] or [No], they should explain why their work has no societal impact or why the paper does not address societal impact.
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate Deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.
If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).
Safeguards
Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pre-trained language models, image generators, or scraped datasets)?
Answer: [N/A]
Justification: Not related to our paper topic.
Guidelines:
The answer [N/A] means that the paper poses no such risks.
Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.
Licenses for existing assets
Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Answer: [N/A]
Justification: We use public dataset and model.
Guidelines:
The answer [N/A] means that the paper does not use existing assets.
The authors should cite the original paper that produced the code package or dataset.
The authors should state which version of the asset is used and, if possible, include a URL.
The name of the license (e.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.
If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.
If this information is not available online, the authors are encouraged to reach out to the asset’s creators.
13. New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer: [N/A]
Justification: We use public dataset and model.
Guidelines:
The answer [N/A] means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent was obtained from people whose asset is used.
At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.
14. Crowdsourcing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?
Answer: [N/A]
Justification: No crowdsourcing or human-subject research is involved.
Guidelines:
The answer [N/A] means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.
According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional review board (IRB) approvals or equivalent for research with human subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [N/A]
Justification: No crowdsourcing or human-subject research is involved.
Guidelines:
The answer [N/A] means that the paper does not involve crowdsourcing nor research with human subjects.
Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.
Declaration of LLM usage
Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigor, or originality of the research, declaration is not required.
Answer: [N/A]
Justification: LLMs were used only for language editing and did not affect the methodology, experiments, or scientific conclusions.
Guidelines:
The answer [N/A] means that the core method development in this research does not involve LLMs as any important, original, or non-standard components.
Please refer to our LLM policy in the NeurIPS handbook for what should or should not be described.
References
- [1]Linara Adilova, Amr Abourayya, Jianning Li, Amin Dada, Henning Petzka, Jan Egger, Jens Kleesiek, and Michael Kamp. Fam: Relative flatness aware minimization. In Proceedings of the ICML Workshop on Topology, Algebra, and Geometry in Machine Learning (TAG-ML), 2023.arxiv.org/abs/2307.02337
- [2]Atish Agarwala and Yann Dauphin. Sam operates far from home: eigenvalue regularization as a dynamical phenomenon. In International Conference on Machine Learning, 2023.arxiv.org/abs/2302.08692
- [3]Maksym Andriushchenko and Nicolas Flammarion. Towards understanding sharpness-aware minimization. In International conference on machine learning, 2022.arxiv.org/abs/2206.06232
- [4]Maksym Andriushchenko, Francesco Croce, Maximilian Müller, Matthias Hein, and Nicolas Flammarion. A modern look at the relationship between sharpness and generalization. In International Conference on Machine Learning, 2023.arxiv.org/abs/2302.07011
- [5]Peter L Bartlett, Philip M Long, and Olivier Bousquet. The dynamics of sharpness-aware minimization: Bouncing across ravines and drifting towards wide minima. Journal of Machine Learning Research, 2023.arxiv.org/abs/2210.01513
- [6]Pierre Foret, Ariel Kleiner, Hossein Mobahi, and Behnam Neyshabur. Sharpness-aware minimization for efficiently improving generalization. In International Conference on Learning Representations, 2021.arxiv.org/abs/2010.01412
- [7]Moritz Haas, Jin Xu, Volkan Cevher, and Leena Chennuru Vankadara. μP²: Effective sharpness-aware minimization requires layerwise perturbation scaling. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024.
- [8]Ting Han, Linara Adilova, Henning Petzka, Jens Kleesiek, and Michael Kamp. Flatness is necessary, neural collapse is not: Rethinking generalization via grokking. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025.arxiv.org/abs/2509.17738
- [9]Sepp Hochreiter and Jürgen Schmidhuber. Flat minima. Neural computation, 1997.
- [10]Tao Li, Qinghua Tao, Weihао Yan, Yingwen Wu, Zehao Lei, Kun Fang, Mingzhen He, and Xiaolin Huang. Revisiting random weight perturbation for efficiently improving generalization. Transactions on Machine Learning Research, 2024a.arxiv.org/abs/2404.00357
- [11]Tao Li, Pan Zhou, Zhengbao He, Xinwen Cheng, and Xiaolin Huang. Friendly sharpness-aware minimization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2024b.arxiv.org/abs/2403.12350
- [12]Yong Liu, Siqi Mai, Xiangning Chen, Cho-Jui Hsieh, and Yang You. Towards efficient and scalable sharpness-aware minimization. In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2022a.arxiv.org/abs/2203.02714
- [13]Yong Liu, Siqi Mai, Minhaо Cheng, Xiangning Chen, Cho-Jui Hsieh, and Yang You. Random sharpness-aware minimization. In Advances in Neural Information Processing Systems, 2022b.DOI
- [14]Peng Mi, Li Shen, Tianhe Ren, Yiyi Zhou, Xiaoshuai Sun, Rongrong Ji, and Dacheng Tao. Make sharpness-aware minimization stronger: A sparsified perturbation approach. In Advances in Neural Information Processing Systems, 2022.arxiv.org/abs/2210.05177
- [15]Maximilian Mueller, Tiffany Joyce V laar, David Rolnick, and Matthias Hein. Normalization layers are all that sharpness-aware minimization needs. In Thirty-seventh Conference on Neural Information Processing Systems, 2023.arxiv.org/abs/2306.04226
- [16]Henning Petzka, Michael Kamp, Linara Adilova, Cristian Sminchisescu, and Mario Boley. Relative flatness and generalization. In Advances in Neural Information Processing Systems, 2021.arxiv.org/abs/2001.00939
- [17]Ankit Vani, Frederick Tung, Gabriel L. Oliveira, and Hossein Sharifi-Noghabі. Forget sharpness: Perturbed forgetting of model biases within SAM dynamics. In Forty-first International Conference on Machine Learning, 2024.arxiv.org/abs/2406.06700
- [18]Nils Philipp Walter, Linara Adilova, Jilles Vreeken, and Michael Kamp. When flatness does (not) guarantee adversarial robustness. In The Fourteenth International Conference on Learning Representations, 2026.arxiv.org/abs/2510.14231
- [19]Kaiyue Wen, Zhiyuan Li, and Tengyu Ma. Sharpness minimization algorithms do not only minimize sharpness to achieve better generalization. In Thirty-seventh Conference on Neural Information Processing Systems, 2023a.arxiv.org/abs/2307.11007
- [20]Kaiyue Wen, Tengyu Ma, and Zhiyuan Li. How sharpness-aware minimization minimizes sharpness? In The Eleventh International Conference on Learning Representations, 2023b.
