ArticleslgStudy

computer science

Markov logic network

Markov logic network 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 logic network rather than just read about it. In short: A Markov logic network (MLN) is a probabilistic logic which applies the ideas of a Markov network to first-order logic, defining probability distributions on possible worlds on any given domain. History In 2002, Ben Taskar, Pieter Abbeel and Daphne Koller introduced relational Markov networks as templates to specify Markov networks abstractly and without reference to a specific domain.

Markov logic network — main illustration
Markov logic network — illustration

Key takeaways

  • Markov logic network 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 logic network to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Markov logic network from memory before moving on to harder problems.

Reference excerpt

A Markov logic network (MLN) is a probabilistic logic which applies the ideas of a Markov network to first-order logic, defining probability distributions on possible worlds on any given domain.

History In 2002, Ben Taskar, Pieter Abbeel and Daphne Koller introduced relational Markov networks as templates to specify Markov networks abstractly and without reference to a specific domain. Work on Markov logic networks began in 2003 by Pedro Domingos and Matt Richardson. Markov logic networks is a popular formalism for statistical relational learning.

Syntax A Markov logic network consists of a collection of formulas from first-order logic, to each of which is assigned a real number, the weight. The underlying idea is that an interpretation is more likely if it satisfies formulas with positive weights and less likely if it satisfies formulas with negative weights. For instance, the following Markov logic network codifies how smokers are more likely to be friends with other smokers, and how stress encourages smoking:2.0::smokes(X)←smokes(Y)∧influences(X,Y)0.5::smokes(X)←stress(X)In the previous example, the weight of formula smokes(X)←smokes(Y)∧influences(X,Y) is 2.0 while the weight of formula smokes(X)←stress(X) is 0.5. Formally, a Markov logic network is a set of pairs of the form(F,w) where F is any first-order formula and w is the weight of the formula.

Semantics Recall that a domain is a set of elements and variables are interpreted as elements of that set. For instance, {john,mary}. Together with a given domain, a Markov logic network defines a probability distribution on the set of possible worlds, i.e. all interpretations of its predicates on the given domain.

Ground Atoms For any n-ary predicate symbol R that occurs in the Markov logic network and every n-tuple a1,…,an of domain elements, R(a1,…,an) is a grounding of R. For instance, influences(john,mary) is a grounding of influences. These groundings are called ground atoms.

Grounding of Formulas Similarly, a grounding of a formula φ in an instantiation of φ in which free variables have been replaced by elements of the domain, with respect to some variable assignment. For instance, smokes(john)←smokes(mary)∧influences(john,mary) is an grounding of smokes(X)←smokes(Y)∧influences(X,Y). x1,…,xn that makes φ true in that interpretation.

Possible world A possible world λ (also called an interpretation) is given by allocating a Boolean truth value (true or false) to each ground atom.

Probability Then the probability of a possible world λ is directly proportional to exp⁡(∑jwjnj(λ)), where wj is the weight of the j-th sentence of the Markov logic network and nj(λ) is the number of groundings of the j-th sentence that are true in λ.

Markov network

This can also be seen as inducing a Markov network whose nodes are the ground atoms. The feature functions of this network are the groundings of the sentences occurring in the Markov logic network, with value ew if the grounding is true and 1 otherwise (where again w is the weight of the formula).

Inference The probability distributions induced by Markov logic networks can be queried for the probability of a particular event, given by an atomic formula (marginal inference), possibly conditioned by another atomic formula. Marginal inference can be performed using standard Markov network inference techniques over the minimal subset of the relevant Markov network required for answering the query. Exact inference is known to be #P-complete in the size of the domain. In practice, the exact probability is often approximated. Techniques for approximate inference include Gibbs sampling, belief propagation, or approximation via pseudolikelihood. The class of Markov logic networks which use only two variables in any formula allows for polynomial time exact inference by reduction to weighted model counting.

See also Markov random field Statistical relational learning Probabilistic logic network Probabilistic soft logic ProbLog

References

Worked examples

Example 1 — a first encounter with Markov logic network

Start with the simplest possible case. Write down what Markov logic network 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 logic network 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 logic network 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 logic network

In research
Markov logic network 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 logic network 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 logic network is common in secondary-school and first-year university syllabi. It links to neighbouring topics Bayesian statistics, Markov networks, so understanding it makes those chapters shorter.
In everyday life
Look for Markov logic network 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Markov logic network” →

How to study Markov logic network in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Markov logic network 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 logic network out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Markov logic network in simple terms?

A Markov logic network (MLN) is a probabilistic logic which applies the ideas of a Markov network to first-order logic, defining probability distributions on possible worlds on any given domain. History In 2002, Ben Taskar, Pieter Abbeel and Daphne Koller introduced relational Markov networks as te…

Why does Markov logic network 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 logic network?

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 logic network.

Tags

  • Bayesian statistics
  • Markov networks

Keep exploring