Skip to main content
QUICK REVIEW

[Paper Review] Composable Sketches for Functions of Frequencies: Beyond the Worst Case

Edith Cohen, Ofir Geri|IT University Of Copenhagen (IT University of Copenhagen)|Apr 9, 2020
Machine Learning and AlgorithmsComputer Science47 references5 citations
TL;DR

This paper introduces composable sketches that enable accurate, small-space sampling for 'hard' frequency functions—such as high-order moments (p > 2) and threshold functions—by leveraging noisy ML predictions or practical frequency distributions. Surprisingly, polylogarithmic-size sketches achieve high accuracy in practice, even when worst-case lower bounds suggest polynomial size is required.

ABSTRACT

Recently there has been increased interest in using machine learning techniques to improve classical algorithms. In this paper we study when it is possible to construct compact, composable sketches for weighted sampling and statistics estimation according to functions of data frequencies. Such structures are now central components of large-scale data analytics and machine learning pipelines. However, many common functions, such as thresholds and p-th frequency moments with p > 2, are known to require polynomial-size sketches in the worst case. We explore performance beyond the worst case under two different types of assumptions. The first is having access to noisy advice on item frequencies. This continues the line of work of Hsu et al. (ICLR 2019), who assume predictions are provided by a machine learning model. The second is providing guaranteed performance on a restricted class of input frequency distributions that are better aligned with what is observed in practice. This extends the work on heavy hitters under Zipfian distributions in a seminal paper of Charikar et al. (ICALP 2002). Surprisingly, we show analytically and empirically that "in practice" small polylogarithmic-size sketches provide accuracy for "hard" functions.

Motivation & Objective

  • Address the gap between theoretical worst-case lower bounds and practical performance in sketching for frequency-based statistics.
  • Design composable sketches that support weighted sampling and statistics estimation for functions of frequencies, especially those considered 'hard' in theory.
  • Explore beyond-worst-case performance by incorporating noisy ML predictions or realistic frequency distributions.
  • Demonstrate that small sketches can accurately estimate high-order moments (p > 2) and threshold functions on real-world data.

Proposed method

  • Propose a framework for composable sketches that use noisy advice from ML models to guide sampling probabilities for frequency functions.
  • Introduce a universal emulation condition based on the relative weight of each key compared to the tail of lower-ranked keys, parameterized by a constant c.
  • Use multi-objective concave-sublinear sampling as a base sketch that emulates a broad class of functions with bounded overhead.
  • Apply Lemma 5.6 to bound the universal emulation overhead as h′(1 + 1/c), where h′ is the overhead for emulating concave-sublinear functions.
  • Evaluate sketch performance on real-world datasets using PPS (probability proportional to size) sampling with base probabilities derived from ℓ₁, ℓ₂, and concave-sublinear functions.
  • Analyze the trade-off between sketch size and estimation error under practical frequency distributions, showing that small sketches suffice in practice.

Experimental results

Research questions

  • RQ1Can composable sketches for 'hard' frequency functions (e.g., p > 2, thresholds) achieve polylogarithmic size in practice despite worst-case lower bounds?
  • RQ2How does incorporating noisy ML predictions on item frequencies improve sketch accuracy for estimating statistics over frequency functions?
  • RQ3What structural conditions on frequency distributions allow small sketches to accurately emulate a broad class of frequency functions?
  • RQ4To what extent do standard sketches like ℓ₁ or ℓ₂ sampling serve as universal emulators for hard functions on real-world data?

Key findings

  • Polylogarithmic-size sketches achieve high accuracy for estimating high-order frequency moments (p > 2) and threshold functions on real-world datasets, defying worst-case lower bounds.
  • The universal emulation overhead for ℓ₁ and concave-sublinear sketches on practical distributions is bounded in the range [92, 1673], which is practically meaningful when hε⁻² ≪ n.
  • An ℓ₂-based sketch performs well on high moments but has poor emulation overhead for 'slow growth' functions due to poor tail coverage.
  • A frequency distribution satisfying minᵢ (iwᵢ / ∑ⱼ>i wⱼ) ≥ c enables a sketch to universally emulate all concave-sublinear functions with overhead h′(1 + 1/c).
  • Empirical results show that even sketches designed for 'easy' functions (e.g., ℓ₁, ℓ₂) can accurately estimate 'hard' functions on real-world data, especially when the distribution is heavy-tailed.
  • The framework of universal emulation via the capping function condition provides a theoretical basis for why small sketches work well in practice despite theoretical limitations.

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.