Turnstile ℓp leverage score sampling with applications

Alexander Munteanu, Simon Omlor

In the era of Big Data, compressing massive matrices into smaller "coresets" or "sketches" is essential for preserving the fundamental properties of the original data while reducing computational overhead. This challenge is particularly acute in turnstile data streams—a highly dynamic environment where data rows, columns, or individual entries can be continuously added or subtracted.

While "oblivious" sketching (randomly projecting data) is effective for certain problems, it has historically struggled with logistic regression. Previous attempts to perform logistic regression in turnstile streams faced a severe theoretical barrier: they either yielded poor approximations or required sketch sizes that grew exponentially with the desired accuracy ($1/\epsilon$).

This paper introduces a novel algorithm that bridges this gap, providing the first $(1+\epsilon)$-approximation for logistic regression in a turnstile setting using only polynomial space. By combining the flexibility of turnstile updates with the high accuracy of importance sampling, the authors successfully bypass the exponential space explosion.

Methodology: A Hybrid Sampling Approach

The authors achieve this breakthrough by treating the sketch not as a final representation, but as an intermediate data structure used to sample a coreset. Their method relies on four key components:

1. Finding Heavy Hitters via Percentiles

The algorithm modifies the standard CountSketch method. Instead of relying on the median to estimate values, the authors utilize the 0.65-percentile of bucket norms to establish a threshold. This subtle but vital statistical tweak provides tighter bounds on the data's tail, allowing the algorithm to identify "heavy" rows (those with large norms) even when they are buried in noise from other updates.

2. Random Rescaling

To convert norm-proportional sampling into a heavy hitter problem, the authors apply a scaling trick. By multiplying rows by $t_i^{-1/p}$ (where $t_i$ is a uniform random variable), rows that should be sampled according to the $\ell_p$ distribution are transformed into the largest rows in the new matrix with high probability.

3. Preconditioning for Leverage Scores

Because raw row norms are insufficient for regression, the algorithm must compute leverage scores. The authors run a second sketch in parallel to compute a "well-conditioned basis." By right-multiplying their main sketch by this basis, the row-norm sampler effectively becomes a leverage score sampler.

4. Post-processing "Cherry-picking"

Crucially, the algorithm does not output the sketch directly. Instead, it "cherry-picks" and reconstructs slightly perturbed versions of the original important rows from the sketch. This post-processing step bypasses the "obliviousness" limitations of prior work. For this to succeed, the loss function must be robust to small perturbations—a property the authors mathematically prove for linear, ReLU, probit, and logistic regression.

Empirical Validation

The authors evaluated their algorithm on three standard large-scale regression benchmarks: Covertype (581,012 rows, 54 features), Webspam (350,000 rows, 127 features), and KDDCup (494,021 rows, 41 features).

  • Superior Accuracy: The turnstile sampler significantly outperformed pure oblivious sketching. Its accuracy was nearly identical to offline leverage score sampling—the gold standard that requires full, static access to the dataset.
  • Practical Efficiency: Although the extraction process is more complex than simple sketching (taking 8-15x longer), the total end-to-end time, including final optimization, only increased by a factor of 3-6x. This is a highly manageable and practical trade-off for the ability to handle dynamic updates and deletions.

Limitations and Future Directions

While this work represents a significant theoretical and practical leap, a few limitations remain:

  • Range of $p$: The current framework focuses on $1 \le p \le 2$. For $p > 2$, the space complexity of sketching is known to grow significantly (scaling at roughly $n^{1-2/p}$), making it less efficient for very high-order norms.
  • Preconditioning Overhead: The preconditioning step currently relies on dense subspace embeddings. While sparse alternatives exist, they often come with a higher dependence on the dimension $d$. Finding a way to combine sparsity with optimal $d$-dependence in turnstile streams remains an open challenge.
  • Spanning Sets: The authors suggest that simulating the construction of "$\ell_p$ spanning sets" in turnstile streams is a promising next step. This could potentially reduce the dependence on the dimension $d$ from higher powers down to near-linear, further optimizing the algorithm for high-dimensional data.

Summary updated

BibTeX
@inproceedings{munteanu2024turnstile,
  author = {Alexander Munteanu and Simon Omlor},
  title = {{Turnstile ℓp leverage score sampling with applications}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=Huf9diIS1q},
}
Figure