According to BP, the belief b V is the pointwise product of all "incoming" messages to V .
at a given step, we only have to compute the gradient with respect to the currently nonzero features (green nodes in Figure 2) and their immediate children (yellow nodes).