Abstract
Standard machine learning models often rely on spurious correlations rather than causal relationships, leading to failures under distribution shift and perpetuating biases. We present a novel causal regularization approach that incorporates domain knowledge by applying differential penalty strengths to causal and spurious features. By setting $\lambda_s \ge \lambda_r > \lambda_c$, we force models to prioritize causal features. Our evaluation on text classification (IMDB, Kindle) and tabular data (Law School Admission) demonstrates significant improvements in robustness to counterfactual shifts and enhanced fairness without compromising standard accuracy.
Introduction
Machine learning models are typically "correlation machines," excelling at pattern recognition but failing to distinguish between causal relationships (e.g., "excellent" indicating positive sentiment) and spurious ones (e.g., a popular director's name correlating with positive reviews). This lack of causal grounding leads to two critical issues: robustness failures under distribution shift and unfairness when models perpetuate historical biases found in training data.
We argue that by steering models toward causal features and away from spurious ones, we can simultaneously address both robustness and fairness.
Methodology
The proposed Causal Regularization approach consists of two stages:
- Feature Identification: Features are categorized into three sets:
- Causal ($C$): Features that logically cause the label (e.g., "interesting").
- Spurious ($S$): Features that correlate with the label but lack a causal link (e.g., "Spielberg").
- Remaining ($R$): All other features.
- Customized Loss Function: Unlike standard L2 regularization, which penalizes all features equally, we introduce separate hyperparameters ($\lambda_c, \lambda_s, \lambda_r$) for each set: $$\text{Loss} = J(f(x), y) + \frac{\lambda_c}{|C|}\sum w_c^2 + \frac{\lambda_s}{|S|}\sum w_s^2 + \frac{\lambda_r}{|R|}\sum w_r^2$$
The core strategy is to set $\lambda_s \ge \lambda_r > \lambda_c$. By assigning a minimal penalty to causal features and a heavy penalty to spurious ones, the model is incentivized to derive predictive power from causal signals.
Experimental Setup
The method was evaluated across two domains:
- Text Classification: Using IMDB and Kindle datasets. Robustness was measured on Counterfactual (CTF) sets, where labels are flipped by changing only causal words.
- Tabular Data: Using a Law School Admission dataset to predict admission status while ensuring fairness across "gender" (spurious/sensitive) and relying on "LSAT" and "GPA" (causal).
Key Results
The causal regularization approach yielded substantial improvements in model reliability. On the IMDB dataset, the model improved accuracy on counterfactual text by up to 13.3% compared to standard L2 models.
Qualitative analysis confirms that the model successfully shifts its focus. For instance, in a review mentioning "Spielberg," a traditional model assigned the director's name a high weight (0.874). In contrast, the causal model reduced this weight to 0.290, shifting the predictive burden to causal terms like "interesting."
Furthermore, on the law school dataset, the model achieved fairness metrics (Equal Opportunity and Demographic Parity) comparable to specialized state-of-the-art fairness models while maintaining high predictive accuracy.
Discussion and Limitations
While effective, the current approach relies on human intervention to categorize features as causal or spurious. Developing automated pipelines for feature identification remains a primary challenge for future work. Additionally, while this study focused on Logistic Regression for interpretability, extending these principles to deep learning architectures (e.g., via attention masks) is a promising avenue for enhancing the robustness of complex neural models.
Summary updated