Sample-Adaptivity Tradeoff in On-Demand Sampling

Nika Haghtalab, Omar Montasser, Mingda Qiao

Abstract

In Multi-Distribution Learning (MDL), an algorithm must learn a hypothesis that performs well across $k$ distinct data distributions. While "on-demand sampling"—adaptively choosing which distribution to sample from—can significantly reduce sample complexity, it often requires a high number of sequential rounds, creating a bottleneck for parallelization. This paper characterizes the fundamental tradeoff between sample complexity and round complexity. We show that near-optimal sample efficiency is achievable with a sub-linear or even constant number of rounds, providing both upper and lower bounds for the realizable and agnostic settings.

Introduction

Modern machine learning systems frequently encounter data from diverse sources, such as different demographic groups, geographic locations, or sensor types. Multi-Distribution Learning (MDL) addresses this by seeking a model that minimizes the maximum loss across $k$ distributions. To optimize data collection, researchers use on-demand sampling, where the learner adaptively requests samples from specific distributions based on current model performance.

However, adaptivity is a double-edged sword. High adaptivity (many rounds) minimizes the total sample count but forces a sequential workflow that is difficult to scale in production environments. Conversely, non-adaptive sampling is easy to parallelize but often requires significantly more data. This work investigates whether a middle ground exists: can we achieve the sample efficiency of fully adaptive algorithms using only a few rounds of communication?

Theoretical Frameworks

The authors analyze the sample-adaptivity tradeoff through two distinct lenses based on the nature of the learning task:

1. Realizable MDL

In the realizable setting, where a hypothesis in the class is assumed to have zero error across all distributions, the authors employ a variant of the AdaBoost algorithm. By utilizing a specific notion of "margin," they demonstrate how increasing the number of rounds ($r$) allows for a controlled reduction in sample complexity. This provides a mathematical "knob" for practitioners to balance data costs against time-to-train.

2. Agnostic MDL and OODS

For the general (agnostic) case, the paper introduces a new abstract framework: Optimization via On-Demand Sampling (OODS). This framework treats the learning problem as a concave optimization task over a simplex of weights for the $k$ distributions. To minimize rounds in this setting, the authors propose the LazyHedge algorithm.

LazyHedge utilizes a "trust region" (or "cap vector") strategy. Instead of updating the sampling distribution after every sample, the algorithm maintains a stable strategy as long as the model's internal weights remain within a safe, observable region. A new round of sampling is only triggered when the weights move outside this trust region, effectively batching the adaptation process.

Key Insights and Results

The $\sqrt{k}$ Threshold

A significant finding in the agnostic setting is that $O(\sqrt{k})$ rounds are sufficient to achieve optimal sample complexity. This is a substantial improvement over prior methods where the number of rounds often scaled with the accuracy parameter ($1/\epsilon$). This result suggests that even for a large number of distributions, the communication overhead does not need to be prohibitively high.

The Power of Limited Rounds

In the realizable setting, the authors prove that even a very small constant number of rounds (e.g., $r=3$) can drastically outperform non-adaptive sampling. Specifically, they show the optimal sample complexity for an $r$-round algorithm scales as $dk^{\Theta(1/r)}/\epsilon$. This confirms that the first few rounds of adaptivity provide the most significant gains in efficiency.

Fundamental Limits

To ensure these results are not merely artifacts of their specific algorithms, the authors establish nearly tight lower bounds using mathematical "hard instances." * Realizable Case: They construct high-dimensional vector spaces where distributions have varying difficulty levels, proving that the $k^{1/r}$ overhead is a fundamental requirement. * OODS Framework: They design objective functions that force any algorithm to "guess" critical indices, demonstrating that sub-polynomial rounds are mathematically unavoidable for certain classes of problems.

Conclusion and Future Work

This research clarifies the relationship between how much we sample and how often we adapt. While the $O(\sqrt{k})$ result for agnostic learning is a major step forward, a gap remains: is it possible to achieve optimal sample complexity with polylogarithmic rounds (e.g., $(\log k)^c$)?

While the OODS lower bounds suggest that standard on-demand techniques cannot reach polylogarithmic efficiency, recent developments in more complex data-weighting techniques suggest potential paths forward. Bridging the gap between the OODS abstraction and these refined hypothesis class techniques remains the next major frontier in multi-distribution learning theory.

Summary updated

BibTeX
@inproceedings{haghtalab2025sample,
  author = {Nika Haghtalab and Omar Montasser and Mingda Qiao},
  title = {{Sample-Adaptivity Tradeoff in On-Demand Sampling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=gaHjGx1cMh},
}
Figure