Jump to content

Factor graph: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Adding local short description: "Function graph representing factorization", overriding Wikidata description "bipartite graph representing the factorization of a function"
 
(23 intermediate revisions by 19 users not shown)
Line 1: Line 1:
{{Short description|Function graph representing factorization}}
{{Distinguish|Graph factorization}}
{{Distinguish|Graph factorization}}


In [[probability theory]] and its applications, a '''factor graph''' is a particular type of [[graphical model]], with applications in [[Bayesian inference]], that enables efficient computation of [[marginal distribution]]s through the [[sum-product algorithm]]. One of the important success stories of factor graphs and the [[sum-product algorithm]] is the [[code|decoding]] of capacity-approaching [[error-correcting code]]s, such as [[LDPC]] and [[turbo codes]].
A '''factor graph''' is a [[bipartite graph]] representing the [[factorization]] of a [[function (mathematics)|function]]. In [[probability theory]] and its applications, factor graphs are used to represent factorization of a [[Probability distribution function (disambiguation)|probability distribution function]], enabling efficient computations, such as the computation of [[marginal distribution]]s through the [[sum-product algorithm|sum–product algorithm]]. One of the important success stories of factor graphs and the sum–product algorithm is the [[code|decoding]] of capacity-approaching [[error-correcting code]]s, such as [[LDPC]] and [[turbo codes]].


