WizMap: Scalable Interactive Visualization for Exploring Large Machine Learning Embeddings

Zijie J. Wang, Fred Hohman, Duen Horng Chau

TL;DR

WizMap is an open-source, browser-based visualization tool designed to help researchers explore and interpret millions of machine learning embedding vectors without needing a dedicated backend server. By combining multi-resolution quadtree summarization with a familiar map-like interface (contours, adaptive labels, and scatter plots), it bridges the gap between high-level distribution overviews and fine-grained data point inspection.

What Problem Does This Paper Address?

High-dimensional embeddings are the backbone of modern machine learning, capturing rich semantic relationships across text, images, and other modalities. However, interpreting them remains difficult. Datasets often contain millions of points, making point-by-point inspection in standard scatter plots overwhelming.

Conversely, density-based contour plots provide good global summaries but obscure local structures and individual data contexts. Furthermore, existing visualization tools often require heavy server-side infrastructure to render and query million-scale datasets interactively. WizMap addresses this trade-off by offering an interactive, multi-scale visual exploration tool that runs smoothly on standard client-side hardware.

Methods

WizMap draws design inspiration from digital cartography (like Google Maps), allowing users to smoothly zoom from a macro overview down to individual data points:

  • 2D Dimensionality Reduction: WizMap accepts 2D coordinates projected from arbitrary techniques (e.g., UMAP, t-SNE, PCA).
  • Multi-Resolution Quadtree Aggregation: WizMap builds a quadtree over the 2D projected space. It recursively aggregates embedding regions from leaf nodes up to the root, creating semantic summaries across varying levels of spatial granularity.
  • Tile-based TF-IDF ($t\text{-TF-IDF}$): For text embeddings, WizMap treats all documents within a quadtree tile as a single "meta-document" and computes TF-IDF scores. Because document merging follows the tree hierarchy, the n-gram count matrix is constructed once and updated at each aggregation step using a single matrix multiplication. For non-text data, it identifies exemplar points closest to the region centroid.
  • Three-Layer Map Interface:
  • Contour Layer: A Kernel Density Estimation (KDE) surface evaluated on a $200 \times 200$ grid to show overall density.
  • Multi-Resolution Labels: Contextual text labels that automatically adapt based on zoom level and density peaks.
  • Scatter Plot: An interactive point layer for individual sample inspection.
  • Client-Side Architecture: Implemented with WebGL (via regl), Web Workers, and the Streams API, allowing dataset streaming and smooth rendering directly in web browsers or Jupyter notebooks (via NOVA) without server backends. Full-text search is powered client-side by FlexSearch.

Datasets

The authors demonstrated WizMap across two real-world case studies:

  • ACL Anthology Corpus (1980–2022): 63,000 NLP paper titles and abstracts embedded into 768-dimensional vectors using MPNet and projected via UMAP.
  • DiffusionDB: 1.8 million text prompts and 1.8 million generated images (3.6 million embeddings total) encoded into a shared 768-dimensional multimodal space using CLIP and projected via UMAP.

Key Insights and Ideas

  • Embeddings Need Dynamic Cartography: Treating high-dimensional vector spaces like geographical maps—where high-level landmarks appear when zoomed out and street-level detail appears when zoomed in—solves the clutter problem of standard scatter plots.
  • Hierarchical Keyword Extraction is Fast: Adapting class-based TF-IDF to spatial quadtree partitions ($t\text{-TF-IDF}$) enables hierarchical keyword extraction in sub-minute compute times, avoiding the high computational cost of running separate clustering algorithms across multiple scales.
  • Zero-Backend Scalability: Modern web primitives (WebGL and streaming pipelines) can handle multi-million-point visualizations entirely in the user’s browser, significantly lowering deployment friction for researchers.

Key Results

  • Computational Efficiency: WizMap summarized 1.8 million text embeddings across three levels of granularity in ~55 seconds on a standard MacBook Pro.
  • Temporal Analysis at Scale: Exploring the 63k ACL papers revealed historical topic shifts over four decades, capturing the decline of grammar-parsing research, the rise of question-answering, and the emergence of recent niches such as hate speech and sarcasm detection.
  • Multimodal Embedding Comparison: Superimposing 1.8M DiffusionDB prompts against 1.8M generated images highlighted key distribution gaps, such as prompts containing movie references having lower visual representation density compared to disproportionately high clusters of generated "art portraits."

Limitations and Future Work

  • Grid Sensitivity: Quadtrees use rigid, axis-aligned partitions; the resulting summaries can be sensitive to bounding box choices and tile boundaries. Future work could incorporate adaptive, density-based clustering.
  • Comparison Visualizations: Visual superposition (layering two distributions in red and blue) can become visually cluttered. The authors suggest exploring small multiples (juxtaposition) and explicit visual difference encodings for local comparisons.
  • Formal Evaluation: While demonstrated on realistic scenarios, formal observational user studies are needed to evaluate how practitioners interact with multi-scale embedding abstractions during diagnostic workflows.

Summary updated

Abstract

Machine learning models often learn latent embedding representations that capture the domain semantics of their training data. These embedding representations are valuable for interpreting trained models, building new models, and analyzing new datasets. However, interpreting and using embeddings can be challenging due to their opaqueness, high dimensionality, and the large size of modern datasets. To tackle these challenges, we present WizMap, an interactive visualization tool to help researchers and practitioners easily explore large embeddings. With a novel multi-resolution embedding summarization method and a familiar map-like interaction design, WizMap enables users to navigate and interpret embedding spaces with ease. Leveraging modern web technologies such as WebGL and Web Workers, WizMap scales to millions of embedding points directly in users' web browsers and computational notebooks without the need for dedicated backend servers. WizMap is open-source and available at the following public demo link: https://poloclub.github.io/wizmap.
BibTeX
@inproceedings{wang2023wizmap,
  author = {Zijie J. Wang and Fred Hohman and Duen Horng Chau},
  title = {{WizMap: Scalable Interactive Visualization for Exploring Large Machine Learning Embeddings}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  url = {https://openreview.net/forum?id=0ufHvC6LHY},
}

Loading related content...

Figure