Abstract
Differential Privacy (DP) is a standard for protecting sensitive data, but its impact on the explainability of machine learning models remains under-explored. This paper investigates the "trilemma" between privacy, performance, and explainability in the context of Anomaly Detection (AD). By evaluating Isolation Forest (iForest) and Local Outlier Factor (LOF) models using SHAP explanations across varying privacy budgets, the authors quantify how DP-induced noise distorts both detection accuracy and the reliability of model explanations. Results indicate that while LOF exhibits greater robustness, high privacy levels significantly degrade model fidelity and lead to misleading explanations.
Introduction
Anomaly Detection (AD) is critical in high-stakes fields like healthcare and finance, where identifying "outliers" can mean spotting a rare disease or a fraudulent transaction. However, these fields often deal with highly sensitive data. To protect individual privacy, researchers use Differential Privacy (DP)—a mathematical framework that injects "calibrated noise" into data to ensure no single record can be identified.
The challenge is that AD systems also need to be explainable. Stakeholders need to know why a specific data point was flagged. While Explainable AI (XAI) tools like SHAP are commonly used to provide these insights, we don't fully understand how the noise added for privacy distorts these explanations. If the privacy-preserving noise changes the "reasoning" of the model, can we still trust the explanation? This paper quantifies that specific trade-off.
Methods
The authors investigate the interplay between DP, AD, and XAI using a structured experimental pipeline designed to compare models trained on original data versus those trained on privatized data.
- Noise Injection: They apply DP at the training data level, injecting either Laplace or Gaussian noise based on varying "privacy budgets" ($\epsilon$). A smaller $\epsilon$ means more noise and stronger privacy.
- Anomaly Detection Models: They compare two distinct types of unsupervised algorithms:
- Isolation Forest (iForest): Focuses on "global" anomalies by isolating points that deviate from the overall distribution.
- Local Outlier Factor (LOF): Focuses on "local" anomalies by comparing a point's density to its immediate neighbors.
- Explainability (XAI): They use SHAP (SHapley Additive exPlanations) to attribute the contribution of each feature to the anomaly score.
- Quantifying Change: To measure how much the explanations "drifted" due to privacy noise, they use three metrics: ShapGAP-Euclidean (magnitude of change), ShapGAP-Cosine (directional change), and ShapLength (the number of features required to explain a prediction).
Datasets
The study utilizes three standard, publicly available benchmarks for anomaly detection:
- Mammography: Radiological scans for breast cancer (6 features, ~11k records).
- Thyroid: Medical histories for thyroid disease (21 features, ~7k records).
- Campaign (Bank): Banking information used for marketing (62 features, ~41k records).
Key Insights and Results
The Resilience of "Local" Logic
One of the most striking findings is that LOF is more robust than iForest when privacy noise is introduced. Because iForest relies on the global distribution, the "blurring" effect of DP noise easily masks global outliers. LOF, which looks at local neighborhoods, maintains its performance and explanation stability much better under moderate noise. For iForest on the Mammography dataset, the Area Under the Curve (AUC) dropped from 74% (no privacy) to 53% (high privacy). In contrast, LOF was much more stable, only dropping to 66% under the same conditions.
The Fidelity-Explanation Link
The authors found a strong negative correlation between "explanation divergence" and "model fidelity." Essentially, as the SHAP values start to drift due to noise, the model’s ability to faithfully represent the original, non-private patterns collapses. For iForest, the ShapGAP-Cosine distance approached 1.0 at high noise levels, indicating that the "direction" of the explanation (which features the model thinks are important) became almost entirely different from the original model.
Visual Interpretation Decay
At high privacy levels ($\epsilon = 0.01$), SHAP summary plots—which usually show clear clusters of high/low feature values—become "muddy." The clear distinction between feature values fades, meaning a human expert looking at the chart would likely draw the wrong conclusion. Furthermore, under strict privacy, ShapLength often decreased, suggesting that the added noise forces the model to rely on fewer, potentially noisier features, leading to "simpler" but less accurate explanations.
Limitations and Future Work
The authors acknowledge several areas for further exploration:
- Algorithm Scope: The study focused on two classical unsupervised algorithms. Future work should examine how Deep Learning-based AD (like Autoencoders) handles this trade-off.
- DP Application: Noise was added directly to the input data. Other methods, such as DP-SGD (adding noise to gradients during training), might yield different results for explainability.
- Mitigation Strategies: The paper identifies the problem but does not yet propose a method to "fix" the distorted explanations. Developing XAI techniques that are inherently "noise-aware" is a logical next step.
Summary updated