Shortcut Invariance: Targeted Jacobian Regularization in Disentangled Latent Space
Shivam Pal, Sakshi Varshney, Piyush Rai
TL;DR
ERM models often rely on shortcuts that degrade OOD generalization. SITAR learns a robust function by identifying shortcut axes from a disentangled latent space via $v_j = |\operatorname{Corr}(\mu^{(j)}, \mathcal{Y})|$ and applying targeted anisotropic noise that perturbs $\bar{\bm{z}} = \bm{z} + \alpha \, (\bm{v} \odot \bm{e})$, combined with a consistency loss to flatten the classifier along these axes. A small-noise expansion shows this objective is equivalent to a unified Jacobian regularizer that penalizes the classifier’s sensitivity on shortcut directions, encouraging reliance on core semantic signals. Empirically, SITAR achieves state-of-the-art worst-group (OOD) accuracy on ColorMNIST, CelebA, Waterbirds, and Camelyon17-WILDS, while maintaining competitive in-distribution performance and avoiding brittle latent-space partitioning. The approach is simple, scalable, and broadly applicable, though it currently relies on a disentangled $\beta$-VAE; extending to pre-trained encoders could widen its applicability to real-world systems.
Abstract
Deep neural networks are prone to learning shortcuts, spurious and easily learned correlations in training data that cause severe failures in out-of-distribution (OOD) generalization. A dominant line of work seeks robustness by learning a robust representation, often explicitly partitioning the latent space into core and spurious components; this approach can be complex, brittle, and difficult to scale. We take a different approach, instead of a robust representation, we learn a robust function. We present a simple and effective training method that renders the classifier functionally invariant to shortcut signals. Our method operates within a disentangled latent space, which is essential as it isolates spurious and core features into distinct dimensions. This separation enables the identification of candidate shortcut features by their strong correlation with the label, used as a proxy for semantic simplicity. The classifier is then desensitized to these features by injecting targeted, anisotropic latent noise during training. We analyze this as targeted Jacobian regularization, which forces the classifier to ignore spurious features and rely on more complex, core semantic signals. The result is state-of-the-art OOD performance on established shortcut learning benchmarks.
