Scalable Bayesian Inference for the Inverse Temperature of a Hidden Potts Model

Matthew T. Moores, Geoff K. Nicholls, A. N. Pettitt, Kerrie Mengersen

TL;DR

This paper introduces a new method, Parametric Functional Approximate Bayesian (PFAB), to efficiently estimate a key parameter in spatial image models (the inverse temperature of a Hidden Potts Model). PFAB significantly speeds up inference for large images, achieving up to a hundredfold improvement in runtime compared to existing methods, making complex Bayesian analysis feasible for real-world applications.

What Problem Does This Paper Address?

Estimating the "inverse temperature" parameter ($\beta$) in Hidden Potts Models is crucial for understanding spatial relationships in images. This parameter dictates how strongly neighboring pixels influence each other. However, calculating $\beta$'s posterior distribution is computationally challenging because it involves an "intractable normalizing constant" – a mathematical term that's impossible to compute directly. Existing methods like the exchange algorithm and Approximate Bayesian Computation (ABC) struggle with large datasets, especially images with millions of pixels, making them impractical for many modern applications like satellite imagery analysis. This paper aims to bridge this gap by developing a scalable Bayesian inference method for $\beta$.

Methods

The core innovation is the Parametric Functional Approximate Bayesian (PFAB) algorithm. Instead of directly dealing with the intractable normalizing constant, PFAB uses a parametric surrogate model to approximate the "score function" (related to the derivative of the log-likelihood). This surrogate model is built using an integral curve that captures known properties of the Potts model, such as its behavior around a "critical temperature" and how pixel values vary.

The process involves:

  1. Precomputation: Generating synthetic data (simulated images) for a range of $\beta$ values and fitting the parametric surrogate model to these simulations. This step can be done in parallel.
  2. Inference: Using the fitted surrogate model within a Markov Chain Monte Carlo (MCMC) framework (specifically, an approximate Metropolis-Hastings step). This allows for efficient sampling of $\beta$ without needing to evaluate the intractable normalizing constant during the main inference process.

This approach is a form of Bayesian Indirect Likelihood (BIL), where a surrogate model approximates the likelihood function.

Datasets

  • Synthetic Data: The authors generated synthetic datasets of varying sizes (from 8x8 to 1000x1000 pixels) and with different numbers of hidden states (k=2, 3, 4, 5). This was done to systematically study the performance of their method across different image complexities and sizes.
  • Remotely-Sensed Imagery: Real-world data from the Landsat-8 satellite was used. These are large images (1 million pixels) of Brisbane, Australia, used for land cover classification.

Key Insights and Ideas

  • The "Critical Temperature" is Key: The Potts model exhibits a phase transition at a specific $\beta$ value (the critical temperature, $\beta_{crit}$). This transition point is crucial for understanding the model's behavior and can be leveraged to build more accurate surrogate models.
  • Parametric vs. Non-parametric Surrogates: Unlike previous methods that used non-parametric surrogates (like Gaussian Processes or k-Nearest Neighbors), PFAB uses a parametric surrogate. This parametric form, informed by the physics of the Potts model, leads to significant efficiency gains.
  • Scalability is Achieved: The primary breakthrough is the dramatic speedup achieved for large images. This makes full Bayesian inference, which was previously computationally prohibitive, a practical option for analyzing massive datasets.
  • Reusability of Surrogate Models: Once a surrogate model is fitted for a given image size and number of labels, it can be reused for multiple datasets, amortizing the precomputation cost.

Key Results

  • Speedup: PFAB achieved up to a hundredfold improvement in elapsed runtime compared to the exchange algorithm or ABC for large images (1 million pixels). For example, AEA took 9 hours per image, while PFAB took 1.6 hours.
  • Accuracy: Simulation studies showed that the approximation error introduced by PFAB had a minimal impact on the posterior distribution of $\beta$. Histograms of rank statistics from simulation-based calibration (SBC) indicated that PFAB's fits were comparable to AEA and within expectations of uniformity.
  • Application: The method was successfully applied to Landsat-8 satellite imagery for land cover segmentation, demonstrating its practical utility.
  • Open Source Implementation: The algorithm is available as an R package called bayesImageS.

Limitations and Future Work

  • Not for Small Images: PFAB is not suited for very small images (e.g., 26 pixels) where the computational overhead of fitting the surrogate model outweighs the benefits. For such small images, traditional methods like AEA are faster.
  • Bias in Non-parametric BIL: The paper notes that a related non-parametric BIL method (nsBIL) showed signs of bias, likely due to ABC tolerance and convergence issues.
  • Future Work:
    • Investigating the use of PFAB with trans-dimensional algorithms or other methods for inferring unknown $k$ (number of labels).
  • Exploring the incorporation of the parametric surrogate model into approximate Hamiltonian or Langevin algorithms for further MCMC efficiency improvements.
  • Using the surrogate model's approximation of the Fisher information for Bayesian optimization to refine the approximation or derive approximate Jeffreys' priors for $\beta$.
  • The potential for interpolating between surrogate models for different image sizes ($n$) and numbers of labels ($k$).

Summary updated

Abstract

