English

The Adversarial Robustness of Sampling

Data Structures and Algorithms 2019-06-28 v1 Computational Geometry Cryptography and Security Databases Distributed, Parallel, and Cluster Computing

Abstract

Random sampling is a fundamental primitive in modern algorithms, statistics, and machine learning, used as a generic method to obtain a small yet "representative" subset of the data. In this work, we investigate the robustness of sampling against adaptive adversarial attacks in a streaming setting: An adversary sends a stream of elements from a universe UU to a sampling algorithm (e.g., Bernoulli sampling or reservoir sampling), with the goal of making the sample "very unrepresentative" of the underlying data stream. The adversary is fully adaptive in the sense that it knows the exact content of the sample at any given point along the stream, and can choose which element to send next accordingly, in an online manner. Well-known results in the static setting indicate that if the full stream is chosen in advance (non-adaptively), then a random sample of size Ω(d/ε2)\Omega(d / \varepsilon^2) is an ε\varepsilon-approximation of the full data with good probability, where dd is the VC-dimension of the underlying set system (U,R)(U,R). Does this sample size suffice for robustness against an adaptive adversary? The simplistic answer is \emph{negative}: We demonstrate a set system where a constant sample size (corresponding to VC-dimension 11) suffices in the static setting, yet an adaptive adversary can make the sample very unrepresentative, as long as the sample size is (strongly) sublinear in the stream length, using a simple and easy-to-implement attack. However, this attack is "theoretical only", requiring the set system size to (essentially) be exponential in the stream length. This is not a coincidence: We show that to make Bernoulli or reservoir sampling robust against adaptive adversaries, the modification required is solely to replace the VC-dimension term dd in the sample size with the cardinality term logR\log |R|. This nearly matches the bound imposed by the attack.

Keywords

Cite

@article{arxiv.1906.11327,
  title  = {The Adversarial Robustness of Sampling},
  author = {Omri Ben-Eliezer and Eylon Yogev},
  journal= {arXiv preprint arXiv:1906.11327},
  year   = {2019}
}
R2 v1 2026-06-23T10:04:44.566Z