Skip to main content
QUICK REVIEW

[Paper Review] Frequency Estimation in Data Streams: Learning the Optimal Hashing Scheme

Dimitris Bertsimas, Vassilis Digalakis|arXiv (Cornell University)|Jul 17, 2020
Caching and Content DeliveryComputer Science48 references5 citations
TL;DR

This paper proposes a learning-based approach for frequency estimation in data streams by optimizing hashing schemes using mixed-integer linear programming and machine learning. It leverages a pre-observed stream prefix to compute near-optimal hash assignments for seen elements and trains a classifier for unseen elements, achieving 1–2 orders of magnitude lower average estimation error and 45–90% lower expected error magnitude than state-of-the-art methods.

ABSTRACT

We present a novel approach for the problem of frequency estimation in data streams that is based on optimization and machine learning. Contrary to state-of-the-art streaming frequency estimation algorithms, which heavily rely on random hashing to maintain the frequency distribution of the data steam using limited storage, the proposed approach exploits an observed stream prefix to near-optimally hash elements and compress the target frequency distribution. We develop an exact mixed-integer linear optimization formulation, which enables us to compute optimal or near-optimal hashing schemes for elements seen in the observed stream prefix; then, we use machine learning to hash unseen elements. Further, we develop an efficient block coordinate descent algorithm, which, as we empirically show, produces high quality solutions, and, in a special case, we are able to solve the proposed formulation exactly in linear time using dynamic programming. We empirically evaluate the proposed approach both on synthetic datasets and on real-world search query data. We show that the proposed approach outperforms existing approaches by one to two orders of magnitude in terms of its average (per element) estimation error and by 45-90% in terms of its expected magnitude of estimation error.

Motivation & Objective

  • To address the challenge of frequency estimation in high-volume data streams with limited storage.
  • To improve upon random hashing in streaming frequency estimation by learning optimal or near-optimal hashing schemes from observed stream prefixes.
  • To develop a method that maintains low space and real-time performance while significantly reducing estimation error.
  • To enable accurate frequency estimation for both seen and unseen elements using a hybrid optimization and machine learning approach.

Proposed method

  • Formulates the optimal hashing problem as a mixed-integer linear program (MILP) to minimize estimation error for elements in the observed stream prefix.
  • Employs block coordinate descent for scalable solution of large-scale instances, with exact dynamic programming for a special case.
  • Introduces auxiliary variables to linearize bilinear terms arising from fractional estimation errors and joint hashing probabilities.
  • Trains a classifier to map unseen elements to buckets based on their features, enabling real-time frequency estimation.
  • Uses a sketch-based query mechanism where frequency estimates are the average of frequencies in each bucket.
  • Supports adaptive updates via Bloom filters to maintain frequency counts for newly observed elements.

Experimental results

Research questions

  • RQ1Can we learn an optimal hashing scheme for elements in a stream prefix to minimize frequency estimation error?
  • RQ2How can we extend optimal hashing to unseen elements using machine learning while preserving low space and real-time performance?
  • RQ3What is the performance gain of learning-based hashing over random hashing in terms of estimation error?
  • RQ4How scalable is the proposed optimization and learning framework for large-scale data streams?

Key findings

  • The proposed method reduces average per-element estimation error by one to two orders of magnitude compared to existing streaming algorithms.
  • The expected magnitude of estimation error is reduced by 45–90% compared to baseline methods.
  • The MILP formulation enables exact solutions for problems with thousands of elements, and the block coordinate descent algorithm scales to tens of thousands of elements.
  • The dynamic programming variant solves a special case in linear time, demonstrating computational efficiency for structured instances.
  • Empirical evaluation on real-world search query data confirms superior performance over state-of-the-art streaming frequency estimators.
  • The approach maintains constant update and query time after training, satisfying real-time and sublinear space constraints.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.