GNN 101: Visual Learning of Graph Neural Networks in Your Web Browser

Yilin Lu, Chongwei Chen, Kexin Huang, Marinka Zitnik, Qianwen Wang

Abstract

Graph Neural Networks (GNNs) have emerged as a cornerstone for analyzing irregular data structures like social networks and molecular graphs. However, the transition from abstract mathematical equations to a concrete understanding of data transformations remains a significant barrier for learners. We introduce GNN101, an interactive, browser-based visualization tool that addresses this "representation gap." By providing hierarchical levels of detail and bidirectional linking between mathematical formulas and visual data representations, GNN101 enables students to build effective mental models of GNN operations. Our study demonstrates that GNN101 nearly doubles the learning improvement compared to traditional static resources.

Introduction: The Representation Gap in GNN Education

While GNNs are essential for non-Euclidean data analysis, they are notoriously difficult to master. Traditional educational materials often suffer from three primary issues:

  1. Staticity: Tutorials typically rely on static diagrams that fail to capture the dynamic, step-by-step transformation of data across layers.
  2. Abstraction Disconnect: There is a persistent gap between "clean" mathematical equations (e.g., message passing) and the high-dimensional feature matrices used in practice.
  3. Structural Complexity: Beginners struggle to track how individual node features are influenced by neighbors across multiple layers of an irregular graph.

The GNN101 Framework

GNN101 is built with React, D3.js, and ONNX Runtime to provide a zero-installation, interactive learning environment. The tool's design is centered on core innovations that contrast with traditional learning methods.

GNN101 contrasts traditional static learning methods with hierarchical details and linked views.

The framework employs Hierarchical Levels of Detail, allowing users to navigate from high-level architecture down to specific layer outputs and internal matrix operations. To provide a comprehensive understanding, it offers Complementary Views: a Node-Link View for intuitive topology and a Matrix View for space-efficient inspection of feature vectors and adjacency matrices.

Bridging Math and Data through Interaction

The "aha" moment in GNN101 often comes from its Bidirectional Math-Visualization Linking. This feature allows users to directly connect abstract symbols to concrete data.

Bidirectional linking between mathematical formulas and visual data representations.

When a user hovers over a variable in a mathematical formula, the tool highlights the corresponding data heatmap in the visualization. Conversely, hovering over a visualization element displays the specific calculation that produced it. This interaction is supported by an Interactive Graph Editor, where users can modify the input graph and immediately see how these changes propagate through the model's internal states.

Evaluation and Impact

The effectiveness of GNN101 was evaluated through a controlled study comparing it to a high-quality static interactive article.

  • Learning Gains: Students using GNN101 achieved an average quiz score improvement of 55.19%, significantly outperforming the 27.78% improvement in the control group.
  • Real-World Adoption: Without public advertising, the tool reached 1,593 active users across 77 countries, maintaining a high return rate of 33.83%.
  • Qualitative Insights: Instructors and TAs found the tool invaluable for explaining complex concepts like "message passing" and neighbor influence, which are traditionally difficult to illustrate on a whiteboard.

Conclusion and Future Directions

GNN101 successfully bridges the gap between theory and practice in GNN education. Future work aims to increase formula flexibility, allowing users to modify aggregation functions dynamically. The authors also plan to integrate GNN101 as a Jupyter widget (ipywidgets) and expand it into a modular framework where researchers can upload custom architectures and datasets to create bespoke educational visualizations.

Summary updated

Abstract

Graph Neural Networks (GNNs) have achieved significant success across various applications. However, their complex structures and inner workings can be challenging for non-AI experts to understand. To address this issue, this study presents \name{}, an educational visualization tool for interactive learning of GNNs. GNN 101 introduces a set of animated visualizations that seamlessly integrate mathematical formulas with visualizations via multiple levels of abstraction, including a model overview, layer operations, and detailed calculations. Users can easily switch between two complementary views: a node-link view that offers an intuitive understanding of the graph data, and a matrix view that provides a space-efficient and comprehensive overview of all features and their transformations across layers. GNN 101 was designed and developed based on close collaboration with four GNN experts and deployment in three GNN-related courses. We demonstrated the usability and effectiveness of GNN 101 via use cases and user studies with both GNN teaching assistants and students. To ensure broad educational access, GNN 101 is open-source and available directly in web browsers without requiring any installations.
BibTeX
@article{lu2025gnn,
  author = {Yilin Lu and Chongwei Chen and Kexin Huang and Marinka Zitnik and Qianwen Wang},
  title = {{GNN 101: Visual Learning of Graph Neural Networks in Your Web Browser}},
  journal = {IEEE Transactions on Visualization and Computer Graphics},
  year = {2025},
  doi = {10.1109/tvcg.2025.3634087},
}
Figure