NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ZADU: A Python Library for Evaluating the Reliability of Dimensionality Reduction Embeddings

Hyeon Jeon, Aeri Cho, Jinhwa Jang, Soohyun Lee, Jake Hyun, Hyung-Kwon Ko, Jaemin Jo, Jinwook SeoarXiv 2023

TL;DR

ZADU is a new open-source Python library that unifies 17 different distortion measures to evaluate the reliability of dimensionality reduction (DR) embeddings. By automatically optimizing and sharing expensive preprocessing steps like nearest-neighbor lookups, ZADU cuts evaluation times by 1.5x on average while enabling fine-grained, point-by-point distortion visualizations.

What Problem Does This Paper Address?

Dimensionality reduction (DR) techniques like t-SNE and UMAP are indispensable for visualizing high-dimensional data in 2D or 3D. However, squeezing high-dimensional space into a lower dimension inherently introduces structural distortions—meaning what you see in a scatterplot might not accurately reflect the true underlying data.

To trust these visualizations, researchers use various distortion measures (e.g., Trustworthiness & Continuity). Unfortunately, the existing ecosystem for these metrics is highly fragmented. Implementations are scattered across isolated repositories, difficult to install, and computationally inefficient. Furthermore, most tools only provide a single global score, leaving practitioners in the dark about where or why specific regions of an embedding are distorted.

Methods

The authors introduce ZADU, a unified, PyPI-installable Python library designed to make DR evaluation efficient and interpretable. ZADU stands out through two core technical features:

  1. Smart Preprocessing Optimization: Evaluating multiple metrics simultaneously usually leads to redundant calculations. ZADU analyzes the requested metrics, extracts common preprocessing blocks—such as pairwise distance matrices, distance rankings, and $k$-nearest neighbor ($k\text{NN}$) identification—and schedules them optimally. For example, if one metric requires a $20\text{NN}$ graph and another requires a $50\text{NN}$ graph, ZADU computes the $50\text{NN}$ graph once and slices it to fulfill both requests.
  2. Pointwise Local Distortions: Instead of returning just a single aggregate score, ZADU can output local distortion values for each individual data point.

To complement this, the authors developed a companion library called ZADUVis. It takes ZADU's pointwise distortion data and generates intuitive visual diagnostics, such as CheckViz (which uses Voronoi diagrams to color-code local error) and Reliability Maps (which project errors onto $k\text{NN}$ graph edges).

Figure 1: The UMAP embedding of the MNIST dataset (leftmost column), and two distortion visualizations generated by ZADUVis: CheckViz [27] and the Reliability Map [18]. The distortion visualizations depict how each region of the given embedding suffers from the distortions that lower the Steadiness & Cohesiveness (S&C) scores. The visualizations follow the 2D colormap proposed by Lespinats and Aupetit [27] (rightmost column). Combined with ZADU, ZADUVis helps practitioners easily generate distortion visualizations on a matplotlib canvas.

Datasets

The library's performance was validated using:

  • 96 public high-dimensional datasets curated from a previous comprehensive benchmark study, spanning diverse dimensionalities and sample sizes.
  • MNIST, the classic handwritten digit dataset, which was utilized to demonstrate the qualitative distortion visualizations generated by ZADUVis.

Key Insights and Ideas

  • The Dependency Graph Advantage: Treating metric evaluation as a shared computational graph rather than isolated functions yields massive efficiency gains. The computational bottleneck in DR evaluation isn't the metric math itself, but the repeated sorting and searching of high-dimensional spaces.
  • Moving Beyond Scalar Metrics: A single global score (e.g., "Trustworthiness = 0.88") hides critical localized failures. By exposing pointwise errors, ZADU allows researchers to see exactly which clusters or classes are being falsely merged or split by the DR algorithm.

Key Results

  • Broadest Coverage: ZADU supports 17 distinct distortion measures across local, cluster-level, and global granularities—more than three times the amount supported by any previous unified tool.
  • 1.5x Speedup: In a simulated real-world hyperparameter tuning scenario (using Bayesian optimization to find the best UMAP parameters across 96 datasets), ZADU's optimization pipeline executed 1.5 times faster on average than unoptimized execution.
  • Scalability: The runtime savings scale dramatically with dataset size. As the number of data points increases, the gap between ZADU's optimized pipeline and the unoptimized baseline widens significantly.
Figure 2: The results of the runtime analysis (Section 4). (left) ZADU’s optimization substantially reduces the runtime for the optimization of DR embeddings. (right) The extent to which the optimization reduces the runtime increases as the size of the datasets increases. The shaded area in the right figure depicts the 95% confidence interval.

Limitations and Future Work

To ensure dead-simple installation and avoid complex dependency hell, ZADU currently runs strictly on CPUs. While it leverages highly optimized libraries like FAISS for nearest-neighbor searches, it misses out on the massive parallel acceleration that GPUs could provide for massive datasets.

Moving forward, the authors plan to port the library to JavaScript to enable native, interactive distortion evaluations directly within web-based visualization toolboxes (like $D^3$). They also intend to develop formal guidelines to help practitioners choose the right combination of metrics for their specific data domains.

Summary updated

BibTeX
@misc{jeon2023zadu,
  author = {Hyeon Jeon and Aeri Cho and Jinhwa Jang and Soohyun Lee and Jake Hyun and Hyung-Kwon Ko and Jaemin Jo and Jinwook Seo},
  title = {{ZADU: A Python Library for Evaluating the Reliability of Dimensionality Reduction Embeddings}},
  year = {2023},
  eprint = {2308.00282},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.00282},
}
Figure