- The paper shows that stochastic weight averaging (SWA) applied to augmented-data training improves both performance and equivariance, with the equivariance benefit asymptotically exceeding generic loss improvement under an Ornstein–Uhlenbeck approximation.
- The theoretical bound connects the relative equivariance gain to group size, representation structure, Hessian traces, and network width, while experiments report equivariance-to-performance ratios above 1 across vision and graph benchmarks.
- SWA produced accuracy gains of up to 14.68% and equivariance improvements in every tested configuration, including cases where accuracy declined or remained statistically unchanged.
Motivation and problem statement
Data augmentation is the standard mechanism for injecting task symmetries into an otherwise unconstrained network, but it yields only approximate, distributional equivariance. Prior theoretical work established that an infinite ensemble of networks trained on fully augmented data is exactly equivariant in expectation [gerken2024; nordenfors2024ensembles], yet ensembling requires repeating training for each member and is therefore computationally prohibitive. This paper investigates stochastic weight averaging (SWA) — averaging checkpoints along a single SGD trajectory [izmailov2019a] — as a cheap surrogate for ensembling, and asks whether SWA on augmented data produces an equivariance gain that exceeds what its generic performance improvement would predict.
The central technical obstacle is that SWA samples are drawn from one trajectory and hence are not independent. The authors resolve this by assuming a well-trained network near an equivariant minimum, where the dynamics reduce to an Ornstein–Uhlenbeck (OU) process governed by the Hessian H of the loss.
Theoretical framework
The setting is a group-invariant classification task with finite group G, unitary representations ρX,ρY on input/output spaces, augmented data (i.e., (X,Y)=d(ρX(g)X,ρY(g)Y)), and an invariant loss. Equivariant parameters form a linear subspace E⊂H of parameter space, with orthogonal complement E⊥. Two key structural facts drive the analysis:
- Equivariance of gradient statistics: for augmented data, the gradient covariance satisfies gΣ(θ)g⊤=Σ(gθ) and the Hessian transforms covariantly (Lemma 1). Consequently, near an equivariant minimum θ∗∈E, both H and Σ are block-diagonal with respect to G0.
- SGD as SDE: late-stage SGD is approximated by G1, which linearizes to an OU process at the minimum. The non-equivariant loss contribution is G2.
Two ratios quantify the benefit: the performance ratio G3 and the equivariance ratio G4, comparing unaveraged and SWA-averaged weights after averaging window G5.
Main results
For well-separated checkpoint times, the averaged weights have covariance shrinking as G6, giving G7. For dense sampling in a classification setting, the paper shows that near a well-fitted minimum the Hessian and gradient covariance coincide to first order in the residual error G8, so the dynamics decouple into one-dimensional OU processes along eigen-directions. This yields, for large G9,
ρX,ρY0
where ρX,ρY1 counts eigenvalues exceeding ρX,ρY2. Both ratios diverge as ρX,ρY3: SWA improves performance and equivariance simultaneously, even with densely sampled checkpoints. Their ratio converges to
ρX,ρY4
To bound this quantity, the paper works in the infinite-width NTK limit, widening via direct sums of intermediate representations. A dimension count using Schur's lemma and Cauchy–Schwarz gives ρX,ρY5, where ρX,ρY6 bounds the growth-rate disparity across layers. For the trace ratio, the authors derive the NTK of a layerwise equivariant subnetwork (Lemma 5), generalizing prior work restricted to regular representations [pmlr-v267-misof25a] to arbitrary irrep decompositions. Under ReLU nonlinearities, the equivariant kernel trace is bounded by ρX,ρY7 times the full kernel trace, yielding the main theorem:
ρX,ρY8
which exceeds one whenever ρX,ρY9. Since each factor is at most (X,Y)=d(ρX(g)X,ρY(g)Y)0, the condition holds whenever intermediate representations mix irreps or contain non-trivial irreps; for regular representations (as in group-CNNs) the per-layer factor is (X,Y)=d(ρX(g)X,ρY(g)Y)1. Notably, the guarantee weakens as (X,Y)=d(ρX(g)X,ρY(g)Y)2 grows, consistent with the intuition that larger symmetry groups are harder to learn statistically.
Finally, Proposition 6 establishes that the KL-based equivariance loss (X,Y)=d(ρX(g)X,ρY(g)Y)3 — computable without Hessian knowledge — agrees with (X,Y)=d(ρX(g)X,ρY(g)Y)4 up to (X,Y)=d(ρX(g)X,ρY(g)Y)5 near a well-fitted equivariant minimum, licensing its use as an empirical proxy for (X,Y)=d(ρX(g)X,ρY(g)Y)6.
Assumptions and limitations
The theorem rests on several assumptions stated explicitly by the authors: large averaging time (X,Y)=d(ρX(g)X,ρY(g)Y)7, large width (X,Y)=d(ρX(g)X,ρY(g)Y)8, finite (X,Y)=d(ρX(g)X,ρY(g)Y)9, a well-fitted model (small residual E⊂H0), ReLU nonlinearities, and convergence to a strictly equivariant minimum E⊂H1 (invoking identifiability results to justify treating layerwise-equivariant parameters as well-defined). The quadratic approximation of the loss is validated empirically but is itself an approximation whose accuracy depends on the SGD trajectory remaining confined to high-curvature directions. On practical architectures the theorem's hypotheses fail (restricted parameter spaces, intractable irrep decompositions), so the experiments there only test the qualitative claim E⊂H2 rather than the quantitative bound. The analysis also covers discrete groups only; continuous symmetries appear in experiments solely through discretized subgroups of E⊂H3 and E⊂H4.
Experimental validation
Synthetic verification. In a teacher–student MLP setup with a regular-representation teacher under E⊂H5, the empirical ratio E⊂H6 rises above the asymptotic bound E⊂H7 and plateaus above it as E⊂H8 grows, while plateaued values decrease monotonically with group order across cyclic groups E⊂H9 — matching both qualitative predictions of the theorem. The ratio remains above 1 throughout, though the excess shrinks with E⊥0 as predicted.
Image classification. Across MNIST, Fashion-MNIST, CIFAR-10/100, and ImageNet-100 with E⊥1 rotation augmentation, and seven models (MLPs, VGG-16, PreResNet-164, WideResNet-28×10, ViT-S, ViG-Ti), OSP improves strictly positively in every configuration — including ViG-Ti on ImageNet-100, where accuracy slightly decreases (E⊥2) while OSP gains E⊥3. Accuracy gains reach E⊥4 (ViT-S on ImageNet-100) and E⊥5 (WRN on CIFAR-100). The relative ratio E⊥6 exceeds 1 everywhere: MLPs yield 1.14–1.44, close to the theoretical ceiling of E⊥7, while deep CNNs reach 2.21–5.09, indicating the bound is conservative outside its strict regime — plausibly because residual architectures' admissible parameter space makes E⊥8 a smaller fraction of E⊥9 than the unrestricted dimension count assumes.
Graph classification. On DHFR, BZR, and COX2 with GINs under tetrahedral/octahedral/icosahedral augmentation, accuracy changes are essentially noise (five of nine configurations negative, error bars comparable to means), yet OSP improves in all nine configurations (gΣ(θ)g⊤=Σ(gθ)0 to gΣ(θ)g⊤=Σ(gθ)1). This dissociation — equivariance gains persisting absent accuracy gains — directly supports the paper's claim that SWA's effect on the non-equivariant subspace is not merely a side effect of generic variance reduction.
Conclusion
This paper provides the first quantitative account of how SWA interacts with data-augmentation-induced symmetrization. By modeling late-stage SGD as an OU process at an equivariant minimum and combining Hessian-trace identities with novel equivariant NTK calculations, it proves that SWA's relative improvement in equivariance asymptotically dominates its relative improvement in loss, under explicit conditions on width, averaging time, group size, and representation structure. Experiments spanning vision and molecular graph tasks, discrete rotations in 2D and 3D, and four architecture families confirm the effect robustly, including settings where accuracy does not improve. Open questions include extending the analysis beyond ReLU and finite groups, tightening the conservative bound observed for deep convolutional models, and characterizing when the predicted equivariance gain translates into downstream accuracy improvements.