On the Adversarial Robustness of Online Importance Sampling

Yotam Kenneth-Mordoch, Shay SapirarXiv 2025 · DOI

Abstract

In the context of big data streaming, maintaining representative summaries (coresets) is essential for efficient computation. However, standard sampling algorithms often fail when faced with adaptive adversaries—inputs that change based on the algorithm's previous outputs. This paper introduces a unified framework for making online importance sampling algorithms robust against such adversaries. By improving the theoretical "robustness tax" from $\log \Delta$ to $\log \log \Delta$ and utilizing a robust merge-and-reduce wrapper, the authors achieve nearly optimal space complexity for complex problems, including hypergraph cut sparsification and $\ell_p$-subspace embeddings. This work bridges the gap between adaptive and oblivious streaming models, providing a generalized approach to robust coreset construction.

Introduction

In modern data science, the volume of incoming data often exceeds storage capacity. To manage this, researchers use sampling techniques to create a "coreset," a small subset of the data that preserves specific properties (e.g., the value of cuts in a graph or the norm of a vector). Traditional analysis of these algorithms typically assumes an oblivious adversary, where the entire data stream is fixed before the algorithm begins.

In practice, many systems face adaptive adversaries. For example, a database responding to a sequence of user queries or a system under a coordinated attack may encounter future inputs that are conditioned on how the algorithm handled previous items. Most classical sampling algorithms break under these conditions. This paper re-evaluates "online importance sampling"—where items are sampled and either kept or discarded irrevocably upon arrival—to establish a framework that remains accurate even under adaptive pressure.

The Robustness Framework

The authors propose a two-part strategy to construct robust algorithms that maintain high accuracy with minimal space overhead.

1. Self-Weighted Online Sampling

The core of the framework is the proof that a one-dimensional version of importance sampling is inherently robust if it is "self-weighted." In this model, the sampling probability of an item is based on its "importance" relative to the items already sampled. The authors formalize this as a "sampling game" between an algorithm and an adversary (Lemma 2.3). By framing the problem this way, they simplify the analysis of martingales in adaptive settings, showing that the algorithm can maintain an accurate estimate even if the adversary attempts to "trap" the sampler into making poor decisions.

2. The Robust Merge-and-Reduce Wrapper

To optimize space complexity, the authors integrate their online sampler into a "merge-and-reduce" framework. This classical technique builds a binary tree of coresets to process data in blocks. The paper provides a novel proof demonstrating that this framework remains robust in the adaptive setting when paired with their self-weighted sampler. This allows the algorithm to scale to massive streams while maintaining the theoretical guarantees of the underlying sampler.

3. Uniform Union Bounds

To extend the analysis from simple 1D sampling to complex structures like hypergraphs, the authors employ a "uniform" union bound over a "net" of possible queries. This ensures that the sampling remains accurate for all potential queries (such as all possible cuts in a hypergraph) simultaneously, even when the queries themselves are chosen adaptively.

Key Theoretical Insights

  • Reducing the "Robustness Tax": A major contribution of this work is the improvement of the space complexity required for robustness. Previous literature suggested that the cost of being robust to an adaptive adversary was proportional to $\log \Delta$ (where $\Delta$ is the range of the data). This paper demonstrates that this cost can be reduced to $\log \log \Delta$, a significant improvement for large-scale data streams.
  • Abstraction as a Game: By treating the interaction between the algorithm and the stream as a two-player game, the authors provide a more extensible proof structure. This abstraction allows the framework to be applied to various problems without requiring bespoke proofs for every new application.
  • Online vs. Streaming: The paper clarifies the distinction between "online" algorithms (irrevocable decisions) and "streaming" algorithms (which may use more complex, reversible data structures). It shows that while online sampling is a more constrained model, it can serve as a powerful building block for nearly-optimal streaming algorithms.

Applications and Results

The framework was applied to several fundamental problems in theoretical computer science, yielding state-of-the-art results:

  • Hypergraph Cut Sparsification: The authors provide an algorithm that maintains a $(1 \pm \epsilon)$-cut sparsifier using only $\tilde{O}(\epsilon^{-2}n)$ hyperedges. This result nearly matches the space complexity of algorithms designed for the much simpler oblivious setting.
  • $\ell_p$-Subspace Embedding: For any $p > 0$, the framework achieves a robust embedding that matches existing non-robust streaming algorithms up to poly-logarithmic factors.
  • Unified Analysis: Unlike prior work that required specialized techniques for different problems, this framework allows researchers to prove robustness for any coreset construction that can be framed as self-weighted importance sampling.

Limitations and Future Work

The primary limitation identified is the remaining gap between robust adaptive bounds and the best possible oblivious bounds. In the oblivious setting, researchers often use "symmetrization" to achieve extremely tight bounds. However, because the "net" of queries becomes a random variable in the adaptive setting, symmetrization is not directly applicable. Closing this gap and further reducing the factor of $n$ in the online version of the hypergraph algorithm remain open questions for future research.

Summary updated

BibTeX
@misc{kennethmordoch2025adversarial,
  author = {Yotam Kenneth-Mordoch and Shay Sapir},
  title = {{On the Adversarial Robustness of Online Importance Sampling}},
  year = {2025},
  eprint = {2507.02394},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.02394},
}
Figure