Error-Correcting Codes Lab 12, Lecture Slide - Engineering, Slides of Applied Mathematics

Prof. Daniel A. Spielman, Engineering, Representing Probabilities, Equality nodes, Parity nodes, Lab Exercise, Applied Mathematics, MIT, Yale

Typology: Slides

2010/2011

Uploaded on 11/09/2011

mjforever
mjforever 🇺🇸

4.8

(25)

254 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
18.413: Error-Correcting Codes Lab March 16, 2004
Lecture 12
Lecturer: Daniel A. Spielman
12.1 Representing Probabilities, Equality nodes
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 pint
i, for i= 1, . . . , k, and we want to compute
pext
1=Qk
i=2 pint
i
Qk
i=2 pint
i+Qk
i=2(1 pint
i).
It turns out that this computation is much easier if we use likelihood ratios:
lrint
i=pint
i
1pint
i
.
The reason is that we have
lrext
1=
k
Y
i=2
lrint
i.
To see this, note that
pext
1
1pext
1
=Qk
i=2 pint
i
Qk
i=2(1 pint
i).
This observation also makes it easier to compute pext
ifor all iat once: first multiply all of the pint
is
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.
12-1
pf3

Partial preview of the text

Download Error-Correcting Codes Lab 12, Lecture Slide - Engineering and more Slides Applied Mathematics in PDF only on Docsity!

18.413: Error-Correcting Codes Lab March 16, 2004

Lecture 12

Lecturer: Daniel A. Spielman

12.1 Representing Probabilities, Equality nodes

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-

12.2 Representing Probabilities, Parity nodes

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

12.3 tanh!?

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).