Table 2 shows diversity results averaged across
all benchmark tasks, over the top-5 generations for
each model, for CODEFUSION and auto-regressive
(T5, CodeT5, StarCoder, CodeGen, GPT-3) base-
lines. CODEFUSION produces generations of higher
diversity compared to auto-regressive models.

Like CODEFUSION, other diffusion methods
(Diffusion-LM and GENIE) improve for top-3 and
top-5 relative to top-1. They fall short of CODEFU-
SION as a result of generating syntactically invalid
programs. Table 3 shows the fraction of syntacti-
cally valid generations for CODEFUSION and dif-
fusion baselines. CODEFUSION generations are
more often syntactically valid compared to diffu-
sion models not designed for code: 33.8% more
CODEFUSION