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.
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:
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:
To denote the stationary probability of state A, we use:
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 ℗:
Now we can see that the probability of transitioning from state A to B is 0.2.
Then the probability flow becomes:
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.
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:
And use this transition matrix:
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:
- A ↔ B: 10 machines each way
- B ↔ C: 10 machines each way
- A ↔ C: 10 machines each way
Let's check that every pair satisfies the detailed balance condition.
A ↔ B
A ↔ C
B ↔ C
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.