BayesianMachineLearningProbabilityTheoryStatistics A factor graph is an undirected probabilistic graphical model over a collection of random variables defined by an bipartite graph , where the nodes are split into variable nodes and factor nodes (displayed as solid squares below - corresponding the the factors ).

Factorizations of the joint distribution in Markov networks are ambiguous in that they don’t specify whether interactions are direct or indirect. For example the graph corresponds to both the following factor graphs: Importantly, both the above graphs have the same conditional independence relations. The latter graph expresses the joint distribution as a product of pairwise interactions, meaning that it would require a lookup table size to represent variables taking on discrete values whereas the former would require a table of size .

Just as directed models can be converted to undirected models, they can be converted into a factor graph by representing a leaf node (a node with no incoming edges) by a single variable factor .