Compressed Least-Squares Regression on Sparse Spaces

Mahdi Milani Fard, Yuri Grinberg, Joelle Pineau, Doina Precup

Abstract

This paper introduces a theoretical and empirical analysis of Compressed Least-Squares Regression (COLS), a method that uses random projections to handle high-dimensional, sparse data. The authors provide a new bias-variance framework that works even for non-independent (non-i.i.d.) data, offering a computationally efficient way to perform regression on massive feature spaces where traditional methods fail.

Introduction

In modern machine learning, we often encounter datasets where the number of features ($D$) far exceeds the number of available training samples ($n$). Standard Ordinary Least Squares (OLS) regression struggles in these scenarios: it either becomes computationally impossible or suffers from massive variance, causing the model to overfit to noise rather than learning the signal.

However, much of this high-dimensional data is sparse, meaning most features are zero for any given instance. While techniques like $L_1$ regularization (Lasso) can handle this, they are often computationally expensive. This paper explores whether we can simply "squash" the high-dimensional sparse space into a much smaller one using random projections and still achieve accurate results. Specifically, the authors analyze the mathematical trade-off between the error introduced by squashing the data (bias) and the error reduced by having fewer parameters to learn (variance).

Methodology: Compressed Ordinary Least Squares (COLS)

The proposed Compressed Ordinary Least Squares (COLS) method follows a straightforward two-step process:

  1. Random Projection: A high-dimensional sparse input vector is multiplied by a random Gaussian matrix to project it into a much lower-dimensional space ($d$).
  2. Standard Regression: OLS regression is performed in this new, smaller space.

A significant contribution of this work is the derivation of worst-case bounds that hold regardless of the data distribution. Unlike most existing theories for random projections that assume data points are sampled independently and identically (i.i.d.), these bounds make the method applicable to "structured" data like time series, video, or music, where temporal dependencies exist.

Experimental Evaluation

The researchers evaluated COLS using two primary setups: synthetic datasets and a real-world music similarity task.

Synthetic Datasets

In a controlled environment with 1,000 features and 5% sparsity, the authors measured how different noise levels and projection sizes affect error. As shown in Figure 1, COLS exhibits a clear "U-shaped" error curve. There is a specific intermediate projection size that performs better than both the original high-dimensional space and a zero-information baseline.

Error vs. projection size for varying noise levels in synthetic datasets.

Music Similarity (Last.fm)

The method was also tested on a real-world task predicting similarity between classical music tracks. By analyzing chord progressions, a massive feature space of 1 million features was generated for only 2,000 training samples. COLS significantly outperformed naive feature selection, proving that random projections are a viable, low-cost way to extract features from extremely high-dimensional spaces where standard OLS would be computationally intractable.

Key Insights and Discussion

  • The Sparsity Advantage: Sparsity allows random projections to preserve the inner product (similarity) between vectors remarkably well. A linear relationship in the original million-dimensional space remains approximately linear in the compressed space.
  • The Bias-Variance "Sweet Spot": Dimensionality reduction is a double-edged sword. Reducing dimensions too much loses vital information (increasing bias), while not reducing them enough leaves too much noise (increasing variance). The paper suggests an optimal projection size is roughly $O(\sqrt{kn})$, where $k$ is the sparsity and $n$ is the number of samples.
  • Robustness to Non-i.i.d. Data: Because the bounds are "worst-case," the method is particularly useful for domains like signal processing or reinforcement learning.

Conclusion

The authors successfully derived a mathematical bound for prediction error in compressed spaces, showing that error decreases as training data increases, even with structured data. While the theory points toward an optimal projection size, practical application still requires techniques like cross-validation to find the best $d$. Future work may involve combining random projections with $L_2$ regularization (Ridge regression) or exploring applications in high-dimensional reinforcement learning.

Summary updated

BibTeX
@inproceedings{fard2012compressed,
  author = {Mahdi Milani Fard and Yuri Grinberg and Joelle Pineau and Doina Precup},
  title = {{Compressed Least-Squares Regression on Sparse Spaces}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2012},
  doi = {10.1609/aaai.v26i1.8303},
}
Figure