next up previous contents
Next: Multiplication Up: Building Blocks for Hierarchical Previous: First Example

Addition

Addition and multiplication nodes can be used e.g. for constructing affine transformations between the variables. Denoting the inputs by sk, the output is $\sum_k s_{k}$ for an addition node. The mean, variance and expected exponential of the addition node are

   
$\displaystyle \left< s_{1}+s_{2} \right>$ = $\displaystyle \left< s_{1} \right> + \left< s_{2} \right>$ (4.24)
$\displaystyle \mathrm{Var}\left\{s_{1}+s_{2}\right\}$ = $\displaystyle \mathrm{Var}\left\{s_{1}\right\} + \mathrm{Var}\left\{s_{2}\right\}$ (4.25)
$\displaystyle \left< \exp(s_{1}+s_{2}) \right>$ = $\displaystyle \left< \exp s_{1} \right> \left< \exp s_{2} \right>$ (4.26)

assuming that the variables sk are independent. The derivatives of the cost function propagate to the inputs using the chain rule applied to each of the Equations ([*]), ([*]) and ([*]). They are
$\displaystyle \frac{\partial C}{\partial \left< s_1 \right>}$ = $\displaystyle \frac{\partial C}{\partial \left< s_1 + s_2 \right>} \frac{\parti...
...tial \left< s_1 \right>} = \frac{\partial C}{\partial \left< s_1 + s_2 \right>}$ (4.27)
$\displaystyle \frac{\partial C}{\partial \mathrm{Var}\left\{s_1\right\}}$ = $\displaystyle \frac{\partial C}{\partial \mathrm{Var}\left\{s_1 + s_2\right\}} ...
...s_1\right\}} = \frac{\partial C}{\partial \mathrm{Var}\left\{s_1 + s_2\right\}}$ (4.28)
$\displaystyle \frac{\partial C}{\partial \left< \exp s_1 \right>}$ = $\displaystyle \frac{\partial C}{\partial \left< \exp (s_1+s_2) \right>} \frac{\partial \left< \exp (s_1+s_2) \right>}{\partial \left< \exp (s_1) \right>}$ (4.29)
  = $\displaystyle \left< \exp s_2 \right>\frac{\partial C}{\partial \left< \exp (s_1+s_2) \right>}.$  

The equations for larger sums are obtained by induction, e.g. s1+s2+s3=(s1+s2)+s3.


next up previous contents
Next: Multiplication Up: Building Blocks for Hierarchical Previous: First Example
Tapani Raiko
2001-12-10