The inverse temperature parameter of the Potts model governs the strength of spatial cohesion and therefore has a major influence over the resulting model fit. A difficulty arises from the dependence of an intractable normalising constant on the value of this parameter and thus there is no closed-form solution for sampling from the posterior distribution directly. There is a variety of computational approaches for sampling from the posterior without evaluating the normalising constant, including the exchange algorithm and approximate Bayesian computation (ABC). A serious drawback of these algorithms is that they do not scale well for models with a large state space, such as images with a million or more pixels. We introduce a parametric surrogate model, which approximates the score function using an integral curve. Our surrogate model incorporates known properties of the likelihood, such as heteroskedasticity and critical temperature. We demonstrate this method using synthetic data as well as remotely-sensed imagery from the Landsat-8 satellite. We achieve up to a hundredfold improvement in the elapsed runtime, compared to the exchange algorithm or ABC. An open-source implementation of our algorithm is available in the R package bayesImageS.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Synthetic 2D Images · n=10^6 pixelsApproximate exchange algorithm (MAVM)Average runtime43 hoursk=3 · images=20 · pixels=10^6 · iterations-per-image=10000
Source quote
L341: All four algorithms were run for 10,000 iterations on each image, discarding the first 5,000 as burn-in. The differences in elapsed runtime are illustrated by Figure~\ref{f:elapsed}. All of the algorithms scaled linearly with increasing numbers of pixels, but the approximate exchange algorithm (MAVM) and ABC were roughly two orders of magnitude slower than either pseudolikelihood (PL) or path sampling (TI). For 2D images with n=10^6 pixels the average runtime was 43 hours for MAVM, 42.5 hours for ABC, 36 minutes for PL and 29 minutes for TI. It took 30 minutes for precomputation of 64 values of \mathbb{E}-z | \beta[S(z)] for path sampling, using 16 parallel threads. For 3D images with n=10^6 voxels the averages were 45 hours for MAVM or ABC, 35 minutes for PL and 30 minutes for TI. The precomputation step took 24 minutes for 44 values of \beta. Even allowing for the cost of precomputation, TI was still much faster than MAVM or ABC.
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
Synthetic 2D Images · n=10^6 pixelsABC baselineAverage runtime42.5 hoursk=3 · images=20 · pixels=10^6 · iterations-per-image=10000
Source quote
L341: All four algorithms were run for 10,000 iterations on each image, discarding the first 5,000 as burn-in. The differences in elapsed runtime are illustrated by Figure~\ref{f:elapsed}. All of the algorithms scaled linearly with increasing numbers of pixels, but the approximate exchange algorithm (MAVM) and ABC were roughly two orders of magnitude slower than either pseudolikelihood (PL) or path sampling (TI). For 2D images with n=10^6 pixels the average runtime was 43 hours for MAVM, 42.5 hours for ABC, 36 minutes for PL and 29 minutes for TI. It took 30 minutes for precomputation of 64 values of \mathbb{E}-z | \beta[S(z)] for path sampling, using 16 parallel threads. For 3D images with n=10^6 voxels the averages were 45 hours for MAVM or ABC, 35 minutes for PL and 30 minutes for TI. The precomputation step took 24 minutes for 44 values of \beta. Even allowing for the cost of precomputation, TI was still much faster than MAVM or ABC.
Synthetic 2D Images · n=10^6 pixelsPseudolikelihood (PL) baselineAverage runtime36 minutesk=3 · images=20 · pixels=10^6 · iterations-per-image=10000
Source quote
L341: All four algorithms were run for 10,000 iterations on each image, discarding the first 5,000 as burn-in. The differences in elapsed runtime are illustrated by Figure~\ref{f:elapsed}. All of the algorithms scaled linearly with increasing numbers of pixels, but the approximate exchange algorithm (MAVM) and ABC were roughly two orders of magnitude slower than either pseudolikelihood (PL) or path sampling (TI). For 2D images with n=10^6 pixels the average runtime was 43 hours for MAVM, 42.5 hours for ABC, 36 minutes for PL and 29 minutes for TI. It took 30 minutes for precomputation of 64 values of \mathbb{E}-z | \beta[S(z)] for path sampling, using 16 parallel threads. For 3D images with n=10^6 voxels the averages were 45 hours for MAVM or ABC, 35 minutes for PL and 30 minutes for TI. The precomputation step took 24 minutes for 44 values of \beta. Even allowing for the cost of precomputation, TI was still much faster than MAVM or ABC.
Synthetic 2D Images · n=10^6 pixelsPath sampling (TI) baselineAverage runtime29 minutesk=3 · images=20 · pixels=10^6 · iterations-per-image=10000
Source quote
L341: All four algorithms were run for 10,000 iterations on each image, discarding the first 5,000 as burn-in. The differences in elapsed runtime are illustrated by Figure~\ref{f:elapsed}. All of the algorithms scaled linearly with increasing numbers of pixels, but the approximate exchange algorithm (MAVM) and ABC were roughly two orders of magnitude slower than either pseudolikelihood (PL) or path sampling (TI). For 2D images with n=10^6 pixels the average runtime was 43 hours for MAVM, 42.5 hours for ABC, 36 minutes for PL and 29 minutes for TI. It took 30 minutes for precomputation of 64 values of \mathbb{E}-z | \beta[S(z)] for path sampling, using 16 parallel threads. For 3D images with n=10^6 voxels the averages were 45 hours for MAVM or ABC, 35 minutes for PL and 30 minutes for TI. The precomputation step took 24 minutes for 44 values of \beta. Even allowing for the cost of precomputation, TI was still much faster than MAVM or ABC.
BibTeX
@inproceedings{moores2018scalable,
  author = {Matthew T. Moores and Geoff K. Nicholls and A. N. Pettitt and Kerrie Mengersen},
  title = {{Scalable Bayesian Inference for the Inverse Temperature of a Hidden Potts Model}},
  booktitle = {Bayesian},
  year = {2018},
  doi = {10.1214/18-ba1130},
}
Figure