A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Belief Propagation Algorithm

Graduate Depth 99 in the knowledge graph I know this Set as goal
1topic build on this
622prerequisites beneath it
See this on the map →
Factor Graphs and InferenceDynamic ProgrammingConstraint Propagation
inference message-passing factor-graphs loopy-belief-propagation

Core Idea

Belief propagation iteratively passes messages between variables and factors in a factor graph to compute marginal probabilities and max-marginals. It is exact on tree-structured graphs and an effective approximation on loopy graphs; the algorithm's convergence and quality depend on the graph structure and message scheduling.

How It's Best Learned

Implement sum-product belief propagation on a factor graph and trace message updates to understand how beliefs propagate through the network.

Explainer

From your study of factor graphs, you know that a joint probability distribution can be represented as a bipartite graph with variable nodes and factor nodes, where each factor encodes a local relationship between a subset of variables. The inference problem is to compute the marginal probability of each variable — that is, to sum out all other variables from the joint distribution. Doing this by brute force is exponential in the number of variables. Belief propagation (BP) solves this efficiently by breaking the global computation into local message-passing steps.

The algorithm works by sending messages along edges of the factor graph. There are two types. A message from a variable node x to a factor node f summarizes what x "believes" about its own state based on all factors *except* f. A message from a factor node f to a variable node x summarizes what f "thinks" x should be, given the local function and all messages from f's other neighboring variables. Each message is a function over the states of the receiving variable — think of it as an unnormalized probability vector. The belief at each variable node is the product of all incoming messages, normalized to sum to one. This gives the estimated marginal distribution.

On tree-structured factor graphs (graphs with no cycles), belief propagation is exact and terminates in a number of steps equal to the diameter of the tree. The reason is elegant: in a tree, every path between two nodes is unique, so messages carry independent information. You can think of it as a generalization of the forward-backward algorithm for hidden Markov models or the elimination algorithm for Bayesian networks — both are special cases of BP on tree-shaped graphs. The sum-product variant computes marginals; the closely related max-product (or min-sum in log space) variant computes the most probable configuration, analogous to the Viterbi algorithm.

When the factor graph has cycles — the loopy case — messages are no longer independent, because information can circulate around loops and be counted multiple times. Nevertheless, loopy belief propagation often works remarkably well in practice. The algorithm simply runs the same update rules iteratively until messages converge (or a maximum number of iterations is reached). It is the core inference engine behind turbo codes, LDPC codes in modern communication systems, and stereo vision algorithms in computer vision. Convergence is not guaranteed in general, and when it does converge, the marginals are approximate. Techniques like message damping (averaging new messages with old ones) and careful scheduling (updating messages in a strategic order rather than all at once) improve reliability. Understanding when and why loopy BP fails — for instance, on graphs with short, tight cycles — is an active area of research that connects to variational inference and the Bethe free energy approximation.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersDividing IntegersUnit RatesProportionsPercent ConceptConverting Between Fractions, Decimals, and PercentsOperations with Rational NumbersTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionSine, Cosine, and Tangent RatiosTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIndefinite IntegralsBasic Integration RulesRiemann SumsDefinite Integral DefinitionProbability Density Functions and Continuous DistributionsCumulative Distribution FunctionsContinuous Random VariablesProbability Density FunctionsExpected ValueWeak Law of Large NumbersProbability Axioms and RulesConditional ProbabilityLaw of Total ProbabilityBayes' Theorem and Statistical InferenceBayesian Networks and InferenceProbabilistic Graphical ModelsMarkov Random FieldsFactor Graphs and InferenceBelief Propagation Algorithm

Longest path: 100 steps · 622 total prerequisite topics

Prerequisites (2)

Leads To (1)