Abstract
Data visualizations summarize high-dimensional distributions in two or three dimensions. Dimensionality reduction entails a loss of information, and what is preserved differs between methods. Existing methods preserve the local or the global geometry of the points, and most techniques do not consider labels. Here we introduce "hypersphere2sphere" (H2S), a new method that aims to visualize not the points, but the relationships between the labeled distributions. H2S fits a hypersphere to each labeled set of points in a high-dimensional space and visualizes each hypersphere as a sphere in 3D (or circle in 2D). H2S perfectly captures the geometry of up to 4 hyperspheres in 3D (or 3 in 2D), and approximates the geometry for larger numbers of distributions, matching the sizes (radii), and the pairwise separations (between-center distances) and overlaps (along the center-connection line). The resulting visualizations are robust to sampling imbalances. Leveraging labels and the sphere as the simplest geometrical primitive, H2S provides an important addition to the toolbox of visualization techniques.
Introduction
Visualizing high-dimensional data typically involves projecting thousands of dimensions into a 2D or 3D space. While popular methods like Principal Component Analysis (PCA), Multidimensional Scaling (MDS), and t-Distributed Stochastic Neighbor Embedding (t-SNE) are effective for many tasks, they focus primarily on preserving distances between individual points. This point-centric approach suffers from three major limitations: a loss of global structure (such as enclosure relationships), "label blindness" where category information is ignored during optimization, and a high sensitivity to sampling imbalances.
When working with labeled data, researchers are often less interested in the exact coordinates of every data point and more interested in the "geometry of the categories." We propose hypersphere2sphere (H2S), a novel visualization method that models high-dimensional clusters as hyperspheres to preserve critical geometric properties like size, separation, and overlap.
The H2S Method
The H2S algorithm operates in two primary stages:
- Hypersphere Fitting: For each labeled category, the algorithm estimates a center ($\hat{c}$) and a radius ($\hat{r}$) in the original high-dimensional space. A robust adaptive estimator is employed to ensure accuracy across various distribution types, such as Gaussian or uniform.
- Low-Dimensional Embedding: The algorithm identifies a configuration of spheres in 2D or 3D that best matches the high-dimensional summary statistics, specifically the radii, inter-center distances, and the "margins" (the gaps or overlaps between categories).
Furthermore, H2S incorporates a nonparametric inference framework. Using permutation and bootstrap testing, it determines if observed overlaps or separations are statistically significant, providing a rigorous foundation for visual interpretations.
Key Results and Synthetic Validation
A primary advantage of H2S is its ability to solve the "enclosure problem," where one distribution is contained within another. Standard dimensionality reduction (DR) methods often fail to represent these nested relationships accurately.
As shown in the synthetic validation (Figure 4), when testing 200-dimensional distributions designed as concentric balls, PCA and MDS suggest the categories are separated. In contrast, H2S recovers the ground truth geometry perfectly. Because H2S treats distributions as solid volumes rather than point clouds, it naturally captures the containment of the blue category within the pink one.
Applications in Neuroscience and Deep Learning
The utility of H2S was further demonstrated using real-world datasets:
- fMRI Brain Activity: In early visual areas (V1-V3), H2S revealed that category distributions (faces, objects, etc.) are highly entangled with significant overlap. In higher-level areas like the FFA or PPA, the spheres move apart, visually representing how the brain creates distinct "territories" for different concepts.
- Deep Neural Networks: Visualizing the layers of a LeNet-5 CNN showed a progression from highly overlapping spheres in early layers to perfectly separated, compact spheres in the final output layer. This provides an intuitive visualization of the "disentangling" process fundamental to deep learning.
Discussion and Limitations
H2S is mathematically optimal for representing up to $n+1$ classes in $n$ dimensions (e.g., 4 classes in 3D). While it is robust to sampling imbalances, it does rely on the assumption that categories are roughly hyperspherical. If a category is highly elongated or non-convex, a single sphere may be an oversimplification. Future work may expand this visual language to include more complex primitives, such as ellipsoids, to capture directional variance while maintaining the clarity of the H2S approach.
Summary updated