MacEachern-Berliner (1994) Subsampling the Gibbs Sampler

gibbs-samplermcmcconvergence-diagnosticsstationary-processvariance-estimation

Summary

MacEachern and Berliner (1994) prove in three pages that systematically subsampling (thinning) the output of a stationary Markov chain never improves posterior mean estimates and generally degrades them. The argument requires only stationarity — not reversibility — and therefore covers the standard fixed-scan Gibbs sampler. The paper is the canonical reference for the practitioner rule "use the full chain, not a thinned subset."

Key Claims

How It Works

The Inefficiency Proof (Section 2)

Let x1,,xnkx_1, \ldots, x_{nk} be a length-nknk run of a Gibbs sampler in its stationary distribution. Define kk systematic subsample means:

xˉi=1nj=0n1xi+jk,i=1,,k\bar{x}_i = \frac{1}{n}\sum_{j=0}^{n-1} x_{i+jk}, \quad i = 1, \ldots, k

By stationarity: var(xˉi)=var(xˉ1)\text{var}(\bar{x}_i) = \text{var}(\bar{x}_1) and cov(xˉi,xˉj)var(xˉ1)|\text{cov}(\bar{x}_i, \bar{x}_j)| \leq \text{var}(\bar{x}_1) for all i,ji,j. The overall mean xˉ=1ki=1kxˉi\bar{x} = \frac{1}{k}\sum_{i=1}^k \bar{x}_i satisfies:

var(xˉ)=var(xˉ1)k+1k2ijcov(xˉi,xˉj)var(xˉ1)\text{var}(\bar{x}) = \frac{\text{var}(\bar{x}_1)}{k} + \frac{1}{k^2}\sum_{i \neq j}\text{cov}(\bar{x}_i, \bar{x}_j) \leq \text{var}(\bar{x}_1)

Equality holds iff cov(xˉi,xˉj)=var(xˉ1)\text{cov}(\bar{x}_i, \bar{x}_j) = \text{var}(\bar{x}_1) for all iji \neq j, which forces Pr(xˉi=xˉ1)=1\Pr(\bar{x}_i = \bar{x}_1) = 1 — a degenerate distribution. Hence the full chain always yields weakly lower variance.

The result extends to any function f(x)f(x) estimated by j=0n1f(xjk+i)/n\sum_{j=0}^{n-1} f(x_{jk+i})/n, provided var(f(x))<\text{var}(f(x)) < \infty.

The Stationary Time Series Warning (Section 3)

The variance of the full-chain mean is:

var(xˉ)=σ2nk{1+2i=1nk1(1ink)ρi}(1)\text{var}(\bar{x}) = \frac{\sigma^2}{nk}\left\{1 + 2\sum_{i=1}^{nk-1}\left(1-\frac{i}{nk}\right)\rho_i\right\} \tag{1}

The variance of the kk-thinned mean is:

var(xˉ1)=σ2n{1+2i=1n1(1in)ρik}\text{var}(\bar{x}_1) = \frac{\sigma^2}{n}\left\{1 + 2\sum_{i=1}^{n-1}\left(1-\frac{i}{n}\right)\rho_{ik}\right\}

Example. Suppose ρ1=ρ\rho_1 = \rho and ρi=0\rho_i = 0 for i>1i > 1, with k=2k = 2. Then:

var(xˉ)=σ22n{1+2(11/2n)ρ},var(xˉ1)=σ2n\text{var}(\bar{x}) = \frac{\sigma^2}{2n}\{1 + 2(1-1/2n)\rho\}, \qquad \text{var}(\bar{x}_1) = \frac{\sigma^2}{n}

For ρ>0.5\rho > 0.5 and large nn: var(xˉ1)<var(xˉ)\text{var}(\bar{x}_1) < \text{var}(\bar{x}) — subsampling appears to win. But stationarity with this autocorrelation structure requires ρ0.5|\rho| \leq 0.5, so the scenario never arises. The full sample is always better.

The key point: "The autocorrelations of a stationary process must satisfy a very large number of conditions" (Box-Jenkins 1976, p. 29). These constraints prevent the parameter combinations that would make thinning beneficial.

Concepts Introduced or Extended

Entities Mentioned

Quotes

"Hence the subsampled chain produces a poorer estimator than does the full chain."

"When, then, is subsampling worthwhile? Only when it is done for computational reasons: When storage space is at a premium and the output must be stored before being processed, or when the cost of processing the output outweighs the benefits of reduced variance of the estimator."

My Take

One of the most useful three-page papers in Bayesian computation. The proof is elementary — nothing beyond the variance of a sum — yet the implication is strong: the "thin to reduce autocorrelation" intuition is simply wrong from a variance standpoint. The stationarity-constraint argument in Section 3 is particularly instructive because it shows exactly why the naive time-series reasoning fails.

The paper's limitation is that it addresses only the mean estimator under a fixed total run budget of nknk draws. In practice, the thinning question usually arises under a fixed computation budget: the choice is between running nknk steps and storing nknk draws (expensive) vs. running nknk steps and storing nn draws. MacEachern-Berliner cover this case too (Section 4) and still recommend against thinning. The only genuine exception they acknowledge is when storage cost is the binding constraint before processing — a scenario that was more relevant in 1994 than today.