Abstract
Explainable AI (XAI) often struggles to bridge the gap between low-level features used by complex models and high-level concepts understood by humans. Traditional methods like SHAP and LIME require an invertible mapping from concepts back to raw data, a mathematical impossibility in many real-world scenarios. This paper presents Latent SHAP, a model-agnostic framework that utilizes a latent surrogate model to generate human-interpretable explanations without requiring an inverse mapping. Validated across diverse domains, Latent SHAP demonstrates high fidelity and robustness, offering a practical path toward transparent machine learning.
Introduction
High-performing machine learning models, particularly Deep Neural Networks (DNNs), typically operate on low-level features such as raw pixels, signal frequencies, or byte sequences. While these features enable high predictive accuracy, they are often unintelligible to human users. Standard explanation tools attempt to map model decisions to "interpretable representations." However, these tools traditionally rely on an invertible transformation ($h^{-1}$) to query the model with concept-based perturbations. Because the mapping from high-level concepts (e.g., "smiling") to low-level features (pixels) is many-to-one, a true mathematical inverse is impossible to define.
Latent SHAP addresses this "many-to-one" problem by relaxing the requirement for an invertible function. By using a one-way transformation and a latent surrogate model, it provides a model-agnostic way to generate explanations in a human-interpretable space.
The Latent SHAP Framework
The core innovation of Latent SHAP is the replacement of the impossible inverse mapping with a statistical approximation. The workflow proceeds through four distinct phases:
- Background Sampling: A representative background dataset is sampled from the original raw feature space.
- Latent Transformation: This data is transformed into a human-interpretable "latent" space using a one-way function ($h$). This function can be a captioning model, a set of predefined rules, or a specialized feature extractor.
- Latent Surrogate Training: A surrogate model ($j$) is trained to learn the relationship between these interpretable latent features and the original black-box model’s outputs.
- Attribution: Instead of querying the original model with synthetic "inverse" samples, Latent SHAP queries the surrogate model to calculate Shapley values, representing feature importance in the interpretable space.
Experimental Evaluation
The researchers validated Latent SHAP across several domains, including image classification (CelebA, dSprites, Wolf & Husky), medical imaging (BraTS), malware detection, and natural language processing (Spam & Ham).
In the CelebA dataset, which contains over 180,000 celebrity images, Latent SHAP successfully attributed model predictions to human-understandable attributes.
Key Results and Insights
Latent SHAP demonstrated significant advantages over existing approaches:
- High Fidelity: On synthetic data with known ground truths, the framework achieved a mean cosine similarity of 0.992 compared to ideal invertible methods.
- Robustness: The method maintained high similarity to ground truth even when the transformation function was corrupted with up to 30% Gaussian noise.
- Superiority over Naive Baselines: The surrogate model approach proved essential. A "naive" baseline that simply projects standard pixel-based SHAP values into the latent space failed to provide the same level of clarity or accuracy.
A key insight from this work is that a perfect inverse mapping is unnecessary; modeling the statistical relationship between concepts and outputs is sufficient for high-quality explanations. Furthermore, the framework's model-agnostic nature allows it to explain any system, from XGBoost ensembles to closed-source Large Language Models (LLMs).
Conclusion
Latent SHAP provides a practical solution for generating human-interpretable explanations for complex models. By bypassing the need for invertible transformations, it opens the door for XAI applications in critical fields like medicine and cybersecurity. Future work will focus on optimizing surrogate model selection and automating the discovery of latent spaces to further enhance the framework's utility.
Summary updated