A Monte Carlo algorithm typically simulates a prescribed number of samples, taking some random real time to complete the computations necessary. This work considers the converse: to impose a real-time budget on the computation, so that the number of samples simulated is random. To complicate matters, the real time taken for each simulation may depend on the sample produced, so that the samples themselves are not independent of their number, and a length bias with respect to computation time is introduced. We propose an anytime framework to address this concern. We firstly introduce a continuous-time Markov jump process to chart the progress of the computation in real time. With respect to the target distribution, the stationary distribution of this process is length-biased by computation time. We introduce a multiple chain construction to eliminate this length bias for any Markov chain Monte Carlo (MCMC) algorithm. Exploiting this debiasing technique yields MCMC algorithms that may be interrupted at any real time to obtain a sample from the target distribution. We call these class of interruptible algorithms anytime Monte Carlo algorithms. The utility of these algorithms is demonstrated on a large-scale Sequential Monte Carlo Squared implementation using four billion particles in total, distributed across a cluster of 128 graphics processing units on the Amazon EC2 service, providing approximately 200000-way parallelism. The anytime framework is used to impose a real-time budget on move steps, ensuring that all processors are simultaneously ready for the resampling step, demonstrably reducing wait times.
View on arXiv