SRP: Efficient class-aware embedding learning for large-scale data via supervised random projections

Amir-Hossein Karimi, Alexander Wong, Ali GhodsiarXiv 2018

Abstract

Dimensionality reduction is a critical preprocessing step for high-dimensional data analysis. While supervised dimensionality reduction (SDR) techniques like Supervised PCA (SPCA) offer superior classification performance over unsupervised methods, their computational complexity—driven by Singular Value Decomposition (SVD)—renders them impractical for large-scale datasets. We present Supervised Random Projections (SRP), a novel framework that bypasses the SVD bottleneck by employing kernel approximations. By leveraging Random Fourier Features, SRP and its kernel extension (KSRP) achieve embedding quality nearly identical to SPCA while delivering 10–100x speedups. Our results demonstrate that SRP makes supervised embeddings feasible for datasets with millions of samples without sacrificing accuracy.

Introduction

In machine learning, the "curse of dimensionality" necessitates techniques that project high-dimensional data into lower-dimensional "embedding" spaces. Unsupervised methods like Principal Component Analysis (PCA) are widely used but often fail to preserve class-relevant information. Supervised PCA (SPCA) addresses this by maximizing the dependence between data and labels via the Hilbert-Schmidt Independence Criterion (HSIC). However, the $O(n^3)$ or $O(dn^2)$ complexity of the required SVD makes SPCA unscalable for modern large-scale datasets.

Methodology

The proposed Supervised Random Projections (SRP) method rests on the mathematical insight that the optimal supervised embedding can be approximated through the direct decomposition of the label kernel.

Kernel Approximation and SRP

Instead of computing a full $n \times n$ kernel matrix, SRP utilizes Random Fourier Features to map data into a randomized feature space. This turns a cubic-time eigenvalue problem into a linear-time projection.

  • SRP: Provides linear supervised embeddings.
  • KSRP (Kernel SRP): Extends this to non-linear embeddings by approximating both the data and label kernels.

By bypassing SVD, the computational cost becomes essentially linear relative to the number of data points, enabling the processing of massive datasets like MNIST that typically cause traditional kernel methods to exceed memory limits.

Experimental Evaluation

The authors evaluated SRP and KSRP against traditional SPCA and KSPCA across several datasets, including synthetic non-linear problems (XOR, Spirals), real-world UCI datasets (Sonar, Ionosphere), and the large-scale MNIST database.

Qualitative Results

Visualization of the "Spirals" dataset highlights the power of non-linear supervised embeddings. While linear methods struggle to separate intertwined classes, KSRP successfully untangles the data into distinct clusters.

Visualization of embeddings on the Synthetic Spirals dataset. KSPCA and KSRP effectively separate the intertwined classes compared to linear methods.

Quantitative Performance

Quantitative analysis focused on 1-Nearest Neighbor (1-NN) accuracy and wall-clock duration. As shown in the performance metrics, KSRP matches the accuracy of the "exact" KSPCA method while maintaining a significantly lower computational footprint.

Comparison of 1-NN accuracy and computation duration across different projected dimensions. KSRP maintains high accuracy while being significantly faster than KSPCA.

Key Insights

  • SVD Avoidance: The paper proves that SPCA embeddings are equivalent to projections involving the square root of the label kernel, which can be approximated efficiently.
  • Scalability: On large datasets, traditional KSPCA often fails due to memory constraints (e.g., exceeding 64GB RAM), whereas KSRP remains efficient.
  • Accuracy-Efficiency Trade-off: There is virtually no "accuracy tax" for the speed gains provided by SRP. Accuracy remains nearly identical to traditional spectral methods.

Conclusion

Supervised Random Projections (SRP) bridge the gap between high-performance supervised dimensionality reduction and the requirements of large-scale data processing. By replacing expensive spectral decompositions with clever randomized approximations, SRP provides a scalable, efficient, and accurate alternative to traditional supervised embedding techniques. Future work may further refine the selection of kernel hyperparameters and explore the theoretical links between SRP and general randomized PCA frameworks.

Summary updated

BibTeX
@misc{karimi2018srp,
  author = {Amir-Hossein Karimi and Alexander Wong and Ali Ghodsi},
  title = {{SRP: Efficient class-aware embedding learning for large-scale data via supervised random projections}},
  year = {2018},
  eprint = {1811.03166},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.03166},
}
Figure