Avoiding spurious sharpness minimization broadens applicability of SAM
ELVIA analysis
Independent review pending
The assessment is Major for an invalid quantitative derivation directly used to motivate the preconditioned method: Appendix B mixes trace normalizations and gives an incorrect matrix-product ratio. A corrected, non-strict comparison is proved here and preserves the intended trend under the toy model’s assumptions. The core first-order Functional-SAM decomposition remains valid. Separate Minor findings concern reversed gradient/auxiliary unpacking in the illustrative implementation and the radius needed for Angle-SAM to match SAM. The reported language-model improvements are not refuted or reproduced; causal transfer from the matrix model, full implementation provenance, and some experimental details remain unresolved.
Problem 1. Inconsistent trace normalization invalidates the quantitative preconditioning derivation
MajorEvidence and reasoning
Problem statement
Write and let have outputs as rows. For a smooth loss composed with including the paper’s sample averaging. At nonzero and under the smoothness needed for Taylor expansion, Holding the output-loss cotangent fixed while perturbing only the Jacobian gives which verifies the first-order interpretation of Equation (11). These are positive gradient conventions; an optimizer applies descent.
A direct smooth binary cross-entropy check with logits first-class target, and gives and For this example the displayed Functional-SAM expansion is exact because the Jacobian is affine in This confirms the intended isolation of the functional term locally, without claiming that it always decreases total sharpness or improves generalization.
Equations (4) and (7) omit a common relative to the correct derivative is This is treated as a scaling clarification: it cancels from Equation (9)’s normalized composition if used consistently and does not invalidate the explicit- update above. Also, the squared-norm terms in Equation (9) sum to one only together with the cross term; individual terms need not be probabilities or fractions bounded by one.
Section 4.2, p. 5, cites Appendix B.1 to argue that inverse-GGN preconditioning amplifies the functional path relative to the logit path, motivating preconditioned SAM and its combination with Functional-SAM. Appendix B.1, p. 16, assumes symmetric invertible, freely independent matrices and a random unit vector It defines and compares Equation (14)’s factor uses ordinary trace. But Equation (13) factors ordinary traces without Equation (16) sets and Equation (17) gives an incompatible product of trace moments, followed by a strict conclusion.
Use symmetric invertible freely independent random matrices and an independent isotropic unit vector Define The corrected moment comparison also requires finite second and inverse-second moments and the stated normalized-trace mixed-moment factorization.
Proof
Assessment: Major; a core motivating derivation is invalid.
Take and uniformly distributed on the unit circle. These matrices are symmetric and invertible, are valid degenerate random matrices, and their scalar algebras satisfy freeness: every centered scalar polynomial is zero. The same construction works as a sequence for every so it is not a finite-size approximation issue.
Here exactly and Thus Equation (13), at powers one, instead gives Equation (16) gives and Equation (17)’s middle trace equals two while its final factorized expression equals four. Most directly, proves that the printed norm is wrong for every invertible and unit
This is not only an equality-edge case for the numerical ratio. With an independent uniform random rotation, and scalar is still free from For independent uniform The middle and final expressions printed in Equation (17) give and respectively, instead of The calculations are recorded in `check.json` and follow exactly from isotropy.
Assume is independent and isotropic on the unit sphere, the necessary moments are finite, and the stated free mixed-moment factorization holds with normalized trace Set Then Indeed, cyclicity and normalized factorization give Applying Cauchy–Schwarz to the absolute eigenvalue and its reciprocal, with an eigenvalue drawn uniformly and averaged over matrix randomness, gives Equality is possible, including strict inequality needs nonconstant squared spectral scale.
With ordinary trace, the corrected ratio is Interpreting every printed trace as normalized does not reconcile all equations, because Equation (14) and the unit-vector norm in Equation (16) then remain wrong.
The wrong quantitative derivation is directly invoked for a core proposed method, supporting Major under the assigned calibration. The correction preserves nondecrease in the idealized model; it does not establish failure of preconditioning in Transformers. The paper explicitly acknowledges that actual gradients and Hessian components do not satisfy its toy calculation exactly. Adam’s diagonal second-moment preconditioner, normalized perturbations, and coupled training dynamics require additional justification or measurements. This report neither transfers the corrected theorem to those settings automatically nor claims that the empirical improvements disappear.
Possible revision
Use normalized trace consistently and retain Equivalently, ordinary traces give Replace universal strictness with the non-strict result and its equality condition. This proof does not establish transfer to the full practical method.
Problem 2. Illustrative JAX code uses an invalid keyword and reverses gradient/auxiliary outputs
MinorEvidence and reasoning
Problem statement
Write and let have outputs as rows. For a smooth loss composed with including the paper’s sample averaging. At nonzero and under the smoothness needed for Taylor expansion, Holding the output-loss cotangent fixed while perturbing only the Jacobian gives which verifies the first-order interpretation of Equation (11). These are positive gradient conventions; an optimizer applies descent.
A direct smooth binary cross-entropy check with logits first-class target, and gives and For this example the displayed Functional-SAM expansion is exact because the Jacobian is affine in This confirms the intended isolation of the functional term locally, without claiming that it always decreases total sharpness or improves generalization.
Equations (4) and (7) omit a common relative to the correct derivative is This is treated as a scaling clarification: it cancels from Equation (9)’s normalized composition if used consistently and does not invalidate the explicit- update above. Also, the squared-norm terms in Equation (9) sum to one only together with the cross term; individual terms need not be probabilities or fractions bounded by one.
Listing uses hax_aux=True and assigns the returned pair to dL_dlogits, dL_dtheta as its Functional-SAM implementation.
Use the official JAX grad convention actually consulted: has_aux=True returns the parameter gradient first and auxiliary data second. The auxiliary value is explicitly the unperturbed logit-loss cotangent. The scalar diagnostic uses and no missing helper or historical runtime is assumed.
Proof
Assessment: Minor; implementation illustration only.
Listing p. 17, calls `grad(loss_fn,hax_aux=True)` and binds the result as The consulted official JAX API uses `has_aux` and returns the parameter gradient before auxiliary data [jax]. Thus correcting the keyword alone still reverses the two spaces: the logit cotangent is used to perturb parameters, and the parameter gradient is supplied to the output VJP.
A finite calculation shows that this is substantive even when shapes happen to agree. Take scalar loss and with the auxiliary value defined as The correct pair is Both entries normalize to positive one, so the perturbed parameter is even after the mistaken swap. The intended VJP is whereas the swapped cotangent yields At these are and This uses a smooth generic loss accepted by the illustration and tests the return-order issue without author-code execution. With unequal logit and parameter structures the mismatch can instead prevent evaluation.
The local correction is provided the auxiliary value is explicitly the unperturbed logit-loss cotangent. The remaining VJP then matches Equation (11). This API/formula correspondence is verified statically; a complete runnable implementation is not certified. JAX was absent from both checked runtimes, and the helper and loss wrapper were missing. The illustration is not proven to be the code that produced historical runs, and the mathematical update itself survives.
Possible revision
Use dL_dtheta, dL_dlogits = grad(loss_fn, has_aux=True)(params), with the auxiliary value explicitly defined as the unperturbed logit-loss cotangent. The remaining VJP then matches Equation (11). Only the API/formula correspondence was checked; no runnable JAX repair is claimed.
Problem 3. Angle-SAM at pi/4 matches a rescaled SAM radius
MinorEvidence and reasoning
Problem statement
Write and let have outputs as rows. For a smooth loss composed with including the paper’s sample averaging. At nonzero and under the smoothness needed for Taylor expansion, Holding the output-loss cotangent fixed while perturbing only the Jacobian gives which verifies the first-order interpretation of Equation (11). These are positive gradient conventions; an optimizer applies descent.
A direct smooth binary cross-entropy check with logits first-class target, and gives and For this example the displayed Functional-SAM expansion is exact because the Jacobian is affine in This confirms the intended isolation of the functional term locally, without claiming that it always decreases total sharpness or improves generalization.
Equations (4) and (7) omit a common relative to the correct derivative is This is treated as a scaling clarification: it cancels from Equation (9)’s normalized composition if used consistently and does not invalidate the explicit- update above. Also, the squared-norm terms in Equation (9) sum to one only together with the cross term; individual terms need not be probabilities or fractions bounded by one.
Appendix D claims that recovers SAM to first order at the same nominal radius
Use a smooth loss, nonzero gradient, normalized direction and the same nominal radius for both methods.
Proof
Assessment: Minor; optional extension.
Appendix D, p. 18, states that recovers SAM to first order in Equation (20) instead gives whereas standard SAM has coefficient Their difference is generally order not order
For an admissible binary cross-entropy example with logits first-class target, and one has Writing for the logistic function, At these equal and Moreover, The corrected statement is that Angle-SAM at radius matches SAM at radius to first order; equivalently use Angle-SAM radius to match SAM radius This does not assert exact finite-radius equality. The Functional-SAM endpoint is unaffected. The paper presents this interpolation as future work rather than the method used in its main experiments, so the supported impact is local.
Possible revision
Angle-SAM radius corresponds to SAM radius Equivalently, use Angle-SAM radius to match SAM radius only to first order. The analytic rescaling is checked; exact finite-radius equality is not claimed.
Supporting record & provenance
Work status
Current version
Version 1
Minhao Liu · Initial report · Version 1
Independent review pending
Original claim and review scope
Also, from this figure we can see that the performance gained imparted by FUNCTIONAL -SAM over ADAMW is equivalent to setting about parameters of zero, and is thus significant.
Published ICML 2025 proceedings PDF (PMLR 267); PDF p. 16
Actual review scope
The recorded inspection concerns these source locations: Section 4.2, p. 5 Appendix B.1, p. 16, Equations 13–17; Appendix C, p. 17, Listing1; Appendix D, p. 18, Equation20.