Comments (4)
Hi!
Yes, we are sampling with replacement in the code for convenience. In fact, if max-pooling aggregation is used, sampling with or without replacement would make no difference. In practice, we also do not see any noticeable difference when sampling with replacement for other aggregation methods.
Your second concern is the reason why doing minibatch training is more memory efficient here: when training, in each iteration, we compute h's only for nodes in minibatch and their neighbors, as opposed to computing h's for all nodes in graph.
Could you clarify what do you mean by minibatch data? Are you referring to the sample data in this repo, or the minibatch training procedure? Algorithm 1 in paper is the inference algorithm for computing node embeddings given weight parameters.
from graphsage.
@RexYing
Hi! Many thanks for your reply!
(1) for question 1, yes it is very straightforward to understand sampling with or without replacement will not influence the max-pooling aggregator. But for the mean aggregator, I can intuitively understand it, but not theoretically.
In the mean aggregator part, you cited the "Discriminative Embeddings of Latent Variable Models for Structured Data" paper. In the algorithm 3 of the paper, it is still a the mean of the neighbors as the author proved the iterative update steps of mean field and loopy belief can be viewed as function mappings of the embedded marginals. I don't know why sampling with replacement for the mean aggregator works theoretically.
(2) for question 1, 2. Thanks I previously had misunderstanding. When I was reading your paper, I was thinking in each training iterations, the weight is trained based on minibatch samples, however, all the h_v^{k} should be updated based on the new weight. I understand if I did it this way, it is computationally expensive to update the h_v^{k} for all nodes.
I am confused because when I think about mean field and loopy belief, in each iteration, the values of all nodes are updated. So it looked weird to me why it is guaranteed to converge when I only sample some of the nodes, and only update the values of these nodes while keeping the values of the other nodes fixed in one training iteration.
I am reading the appendix of your paper, it will be great if you can point me to the theorem or corollary that exactly answers my questions. Thanks a lot!
from graphsage.
Hi,
Building off what Rex mentioned, I think a key point is that our sampling with replacement approach is a practical/empirical method to deal with large datasets. Intuitively, it can also be viewed as a form of "node/edge dropout" or regularization.
However, none of our proofs actually show that the sampling with replacement converges in the sense that you are discussing. And in fact, we assume that full neighborhood sets are used in our proofs. This will be made more clear in the next version our paper.
Does this clear things up?
from graphsage.
@williamleif , thanks for your reply!
I think I have got the answer for my question (1)
But I still don't know the answer to question (2). I don't know why in each iteration, only the mini batch samples got the h_v^{k} updated.
Maybe I don't understand it correctly, thanks again for taking the time to answer my questions!
from graphsage.
Related Issues (20)
- Fatal Python error: Segmentation fault
- Is there any example notebooks of using this code?
- What's the difference between GraphSAGE-GCN and GraphSAGE-mean ?
- Norm of node representation z
- how sage train the node that only have 1 top neighbors? HOT 3
- 异构图生成二部图问题Graph is multigraph, cannot be converted to networkx graph. HOT 1
- What if the number of neighbors is less than the pre-defined number? HOT 1
- GraphSAGE for weighted graphs
- PPI ID-protein name correspondence?
- Unseen Node classification HOT 3
- Question about PPI: how to process C1, C3 and C7 into 50-dim features?
- WHY 2 layer loop in aggregate function?
- I'm new to graphsage. Can't run. Getting error.Please explain HOT 1
- Dense layers use relu with xavier initialization
- the code problem in utils HOT 1
- networkx issue with reddit dataset HOT 2
- what is the class in "<train_prefix>-class_map.json" means. HOT 1
- why i still can't run the program because an error No such file or directory: './example_data/ppi-G.json' HOT 1
- how to change the dataset HOT 1
- BLAS and GEMM occur error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphsage.