DeepNull

Stochastic Series - Pt 7 - Detailed Balance

In the last chapter we covered the stationary distribution for a Markov chain. As you might recall, this means that the distribution q is stationary, which means it does not change.

We use π (pi) to denote the stationary distribution.

π=πP

The above expression means that the stationary distribution is equal to the stationary distribution multiplied by the transition matrix.

Detailed Balance vs. Stationary Distribution

Stationary Distribution

Detailed balance is a stricter condition than stationarity, which means that if a chain satisfies detailed balance with respect to a distribution, that distribution must also be stationary.

A stationary distribution does not "care" how the distribution stays stationary, as long as the probability of each state stays the same.

Imagine we have 100 machines:

State Machines Probability
A 50 0.50
B 25 0.25
C 25 0.25
Total 100 1.00

If 10 machines from state A transition into B, it's okay for C to make up for the loss in A.

For example, imagine the following expected transitions:

From To Machines
A B 10
B C 10
C A 10

We can represent these transitions with the following transition matrix:

P=(0.80.2000.60.40.400.6)

This illustrates global balance. Each state receives as much as it loses, even though the machines move in a cycle.

At the end of the step, the distribution remains unchanged in expectation.

But for a chain to satisfy detailed balance, we need something stricter: the flow of probability must balance between every pair of states.

Probability Flow?

Probability flow is the probability of being in a specific state multiplied by the probability of transitioning to another state.

Let's say our stationary distribution looks like this:

π=(0.3, 0.2, 0.5)

To denote the stationary probability of state A, we use:

π(A)=0.3

So imagine that we are at step n in the chain and the distribution is stationary. We know that π(A) is 0.3, so we can expect 30% of all machines to be in state A.

We also have this transition matrix ℗:

P=(0.70.20.10.20.70.10.100.9)

Now we can see that the probability of transitioning from state A to B is 0.2.

Then the probability flow becomes:

π(A)×P(A,B)=0.3×0.2=0.06

So we took the stationary probability of state A, which was 0.3, and multiplied it by the probability of transitioning from A to B, which was 0.2.

This means that 6% of all machines are expected to transition from A to B during a single step.

Detailed Balance

Now that we have covered the concept of probability flow, we can take a closer look at what detailed balance means.

π(A)×P(A,B)=π(B)×P(B,A)

The above expression means that the probability flow from A to B matches the probability flow from B to A.

This condition must hold for every pair of states.

Our previous examples satisfied stationarity, but not detailed balance. So let's use a transition matrix that satisfies detailed balance.

We return to our original distribution of 100 machines:

π=(0.50, 0.25, 0.25)

And use this transition matrix:

P=(0.60.20.20.40.20.40.40.40.2)

In the first example, machines moved in a one-way cycle.

In the new matrix, the expected flow is equal in both directions for every pair:

Let's check that every pair satisfies the detailed balance condition.

A ↔ B

0.50×0.2=0.100.25×0.4=0.10

A ↔ C

0.50×0.2=0.100.25×0.4=0.10

B ↔ C

0.25×0.4=0.100.25×0.4=0.10

All three pairs satisfy detailed balance.

The distribution remains stationary, but unlike our previous examples, the probability flow between every pair of states is now balanced in both directions.