We give a pseudocode in Algorithm 1 that trains this model in an online fashion using feedback from the loopy belief propagation (LBP) inference algorithm (to be described later in Section 3.1.1).
the marginals from the LBP are used in a stochastic gradient descent (SGD) algorithm, which has the following (minibatch) update rule: where θ t and η t are the model parameters and the learning rate at step t, respectively, and 1 N f (θ t ) is the mean gradient for the minibatch (a thread).