ArticleslgStudy

computer science

Markov random field

Markov random field is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Markov random field rather than just read about it. In short: In the domain of physics and probability, a Markov random field (MRF), Markov network or undirected graphical model is a set of random variables having a Markov property described by an undirected graph. In other words, a random field is said to be a Markov random field if it satisfies Markov properties.

Markov random field — main illustration
Markov random field — illustration

Key takeaways

  • Markov random field belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Markov random field to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Markov random field from memory before moving on to harder problems.

Reference excerpt

In the domain of physics and probability, a Markov random field (MRF), Markov network or undirected graphical model is a set of random variables having a Markov property described by an undirected graph. In other words, a random field is said to be a Markov random field if it satisfies Markov properties. The concept originates from the Sherrington–Kirkpatrick model. A Markov network or MRF is similar to a Bayesian network in its representation of dependencies; the differences being that Bayesian networks are directed and acyclic, whereas Markov networks are undirected and may be cyclic. Thus, a Markov network can represent certain dependencies that a Bayesian network cannot (such as cyclic dependencies ); on the other hand, it can't represent certain dependencies that a Bayesian network can (such as induced dependencies ). The underlying graph of a Markov random field may be finite or infinite. When the joint probability density of the random variables is strictly positive, it is also referred to as a Gibbs random field, because, according to the Hammersley–Clifford theorem, it can then be represented by a Gibbs measure for an appropriate (locally defined) energy function. The prototypical Markov random field is the Ising model; indeed, the Markov random field was introduced as the general setting for the Ising model. In the domain of artificial intelligence, a Markov random field is used to model various low- to mid-level tasks in image processing and computer vision.

Definition Given an undirected graph G = ( V , E ) {\displaystyle G=(V,E)} , a set of random variables X = ( X v ) v ∈ V {\displaystyle X=(X_{v})_{v\in V}} indexed by V {\displaystyle V} form a Markov random field with respect to G {\displaystyle G} if they satisfy the local Markov properties:

Pairwise Markov property: Any two non-adjacent variables are conditionally independent given all other variables:

X u ⊥ ⊥ X v ∣ X V ∖ { u , v } {\displaystyle X_{u}\perp \!\!\!\perp X_{v}\mid X_{V\smallsetminus \{u,v\}}}

Local Markov property: A variable is conditionally independent of all other variables given its neighbors:

X v ⊥ ⊥ X V ∖ N ⁡ [ v ] ∣ X N ⁡ ( v ) {\displaystyle X_{v}\perp \!\!\!\perp X_{V\smallsetminus \operatorname {N} [v]}\mid X_{\operatorname {N} (v)}}

where N ⁡ ( v ) {\textstyle \operatorname {N} (v)} is the set of neighbors of v {\displaystyle v} , and N ⁡ [ v ] = v ∪ N ⁡ ( v ) {\displaystyle \operatorname {N} [v]=v\cup \operatorname {N} (v)} is the closed neighbourhood of v {\displaystyle v} . Global Markov property: Any two subsets of variables are conditionally independent given a separating subset:

X A ⊥ ⊥ X B ∣ X S {\displaystyle X_{A}\perp \!\!\!\perp X_{B}\mid X_{S}}

where every path from a node in A {\displaystyle A} to a node in B {\displaystyle B} passes through S {\displaystyle S} . The Global Markov property is stronger than the Local Markov property, which in turn is stronger than the Pairwise one. However, the above three Markov properties are equivalent for positive distributions (those that assign only nonzero probabilities to the associated variables). The relation between the three Markov properties is particularly clear in the following formulation:

… excerpt ends here. Continue reading the full article.

Illustrations

Markov random field: An example of a Markov random field. Each edge represents dependency. In this example: A depends on B and D. B depends on A and D. D depends on A, B, and E. E depends on D and C. C depends on E.
An example of a Markov random field. Each edge represents dependency. In this example: A depends on B and D. B depends on A and D. D depends on A, B, and E. E depends on D and C. C depends on E.

Worked examples

Example 1 — a first encounter with Markov random field

Start with the simplest possible case. Write down what Markov random field claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Markov random field before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Markov random field ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Markov random field

In research
Markov random field appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Markov random field in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Markov random field is common in secondary-school and first-year university syllabi. It links to neighbouring topics Graphical models, Markov networks, so understanding it makes those chapters shorter.
In everyday life
Look for Markov random field outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Markov random field in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Markov random field means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Markov random field out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Markov random field in simple terms?

In the domain of physics and probability, a Markov random field (MRF), Markov network or undirected graphical model is a set of random variables having a Markov property described by an undirected graph. In other words, a random field is said to be a Markov random field if it satisfies Markov prope…

Why does Markov random field matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Markov random field?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Markov random field.

Tags

  • Graphical models
  • Markov networks

Keep exploring