HSFM: Hard-Set-Guided Feature-Space Meta-Learning for Robust Classification under Spurious Correlations
Organizations: The University of Melbourne, Melbourne, Australia
Abstract
Deep neural networks often rely on spurious features to make predictions, which makes them brittle under distribution shift and on samples where the spurious correlation does not hold (e.g., minority-group examples). Recent studies have shown that, even in such settings, the feature extractor of an Empirical Risk Minimization (ERM)-trained model can learn rich and informative representations, and that much of the failure may be attributed to the classifier head. In particular, retraining a lightweight head while keeping the backbone frozen can substantially improve performance on shifted distributions and minority groups. Motivated by this observation, we propose a bilevel meta-learning method that performs augmentation directly in feature space to improve spurious correlation handling in the classifier head. Our method learns support-side feature edits such that, after a small number of inner-loop updates on the edited features, the classifier achieves lower loss on hard examples and improved worst-group performance. By operating at the backbone output rather than in pixel space or through end-to-end optimization, the method is highly efficient and stable, requiring only a few minutes of training on a single GPU. We further validate our method with CLIP-based visualizations, showing that the learned feature-space updates induce semantically meaningful shifts aligned with spurious attributes.
Figures & tables
| Group Info | Waterbirds | CelebA | MetaShift | Dominoes | |||||
| Method | train/val | Worst | Average | Worst | Average | Worst | Average | Worst | Average |
| DFR | ✗/✓✓ | ||||||||
| Group DRO | ✓/✓ | - | - | ||||||
| LISA | ✓/✓ | - | - | ||||||
| JTT | ✗/✓ | - | - | ||||||
| DaC | ✗/✓ | ||||||||
| Waterbirds | CelebA | MetaShift | Dominoes | |||||
|---|---|---|---|---|---|---|---|---|
| Method | Worst | Average | Worst | Average | Worst | Average | Worst | Average |
| Base (ERM) | ||||||||
| HSFM (ours) | ||||||||
| Method | Stanford Cars | CUB-Birds | Oxford Flowers |
|---|---|---|---|
| ERM | 83.98 | 75.01 | 91.07 |
| DFR-ERM | 82.74 | 72.90 | 95.98 |
| DFR-Pretrained | 32.75 | 48.33 | 87.71 |
| HSFM-ERM | 83.44 | 72.83 | 97.27 |
| HSFM-Pretrained | 85.10 | 72.94 | 97.10 |
| Split | Train | Validation | Test |
|---|---|---|---|
| (landbird, land background) | 3,498 | 467 | 2,255 |
| (landbird, water background) | 184 | 466 | 2,255 |
| (waterbird, land background) | 56 | 133 | 642 |
| (waterbird, water background) | 1,018 | 133 | 642 |
| Split | Train | Validation | Test |
|---|---|---|---|
| (NonBlond, female) | 12,426 | 8,535 | 9,767 |
| (NonBlond, male) | 11,841 | 8,276 | 7,535 |
| (Blond, female) | 22,880 | 2,874 | 2,480 |
| (Blond, male) | 1,387 | 182 | 180 |
| Split | Train | Validation | Test |
|---|---|---|---|
| (Blond, female) | 5,000 | 100 | 100 |
| (Non-blond, male) | 5,000 | 100 | 100 |
| (Blond, male) | 100 | 100 | 100 |
| (Non-blond, female) | 100 | 100 | 100 |
| Split | Train | Validation | Test |
|---|---|---|---|
| (car, 0) | 3,592 | 500 | 490 |
| (car, 1) | 398 | 499 | 490 |
| (truck, 0) | 398 | 499 | 490 |
| (truck, 1) | 3,592 | 500 | 490 |
| Split | Train | Validation | Test |
|---|---|---|---|
| (Cat, sofa) | 231 | 0 | 0 |
| (Cat, bed) | 380 | 0 | 0 |
| (Dog, bench) | 145 | 0 | 0 |
| (Dog, bike) | 367 | 0 | 0 |
| (Cat, shelf) | 0 | 34 | 201 |
| (Dog, shelf) | 0 | 47 | 259 |
| Split | Train | Validation | Test |
|---|---|---|---|
| (Cat, sofa) | 231 | 0 | 0 |
| (Cat, bed) | 380 | 0 | 0 |
| (Dog, bench) | 145 | 0 | 0 |
| (Dog, bike) | 367 | 0 | 0 |
| (Cat, shelf) | 0 | 34 | 201 |
| (Dog, shelf) | 0 | 47 | 259 |
| Hyperparameter | CelebA | Waterbirds | MetaShift | Dominoes |
|---|---|---|---|---|
| Support set size per class | 1024 | 16 | 32 | 16 |
| 10 | 15 | 15 | 10 | |
| Inner learning rate | ||||
| Outer learning rate | ||||
| 5 | 15 | 10 | 15 | |
| 256 | 64 | 64 | 256 |
| Hyperparameter | CelebA | Waterbirds | MetaShift | Dominoes |
|---|---|---|---|---|
| Support set size per class | 1024 | 128 | 64 | 128 |
| 10 | 10 | 10 | 10 | |
| Inner learning rate | ||||
| Outer learning rate | ||||
| 15 | 15 | 10 | 15 | |
| 256 | 32 | 8 | 256 |
| Hyperparameter | CelebA | Waterbirds |
|---|---|---|
| Support set size per class | 32 | 128 |
| 10 | 10 | |
| Inner learning rate | ||
| Outer learning rate | ||
| 15 | 15 | |
| 8 | 16 |
| Method | DFR | CnC | JTT | MaskTune | DaC | Ours |
|---|---|---|---|---|---|---|
| Time (min) | 4 | 85 | 58 | 6.5 | 18.9 | 1.43 |
| Dataset | Runtime (minutes) |
|---|---|
| CelebA | 2.98 |
| Waterbirds | 1.43 |
| Dominoes | 0.26 |
| MetaShift | 0.27 |
Spurious Correlation Robustness
Spurious correlation robustness studies how to prevent models from relying on incidental features that fail under distribution shifts.
See all 61 papers