# The Adversarial Robustness of Sampling

**Authors:** Omri Ben-Eliezer, Eylon Yogev

arXiv: 1906.11327 · 2019-06-28

## TL;DR

This paper investigates the vulnerability of common sampling methods like Bernoulli and reservoir sampling to adaptive adversarial attacks in streaming data, revealing that robustness depends on the complexity of the set system and proposing a modified sample size bound.

## Contribution

It demonstrates that standard sampling sizes are vulnerable to adaptive adversaries and proposes a simple modification replacing VC-dimension with the logarithm of the set system's size to ensure robustness.

## Key findings

- Adaptive adversaries can unrepresentatively skew samples with small sizes in certain set systems.
- Replacing VC-dimension with log of set system size in sample bounds enhances robustness.
- The proposed modification nearly matches the attack's theoretical lower bound.

## 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 $U$ 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 $\Omega(d / \varepsilon^2)$ is an $\varepsilon$-approximation of the full data with good probability, where $d$ is the VC-dimension of the underlying set system $(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 $1$) 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 $d$ in the sample size with the cardinality term $\log |R|$. This nearly matches the bound imposed by the attack.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1906.11327/full.md

## Figures

3 figures with captions in the complete paper: https://tomesphere.com/paper/1906.11327/full.md

## References

66 references — full list in the complete paper: https://tomesphere.com/paper/1906.11327/full.md

---
Source: https://tomesphere.com/paper/1906.11327