LatentExplainer: Explaining Latent Representations in Deep Generative Models with Multi-modal Foundation Models

Mengdan Zhu, Raasikh Kanjiani, Jiahui Lu, Andrew Choi, Qirui Ye, Liang Zhao

Abstract

Deep generative models, such as Variational Autoencoders (VAEs) and Diffusion models, learn powerful latent representations of data. However, these latent variables often lack explicit semantic meaning, operating as "black boxes." We introduce LatentExplainer, a framework that utilizes Multimodal Large Language Models (MLLMs) to automatically generate human-readable text explanations for specific latent dimensions. By leveraging mathematical inductive biases and implementing uncertainty-aware generation, LatentExplainer bridges the gap between abstract latent spaces and natural language, significantly improving the interpretability of generative models.

Introduction

While deep generative models excel at producing realistic images, their internal logic remains opaque. Latent variables capture essential features—like facial expressions or architectural complexity—but these are not naturally linked to real-world concepts. Existing explanation methods often fail because they ignore the model's training constraints (inductive biases) and cannot distinguish between meaningful features and uninterpretable noise.

Conceptual overview of LatentExplainer translating latent variables into human-readable descriptions.

LatentExplainer addresses these challenges by treating the generative model as a black box and using MLLMs to "read" the visual transitions caused by perturbing latent variables. By analyzing how images change along specific latent dimensions, the system can identify complex semantic shifts, such as the gradual transition of a small church into a more complex building structure.

Methodology

The LatentExplainer framework consists of a three-stage pipeline designed to ground explanations in the model's underlying logic:

The three-stage LatentExplainer pipeline.
  1. Inductive-Bias-Guided Manipulation: The system identifies the mathematical rules (e.g., disentanglement) used during training. An LLM agent then perturbs latent variables to generate image sequences that highlight specific transitions.
  2. Symbol-to-Word Prompting: Abstract mathematical formulas are translated into natural language prompts using a specialized lookup table. For example, a formula for disentanglement is translated into: "These two rows of images show the same pattern of change despite other variations." This provides the MLLM with the necessary context to interpret the visual patterns correctly.
  3. Uncertainty-Aware Generation: To mitigate hallucinations, the system generates multiple candidate explanations and calculates a certainty score based on their consensus. If no consistent explanation is reached, the system outputs "No clear explanation," effectively filtering out noise.

Experimental Results

The framework was evaluated on both synthetic (3DShapes, dSprites) and real-world datasets (CelebA-HQ, AFHQ, LSUN-Church). Quantitative analysis using GPT-4o on the CelebA-HQ dataset showed significant improvements over zero-shot baselines:

  • BLEU Score: Increased from 5.79 to 18.50.
  • SPICE Score: Improved from 12.68 to 23.90.

Ablation studies confirmed that the inclusion of inductive bias prompts is critical. Removing these prompts caused a massive drop in performance across all tested MLLMs, including GPT-4o, Gemini 1.5 Pro, and Claude 3.5 Sonnet. Qualitatively, the model moved from vague descriptions to highly specific ones, accurately identifying features like hairstyle brightness or facial symmetry.

Discussion and Conclusion

The core insight of LatentExplainer is that mathematical inductive biases serve as a powerful bridge between latent representations and natural language. By quantifying uncertainty, the framework also provides a reliable measure of a variable's interpretability.

While powerful, LatentExplainer is currently dependent on the reasoning capabilities of the underlying MLLM and incurs higher computational costs due to multiple response generation. Future work may extend this approach to audio and video modalities, further opening the "black box" of generative AI across diverse data types.

Summary updated

BibTeX
@inproceedings{zhu2025latentexplainer,
  author = {Mengdan Zhu and Raasikh Kanjiani and Jiahui Lu and Andrew Choi and Qirui Ye and Liang Zhao},
  title = {{LatentExplainer: Explaining Latent Representations in Deep Generative Models with Multi-modal Foundation Models}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2025},
  doi = {10.1145/3746252.3761318},
}
Figure