Gaussian-noise posterior for an autologistic image (source code)

= Gaussian-noise posterior for an autologistic image
{c}
{title2=$p_v^{\rm post}=\operatorname{logistic}(\alpha+\beta z_v+y_v-\tfrac12)$}

For an <autologistic binary-image model> on a finite undirected <graph>, let $x_v\in\{0,1\}$ and give the configuration prior mass proportional to
$$
\exp\left(\alpha\sum_vx_v+\beta\sum_{\{v,w\}\in E}x_vx_w\right).
$$
Suppose $Y_v\mid x$ are <independent> <Gaussian distribution> observations with <expected value> $x_v$ and unit <variance>. Their local log-<likelihood ratio> for $x_v=1$ versus $0$ is
$$
-\frac{(y_v-1)^2}{2}+\frac{y_v^2}{2}=y_v-\frac12.
$$
Writing $z_v=\sum_{w\sim v}x_w$, the full posterior <conditional probability> is therefore
$$
\mathbb P(x_v=1\mid x_{-v},y)
=\operatorname{logistic}\left(\alpha+\beta z_v+y_v-\frac12\right).
$$
Thus the local evidence changes the one-site field while retaining the same neighbor interaction. For a noise <variance> $\sigma^2>0$, replace $y_v-1/2$ by $(y_v-1/2)/\sigma^2$.

The graphical <conditional independence> survives this update: vertices in any <independent> color class are conditionally <independent> given the other vertices and the observations. On a nearest-neighbor square grid, the two checkerboard colors give such classes, so one color can be updated in parallel in a <Gibbs sampler>. An arbitrary <graph> need not be bipartite and may require more colors. Updating every vertex simultaneously from its old neighbors is not the same as this exact conditional block update.