Abstract
Traditional Explainable AI (XAI) methods in computer vision often produce visual saliency maps that are difficult for non-experts to interpret. LangXAI is a novel framework that bridges this gap by integrating traditional XAI techniques with Large Vision Models (LVMs) like GPT-4V. By translating abstract heatmaps into natural language, LangXAI provides intuitive, human-readable justifications for model predictions across classification, object detection, and semantic segmentation tasks. Evaluation using BERTScore indicates that these generated explanations align closely with human expert reasoning.
Introduction
The interpretability of deep learning models is critical for trust and deployment in sensitive domains. While saliency maps—such as those generated by Grad-CAM or RISE—highlight influential image regions, they often lack semantic context, leaving users to interpret abstract visual artifacts. This "last-mile" communication problem often requires significant domain expertise. LangXAI addresses this gap by using LVMs to interpret these visual artifacts, turning "where" the model looks into a coherent narrative of "why" it made a decision.
The LangXAI Framework
The LangXAI framework operates in two distinct stages to provide multi-task explainability. First, a saliency map is extracted from a base computer vision model (e.g., Swin Transformer or YOLOX) using established XAI algorithms. The framework is designed to be task-agnostic, supporting a wide array of gradient-based and perturbation-based methods.
In the second stage, the original image, the generated saliency map, the model's prediction, and the ground truth are fed into an LVM (specifically GPT-4V). The LVM acts as an interpreter, grounded by the visual evidence provided by the heatmap, to generate a textual explanation that describes the relationship between the highlighted regions and the final decision. This grounding mechanism helps mitigate the risk of LVM hallucinations by forcing the model to describe specific visual attributions.
Experimental Evaluation and Results
The authors evaluated LangXAI across three distinct tasks using well-known benchmarks: ImageNetv2 for classification, TTPLA for semantic segmentation, and MS-COCO 2017 for object detection. To assess the quality of the generated text, the researchers utilized BERTScore, which evaluates the semantic meaning of the explanation rather than just exact word matches.
| Task | BERTScore |
|---|---|
| Classification | 0.9341 |
| Segmentation | 0.8594 |
| Detection | 0.9093 |
The high BERTScore (averaging ~0.9) suggests that the LVM's explanations are semantically very close to expert interpretations. Classification performed the best, likely because identifying a single subject is less spatially complex than describing the boundaries of a segmentation mask or the coordinates of multiple bounding boxes.
Discussion and Conclusion
LangXAI successfully demonstrates that LVMs can be used to "humanize" XAI outputs. By grounding the language model in traditional saliency maps, the framework makes complex model behaviors accessible to a broader audience. However, challenges remain regarding the computational cost of high-end LVMs and the need for larger-scale human studies to prove generalizability. Future work will focus on refining prompting strategies to handle the intricate spatial interactions required for even more precise detection and segmentation explanations.
Summary updated