wengong-jin / icml18-jtnn

Junction Tree Variational Autoencoder for Molecular Graph Generation (ICML 2018)
MIT License
509 stars 190 forks source link

Inconsistency between Eq. 15 and jtmpn.py:L81-L108? #19

Open BarclayII opened 6 years ago

BarclayII commented 6 years ago

Consider three atoms A -- B -- C, where A and B are connected within the same clique C1, and B and C are connected but belonging to different cliques C1 and C2. The code in jtmpn.py:L81-L108 will assign a connection to B with a "dummy" edge corresponding to the tree message C2 -> C1. So (1) The loopy BP on edge B -> A will also gather the tree message C2 -> C1, even if B and A are within the same clique. (2) During readout phase, B will gather message not only from A -> B and C -> B, but also the tree message C2 -> C1.

Are these behaviors intended? I think they don't match Eq. 15 in the paper, where the message on an edge whose ends belong to the same clique does not gather any tree message, and the atoms does not gather tree messages during readout as well.