Source-linked AI summary

TriMap: Large-scale Dimensionality Reduction Using Triplets

Ehsan Amid, Manfred K. Warmuth

arXiv:1910.00204v2cs.LGstat.ML

TL;DR

Dimensionality reduction needs embeddings that preserve global structure, not only individual-point neighborhoods. TriMap addresses this with triplet-based constraints and a global-accuracy score, and experiments report strong global accuracy, comparable local accuracy, and favorable runtime and scaling across datasets.

  • Problem

    Recent nonlinear dimensionality-reduction methods and common measures emphasize local neighborhoods, leaving global cluster placement less directly assessed.

  • Method

    TriMap initializes a PCA embedding and modifies it using selected triplets that encode relative point-order constraints, while global score measures cluster placement accuracy.

  • Results

    Across real-world and synthetic datasets, TriMap often achieves higher global scores than competing nonlinear methods, comparable local accuracy, and better large-scale runtime.

  • Takeaways & Limitations

    TriMap offers a fast approach for producing globally informative embeddings on datasets ranging from ordinary benchmarks to millions of points.

  • Takeaways & Limitations

    The global score can be ineffective for highly nonlinear data or datasets containing many outliers because it assumes PCA provides a globally optimal linear projection.

Abstract

from arXiv · show

We introduce "TriMap"; a dimensionality reduction technique based on triplet constraints, which preserves the global structure of the data better than the other commonly used methods such as t-SNE, LargeVis, and UMAP. To quantify the global accuracy of the embedding, we introduce a score that roughly reflects the relative placement of the clusters rather than the individual points. We empirically show the excellent performance of TriMap on a large variety of datasets in terms of the quality of the embedding as well as the runtime. On our performance benchmarks, TriMap easily scales to millions of points without depleting the memory and clearly outperforms t-SNE, LargeVis, and UMAP in terms of runtime.

1 Introduction

TriMap targets a limitation of recent nonlinear dimensionality-reduction methods by preserving global structure through triplet constraints and evaluating cluster placement with a global score. Across datasets, it provides globally more accurate embeddings and scales efficiently while retaining comparable local accuracy.

  • Recent nonlinear methods emphasize individual-point neighborhoods, while global structure concerns dataset shape, cluster placement, and outliers.
  • The global score measures how closely an embedding reflects the relative placement of clusters compared with the PCA embedding.Higher global-score values indicate greater accuracy in reflecting global structure.
  • TriMap preserves global structure by replacing pairwise similarities with higher-order triplet constraints stating that one point is closer to another than a third.The method uses triplets of the form (i, j, k), where point i is closer to j than k.
  • On CIFAR-10’s first fully connected layer, TriMap has NN = 0.72 and GS = 0.70, compared with t-SNE’s NN = 0.87 and GS = 0.58.The visualization associates TriMap’s higher global score with recovery of animal and vehicle super-clusters and smaller hierarchies.
  • TriMap is initialized with a low-dimensional PCA embedding and modified using carefully selected triplets from the high-dimensional data.
  • TriMap outperforms competing nonlinear methods on global score in many cases, provides comparable local accuracy, and scales to millions of points with strong runtime performance.On approximately 1.7M Character Font Images points, TriMap takes approximately 1.3 hours, versus more than 3 hours for LargeVis; UMAP exceeds 12 hours.

2 A Measure of Global Accuracy

The section argues that local measures can miss global embedding accuracy and defines a reconstruction-based global score aligned with PCA's preservation of overall data structure.

  • The global score measures how closely an embedding reflects the relative placement of clusters in the original high-dimensional data.
  • Local measures such as AUC cannot reflect the global accuracy of a low-dimensional embedding.
  • PCA preserves global structure, including overall shape, cluster placement, and potential outliers, but loses local neighborhood information.
  • Minimum Reconstruction Error evaluates an embedding by the smallest squared reconstruction error achievable through a linear inverse map.
  • PCA achieves the lowest possible reconstruction error and therefore the highest global score, while larger scores indicate stronger global-structure preservation.
  • The global score handles possible rotation and scaling of the embedding and is used as the global performance measure thereafter.

3 The TriMap Method

TriMap constructs a low-dimensional embedding by weighting selected triplet constraints according to high-dimensional similarities and minimizing their aggregate loss. PCA initialization, adaptive weighting, and sampled triplets support efficient optimization while preserving global structure.

  • Triplet construction: TriMap selects triplets in which j is closer to i than k and assigns larger weights when k should be much farther than j.Triplets are sampled using nearest neighbors for j and more distant points for k.
  • Triplet construction: The triplet loss uses low-dimensional similarities, decreasing as yi approaches yj and yi moves farther from yk.The similarity function is motivated by the Student t-distribution used in t-SNE.
  • Triplet weighting: High-dimensional distances are used to define triplet weights, with adaptive scaling based on local data density.The scaling uses nearest-neighbor distances to adjust for density variation.
  • Optimization: PCA initialization accelerates convergence while preserving much of PCA’s discovered global structure.Random initialization also works in practice, but other methods such as t-SNE are described as more initialization-sensitive.
  • Optimization: The final objective sums the losses over sampled triplets and is minimized with full-batch gradient descent using momentum.The experiments use 400 iterations, with momentum 0.5 initially and 0.8 afterward.
  • Parameter robustness: TriMap is robust to the number of sampled triplets because many triplets convey redundant information, with little quality improvement after a threshold.Figure 3 evaluates nearest-neighbor accuracy and global score as triplet counts increase on MNIST.

