Navigating the Effect of Parametrization for Dimensionality Reduction

Haiyang Huang, Yingfan Wang, Cynthia Rudin

TL;DR

Parametric dimensionality reduction methods (like neural network-based UMAP) often fail to preserve local data structures, leading to "mushy" cluster boundaries. This paper introduces ParamRepulsor, a new algorithm that uses hard negative mining to apply stronger repulsive forces, achieving state-of-the-art local structure preservation without losing global context.

What Problem Does This Paper Address?

Dimensionality reduction (DR) is a cornerstone of data analysis, allowing us to visualize high-dimensional datasets (like gene expression or image features) in 2D or 3D. Traditional "non-parametric" methods like t-SNE and UMAP are excellent at this but have a major flaw: they don't generalize. If you get new data, you often have to re-run the entire algorithm.

To solve this, researchers developed "parametric" versions that use neural networks to learn a mapping function. In theory, these should behave just like their non-parametric counterparts while being able to process new data instantly. However, practitioners have noticed a "performance gap"—parametric versions often produce embeddings where clusters are densely packed with blurred, indistinct boundaries. The authors set out to explain why this gap exists and how to close it.

Figure 1: Dimensionality reduction results on the MNIST digit dataset [15]. Parametric methods (bottom row) fail to preserve the local structure of the dataset compared to their non-parametric counterparts (top row). Our method, ParamRepulsor, effectively resolves this problem via Hard Negative Mining.

Methods

The authors first conducted a deep dive into loss functions, comparing Noise Contrastive Estimation (NCE/InfoNCE) used by methods like t-SNE and NCVis against Negative Sampling (NEG) used by UMAP and PaCMAP. They found that NEG-style losses are inherently more adaptable to parametrization because they penalize the proximity of negative pairs more directly.

Building on this, they developed ParamRepulsor. Its core innovation is the use of Hard Negative Mining (HNM) without requiring labels. Specifically, they identify "Mid-Near" (MN) pairs: points that are not among the $K$-nearest neighbors but are still relatively close in the high-dimensional space.

ParamRepulsor works by:

  1. Sampling MN pairs: For each point, it samples a small set of random points and picks the second closest as the "hard negative."
  2. Applying Strong Repulsion: It uses a tailored loss function that applies a significantly stronger repulsive force to these MN pairs than standard methods do for random negative pairs.
  3. Neural Projector: It uses a shallow Multi-layer Perceptron (MLP) with SiLU activations to learn the mapping.

Datasets

The authors evaluated their method across 14 diverse datasets:

  • Image Data: MNIST, Fashion-MNIST, USPS, COIL-20, and COIL-100.
  • Biological Data (scRNA-seq): Datasets from Kang et al., Kazer et al., Muraro et al., and Stuart et al.
  • Text Data: 20 Newsgroups (20NG).
  • Simulated Structures: Circle, Mammoth (a 3D skeleton), Gaussian Lineage, and Gaussian Hierarchy.

Key Insights and Ideas

  • The Repulsion Deficit: The primary reason parametric methods fail is a lack of sufficient repulsive force on negative pairs. In a neural network setting, the gradients from standard negative sampling aren't strong enough to push dissimilar points apart effectively.
  • Loss Function Matters: InfoNCE-style losses, while popular in contrastive learning, struggle in parametric DR because their gradients can be "diluted" by the global normalization term. NEG-style losses, which treat each pair independently, provide sharper gradients for boundary definition.
  • The Power of "Mid-Near" Pairs: Uniformly sampling negative pairs often leads to "easy" negatives that don't provide useful learning signals. MN pairs are "challenging" negatives that are close enough to be problematic but far enough to rarely be false negatives.
  • Diminishing Returns of Depth: Simply adding more layers to a neural network projector doesn't solve the local structure problem. As shown in Figure 2, performance plateaus quickly, proving that the issue lies in the objective function, not the model capacity.
Figure 2: Embeddings of the MNIST [15] dataset generated by various DR methods with different numbers of hidden layers: 0 (Linear), 1, 2, or 3, or non-parametric variant. See Section 5.1 for details of SVM Acc. It is helpful to envision these images in black and white (without labels) to see when clusters would be difficult to visually separate. More datasets/methods can be found in App. C.

Key Results

ParamRepulsor consistently outperformed existing parametric methods in preserving local structure:

  • Quantitative Superiority: It achieved the highest 10-NN accuracy on 10 out of 14 datasets and the highest SVM accuracy on 9 out of 14.
  • Visual Clarity: On the MNIST dataset, ParamRepulsor was the only parametric method to produce clear, separated clusters similar to non-parametric methods.
  • Distance Distribution: Analysis showed that ParamRepulsor successfully pushes MN and False Positive (FP) pairs much further away from Nearest Neighbors (NN) than its predecessor, ParamPaCMAP.
  • Scalability: The method is highly efficient, successfully embedding datasets with over 2 million points (e.g., the Cao et al. dataset) in a reasonable timeframe, where methods like Parametric UMAP failed due to time constraints.
Figure 3: The low-dimensional scaled distance distribution between various types of point pairs with labels “3” and “8” in the embedding of the MNIST digit dataset [15], gener- ated by PaCMAP, ParamPaCMAP, and ParamRepulsor (other methods in App. H.1.) See definitions in Sec. 2 & 4.

Limitations and Future Work

While ParamRepulsor is faster than Parametric UMAP, it is still slower than InfoNCE-based methods like Parametric Info-NC-t-SNE due to the added complexity of hard negative mining. The authors also note that choosing the "optimal" neural network architecture for different types of data remains an open question. Future work could involve refining the optimization schedule to further improve speed and exploring new evaluation metrics that better capture the nuances of both local and global structure preservation.

Summary updated

Abstract

Parametric dimensionality reduction methods have gained prominence for their ability to generalize to unseen datasets, an advantage that traditional approaches typically lack. Despite their growing popularity, there remains a prevalent misconception among practitioners about the equivalence in performance between parametric and non-parametric methods. Here, we show that these methods are not equivalent -- parametric methods retain global structure but lose significant local details. To explain this, we provide evidence that parameterized approaches lack the ability to repulse negative pairs, and the choice of loss function also has an impact. Addressing these issues, we developed a new parametric method, ParamRepulsor, that incorporates Hard Negative Mining and a loss function that applies a strong repulsive force. This new method achieves state-of-the-art performance on local structure preservation for parametric methods without sacrificing the fidelity of global structural representation. Our code is available at https://github.com/hyhuang00/ParamRepulsor.
BibTeX
@inproceedings{huang2024navigating,
  author = {Haiyang Huang and Yingfan Wang and Cynthia Rudin},
  title = {{Navigating the Effect of Parametrization for Dimensionality Reduction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=eYNYnYle41},
}
Figure