Pattern or Artifact? Interactively Exploring Embedding Quality with TRACE

Edith Heiter, Liesbet Martens, Ruth Seurinck, Martin Guilliams, Tijl De Bie, Yvan Saeys, Jefrey Lijffijt · DOI

Abstract

Dimensionality reduction (DR) is an essential tool for visualizing high-dimensional data, yet it is inherently lossy, often introducing distortions that can lead to the misinterpretation of artifacts as biological or physical patterns. We present TRACE (Two-dimensional Representation Analysis and Comparison Engine), an interactive tool designed to bridge the gap between aggregate quality metrics and local visual exploration. By visualizing quality metrics directly on 2D embeddings and providing interactive diagnostic tools, TRACE allows researchers to distinguish reliable data structures from algorithmic artifacts. Benchmarks demonstrate that TRACE scales to datasets with millions of points, maintaining performance parity with standard embedding algorithms.

Introduction

Visualizing high-dimensional data in two dimensions is a cornerstone of modern data science, particularly in genomics and machine learning. However, projecting high-dimensional structures into a 2D plane is mathematically guaranteed to introduce distortions. For researchers, this creates a fundamental ambiguity: does a visual cluster or "branch" in a t-SNE or UMAP plot represent a genuine reality, or is it merely a byproduct of the algorithm's optimization process?

While aggregate quality scores are often used to benchmark DR methods, these global averages frequently mask local failures. A projection may achieve high accuracy on average while being completely misleading in a specific, critical region of the data. TRACE addresses this by providing a framework for pointwise quality assessment, allowing users to see exactly where and how an embedding might be distorting their data.

The TRACE Framework

TRACE is built on a flexible architecture consisting of a Python backend and a high-performance React frontend. The system is designed to handle the massive datasets common in contemporary research without introducing significant computational overhead.

Technical Implementation

To ensure scalability, TRACE utilizes approximate nearest neighbors (ANN) and parallelizes computations using Numba. This optimization ensures that calculating quality scores is as efficient as generating the embedding itself, removing the "time penalty" typically associated with rigorous data validation.

Quality Metrics

TRACE moves beyond static scores by mapping metrics directly to individual data points:

  • Neighborhood Preservation: Measures how well the local high-dimensional neighbors are maintained in the 2D projection.
  • Random Triplet Accuracy: Evaluates how well global distances and relative positions are preserved.
  • Point Stability: Highlights points that shift significantly between different DR methods (e.g., comparing UMAP to t-SNE), identifying regions where the visualization is sensitive to algorithmic choice.

Interactive Diagnostics

The core innovation of TRACE is its interactive interface, built on regl-scatterplot. This allows for smooth transitions, zooming, and lasso selection even with hundreds of thousands of points. Users can select specific groups of points to:

  1. Visualize their "true" high-dimensional neighbors.
  2. Compare actual high-dimensional distances relative to a selected landmark.
  3. Toggle between different quality views to verify if a visual cluster is supported by the underlying data.

This "pointwise" approach creates an "aha" moment for analysts: they can immediately identify that while "Cluster A" is highly reliable, "Cluster B" may be a distorted region that should not be over-interpreted.

Performance and Scalability

The authors demonstrated TRACE’s utility using a single-cell RNA sequencing dataset of mouse cells (CD49neg) and various synthetic datasets. Key results include:

  • Scalability: The tool maintains performance on synthetic datasets ranging up to 10 million points and 1 million dimensions.
  • Efficiency: Computing all quality measures for five different embeddings takes approximately 146 seconds for $10^5$ points—roughly equivalent to the time required to run a single t-SNE embedding (800 iterations).
  • Responsiveness: The use of ANN indexing ensures that as dimensionality increases to $10^6$, the tool remains viable for real-time exploration in a standard web browser.

Discussion and Future Work

TRACE provides a necessary sanity check for high-dimensional data visualization. By making quality metrics as accessible and interactive as the embeddings themselves, it empowers researchers to conduct more rigorous exploratory data analysis.

However, the reliance on approximate nearest neighbors introduces an inherent trade-off, as the quality metrics themselves become approximations. Future work could involve formal user studies to quantify how much TRACE improves discovery speed or reduces interpretation errors. Additionally, while TRACE identifies where distortions occur, future iterations could potentially suggest parameter adjustments to help users automatically resolve identified artifacts.

Summary updated

BibTeX
@inproceedings{heiter2024pattern,
  author = {Edith Heiter and Liesbet Martens and Ruth Seurinck and Martin Guilliams and Tijl De Bie and Yvan Saeys and Jefrey Lijffijt},
  title = {{Pattern or Artifact? Interactively Exploring Embedding Quality with TRACE}},
  booktitle = {ECML/PKDD},
  year = {2024},
  doi = {10.1007/978-3-031-70371-3\_24},
}
Figure