Neural networks are incredibly powerful, but they are notorious for acting as "correlation machines." They often pick up on spurious correlations rather than true causal relationships. For instance, if a dataset shows that people with high calorie intake also happen to be fit runners, a neural network might incorrectly learn that eating more causes a lower BMI. While this correlation might hold in a specific training set, it fails in the real world and leads to untrustworthy, "black box" explanations.
To address this, researchers have introduced CREDO (Causal REgularization using Domain priOrs), a novel regularization method that bakes expert domain knowledge directly into the training process. By matching the model's gradients to known causal shapes, CREDO produces models that remain highly accurate while becoming significantly more robust, fair, and aligned with human intuition.
The Challenge of Enforcing Expert Knowledge
Human experts often understand the shape of a relationship—for example, knowing that a specific effect should be negative, exhibit diminishing returns, or have exactly zero effect for fairness reasons. However, enforcing these constraints during training without ruining the model's predictive power is notoriously difficult. Existing methods typically only handle simple constraints like monotonicity and fail to distinguish between direct effects (A causes B) and total effects (A causes B, but also causes C, which then causes B).
The CREDO Methodology: Gradient Matching
The core innovation of CREDO is gradient matching. Instead of forcing the model to predict specific absolute values, CREDO forces the partial derivatives (gradients) of the model's output with respect to its inputs to match the gradients of a "prior" function provided by an expert.
Why use gradients? Gradients capture the rate of change. If an expert describes a relationship as having "diminishing returns," they are fundamentally describing how the gradient changes. Matching gradients is computationally efficient and avoids the need to define arbitrary baseline values for features.
CREDO mathematically defines how to regularize for different types of causal effects:
- Controlled Direct Effect (CDE): The effect of an input when all other variables are held constant.
- Total Causal Effect (TCE): The full impact of an input, including its influence on "mediator" variables that eventually affect the output.
During training, a penalty term is added to the standard loss function. This term activates if the model's learned causal gradient deviates from the expert's prior gradient beyond a small margin of error ($\epsilon$).
Experimental Validation and Key Findings
The authors evaluated CREDO across twelve benchmark datasets, including synthetic datasets with known ground-truth causal equations (like BNLearn networks) and real-world datasets (such as COMPAS, AutoMPG, and Boston Housing).
The results highlight several major advantages of the CREDO approach:
- Superior Causal Alignment: In synthetic tests, CREDO's learned causal effects matched the ground truth nearly perfectly, often achieving a 0.000 RMSE. In contrast, standard Empirical Risk Minimization (ERM) models frequently learned effects with the wrong sign or shape.
- No Accuracy Trade-off: Across all 12 datasets, CREDO maintained predictive accuracy comparable to standard training. It proves that aligning a model with human intuition does not require sacrificing performance.
- Causality Breeds Robustness: Models trained with CREDO are significantly more robust to noisy inputs. Because the model is forced to rely on true causal paths rather than brittle correlations, it maintains performance better under stress. For example, on an AutoMPG dataset injected with high noise variance, CREDO achieved 79.74% accuracy compared to the standard model's 68.35%.
- Fairness as a Causal Constraint: Fairness can be effectively treated as a causal problem. By enforcing a "zero direct causal effect" prior on sensitive attributes like race or gender, CREDO reduces proxy discrimination. On the Law School dataset, CREDO reduced the causal effect of gender and race to near zero (from $10^{-3}$ down to $10^{-5}$) without dropping its 95% test accuracy.
Limitations and Future Directions
While powerful, CREDO relies heavily on the assumption that the domain expert is correct. If the provided prior is wrong—for instance, insisting on a relationship that doesn't exist—the model's accuracy will suffer as it tries to force a false constraint onto the data. Additionally, regularizing for total effects requires the user to know the partial causal graph (i.e., identifying which variables act as mediators).
Future work will likely explore ways to automatically validate whether an expert prior is consistent with the underlying data before enforcing it, potentially catching human errors in domain knowledge and making causal regularization even more robust.
Summary updated