For the parameters of the generator θ g , Using the fact The last term is the expected gradient where the expectation is taken with respect to the generator distribution over rationales z.
we can simply sample a few rationales z from the generator gen(x) and use the resulting average gradient in an overall stochastic gradient method.