Exercise 27.1 - Partition function for an RBM

Answers

The partition function for a binary RBM takes the form:

Z ( 𝜃 ) = 𝐯 𝐡 exp { 𝐯 T 𝐖 𝐡 + 𝐯 T 𝐛 + 𝐡 T 𝐜 } .

For a fixed 𝐯 , the terms to be summed up are:

exp { 𝐯 T 𝐛 } 𝐡 exp { 𝐡 T 𝐮 } ,

where:

𝐮 = 𝐖 T 𝐯 + 𝐜 .

The summation 𝐡 exp { 𝐡 T 𝐮 } shall be written as:

exp ( 0 ) + exp ( u 1 ) + exp ( u 2 ) + exp ( u 2 + u 1 ) + = exp ( 0 ) + exp ( u 1 ) + exp ( u 2 ) [ exp ( 0 ) + exp ( u 1 ) ] + ,

Hence:

𝐡 exp { 𝐡 T 𝐮 } = k = 1 K ( 1 + exp ( u k ) ) ,

whose computation cost is 𝒪 ( K ) . The overall complexity is thus 𝒪 ( K 2 R ) . Since the summation order for 𝐯 and 𝐡 is interchangable, the complexity is reduced to:

𝒪 ( min R , K { K 2 R , R 2 K } ) .

User profile picture
2021-03-24 13:42
Comments