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:
- 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.
- 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).
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.
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