Giter Club home page Giter Club logo

Comments (3)

williamleif avatar williamleif commented on August 20, 2024 3

Hi,

Yes this can be confusing/counterintuitive and has to do with the naming conventions we use, as well how we "unfold" the recursion/loop of Algorithm 1 in our paper. We are making considerable efforts to clarify this in the next version of our paper, as well in updates to the code.

The short answer is that this is just a convention, which is complicated by the fact that the minibatch sampling is conceptually reversed compared to the outer loop (over "k") in Algorithm 1 (in our paper). By convention, when we refer to "layer k" in the code, we (usually) mean the computations/nodes present at "depth k" in Algorithm 1. But the key thing to note is that the sampling in our minibatch algorithm is in reverse order compared to outer loop (iteration over k) in Algorithm 1.

In particular, say we want to generate embeddings for a set of input, or target, nodes in a minibatch with depth K=2 and with neighborhood sample sizes S_1=10 and S_2=25 (i.e., we are using information from 2-hop neighborhoods), then, in our current convention, "layer 0" nodes (corresponding to the k=0 base case in Algorithm 1) are the nodes that are 2-hops away from the target nodes (and we need 10*25 of them per input node), "layer-1" nodes are 1-hop away (and we need 10 of them per input node), and "layer-2" nodes are target/input nodes.

Put in another way, the representations we want to generate -- for the input/target nodes -- are at depth/layer k=2 and these representations recursively depend on representations of the input nodes's neighbors at the previous layers. So from the perspective of sampling, we must sample the higher-depth/layer nodes first.

Anyways, I hope this made some sense, as this was a somewhat rushed reply. In any event, we will aim to clarify this in much more detail in updates to come.

from graphsage.

williamleif avatar williamleif commented on August 20, 2024

Closing for lack of activity. Feel free to email me if you have more conceptual questions about the algorithm.

from graphsage.

cxfneo avatar cxfneo commented on August 20, 2024

from graphsage.

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.