About aggregation issues in the messaging passing
karlhjm opened this issue · 2 comments
decima-sim/msg_passing_path.py
Line 87 in c010dd7
The “msg_mats, msg_masks” generated in this function will repeatedly aggregate its child_node original feature and embedded feature in some cases.
for instance, a dag_job as below
According to the msg_masks and msg_mats generated above,
In the first step of message passing, node e passes the original feature to node d, so that d aggregates the original feature of e, and node f passes its original feature to generate the embedded feature of e.
In the second step of the message passing, node e will pass its embedded feature to node d, so that node d will aggregate the embedded features of e.
So the last node d not only aggregates the embedded features of e, but also aggregates the original features of e.
But according to my understanding, in the paper, node d should only aggregate the embedded feature of its child e.
Did I get it wrong? I really hope to get your reply, thank you!
Thanks for your effort of understanding the details of our implementation. Just want to make sure, did you get these msg_mats
and msg_masks
from our code (by passing your example DAG)? They are calculated in:
decima-sim/msg_passing_path.py
Lines 138 to 140 in c010dd7
msg_mats
puts the node being aggregated at each step (as row index) and its child nodes (as column index). msg_masks
ensures only these nodes are being updated at this step. Therefore, at each step, the input to the aggregation will be the original features of the current node and the aggregated features from its children. Hope this helps?I'm very excited to see your reply. I'm so sorry to bother you, but I'm sure I didn't make any mistakes in the calculation steps. I've calculated it three times based on your source code...
When the maximum depth is 2, The message delivery path of the above DAG should be as follows,
e -> c -> a
e -> c -> b
f -> e -> d
So in the first step, the corresponding message passing matrix should't have this term(msg_mats[0][d][e] = 1), otherwise it will cause node E to pass original feature to node D.
First, I get frontier as [e, f] from the code.
decima-sim/msg_passing_path.py
Line 99 in c010dd7
Then calculate the first iteration when depth is 0.
decima-sim/msg_passing_path.py
Lines 122 to 126 in c010dd7
However, D will be added to new_frontier when the depth is 0, which will result in msg_mats[0][d][e] = 1 and msg_masks[0][d] = 1.
decima-sim/msg_passing_path.py
Lines 136 to 139 in c010dd7