Abstract
Responsible use of machine learning requires models to be audited for undesirable properties. While a body of work has proposed using explanations for auditing, how to do so and why has remained relatively ill-understood. This work formalizes the role of explanations in auditing and investigates if and how model explanations can help audits. Specifically, we propose explanation-based algorithms for auditing linear classifiers and decision trees for feature sensitivity. Our results illustrate that Counterfactual explanations are extremely helpful for auditing. While Anchors and decision paths may not be as beneficial in the worst-case, in the average-case they do aid a lot.
Introduction
As machine learning (ML) systems are increasingly deployed in high-stakes domains such as healthcare, lending, and law, the need for rigorous auditing becomes paramount. Auditing ensures that models do not rely on prohibited or spurious features—for instance, ensuring a medical imaging model isn't using a "pen mark" on an X-ray to predict cancer.
Traditionally, auditing has been an ad-hoc process, often involving testing a model against a held-out dataset. However, in practice, auditors frequently lack access to the model's internal code or parameters due to intellectual property concerns. This necessitates "query access," where the auditor can only observe outputs for specific inputs. This paper introduces XAudit, a theoretical framework that formalizes how local explanations—such as counterfactuals and anchors—can significantly accelerate the auditing process for feature sensitivity.
Methodology: The XAudit Framework
The authors formalize auditing as a strategic interaction between an Auditor and a Data Scientist (DS). The primary goal is to determine Feature Sensitivity: verifying whether a specific "Feature of Interest" (FoI) influences the model's output.
The framework develops specific algorithms for two primary hypothesis classes:
- Linear Classifiers:
- Counterfactual Explanations: These are highly potent. The vector between a point and its nearest counterfactual is parallel to the model's weight vector, allowing for rapid parameter estimation.
- Anchor Explanations: Through "Anchor Augmentation," the auditor leverages the "safe" region defined by an anchor to generate synthetic labeled data, reducing the need for expensive model queries.
- Decision Trees:
- Decision Path Explanations: A breadth-first search approach perturbs features along a path to determine if the FoI is ever triggered.
The paper also establishes a link between auditing and Membership Query Active Learning (MQAL). It demonstrates that while any learnable property can be audited, auditing is fundamentally more efficient because it focuses on verifying a single property rather than reconstructing the entire model.
Empirical Evaluation
The proposed auditors were evaluated on three standard benchmarks: Adult Income (predicting income >$50k/year, FoI: Gender), Covertype (predicting forest cover, FoI: Wilderness area), and Credit Default (predicting defaults, FoI: Sex).
Key Results
- The Power of Counterfactuals: For linear models, counterfactuals act as "cheat codes." The paper proves that an auditor requires exactly one query to determine feature sensitivity if provided with a perfect counterfactual.
- Average-Case Optimism: While theoretical worst-case bounds for anchors can be modest, empirical results show that "typical" anchors found in real-world datasets allow for massive speedups.
- Efficiency Gains: The algorithms consistently outperformed simple random testing. For decision trees, auditors often required only 2 to 54 queries to audit models with hundreds of nodes.
Discussion and Future Work
A critical insight of this work is that Auditing ≠ Learning. Auditing is a "partial learning" task, making it inherently more efficient than full model extraction. However, several challenges remain:
- Truthfulness: The theory assumes the Data Scientist provides honest explanations. Verifying these explanations can be as computationally intensive as the audit itself.
- Model Complexity: Current guarantees are limited to linear models and decision trees. Extending this to non-convex Deep Neural Networks (DNNs) is a major future direction.
- Privacy vs. Auditability: High query efficiency for auditors might inadvertently facilitate model stealing by malicious actors.
- Approximate Explanations: Future iterations must account for the noise and potential "unfaithfulness" inherent in real-world explanation tools like LIME or SHAP.
By formalizing the role of explanations, XAudit provides a rigorous foundation for building more transparent and accountable machine learning systems.
Summary updated