Explaining Language Models' Predictions with High-Impact Concepts

Ruochen Zhao, Shafiq R. Joty, Yongjie Wang, Tan WangarXiv 2023 · DOI

Introduction

As Large Language Models (LLMs) are increasingly deployed in high-stakes domains like recruitment and personalized medicine, understanding the rationale behind their predictions is critical. Current Explainable AI (XAI) methods typically offer either local explanations (focusing on specific input tokens) or global explanations (summarizing model behavior across a dataset). Concept-based interpretability has emerged as a preferred global approach because it maps complex model activations to human-understandable ideas.

However, a significant challenge remains: spurious correlations. Many existing methods highlight features that are merely correlated with an output rather than those that drive it. For instance, a model might associate "ice cream sales" with "sunburns" due to their shared correlation with hot weather, even though ice cream does not cause sunburns. If an explanation highlights a feature that does not actually change the model's output when removed, that explanation is unfaithful to the model's internal logic.

Causal graph illustrating the difference between predictive features (Z) and confounding associations (E).

Methodology: The HI-Concept Framework

To address the reliability of explanations, we introduce HI-Concept, a post-hoc interpretability framework designed to identify "high-impact" concepts. Unlike previous methods, HI-Concept ensures that discovered concepts have a measurable causal impact on the final prediction.

Key Components

  • Concept Extraction: The framework inserts a "bottleneck" network into the model's hidden layers, compressing activations into $n$ human-readable concepts.
  • Causality Loss: This is the core innovation. During training, the module optimizes for concepts that, when removed (set to zero), cause a significant shift in the model's prediction. This approach mimics the "Individual Treatment Effect" found in causal inference.
  • Loss Functions: The framework balances four distinct objectives: Reconstruction Loss (accuracy), Regularization Loss (concept distinctness), Auto-encoding Loss (data representation), and Causality Loss (predictive impact).
  • The Context Concept: To maintain predictive performance while testing for causality, the authors designate one "context concept" that remains unperturbed, providing necessary background information while other concepts are evaluated for impact.

Experimental Setup

HI-Concept was evaluated across three model architectures—standard Transformer, BERT, and T5—on three distinct tasks:

  1. Synthetic Dataset: A controlled image dataset used to validate the method against known ground-truth causal factors.
  2. IMDB: Sentiment analysis of movie reviews.
  3. AG-News: Topic classification of news articles.

Results and Discussion

Quantitative evaluations demonstrate that HI-Concept significantly outperforms traditional baselines like ConceptSHAP and $\beta$-TCVAE in identifying the actual "levers" of model decision-making.

Quantitative comparison of HI-Concept against baselines across IMDB and AG-News datasets.

Key Findings

  • Predictive Impact ($I(C)$): On the IMDB dataset using BERT, HI-Concept achieved an impact score of 0.104, nearly doubling the performance of the best baseline (0.057).
  • Faithfulness via Accuracy Change ($\Delta Acc$): The causal nature of HI-Concept is most evident in ablation studies. When a single concept identified by HI-Concept was removed from the T5 model on AG-News, accuracy dropped by 52.2%. In contrast, removing concepts from baseline methods resulted in negligible changes (0.0% to 1.49%), suggesting those methods were identifying non-essential correlations.
  • Layer-wise Insights: Analysis revealed that intermediate layers (e.g., BERT layer 6) capture high-impact, token-level concepts, while penultimate layers capture more coherent, sentence-level topics that align better with human labels but offer less fine-grained control.

Conclusion

HI-Concept represents a shift in XAI from mere correlation to causal impact. By optimizing for concepts that actually drive predictions, the framework provides more faithful and actionable explanations. While the tool currently requires manual selection of hyperparameters like the number of concepts and target layers, it offers a robust foundation for building more transparent and trustworthy language models.

Summary updated

BibTeX
@misc{zhao2023explaining,
  author = {Ruochen Zhao and Shafiq R. Joty and Yongjie Wang and Tan Wang},
  title = {{Explaining Language Models' Predictions with High-Impact Concepts}},
  year = {2023},
  eprint = {2305.02160},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.02160},
}
Figure