Exploiting the policy gradient theorem [1]} and using the fact that \(\nabla \log (\pi ) = (\nabla \pi )/\pi \) , we can write
\(\nabla _{\theta ^{\text{DPD}}} \mathcal {L}(\theta ^{\text{DPD}})= \mathbb {E}_{m,\tilde{x},y}\left\lbrace  l_n \ \nabla _{\theta ^{\text{DPD}}} \log \left(\pi \left(\tilde{x}| x\right)\right)\right\rbrace \,.\) 
