liveBook · Manning

Markov random field

As explained in Machine Learning Algorithms in Depth

A Markov random field is a joint distribution over variables represented by an undirected graph whose edges encode conditional independence relationships.

A Markov random field (MRF) represents a joint distribution with an undirected graph: nodes are random variables, and edges encode conditional independence. Neighboring variables interact through potentials, making the graph structure part of the probability model. section 3.3

The Ising model specializes this structure to binary states on a grid. Positive coupling favors equal neighboring states, creating a smoothness prior that is useful for recovering an underlying image from noisy observations. section 3.3

For image denoising, the model combines:

  • Binary latent pixels xi ∈ {−1, +1} with noisy Gaussian observations yi. section 3.3
  • Edge potentials Ψ(xs, xt) = exp{xs J xt}, where J > 0 favors matching neighboring states. section 3.3
  • Mean-field variational inference, which approximates the joint posterior with a fully factored q(x) and updates each variable using neighboring means. section 3.3
Figure 3.5 Mean field VI for Ising model pseudo-code
figure

Use the pseudo-code to follow iterative mean-field inference for Ising-model image denoising. section 3.3

Denoising a binary image

Start with a two-dimensional grid of noisy pixel observations, then infer each latent pixel from its observation and the expected states of its neighbors. Repeating the updates recovers a smoother image. section 3.3

How Machine Learning Algorithms in Depth covers it

How deep it goes
Defines graph semantics, specifies interaction potentials, and derives mean-field updates, with implementation pseudo-code rather than full derivations.
Examples
Uses binary image denoising on a two-dimensional grid with noisy Gaussian pixel observations.
What you can do after
Apply mean-field variational inference to denoise images represented by binary Ising-model variables.
How it connects
Connects conditional independence, Ising models, interaction potentials, Gaussian observations, and variational inference.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Algorithms in Depth. The section links point to the parts of the book it draws on.