LatentFlow: Visual Analytics for Latent Space Analysis in Molecular Graph Neural Networks
Authors
Shiyi Liu (Arizona State University), Jiaqing Chen (Arizona State University), Nicholas Hadler (University of California, Berkeley), Rostyslav Hnatyshyn (Arizona State University), Michael Mahoney (UC Berkeley), Talita Perciano (Lawrence Berkeley National Lab), John F. Hartwig (University of California, Berkeley), Gunther H Weber (Lawrence Berkeley National Laboratory), Ross Maciejewski (Arizona State University)
Presentation
- Session
- What does it mean to live, anyway?
- Time
- Wednesday, Nov 11, 10:24 – 10:36 (US/Eastern) · session 10:00 – 11:30
- Location
- Hall America center
Links
Sign in to access the preprint PDF.
Sign in
Keywords
Visual analytics, latent space, chemistry and material science, graph neural networks.
Abstract
Chemists and materials scientists increasingly use machine learning models, such as graph neural networks (GNNs), to predict properties of molecules and the outcomes of their reactions. Beyond predictive performance, understanding how these models organize chemical information internally in their latent spaces, i.e., the embeddings of the molecules, is critical. Analyzing latent spaces helps diagnose model behavior and assess whether the learned embeddings are organized in ways that reflect meaningful chemical relationships. Unfortunately, existing methods provide limited support for analyzing latent spaces across layers and across different model states (e.g., training epochs, model configurations, and input data), making it difficult to understand how these latent spaces evolve throughout a model or relate to chemical concepts. We present LatentFlow, a visual analytics system developed in collaboration with a domain expert for analyzing latent spaces in molecular GNNs. LatentFlow groups embeddings into clusters and supports exploration of latent spaces by tracking how these clusters change across layers and model states using a modified Sankey diagram. To support interpretation, LatentFlow links these clusters to representative molecules and their shared substructures, and it allows scientists to introduce their own domain knowledge and compare it with the patterns found in the latent spaces. We evaluate LatentFlow through two case studies. The results show that LatentFlow helps scientists understand how latent spaces evolve, identify meaningful molecular patterns, and better interpret model behavior.
For Practitioners
This paper is intended for computational chemists, materials scientists, machine learning practitioners, and data scientists who develop or analyze graph neural networks for molecular applications. LatentFlow provides an interactive visual analytics system for examining how molecular representations evolve across network layers and model states. Practitioners can use the system to identify meaningful molecular patterns, compare different model configurations or training stages, diagnose unexpected model behavior, and relate learned latent representations to established chemical knowledge. These capabilities can support model debugging, interpretation, and iterative model development in molecular machine learning workflows.