Learning-Augmented Frequent Directions

Anders Aamand, Justin Y. Chen, Siddharth Gollapudi, Sandeep Silwal, Hao Wu

Abstract

This paper introduces a learning-augmented framework for matrix streaming and frequency estimation. By incorporating machine learning predictions into the classic Frequent Directions and Misra-Gries algorithms, the authors achieve state-of-the-art error bounds. Notably, the proposed Learned Misra-Gries algorithm provides a deterministic alternative to complex randomized sketches, while Learned Frequent Directions extends the "algorithms with predictions" paradigm to high-dimensional linear algebra tasks.

Introduction

In massive data stream processing, memory is a critical constraint. Traditional algorithms for frequency estimation (identifying "heavy hitters") and matrix streaming (finding "frequent directions" for PCA/SVD) often rely on randomized sketches to maintain efficiency. Recent advances have introduced "learning-augmented" algorithms that leverage ML-based oracles to predict frequent items, thereby optimizing memory allocation. However, existing literature has largely focused on randomized 1D frequency estimators, leaving deterministic approaches like Misra-Gries and high-dimensional matrix tasks unexplored in this context.

Methodology

The core approach involves partitioning incoming data into two streams based on ML predictions:

  • Learned Misra-Gries (1D): Memory is split between exact counters for predicted heavy hitters and a standard Misra-Gries sketch for unpredicted elements.
  • Learned Frequent Directions (High-D): Incoming matrix rows are projected into a predicted subspace and an orthogonal subspace. Separate Frequent Directions sketches are maintained for each and merged upon completion.

To ensure reliability, a robust variant of the high-dimensional algorithm runs standard and learned sketches in parallel, reverting to the standard sketch if predictions prove inaccurate.

Theoretical Insights

A key contribution is the derandomization of optimal learning-augmented frequency estimation. The authors demonstrate that Learned Misra-Gries matches the theoretical error bounds of complex randomized algorithms like CountSketch++. Furthermore, the paper establishes a unified mathematical structure between 1D frequency estimation and high-dimensional matrix approximation.

Experimental Results

The algorithms were evaluated on real-world datasets, including hyperspectral imagery (Hyper), video frames (YouTube), and network traffic (CAIDA).

Matrix Streaming

Learned Frequent Directions achieved an expected error that eliminates the $\ln m$ dependence found in standard algorithms. Empirically, it outperformed standard streaming methods by 1-2 orders of magnitude on video datasets, approaching the accuracy of full SVD.

Theoretical error bounds for Frequent Direction vs. Learned Frequent Direction.

Frequency Estimation

Learned Misra-Gries significantly outperformed Learned CountSketch and matched the performance of Learned CountSketch++ without requiring extensive hyperparameter tuning.

Conclusion and Future Work

While the proposed algorithms offer substantial improvements, the high-dimensional variant requires a robust fallback mechanism to handle poor predictions, which increases memory overhead. Future research may focus on more space-efficient methods for maintaining consistency and robustness in learning-augmented matrix streaming.

Summary updated

BibTeX
@inproceedings{aamand2025learning,
  author = {Anders Aamand and Justin Y. Chen and Siddharth Gollapudi and Sandeep Silwal and Hao WU},
  title = {{Learning-Augmented Frequent Directions}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=WcZLG8XxhD},
}
Figure