Factor graphs generalize [[constraint graph]]s. A factor whose value is either 0 or 1 is called a constraint. A constraint graph is a factor graph where all factors are constraints. The max-product algorithm for factor graphs can be viewed as a generalization of the [[Local_consistency#Arc_consistency | arc-consistency algorithm]] for constraint processing.
A factor graph is an example of a [[hypergraph]], in that an ''arrow'' (i.e., a factor node) can connect more than one (normal) node.

When there are no free variables, the factor graph of a function ''f'' is equivalent to the [[constraint graph]] of ''f'', which is an instance to a [[constraint satisfaction problem]].


==Definition==
==Definition==
Line 12: Line 11:


where <math> S_j \subseteq \{X_1,X_2,\dots,X_n\}</math>, the corresponding factor graph <math> G=(X,F,E)</math> consists of variable vertices
where <math> S_j \subseteq \{X_1,X_2,\dots,X_n\}</math>, the corresponding factor graph <math> G=(X,F,E)</math> consists of variable vertices
<math>X=\{X_1,X_2,\dots,X_n\}</math>, factor [[vertex (graph theory)|vertices]] <math>F=\{f_1,f_2,\dots,f_m\}</math>, and edges <math>E</math>. The edges depend on the factorization as follows: there is an undirected edge between factor vertex <math> f_j </math> and variable vertex <math> X_k </math> when <math> X_k \in S_j</math>. The function is tacitly assumed to be real-valued: <math>g(X_1,X_2,\dots,X_n) \in \Bbb{R} </math>.
<math>X=\{X_1,X_2,\dots,X_n\}</math>, factor [[vertex (graph theory)|vertices]] <math>F=\{f_1,f_2,\dots,f_m\}</math>, and edges <math>E</math>. The edges depend on the factorization as follows: there is an undirected edge between factor vertex <math> f_j </math> and variable vertex <math> X_k </math> if <math> X_k \in S_j</math>. The function is tacitly assumed to be [[real-valued]]: <math>g(X_1,X_2,\dots,X_n) \in \mathbb{R} </math>.


Factor graphs can be combined with message passing algorithms to efficiently compute certain characteristics of the function <math>g(X_1,X_2,\dots,X_n)</math>, such as the [[marginal distribution]]s.
Factor graphs can be combined with message passing algorithms to efficiently compute certain characteristics of the function <math>g(X_1,X_2,\dots,X_n)</math>, such as the [[marginal distribution]]s.
Line 25: Line 24:


==Message passing on factor graphs==
==Message passing on factor graphs==
A popular message passing algorithm on factor graphs is the [[sum-product algorithm]], which efficiently computes all the marginals of the individual variables of the function. In particular, the marginal of variable <math> X_k </math> is defined as
A popular message passing algorithm on factor graphs is the sum–product algorithm, which efficiently computes all the marginals of the individual variables of the function. In particular, the marginal of variable <math> X_k </math> is defined as
:<math> g_k(X_k) = \sum_{X_{\bar{k}}} g(X_1,X_2,\dots,X_n)</math>
:<math> g_k(X_k) = \sum_{X_{\bar{k}}} g(X_1,X_2,\dots,X_n)</math>
where the notation <math>X_{\bar{k}} </math> means that the summation goes over all the variables, ''except'' <math> X_k </math>. The messages of the sum-product algorithm are conceptually computed in the vertices and passed along the edges. A message from or to a variable vertex is always a [[Function (mathematics)|function]] of that particular variable. For instance, when a variable is binary, the messages
where the notation <math>X_{\bar{k}} </math> means that the summation goes over all the variables, ''except'' <math> X_k </math>. The messages of the sum–product algorithm are conceptually computed in the vertices and passed along the edges. A message from or to a variable vertex is always a [[Function (mathematics)|function]] of that particular variable. For instance, when a variable is binary, the messages
over the edges incident to the corresponding vertex can be represented as vectors of length 2: the first entry is the message evaluated in 0, the second entry is the message evaluated in 1. When a variable belongs to the field of [[real numbers]], messages can be arbitrary functions, and special care needs to be taken in their representation.
over the edges incident to the corresponding vertex can be represented as vectors of length 2: the first entry is the message evaluated in 0, the second entry is the message evaluated in 1. When a variable belongs to the field of [[real numbers]], messages can be arbitrary functions, and special care needs to be taken in their representation.


In practice, the sum-product algorithm is used for [[statistical inference]], whereby <math> g(X_1,X_2,\dots,X_n)</math> is a joint [[Probability distribution|distribution]] or a joint [[likelihood function]], and the factorization depends on the [[conditional independence|conditional independencies]] among the variables.
In practice, the sum–product algorithm is used for [[statistical inference]], whereby <math> g(X_1,X_2,\dots,X_n)</math> is a joint [[Probability distribution|distribution]] or a joint [[likelihood function]], and the factorization depends on the [[conditional independence|conditional independencies]] among the variables.


The [[Hammersley–Clifford theorem]] shows that other probabilistic models such as [[Markov network]]s and [[Bayesian network]]s can be represented as factor graphs; the latter representation is frequently used when performing inference over such networks using [[belief propagation]]. On the other hand, Bayesian networks are more naturally suited for [[generative model]]s, as they can directly represent the causalities of the model.
The [[Hammersley–Clifford theorem]] shows that other probabilistic models such as [[Bayesian network]]s and [[Markov network]]s can be represented as factor graphs; the latter representation is frequently used when performing inference over such networks using [[belief propagation]]. On the other hand, Bayesian networks are more naturally suited for [[generative model]]s, as they can directly represent the causalities of the model.


==See also==
==See also==
* [[Belief propagation]]
* [[Belief propagation]]
* [[Bayesian inference]]
* [[Bayesian inference]]
* [[Bayesian programming]]
* [[Conditional probability]]
* [[Conditional probability]]
* [[Markov network]]
* [[Markov network]]
Line 43: Line 43:


==External links==
==External links==
* {{citation |url=http://www.isiweb.ee.ethz.ch/papers/arch/aloe-2004-spmagffg.pdf |title=An Introduction to Factor Graphs] |first=Hans-Andrea |last=Loeliger |journal=IEEE Signal Processing Magazine |date=January 2004 |volume=21 |issue=1 |pages=28–41 |doi=10.1109/MSP.2004.1267047 |bibcode=2004ISPM...21...28L|s2cid=7722934 }}
* [http://www.volker-koch.com/diss/ A tutorial-style dissertation by Volker Koch]
* [http://dimple.probprog.org/ dimple] {{Webarchive|url=https://web.archive.org/web/20160106225436/http://dimple.probprog.org/ |date=2016-01-06 }} an open-source tool for building and solving factor graphs in MATLAB.
* [http://www.robots.ox.ac.uk/~parg/mlrg/papers/factorgraphs.pdf An Introduction to Factor Graphs] by [[Hans-Andrea Loeliger]], ''[[IEEE Signal Processing Magazine]],'' January 2004, pp.&nbsp;28–41.
* {{citation |url=http://people.binf.ku.dk/~thamelry/MLSB08/hal.pdf |title=An introduction to Factor Graphs |first=Hans-Andrea |last=Loeliger |year=2008 }}
* [http://dimple.probprog.org/ dimple] an open-source tool for building and solving factor graphs in MATLAB.
* [http://people.binf.ku.dk/~thamelry/MLSB08/hal.pdf An introduction to Factor Graph. Presentation from the ETH by Prof. Dr. Hans Loeliger]
{{No footnotes|date=September 2010}}


==References==
==References==
* {{Citation|contribution=Markov random fields in statistics|last=Clifford|year=1990|editor1-last=Grimmett|editor1-first=G.R.|editor2-last=Welsh|editor2-first=D.J.A.|title=Disorder in Physical Systems, J.M. Hammersley Festschrift|pages=19–32|publisher=[[Oxford University Press]]|url=http://www.statslab.cam.ac.uk/~grg/books/hammfest/3-pdc.ps}}
* {{Citation|contribution=Markov random fields in statistics |last=Clifford |year=1990 |editor1-last=Grimmett|editor1-first=G.R.|editor2-last=Welsh|editor2-first=D.J.A.|title=Disorder in Physical Systems, J.M. Hammersley Festschrift|pages=19–32|publisher=[[Oxford University Press]]|url=http://www.statslab.cam.ac.uk/~grg/books/hammfest/3-pdc.ps |format=postscript |isbn=9780198532156}}
* {{Citation
* {{Citation
| last = Frey
| last = Frey
| first = Brendan J.
| first = Brendan J.
| editor-last = jain
| editor-last = Jain
| editor-first = Nitin
| editor-first = Nitin
| contribution = Extending Factor Graphs so as to Unify Directed and Undirected Graphical Models
| contribution = Extending Factor Graphs so as to Unify Directed and Undirected Graphical Models
| title = UAI'03, Proceedings of the 19th Conference in Uncertainty in Artificial Intelligence, August 7–10, Acapulco, Mexico
| title = UAI'03, Proceedings of the 19th Conference in Uncertainty in Artificial Intelligence
| year = 2003 |isbn = 0127056645 |contribution-url= https://dl.acm.org/doi/abs/10.5555/2100584.2100615
| year = 2003
| pages = 257–264
| pages = 257–264 | arxiv = 1212.2486
| publisher = Morgan Kaufmann }}
| publisher = Morgan Kaufmann }}
* {{Citation
* {{Citation
Line 67: Line 65:
| first2 = Brendan J. |last2=Frey |first3= Hans-Andrea |last3=Loeliger
| first2 = Brendan J. |last2=Frey |first3= Hans-Andrea |last3=Loeliger
| title = Factor Graphs and the Sum-Product Algorithm
| title = Factor Graphs and the Sum-Product Algorithm
| journal = IEEE Transactions on Information Theory
| journal = [[IEEE Transactions on Information Theory]]
| volume = 47
| volume = 47
| issue = 2
| issue = 2
| pages = 498–519
| pages = 498–519
| year = 2001
| year = 2001
| citeseerx = 10.1.1.54.1570
| url = http://citeseer.ist.psu.edu/kschischang01factor.html
| doi = 10.1109/18.910572
| doi = 10.1109/18.910572
| accessdate = 2008-02-06
| postscript = . }}
| postscript = . }}
* {{Citation
* {{Citation
Line 83: Line 80:
| publisher = Cambridge University Press
| publisher = Cambridge University Press
| url = http://www.cambridge.org/us/catalogue/catalogue.asp?isbn=9780521873154
| url = http://www.cambridge.org/us/catalogue/catalogue.asp?isbn=9780521873154
| isbn = 0-521-87315-0 }}
| isbn = 978-0-521-87315-4 }}


{{DEFAULTSORT:Factor Graph}}
{{DEFAULTSORT:Factor Graph}}

Latest revision as of 22:20, 25 November 2024

A factor graph is a bipartite graph representing the factorization of a function. In probability theory and its applications, factor graphs are used to represent factorization of a probability distribution function, enabling efficient computations, such as the computation of marginal distributions through the sum–product algorithm. One of the important success stories of factor graphs and the sum–product algorithm is the decoding of capacity-approaching error-correcting codes, such as LDPC and turbo codes.

Factor graphs generalize constraint graphs. A factor whose value is either 0 or 1 is called a constraint. A constraint graph is a factor graph where all factors are constraints. The max-product algorithm for factor graphs can be viewed as a generalization of the arc-consistency algorithm for constraint processing.

Definition

[edit]

A factor graph is a bipartite graph representing the factorization of a function. Given a factorization of a function ,

where , the corresponding factor graph consists of variable vertices , factor vertices , and edges . The edges depend on the factorization as follows: there is an undirected edge between factor vertex and variable vertex if . The function is tacitly assumed to be real-valued: .

Factor graphs can be combined with message passing algorithms to efficiently compute certain characteristics of the function , such as the marginal distributions.

Examples

[edit]
An example factor graph

Consider a function that factorizes as follows:

,

with a corresponding factor graph shown on the right. Observe that the factor graph has a cycle. If we merge into a single factor, the resulting factor graph will be a tree. This is an important distinction, as message passing algorithms are usually exact for trees, but only approximate for graphs with cycles.

Message passing on factor graphs

[edit]

A popular message passing algorithm on factor graphs is the sum–product algorithm, which efficiently computes all the marginals of the individual variables of the function. In particular, the marginal of variable is defined as

where the notation means that the summation goes over all the variables, except . The messages of the sum–product algorithm are conceptually computed in the vertices and passed along the edges. A message from or to a variable vertex is always a function of that particular variable. For instance, when a variable is binary, the messages over the edges incident to the corresponding vertex can be represented as vectors of length 2: the first entry is the message evaluated in 0, the second entry is the message evaluated in 1. When a variable belongs to the field of real numbers, messages can be arbitrary functions, and special care needs to be taken in their representation.

In practice, the sum–product algorithm is used for statistical inference, whereby is a joint distribution or a joint likelihood function, and the factorization depends on the conditional independencies among the variables.

The Hammersley–Clifford theorem shows that other probabilistic models such as Bayesian networks and Markov networks can be represented as factor graphs; the latter representation is frequently used when performing inference over such networks using belief propagation. On the other hand, Bayesian networks are more naturally suited for generative models, as they can directly represent the causalities of the model.

See also

[edit]
[edit]
  • Loeliger, Hans-Andrea (January 2004), "An Introduction to Factor Graphs]" (PDF), IEEE Signal Processing Magazine, 21 (1): 28–41, Bibcode:2004ISPM...21...28L, doi:10.1109/MSP.2004.1267047, S2CID 7722934
  • dimple Archived 2016-01-06 at the Wayback Machine an open-source tool for building and solving factor graphs in MATLAB.
  • Loeliger, Hans-Andrea (2008), An introduction to Factor Graphs (PDF)

References

[edit]