

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Prof. Daniel A. Spielman, Engineering, Representing Probabilities, Equality nodes, Parity nodes, Lab Exercise, Applied Mathematics, MIT, Yale
Typology: Slides
1 / 3
This page cannot be seen from the preview
Don't miss anything!


18.413: Error-Correcting Codes Lab March 16, 2004
Lecturer: Daniel A. Spielman
It turns out that probabilities are not always the best way to represent the quantities we are considering. To see why, I’ll begin with an examination of the computation at equality nodes. Say that an equality node has incomming messages pinti , for i = 1,... , k, and we want to compute
pext 1 =
∏k i=2 p
int ∏ i k i=2 p int i +^
∏k i=2(1^ −^ p int i )^
It turns out that this computation is much easier if we use likelihood ratios:
lriint =
pinti 1 − pinti
The reason is that we have
lrext 1 =
∏^ k
i=
lriint.
To see this, note that pext 1 1 − pext 1
∏k i=2 p int ∏ i k i=2(1^ −^ p int i )^
This observation also makes it easier to compute pexti for all i at once: first multiply all of the pinti s together, and then just divide out the appropriate terms as needed. However, I should warn you that this solution is better in theory than in practice: in practice it is very easy to get zero divided by zero this way.
Pushing things a little further, note that it is much easier to add than multiply. So, we could take the logs of all these terms, and then just add them. This gives the log-likelihood-ratios
llri = log(lri).
Log-likelihood-ratios are nicer than likelihood ratios is that they treat probability values near 0 and near 1 symmetrically: going to the other side just changes the sign in the llr. On the other hand, the representation of numbers in floating point creates assymetry in likelihood ratios.
Lecture 12: March 16, 2004 12-
It seems like we should try to do something similar for parity nodes, and we can. Let’s look again at the computation that we have to do at a parity node:
pext 1 =
∏k i=2(1^ −^2 p
int i ) 2
Rearranging terms, we can write this as
2 pext 1 − 1 =
∏^ k
i=
(1 − 2 pinti ) = (−1)k−^1
∏^ k
i=
(2pinti − 1).
This suggests introducing the “soft-bit”,
χi = 2pi − 1.
We then have
χext 1 = (−1)k−^1
∏^ k
i=
χinti.
We would again like to consider taking logs and adding. However, we can get into trouble this way because the terms we are multiplying can be negative! To resolve this, we could separate out the signs, and write
χext 1 = (−1)k−^1 =
∏^ k
i=
sign(χinti ).
∑^ k
i=
log(
χinti
If you really like log-likelihood ratios, then you might want to try to keep all of your computations in terms of them. We first recall that
tanh(x/2) =
ex^ − 1 ex^ + 1
So,
tanh(llri/2) =
p 1 −p −^1 p 1 −p + 1
= 2p − 1.
So, we have χi = − tanh(llri/2).
As tanh is an odd function, we can push the minus sign inside if we wish, to obtain
χi = tanh(−llri).