cs.LGApr 12, 2026

Replicable Composition

Authors: Kiarash Banihashem, MohammadHossein Bateni, Hossein Esfandiari, Samira Goudarzi, MohammadTaghi Hajiaghayi

Organizations: University of Maryland, College Park, MD, USA · Google Research, New York City, NY, USA · Google Research, London, UK

Abstract

Replicability requires that algorithmic conclusions remain consistent when rerun on independently drawn data. A central structural question is composition: given kk problems each admitting a ρρ-replicable algorithm with sample complexity nn, how many samples are needed to solve all jointly while preserving replicability? The naive analysis yields O~(nk2)\widetilde{O}(nk^2) samples, and Bun et al. (STOC'23) observed that reductions through differential privacy give an alternative O~(n2k)\widetilde{O}(n^2k) bound, leaving open whether the optimal O~(nk)\widetilde{O}(nk) scaling is achievable. We resolve this open problem and, more generally, show that problems with sample complexities n1,…,nkn_1,\ldots,n_k can be jointly solved with O~(∑ini)\widetilde{O}(\sum_i n_i) samples while preserving constant replicability. Our approach converts each replicable algorithm into a perfectly generalizing one, composes them via a privacy-style analysis, and maps back via correlated sampling. This yields the first advanced composition theorem for replicability. En route, we obtain new bounds for the composition of perfectly generalizing algorithms with heterogeneous parameters. As part of our results, we provide a boosting theorem for the success probability of replicable algorithms. For a broad class of problems, the failure probability appears as a separate additive term independent of ρρ, immediately yielding improved sample complexity bounds for several problems. Finally, we prove an Ω(nk2)Ω(nk^2) lower bound for adaptive composition, establishing a quadratic separation from the non-adaptive setting. The key technique, which we call the phantom run, yields structural results of independent interest.

Figures & tables

Explore similar work

Oct 18, 2026

The Optimal Sample Complexity of Pointwise Replicable Agnostic Learning

Pointwise replicability asks that two independently trained predictors, using the same random seed, agree at each fixed query with high probability. We determine its optimal agnostic sample complexity on finite and countable domains. For every nonempty binary class of finite VC dimension d≥1d\ge1, the required number of independent examples is Θ ⁣(dρ2α2+log⁡(1/β)α2)Θ\!\left(\frac{d}{ρ^2α^2}+\frac{\log(1/β)}{α^2}\right), uniformly over independent accuracy, failure, and disagreement parameters α,β,ρ∈(0,1/10)α,β,ρ\in(0,1/10). The learner returns one binary function, may be improper, and uses unrestricted shared randomness. Its sample budget is fixed before observing data, and the replicability guarantee includes queries of zero marginal mass. The main construction combines an ensemble of empirical-risk minimizers with a smooth, signal-dependent risk decomposition. A single shared phase selects the final binary predictor. Record times certify its weak-signal risk, while a uniform bound protects the strong-signal risk at that same selected time. A phase-comparison theorem controls the actual shared-seed execution under simultaneous changes in the marginals and risk coefficients. A rare repair step then makes the confidence cost additive. Together with matching lower bounds, this removes the remaining logarithmic overhead and parameter restrictions in the general countable-domain sample-complexity problem. This extended version also retains the earlier explicit constructions and their proofs, including proper learning for VC-one classes, the full finite-atom class, a faster realizable bound, and counterexamples that separate restrictions of particular algorithms from restrictions of the learning problem.
Feb 12, 2024

Replicability is Asymptotically Free in Multi-armed Bandits

We consider a replicable stochastic multi-armed bandit algorithm that ensures, with high probability, that the algorithm's sequence of actions is not affected by the randomness inherent in the dataset. Replicability allows third parties to reproduce published findings and assists the original researcher in applying standard statistical tests. We observe that existing algorithms require O(K2/ρ2)O(K^2/ρ^2) times more regret than nonreplicable algorithms, where KK is the number of arms and ρρ is the level of nonreplication. However, we demonstrate that this additional cost is unnecessary when the time horizon TT is sufficiently large for a given K,ρK, ρ, provided that the magnitude of the confidence bounds is chosen carefully. Therefore, for a large TT, our algorithm only requires K2/ρ2K^2/ρ^2 times smaller amount of exploration than existing algorithms. To ensure the replicability of the proposed algorithms, we incorporate randomness into their decision-making processes. We propose a principled approach to limiting the probability of nonreplication. This approach elucidates the steps that existing research has implicitly followed. Furthermore, we derive the first lower bound for the two-armed replicable bandit problem, which implies the optimality of the proposed algorithms up to a log⁡log⁡T\log\log T factor for the two-armed case.
Feb 16, 2026

Replicable Constrained Bandits

Algorithmic replicability has recently been introduced to address the need for reproducible experiments in machine learning. A replicable online learning algorithm is one that takes the same sequence of decisions across different executions in the same environment, with high probability. We initiate the study of algorithmic replicability in constrained MAB problems, where a learner interacts with an unknown stochastic environment for TT rounds, seeking not only to maximize reward but also to satisfy multiple constraints. Our main result is that replicability can be achieved in constrained MABs. Specifically, we design replicable algorithms whose regret and constraint violation match those of non-replicable ones in terms of TT. As a key step toward these guarantees, we develop the first replicable UCB-like algorithm for unconstrained MABs, showing that algorithms that employ the optimism in-the-face-of-uncertainty principle can be replicable, a result that we believe is of independent interest.