Memra

Bayesian belief networks (breadth)

◈ 4 cards

BBNs as a DAG of variables with CPTs, the factorization P(x1..xn)=∏P(xi|parents), d-separation and the three connection patterns, "explaining away," and posterior inference by enumeration.

The structure: a DAG plus CPTs

Naive Bayes assumes everything is independent; full Bayes assumes nothing is. A Bayesian belief network (BBN) is the principled middle ground. It is a directed acyclic graph (DAG) whose nodes are random variables and whose directed edges encode causal influence, with a conditional probability table (CPT) attached to each node giving .

The defining property is the Markov assumption: each node is conditionally independent of all its non-descendants given its parents. This is what makes a BBN compact — it lets the full joint distribution factor into a product of small per-node CPTs: Instead of one exponential -entry table, you store one small table per node — exponential savings whenever each node has few parents.

d-separation: when is influence blocked?

d-separation is the graphical test for conditional independence: are and independent given a set of observed nodes? It depends on the three connection patterns along the path between them:

  • Serial — observing the middle node blocks the influence (knowing makes and independent).
  • Diverging (common cause) — observing blocks the correlation between and .
  • Converging (common effect) — the opposite rule: and are independent when (and all its descendants) is unobserved; observing creates a correlation. This is ‘explaining away’: two competing causes of the same observed effect become negatively correlated — confirming one cause makes the other less needed. (Explaining away is exactly the abductive reasoning from L7.4, now formalized.)

Worked example — burglary → alarm → call

A three-node chain: a Burglary () may trigger the Alarm (), and the alarm may prompt a neighbour’s Call (). We are given the prior , the CPT , and the CPT , and we want the posterior — how likely a burglary is, given that we got a call. By Bayes, This is inference by enumeration: write the joint via the factorization, then sum out the hidden variable in both numerator and denominator. With a tiny burglary prior (), the posterior stays small even after a call — a correct and sobering result (most alarm calls are not burglaries). The code exercise enumerates exactly this and prints .

BurglaryP(B) = 0.001AlarmP(A|B): .94 / .01CallP(C|A): .90 / .05No B → C arrow: given Alarm, Call tells you nothing more.
The whole network: a DAG plus one small table per node. The <em>absent</em> arrow from Burglary straight to Call is the claim — Call is conditionally independent of Burglary given Alarm — and it is exactly what licenses the factorization P(B,A,C) = P(B)·P(A|B)·P(C|A). Three small tables replace one joint table.
BAP(B)·P(A|B)·P(C|A)valuetruetrue0.001 · 0.94 · 0.900.000846truefalse0.001 · 0.06 · 0.050.000003falsetrue0.999 · 0.01 · 0.900.008991falsefalse0.999 · 0.99 · 0.050.04945P(B|C) = 0.000849 / 0.05929 = 0.014 — a call is still almost never a burglary.
Inference by enumeration, written out. Each row is one setting of B and A with C observed, scored by the factorization. The posterior is the two burglary rows divided by all four — and it lands near 1.4%, because a prior of one in a thousand is not overturned by evidence that fires almost as often without a burglary. This is the base-rate fallacy, arithmetically defused.
NORMAL ~/memra/learn/comp-456/bayesian-belief-networks utf-8 LF