4 Experiments

Experiments compare TriMap with t-SNE, UMAP, LargeVis, and PCA across datasets using nearest-neighbor accuracy, global score, visualizations, and runtime. TriMap better preserves global structure, scales to millions of points, and reveals structure that other methods can miss.

  • Experimental setup: Experiments compare TriMap with t-SNE, LargeVis, UMAP, and PCA on real-world and synthetic datasets under common runtime limits.The experiments use a single machine, default parameters, and a 12-hour limit per algorithm.
  • Evaluation: The global score evaluates cluster placement relative to the PCA embedding, while nearest-neighbor accuracy measures local structure.The reported performance pair is (NN, GS).
  • Standard datasets: TriMap generally preserves global structure better than competing methods, including recovering TV news continuity and separating outliers missed by t-SNE and UMAP.These observations are reflected in larger global-score values and similarity to PCA.
  • Runtime: TriMap scales to millions of points and outperforms other methods in most runtime comparisons, whereas UMAP runs out of memory beyond approximately 4M points.The runtime experiments limit each method to 12 hours.
  • Neural-network visualization: In CIFAR-10 network representations, TriMap separates clusters better after another nonlinear layer and makes a highly misclassified dog example visible as an outlier.The example is classified as horse with probability approximately 1 and resembles a horse in the overlaid image.

5 Conclusion and Future Work

The conclusion presents TriMap as fast and effective for large datasets, while identifying limits in local-neighborhood accuracy and in the global score’s assumptions and robustness. Future work includes combining pairwise and triplet constraints and parallelizing the implementation.

  • Conclusion: TriMap is fast and efficient for large datasets, but other methods such as t-SNE can provide additional local-neighborhood insight.The authors propose combining pairwise with triplet constraints to improve local accuracy.
  • Future work: The current implementation uses a single core, leaving parallel multi-core implementation as a future direction.This limits exploitation of multiple cores in the current implementation.
  • Conclusion: In the FC2 visualization, TriMap has NN = 0.77 and GS = 0.84, compared with t-SNE’s NN = 0.87 and GS = 0.61.The comparison illustrates higher global score but lower nearest-neighbor accuracy for TriMap in this example.
  • Limitations: The global score assumes that the PCA linear projection is globally optimal and can be ineffective for highly nonlinear data or many outliers.The paper motivates nonlinear and more robust global performance measures as future work.

A Datasets

The experiments cover publicly available datasets spanning text, images, audio-visual data, biomedical signals, single-cell transcriptomics, network intrusion detection, and particle-physics recognition, ranging from 1,440 to 11 million points.

  • Availability: All datasets are publicly available online, with download links provided.The paper lists the datasets and gives short descriptions.
  • Image datasets: Image datasets include COIL-20, USPS, MNIST, Fashion MNIST, and Character Font Images.They cover object views, handwritten digits, clothing items, and scanned or computer-generated fonts.
  • Other modalities: The collection also includes EEG seizure recordings, 20 Newsgroup documents, Tabula Muris single-cell transcriptomes, and TV News audio-visual features.These datasets represent biomedical, text, biological, and multimedia applications.
  • Large-scale datasets: The dataset suite includes large-scale collections from approximately 362K Lyrics15 points to 11M HIGGS points.Other large datasets include Covertype, RCV1, Character Font Images, and KDDCup99.

B More Visualizations

This section compares TriMap with LargeVis in Figures 7 and 8 and presents additional TriMap visualizations in Figure 9.

  • Figures 7 and 8 compare TriMap results with LargeVis results.
  • Figure 7 includes a comparison between TriMap and LargeVis.
  • Figure 9 provides additional visualizations obtained using TriMap.

C Discussion

TriMap generally improves global accuracy while preserving continuous manifold structure and exposing possible outliers. However, the global score can be uninformative for highly nonlinear data or isolated outliers.

  • Global structure: TriMap generally provides better global accuracy than competing methods while preserving continuity in datasets such as COIL-20, Fashion MNIST, and TV News.On COIL-20, distant clusters remain separated while the main cluster retains a structure resembling other methods.
  • Outliers: TriMap separates possible outliers that PCA reveals in Tabula Muris and 360+K Lyrics, whereas t-SNE places the same points near other observations.The comparison concerns the spatial placement of candidate outliers relative to the main clusters.
  • Manifold structure: t-SNE and LargeVis can form spurious clusters by splitting connected manifolds, illustrated by TV News and LargeVis on Covertype.These examples contrast fragmentation with preservation of underlying connected structure.
  • Global-score limitation: GS can fail to reflect embedding accuracy when data are highly nonlinear relative to PCA or when accuracy depends on uncovering single outliers.The authors identify more accurate global measures for these cases as a future research direction.
  • Visual comparisons: TriMap shows more structure than PCA for both KDDCup99 and HIGGS, although GS is uninformative for KDDCup99.The figure reports nearest-neighbor accuracy and global-score values as (NN,GS) pairs above each visualization.
Loading 1910.00204v2…