TL;DR
RootCLAM is a novel framework that uses causal inference to not only pinpoint the exact root cause of an anomaly in tabular data but also recommend the minimal, most effective actions to fix it. By leveraging a Variational Causal Graph Autoencoder, it ensures that recommended fixes respect real-world feature dependencies, outperforming traditional recourse methods that ignore causal structures.
What Problem Does This Paper Address?
Deep anomaly detection models are highly effective at flagging unusual data points—such as a fraudulent credit card transaction or a high-risk loan application. However, they operate as black boxes. When a system flags an anomaly, practitioners face two critical questions: What exactly caused this anomaly? and How can we fix it?
Existing explainable AI approaches typically rely on feature attribution, which highlights which features contributed most to the anomaly score. The fatal flaw here is that these methods treat features as independent. In reality, features depend on one another. For instance, if a loan application is rejected, an attribution method might blame both "low savings" and "low income." But "low income" is the actual root cause that drives the low savings.
Furthermore, when trying to mitigate an anomaly (a task known as algorithmic recourse), standard methods might suggest unrealistic or inefficient changes because they don't understand these causal links. This paper addresses the dual challenge of Root Cause Localization and Anomaly Mitigation in tabular data using a rigorous causal framework.
Methods
The authors introduce RootCLAM (Root Cause Localization and Anomaly Mitigation), a two-phase framework built on Pearl’s Structural Causal Model (SCM) framework.
Phase 1: Root Cause Localization
RootCLAM models anomalies as external interventions on the system's exogenous variables (unobserved background factors that drive each feature). To learn these complex, non-linear relationships from normal data, the framework employs a Variational Causal Graph Autoencoder (VACA).
- The VACA encoder maps observed features to a latent space representing the exogenous variables.
- If a feature's inferred exogenous variable significantly deviates from the distribution learned from normal data (evaluated via cumulative probability thresholds), it is flagged as a root cause. This prevents downstream "symptom" features from being falsely accused.
Phase 2: Anomaly Mitigation
Once the root causes are identified, RootCLAM formulates the fix as a series of soft interventions—meaning it calculates a perturbation vector ($\theta$) applied only to the root cause features.
Directly optimizing this is challenging because changing a root cause feature triggers a cascade of changes in downstream features. RootCLAM solves this by proposing an iterative optimization algorithm that steps through the causal graph in topological order. It simulates the downstream effects of each change using VACA's encoder-decoder architecture, ensuring the final recommended action is both minimal in effort (measured by a weighted L2 norm) and causally realistic.
Datasets
The framework was evaluated on three distinct datasets:
- Loan: A semi-synthetic dataset (7 features) based on the German Credit dataset, where anomalies were explicitly injected by shifting the distributions of specific exogenous variables (e.g., shifting savings).
- Adult: A semi-synthetic dataset (10 features) mapping demographic and employment features to annual income.
- Donors: A real-world dataset from DonorsChoose.org (10 features) used to predict whether a school project is "exciting." Because the true causal graph was unknown, the authors used the PC algorithm to discover and approximate the graph structure.
Key Insights and Ideas
- Symptoms vs. Root Causes: Anomalies propagate. A perturbation at the root level bleeds into downstream variables. RootCLAM successfully separates the "symptoms" from the "disease" by analyzing the latent exogenous noise rather than the raw feature values.
- The Danger of Causal Blindness in Recourse: Traditional recourse methods (like NaiveAM or C-CHVAE) often recommend actions that look good to the anomaly detection model ($\hat{Y}$) but completely fail to flip the true ground-truth label ($Y$) when simulated through the actual data-generating SCM. Accounting for the causal graph is non-negotiable for recourse to work in the real world.
Key Results
- Superior Localization: RootCLAM consistently outperformed the state-of-the-art baseline, CausalRCA, in identifying root causes. Notably, it achieved significantly higher recall (e.g., 0.765 vs 0.680 on the Loan dataset using an Autoencoder detector), meaning it successfully catches more true root causes.
- Efficient and Effective Mitigation: As shown in the trade-off curves, RootCLAM achieves a near 100% flipping ratio on the ground-truth label ($Y$) while requiring a drastically smaller perturbation norm (action value) compared to baselines.
For example, on the Adult dataset with Deep SVDD, RootCLAM flipped 100% of the ground-truth labels with an action value norm of 29.27, whereas NaiveAM required a massive norm of 69.16 and only managed to flip 59.5% of the true labels.
Limitations and Future Work
- Dependency on Causal Graphs: RootCLAM assumes that a causal graph of the data is either known beforehand or can be accurately recovered via causal discovery algorithms (like the PC algorithm). In highly complex real-world scenarios, discovering a perfect causal graph remains an open challenge.
- Exogenous Assumption: The framework assumes that anomalies are exclusively caused by interventions on exogenous variables, which might not encompass all types of real-world anomalies (e.g., structural changes in the causal mechanisms themselves).
Summary updated