microsoft / graph-based-code-modelling

Code for "Generative Code Modeling with Graphs" (ICLR'19)
MIT License
170 stars 38 forks source link

Concurrent repair or one-by-one #6

Closed zhaohan-xi closed 3 years ago

zhaohan-xi commented 3 years ago

Hi Dear Author, here is a question about the testing details in your ICLR'18 paper (Learning to Represent Programs with Graphs). On the example programs in your paper, the model can successfully predict variables in many slots (like the image below, which is a figure from your paper). I just wondering the way to predict all these slots in the test stage after training, is that: (1) the model predicts variable in all slots at the same time (2) or, the model predicts the slots one by one, each time you only remove the variable in one slot, and predict it; next time restore that last slot back and remove the variable in another slot, then predict it; ..., do this prediction in an iteration.

Which one is a correct understanding in your detailed realization? Or, both incorrect since there is another way to predict the contents in all these slots? Thanks!

Screen Shot 2020-12-18 at 12 51 33 AM
mmjb commented 3 years ago

Heya,

Indeed, for the results in the ICLR'18 paper, we used the approach that you describe in (2) (fill in one slot, conditional on correct content for all others). However, our related, earlier work, we discuss how to use iterative conditional modes to extend to the fill-all-slots-at-once setting (see https://arxiv.org/pdf/1705.07867v1.pdf, Sect. 3.1).

Marc