###### tags: `one-offs` `monte carlo` `sampling` `gibbs sampling` # Scans in Gibbs Sampling **Overview**: In this note, I examine some aspects of the notion of a 'scan' in the context of Gibbs sampling MCMC algorithms. ## Discussion In Gibbs sampling, a 'scan' is usually viewed as a sequence of updates which touches each coordinate exactly once. There is clear motivation for demarcation of segments in which each coordinate is touched at least once (e.g. ergodicity), but is the 'exactly' needed? In fact, updating all of the coordinates in equal proportion need not be optimal. That is, in under an 'at least once each' scan protocol, it can be the case that certain coordinates 'should' be updated several times (though not in a row, of course). This is easiest to see when some of the coordinates are essentially independent of all other coordinates; roughly speaking, coordinates which are subject to greater dependence require greater effort to move substantially. This should be true for both deterministic and randomised schedules. Note that one particularly useful way of thinking about randomised schedules is to make an analogy with a continuous-time jump process with Gibbs-type transitions, where each coordinate can have its own jump rate. This abstraction allows one to step away from the combinatorially-flavoured problem of schedule selection, to the more continuous and analytic problem of rate tuning. One reason for not talking about this distinction so much is it is hard to find good heuristics for practically setting heterogeneous coordinate rates. Another reason is that for sufficiently symmetric models (e.g. Gibbs sampling as applied to spin systems), the homogeneous formulation is probably optimal, in some sense or another. It bears mentioning that there are few concrete examples of problems to which Gibbs sampling applies for which a sharp theoretical analysis is available, and many of these rely heavily on symmetry assumptions to make progress. This represents something of a barrier to understanding the heterogeneous case well. A point of contrast is coordinate descent algorithms for minimisation problems, where inhomogeneous scans are commonplace, and even quite well-understood. If this analogy is explored well, perhaps there will be room for making useful recommendations about inhomogeneous scans for Gibbs sampling. All of this is to say, in the absence of a well-justified alternative to balanced scans, it is easy to see why they have become the norm. Still, it's a bit interesting to re-think what a 'scan' ought to mean, and how the notion might be adapted and expanded.