ELVIA analysis of: Avoiding spurious sharpness minimization broadens applicability of SAM — Problem 2: Illustrative JAX code uses an invalid keyword and reverses gradient/auxiliary outputs
Original paper: Sidak Pal Singh; Hossein Mobahi; Atish Agarwala; Yann Nicolas Dauphin. Avoiding spurious sharpness minimization broadens applicability of SAM. Proceedings of the 42nd International Conference on Machine Learning, vol. 267, 2025. https://proceedings.mlr.press/v267/singh25b.html
Source version: Published ICML 2025 proceedings PDF (PMLR 267)
Source location: Appendix C, p. 17, Listing1
Question: What does the recorded analysis establish about “Illustrative JAX code uses an invalid keyword and reverses gradient/auxiliary outputs”?
Bounded finding:
The illustration reverses parameter-gradient and auxiliary roles. The equal-shape witness gives \(67.2\) instead of \(16.8\) at \(\rho=0.1\); no historical experiment failure is established.
Recorded check:
Assessment: Minor; implementation illustration only.
Listing 1, p. 17, calls `grad(loss_fn,hax_aux=True)` and binds the result as \[\texttt{dL\_dlogits,\ dL\_dtheta = grad(...)(params)}.\] 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 \(F(\theta)=\theta^{2}\), loss \(\ell(z)=z^{2}/2\), and \(\theta=2\), with the auxiliary value defined as \(\partial\ell/\partial z\). The correct pair is \((16,4)\). Both entries normalize to positive one, so the perturbed parameter is \(2+\rho\) even after the mistaken swap. The intended VJP is \[4\cdot2(2+\rho)=16+8\rho,\] whereas the swapped cotangent yields \(16\cdot2(2+\rho)=64+32\rho\). At \(\rho=0.1\) these are 16.8 and 67.2. 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 \[\texttt{dL\_dtheta,\ dL\_dlogits =
grad(loss\_fn,has\_aux=True)(params)},\] 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.
Case-wide limitations:
- P1 — Inconsistent trace normalization invalidates the quantitative preconditioning derivation — Counterevidence: A corrected nondecrease result survives the toy assumptions. The first-order Functional-SAM decomposition remains valid. Actual Adam dynamics/normalized perturbations need not satisfy the model; authors acknowledge the approximation. No benchmark reversal demonstrated.
- P2 — Illustrative JAX code uses an invalid keyword and reverses gradient/auxiliary outputs — Counterevidence: With correct has_aux and (dL_dtheta,dL_dlogits) unpacking the VJP matches Eq11. Full wrappers were not supplied; this listing is not bound to historical training execution.
- P3 — Angle-SAM at pi/4 matches a rescaled SAM radius — Counterevidence: Angle-SAM is an optional future extension, not the main experimental method. Phi0 Functional-SAM is unaffected.
- Limitations: No author code or training was executed; no empirical values independently reproduced.
- Limitations: Standalone official repository, complete preconditioned implementation, normalization helper, loss auxiliary wrapper, configs and raw runs unavailable.
- Limitations: JAX absent in both checked runtimes; no JAX execution claimed.
- Limitations: External OpenReview attachment discovery was blocked in completed source preparation.
- Limitations: References were not all independently audited.
- Unresolved: Section5.3 common LR1e-4 versus Tables6–7 captions1e-3: historical value Needs Evidence.
- Unresolved: Actual Adam/preconditioner/gradient coupling and normalized perturbations do not follow from the free-matrix toy model.
- Unresolved: Causal mechanism across domains, smaller rho settings, paired-seed uncertainty and full run correspondence remain unresolved.
- The original report's complete scope, counterevidence and unresolved questions are retained below.
- This import checks publication format and identity; it does not repeat scientific review.
- Independent human scientific review is pending; author adoption has not been requested.
Source problem ID: p2
Source report index: 2
Original source excerpts (verbatim):
Also, from this figure we can see that the performance gained imparted by FUNCTIONAL -SAM over ADAMW is equivalent to setting about 25% parameters of zero, and is thus significant.
Source: Published ICML 2025 proceedings PDF (PMLR 267)
Locator: PDF p. 16
Source PDF SHA-256: 07535694d19cf2eca9ac919a5718f3900f42a8555290c45c1827d19912768ec2
Review status: Independent review pending
Case: icml2025-0298-avoiding-spurious-sharpness-minimization-broadens-applicability-of
Revision: 1
Record created: 2026-10-26T04:21:21.357774+00:00
Permalink: https://elvia-atlas.org/atlas/cases/icml2025-0298-avoiding-spurious-sharpness-minimization-broadens-applicability-of.html#problem-2
Versioned public record: https://elvia-atlas.org/atlas/evidence/icml2025-0298-avoiding-spurious-sharpness-minimization-broadens-applicability-of/records/icml2025-0298-avoiding-spurious-sharpness-minimization-broadens-applicability-of.r1.json
Canonical record SHA-256: 95855ce14dcbeabb7762e277cec0520e51b80ca1d8c513991db65dce328a4c6d
The page follows the latest revision; the versioned record identifies this snapshot.