We start by stating our problem, known as conditional program generation (CPG) [1]}. We imagine a joint distribution \(\mathcal {D}(X, Y)\) , where \(X\)  ranges over specifications of program-generation problems and \(Y\)  ranges over programs. The probability \(\mathcal {D}(X = \mathsf {X}, Y = \mathsf {Y})\)  is high when \(\mathsf {Y}\)  is a solution to \(\mathsf {X}\) . Also, we consider a family of distributions \(\mathcal {P}_{\theta }(Y | X = \mathsf {X})\) , parameterized by \(\theta \) , that we might want to learn. Learning to conditionally generate programs amounts to finding parameters \(\theta \)  that minimize the prediction error
\(\mathbf {E}_{(\mathsf {X}, \mathsf {Y}) \sim \mathcal {D}}[\delta (\mathcal {P}_{\theta }(\mathsf {X}| \mathsf {Y}), \mathsf {Y})],\) 
where \(\delta \)  is a suitable distance function between programs.
