Giter Club home page Giter Club logo

Comments (2)

hongzimao avatar hongzimao commented on July 27, 2024

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:

sp_mat.add(row=n.idx, col=child.idx, data=1)
msg_masks[depth, n.idx] = 1
msg_mats.append(sp_mat)
So 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?

from decima-sim.

karlhjm avatar karlhjm commented on July 27, 2024

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.

frontier = get_init_frontier(job_dag, args.max_depth)

Then calculate the first iteration when depth is 0.
if children_all_in_frontier:
if parent not in msg_level or \
curr_level + 1 > msg_level[parent]:
# parent node has deeper message passed
new_frontier.add(parent)

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.
for n in new_frontier:
for child in n.child_nodes:
sp_mat.add(row=n.idx, col=child.idx, data=1)
msg_masks[depth, n.idx] = 1

from decima-sim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.