Overcoming the global–local trade-off in dimensionality reduction via interactivity
A well-known problem in the representation of high-dimensional data is that it is very hard to find low-dimensional representations that faithfully represent both the global and the local structure.
This problem has led to the development of methods of dimensionality reduction, like DREAMS (Kury, Kobak, and Damrich, 2026), which allow for a single explicit parameter that makes a representation focus on local or global structure. In DREAMS, that parameter is the regularization strength λ. At λ = 0, it produces a standard t-SNE embedding; at λ = 1, it produces a PCA embedding. We can thus optimize either for global structure, as measured by the correlation of pairwise distances in high-dimensional and low-dimensional space, or for local structure, as measured by the recall of nearest neighbors.
Here’s an example on Fashion-MNIST:
What I’ve done here is build an interactive interface that sidesteps this trade-off by only ever showing the data at the level that’s appropriate for how far we zoom into it.
The interactive plots on this page are created by passing some additional JavaScript with coordinates and interpolation parameters (linear, by default) to Leland McInnes’s great DataMapPlot library. The visualization starts out at λ = 1, which corresponds to PCA. As we zoom in, the coordinates of the representation shift around, leading to a viewing experience that is maybe slightly confusing, but also, at all levels, much more faithful than looking at a single-scale embedding.
The whole thing was pretty easy to implement with the help of Codex. I’ve made it available as zoommap, as a kind of add-on to DataMapPlot. You just compute a series of embeddings (they don’t have to be DREAMS), use zoommap to create your custom JavaScript, and pass it to DataMapPlot.
Here are some more examples:
MNIST
20 NEWSGROUPS
References
- Kury, N., Kobak, D., & Damrich, S. (2026). DREAMS: Preserving both Local and Global Structure in Dimensionality Reduction. Transactions on Machine Learning Research.
- McInnes, L. (n.d.). DataMapPlot: Creating beautiful plots of data maps [Software].