Evidence Lower Bound (ELBO) Visualization

This visualization demonstrates the Evidence Lower Bound (ELBO) in variational inference. It extends the Bayesian visualization by adding a variational distribution Q and showing how ELBO relates to the marginal likelihood.

My prior beliefs: the probability that I'm looking at a frog, not an apple: 30.0%
Probability that a frog jumps: 70.0%
Probability for jumping frog
21.0%
Prior belief for a jumping apple:
14.0%
Probability that an apple jumps: 20.0%

Marginal/Evidence, P(E)

What is my expectation to see a jumping thing?

35.0%

Posterior, P(H|E)

Given that I see a jumping thing, what is the probability it's a frog?

60.0%

Variational Distribution Q(H)

0%100%
Q(H) = 50.0%

Variational Free Energy F[Q,y] (negative ELBO)

-Energy

1.7634

-EQ(x)[ln P(y,x)]

-

Entropy

0.6931

H[Q(x)]

F[Q,y]

1.0702

Complexity

0.0872

DKL[Q(x) || P(x)]

-

Accuracy

-0.9831

EQ(x)[ln P(y|x)]

=

F[Q,y]

1.0702

Divergence

0.0204

DKL[Q(x) || P(x|y)]

-

Evidence

-1.0498

ln P(y)

=

F[Q,y]

1.0702

Green boxes are tractable and can be directly computed.Red boxes are intractable in the general case.

-F[Q,y] = ELBO = Evidence Lower Bound.

The third formulation shows that ELBO ≤ Evidence (hence the name). Both are negative, so |ELBO| ≥ |Evidence|.

Drag the dividing lines to adjust probabilities and the slider to adjust Q. See how they affect the ELBO and its relationship to the marginal likelihood.