GraphSAGE icon indicating copy to clipboard operation
GraphSAGE copied to clipboard

GraphSAGE without external features

Open vinaysetty opened this issue 7 years ago • 6 comments

I am wondering if it makes sense to use GraphSAGE on graphs with no features? Does it still have an advantage over DeepWalk? Why is GraphSAGE without features experiment is missing in the paper?

vinaysetty avatar Nov 03 '18 16:11 vinaysetty

Identity features can be used. The experiment is done in Kipf & Welling's paper. They show performance comparison over baselines such as Planetoid and DeepWalk.

We did not want to include such experiment because this work focuses on inductive representation learning. If we want to be inductive, neither identity features nor DeepWalk type of approach works. But it's still possible to use constant features with degree/clustering coefficient features for each node. One example of using degree/clustering coefficient features is PinSage (https://arxiv.org/pdf/1806.01973.pdf)

RexYing avatar Nov 08 '18 22:11 RexYing

Thank you for the reply. That makes sense. Now I am wondering if it makes sense to use GraphSage in the Transductive setting? Is it correct to make GraphSAGE look at all nodes during the training without any labels and treat it as unsupervised Transductive mode?

I am noticing that the original vanilla DeepWalk (using genesis Word2Vec wrapper) without any features and in unsupervised Transductive setting exceeds the performance of GraphSAGE in the above mentioned Transductive setting (for Reddit node classification). May be if all we need is Transductive way of computing embeddings, then we should just stick to random walk or Matrix Factrorization methods?

vinaysetty avatar Nov 16 '18 13:11 vinaysetty

I think yes you need to try both to see which one is better. Another advantage is that GraphSAGE can capture local structure similar to WL test. And it is scalable in the sense that parameter size does not depend on size of graph. But in terms of performance I can see that MF / random walk methods could also be very good in your case with no feature and transductive dataset

RexYing avatar May 28 '19 05:05 RexYing

@RexYing in case external features <train_prefix>-feats.npy is absent, does identity features use the ordering given by <train_prefix>-id_map.json ?

arunavsk avatar Jun 23 '20 10:06 arunavsk

I believe it's the same ordering, in graphsage/utils you can see how features are treated id none are present as well as in training there is:

            # pad with dummy zero vector
            features = np.vstack([features, np.zeros((features.shape[1],))])

also in the inference examples for Linear Regression you can also see the different use cases when there are and are not features for classification.

sam-lev avatar Jun 23 '20 20:06 sam-lev

question: If I have not feats.npy, just have nodes and edges. How can I can generate a feats.npy?

knightXun avatar Aug 30 '20 02:08 knightXun