TL;DR
Imagine giving a neural network two "cheats" with the exact same total signal energy: one is a bright, tiny corner patch, and the other is a faint, full-image tint. To standard SGD with L2 regularization, these are mathematically identical problems—just rotated in space. To AdamW, however, changing how that cheat is spread across pixels completely flips its behavior: AdamW beats SGD+L2 at ignoring the concentrated patch, yet fails much harder when tempted by the faint tint.
What Problem Does This Paper Address?
Neural networks love shortcuts—spurious features like background colors or watermarks that predict labels during training, only to fail miserably when conditions change at test time. How heavily a model relies on a shortcut depends on its optimizer. Recent work suggested Adam is naturally more resistant to shortcut learning than SGD (for instance, ignoring a colored corner patch), leaving open how decoupled weight decay—and therefore AdamW, modern deep learning's favorite optimizer—behaves.
Meanwhile, optimization theory tells us there is a fundamental geometric divide here. SGD with coupled L2 regularization (SGD+L2) penalizes weights inside a smooth, rotation-invariant sphere ($\ell_2$ ball). Full-batch AdamW, by contrast, implicitly constrains weights inside an axis-aligned hypercube ($\ell_\infty$ box). Because a cube has corners that point along specific coordinate axes, rotating your data changes what fits inside the box. The author asks: does this coordinate-bound geometry actually change whether AdamW falls for a shortcut, and where does that explanation break down?
Methods
To isolate the pure effect of coordinate geometry, the author trains a simple two-layer ReLU network (64 hidden units, fixed second layer) where the input consists of two separate 196-dimensional blocks: one holding an image, and the other holding a synthetic shortcut.
The core trick is spreading the shortcut across $k$ coordinates (from $k=4$, a concentrated "patch," up to $k=196$, a diffuse "tint") while keeping its Euclidean ($\ell_2$) norm constant. Moving from 4 to 196 coordinates is strictly an orthogonal change of basis—a mathematical rotation.
To make apples-to-apples comparisons, the author introduces two clever controls:
- Loss-matched evaluation: Because regularization strength $\lambda$ means different things to different optimizers, models are compared by sweeping regularization grids and interpolating test accuracy at the exact same training Binary Cross-Entropy (BCE) loss ($\tau = 0.10$).
- Geometric projection controls: Alongside SGD+L2, Adam+L2, and AdamW, the author runs plain SGD projected after every step onto either an $\ell_2$ ball or an $\ell_\infty$ box. Only the shape of the allowed weight boundary differs between the two.
Datasets
The experiments use a binary, class-balanced subset of MNIST resized to $14 \times 14$ (196 pixels), separating the digit 0 from 1 and 2 (3,000 training, 1,000 validation, and 1,960 test images). Appended to each image is a 196-coordinate shortcut block whose sign agrees with the true label 95% of the time during training. At test time, models are evaluated on a "reversed" copy where the shortcut points to the wrong label—an analogue of worst-group accuracy.
Key Insights and Ideas
- Cubes love spread-out signals: Why does spreading a unit-norm vector over $k$ coordinates tempt AdamW? Inside an $\ell_\infty$ box of radius $B$, every weight coordinate gets its own independent budget of $\pm B$. By Hölder’s inequality, a hidden unit's maximum alignment with the shortcut scales as $B\sqrt{k}$. A 4-coordinate shortcut hits a ceiling at $2B$, whereas a 196-coordinate tint can reach $14B$—amplifying the cheat without stealing any "budget" from the actual digit pixels!
- Decoupled decay is the culprit, not Adam itself: Adam with traditional coupled L2 regularization (Adam+L2) shows no statistically clear reversal across bases. The dramatic flip only emerges with decoupled weight decay (AdamW), and plain SGD projected onto an $\ell_\infty$ box reproduces AdamW's exact behavior.
- The digit isn't forgotten, just drowned out: Linear probes trained on the hidden layer's features without the shortcut present still read the true digit at 97.0–98.8% accuracy across all optimizers. The dense shortcut doesn't erase the digit representation; it inflates how heavily the network weighs the shortcut alongside it.
- Where the box analogy breaks: When a random rotation mixes the digit and shortcut blocks together, the $\ell_\infty$ box control loses all advantage over the $\ell_2$ ball, yet AdamW still retains a modest edge (+5.8 to +8.4 percentage points over SGD+L2), showing AdamW's trajectory dynamics go slightly beyond static box constraints.
Key Results
As shown in the loss curves above, SGD+L2 and the $\ell_2$ ball produce virtually identical predictions whether $k=4$ or $k=196$ (differing in zero out of 3,920 test predictions under transported initial weights). AdamW tells a wildly different story at matched training loss ($\text{BCE} = 0.10$):
- Concentrated shortcut ($k=4$): On reversed-shortcut test inputs, AdamW achieves 76.8% accuracy versus 46.9% for SGD+L2—a +29.9 percentage point (pp) advantage.
- Spread-out shortcut ($k=196$): AdamW plunges to 24.0% accuracy while SGD+L2 stays at 46.9%—a −22.9 pp disadvantage (a net swing of −52.8 pp). Even when the shortcut is simply removed ($s=0$), AdamW loses ~4 points in the dense basis (94.3% vs. 98.3%).
- Projection control match: Replacing SGD's $\ell_2$ ball with an $\ell_\infty$ box mirrors AdamW almost perfectly: +29.3 pp at $k=4$ (76.4% vs. 47.1%) and −26.3 pp at $k=196$ (20.8% vs. 47.1%).
Sweeping across support sizes $k$ (above) reveals that the advantage flips sign surprisingly early—between $k=9$ and $25$ for AdamW, right around where the hidden units' mean shortcut alignment ($\bar{a}$) crosses the constant $\ell_2$ level of $0.084$.
Limitations and Future Work
The author is candid about the toy nature of the setup: it investigates a single MNIST task, a tiny 64-unit network, and a synthetic shortcut neatly quarantined in its own input block. Furthermore, the reversal has clear boundaries—it fades if the shortcut is made twice as strong ($\alpha = 5$, eliminating the dense-basis penalty) or much less reliable. In real-world vision tasks, spurious tints and textures overlap directly with object pixels, and deep networks continuously re-encode representations across layers—meaning AdamW's coordinate-sensitive geometry acts on internal parameter spaces rather than raw input pixels. Exploring how internal layer bases interact with decoupled decay in deeper architectures is the natural next frontier.
Summary updated