Critical Iterative Denoising: A Discrete Generative Model Applied to Graphs