Figure 2: RNNG composition function on each REDUCE operation; the network on the right models the structure on the left (Dyer et al., 2016).
since the RNNG is a generative model, it attempts to maximize p(x, y), the joint distribution of strings and trees, defined as p(x, y) is defined as a product of local probabilities, conditioned on all past actions.