Deep learning models often act as "shortcut learners," latching onto easy-to-find background features rather than the intrinsic, causal attributes of an object. This paper introduces Causal Logit Perturbation (CLP), a framework designed to break these spurious correlations by incorporating human causal knowledge through a meta-learned perturbation network.
The Challenge of Spurious Correlations
Standard empirical risk minimization (ERM) often fails when training data contains strong correlations between labels and non-causal attributes. For example, if a dataset predominantly features dogs on land and ducks in water, a model may learn to associate "water" with "duck" rather than learning the physical features of the bird itself. When presented with a dog in a swimming pool, the model's performance collapses because the background "shortcut" is no longer valid.
While previous attempts to fix this have used heuristic logit adjustments (shifting raw output scores), they often rely on simple factors like class frequency. These methods fail to account for the complex causal relationships between foreground objects, backgrounds, and labels. CLP addresses this by explicitly modeling causal interventions at the logit level.
The Causal Logit Perturbation (CLP) Framework
The CLP framework uses a bi-level optimization strategy to adjust model outputs on a per-sample basis. It consists of four primary components that work together to guide the model toward causal features.
1. Metadata Augmentation
At the heart of CLP is a small, clean meta-dataset augmented in two specific ways to encode causal knowledge:
- Counterfactual (CF) Augmentation: The foreground object is removed while the background is kept. Since the "cause" of the label is gone, the label is changed to "not-y."
- Factual (F) Augmentation: The foreground is kept, but the background is swapped or perturbed. The label remains "y," forcing the model to ignore the background.
2. Training Characteristics and Perturbation
For every training sample, the system extracts ten "health metrics," such as sample loss, margin (distance from the decision boundary), and the norm of the loss gradient. A simple two-layer MLP (the Perturbation Network) takes these characteristics as input and generates a sample-specific logit perturbation ($\delta_x$). This acts as a "do-intervention" on the model’s internal logic, effectively telling it how much to ignore potential confounders.
3. Meta-Learning Loop
The perturbation network is trained via meta-learning to ensure the main classifier performs well on the causally-augmented meta-dataset. Additionally, a saliency regularization term ($R^{Sal}$) is applied to penalize the model if its internal attention (saliency) relies too heavily on non-causal background pixels.
Key Results and Insights
CLP was evaluated across several biased scenarios, including long-tailed learning, noisy labels, and subpopulation shifts. It consistently outperformed state-of-the-art (SOTA) methods:
- Robustness to Imbalance: On CIFAR-10-LT (100:1 imbalance), CLP achieved an error rate of 18.03%, a significant improvement over previous benchmarks.
- Breaking Spurious Correlations: On the Waterbirds dataset, CLP achieved a 91.8% worst-group accuracy. This metric is crucial because it demonstrates that the model remains accurate even in the "hard" cases where the background is intentionally misleading.
- Sample-Wise Granularity: Unlike class-wide shifts, CLP’s ability to look at the "difficulty" of individual images allows for more precise interventions.
Limitations and Future Directions
While effective, CLP currently depends on accurate image segmentation (matting) to separate foregrounds from backgrounds. If the matting is poor, the causal intervention may be flawed. Furthermore, while the authors show training time is manageable, bi-level optimization is computationally more intensive than standard training. Future work may look to extend these causal interventions beyond backgrounds to other spurious features like texture, color, or object shape.
Summary updated