We show how to use parallelization to speed up sampling from an arbitrary distribution on a product space , given oracle access to counting queries: for any and . Our algorithm takes parallel time, to the best of our knowledge, the first sublinear in runtime for arbitrary distributions. Our results have implications for sampling in autoregressive models. Our algorithm directly works with an equivalent oracle that answers conditional marginal queries , whose role is played by a trained neural network in autoregressive models. This suggests a roughly -factor speedup is possible for sampling in any-order autoregressive models. We complement our positive result by showing a lower bound of for the runtime of any parallel sampling algorithm making at most queries to the counting oracle, even for .
View on arXiv