A Comprehensive Guide to Explainable AI: From Classical Models to LLMs

Weiche Hsieh, Ziqian Bi, Chuanqi Jiang, Junyu Liu, Benji Peng, Sen Zhang, Xuanhe Pan, Jiawei Xu, Jinlang Wang, Keyu Chen, Pohsun Feng, Yizhu Wen, Xinyuan Song, Tianyang Wang, Ming Liu, Junjie Yang, Ming Li, Bowen Jing, Jintao Ren, Junhao Song, Hong-Ming Tseng, Yichao Zhang, Lawrence Kq Yan, Qian Niu, Silin Chen, Yunze Wang, Chia Xin LiangarXiv 2024 · DOI

As artificial intelligence systems transition from simple statistical tools to massive Large Language Models (LLMs), the "Black Box" problem has become a central challenge in modern computer science. While deep learning models offer unprecedented predictive power, their decision-making processes remain largely opaque. This paper provides a unified taxonomy and technical deep-dive into Explainable AI (XAI), tracing its evolution from inherently interpretable classical models to the complex architectures of modern neural networks.

The Interpretability-Complexity Trade-off

The fundamental tension in AI deployment is the trade-off between model performance and interpretability. Simple "white box" models, such as linear regression or decision trees, allow for direct inspection of coefficients and logic. However, these models often lack the capacity to handle high-dimensional data or complex patterns. Conversely, Deep Neural Networks (DNNs) and LLMs achieve state-of-the-art results but operate with billions of parameters, making human comprehension nearly impossible.

This lack of transparency introduces three significant risks:

  1. Trust and Accountability: Critical sectors like healthcare and finance require a clear rationale for automated decisions (e.g., why a loan was denied or a diagnosis was made).
  2. Regulatory Compliance: Frameworks such as the GDPR establish a "right to explanation" for users affected by automated decisions.
  3. Model Debugging: Without interpretability, identifying why a model fails on edge cases becomes a matter of trial and error rather than systematic engineering.

A Taxonomy of XAI Methods

The paper categorizes XAI techniques into several distinct families to provide a structured framework for practitioners, moving from design-time interpretability to post-hoc analysis.

Intrinsic vs. Post-hoc Explanations

Intrinsic models, such as Generalized Additive Models (GAMs) and Decision Trees, are designed to be interpretable by their very architecture. In contrast, post-hoc methods (like SHAP and LIME) are applied to a pre-trained model to probe its logic without altering its underlying structure.

Feature Attribution and Visualization

Techniques like SHAP (Shapley Additive Explanations) and LIME quantify the contribution of individual input features to a specific prediction. For deep learning, methods like Integrated Gradients and DeepLIFT address the "saturation problem," where gradients may become uninformative in very deep networks. Visualization tools, such as Grad-CAM, generate heatmaps for Convolutional Neural Networks (CNNs), indicating which regions of an image the model prioritized when making a classification.

Causal and Counterfactual Reasoning

Moving beyond simple correlation, Structural Causal Models (SCMs) help researchers understand cause-and-effect relationships using libraries like DoWhy. Counterfactual Explanations provide "what-if" scenarios—for instance, explaining that a loan would have been approved if an applicant's income were $5,000 higher. This provides actionable recourse for end-users rather than just a static diagnostic.

Probing Large Language Models

A significant portion of the research focuses on "interrogating" the hidden layers of LLMs like BERT or GPT. By treating model layers as biological strata, researchers have found that early layers typically handle syntax (grammar), while later layers manage complex semantics (meaning). Probing experiments demonstrate that simple classifiers can identify parts of speech from BERT embeddings with nearly 100% accuracy, confirming that LLMs internally organize linguistic information in a logical manner.

Evaluation Metrics and Results

The effectiveness of XAI is measured through several key metrics introduced or highlighted in the paper:

  • Explanation Stability Score (ESS) and Adversarial Robustness Score (ARS): These ensure that explanations (such as saliency maps for MNIST digits) remain consistent (scores > 0.9) even under minor noise or adversarial perturbations.
  • Average Causal Effect (ACE): This quantifies the mathematical influence of sensitive attributes (e.g., gender or race) on model predictions, facilitating rigorous fairness auditing.
  • Faithfulness vs. Fidelity: The authors distinguish between how well an explanation matches the model's internal logic (fidelity) and how much it reflects the actual underlying data reality (faithfulness).

Limitations and Future Directions

Despite significant progress, several frontiers remain for XAI research:

  • Computational Overhead: Mathematically rigorous methods like SHAP are often too computationally expensive for real-time applications or massive datasets.
  • The Evaluation Gap: There is no universal "gold standard" for what constitutes a good explanation; what is clear to a data scientist may be unintelligible to a doctor or judge.
  • Privacy vs. Transparency: Detailed explanations can inadvertently leak sensitive information about the training data, creating a security risk.

The paper concludes by pointing toward Human-in-the-Loop systems, where AI provides interactive explanations that users can query and correct in real-time, fostering a more collaborative relationship between humans and machines.

Summary updated

BibTeX
@misc{hsieh2024comprehensive,
  author = {Weiche Hsieh and Ziqian Bi and Chuanqi Jiang and Junyu Liu and Benji Peng and Sen Zhang and Xuanhe Pan and Jiawei Xu and Jinlang Wang and Keyu Chen and Pohsun Feng and Yizhu Wen and Xinyuan Song and Tianyang Wang and Ming Liu and Junjie Yang and Ming Li and Bowen Jing and Jintao Ren and Junhao Song and Hong-Ming Tseng and Yichao Zhang and Lawrence KQ Yan and Qian Niu and Silin Chen and Yunze Wang and Chia Xin Liang},
  title = {{A Comprehensive Guide to Explainable AI: From Classical Models to LLMs}},
  year = {2024},
  eprint = {2412.00800},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.00800},
}
Figure