Facilitate the Parametric Dimension Reduction by Gradient Clipping

Chien-Hsun Lai, Yu-Shuen WangarXiv 2020

Abstract

Non-parametric dimension reduction (DR) techniques like t-SNE and UMAP are the gold standards for high-dimensional data visualization but suffer from a lack of generalization to new data. This paper introduces a method to transform these techniques into parametric models using deep neural networks. By identifying and mitigating the "exploding gradient" problem through simple gradient clipping, the authors enable stable optimization of DR objectives. The resulting models maintain the high embedding quality of non-parametric methods while providing efficient, functional mappings for unseen data.

Introduction

Dimension Reduction is essential for interpreting high-dimensional datasets in 2D or 3D spaces. While t-SNE is widely favored for its ability to preserve local structures, its non-parametric nature is a significant drawback: it lacks a mapping function. Consequently, adding new data points requires re-running the entire algorithm on the combined dataset, which is computationally prohibitive and often alters the existing layout.

Previous attempts to create parametric versions of t-SNE using neural networks often failed to match the original's quality or required complex pre-training (e.g., using Restricted Boltzmann Machines). This research identifies that the primary hurdle is numerical instability: the t-SNE objective function produces massive gradients when distant high-dimensional points are initialized too close together in the embedding space, causing the network weights to diverge.

Methodology

The authors propose a straightforward solution: directly optimize the DR objective function using a deep neural network while applying aggressive gradient clipping.

The parametric architecture uses a neural network to map high-dimensional data (D) to a 2D embedding space.

The Gradient Clipping "Secret Sauce"

The "Aha" moment came from realizing that the failure of parametric t-SNE was an optimization issue, not a capacity issue. In t-SNE, the force between points is inversely proportional to their distance. Random initialization often places distant points on top of each other, creating a "force" so strong it breaks the network. By clipping gradients at a high threshold (e.g., $10^{14}$ for the total gradient), the network can ignore these physically impossible "shoves" early in training, leading to stable convergence from scratch.

Experiments and Results

The approach was evaluated on standard benchmarks including MNIST, Fashion-MNIST, and Coil-20. The parametric version (nn-tsne) achieved K-Nearest Neighbor (KNN) accuracy and trustworthiness scores nearly identical to the original non-parametric t-SNE. For instance, on MNIST, nn-tsne achieved 93.3% KNN accuracy compared to the original's 94.3%.

Comparison of embedding results across various datasets and methods, demonstrating the high quality and cluster separation achieved by the proposed parametric approach.

Beyond quality, the parametric approach offers several advantages:

  • Generalization: Once trained, the network acts as a fixed mathematical function. New data can be projected into the 2D map instantly.
  • Efficiency: By utilizing stochastic gradient descent (RMSProp) and mini-batching, the method scales significantly better with dataset size than traditional full-batch t-SNE.
  • Regularization: The neural network constraint acts as a form of regularization, often preventing the fragmented clusters sometimes seen in non-parametric layouts.

Conclusion

This work demonstrates that the long-standing difficulty in training parametric dimension reduction models can be resolved with a simple numerical fix. By applying gradient clipping, researchers can leverage the visualization power of t-SNE and UMAP within a deep learning framework, enabling scalable and generalizable data exploration. Future work remains to explore theoretical clipping thresholds and more complex distance metrics for semantic understanding in challenging datasets.

Summary updated

BibTeX
@misc{lai2020facilitate,
  author = {Chien-Hsun Lai and Yu-Shuen Wang},
  title = {{Facilitate the Parametric Dimension Reduction by Gradient Clipping}},
  year = {2020},
  eprint = {2009.14373},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.14373},
}
Figure