2
$\begingroup$

Context: I was reading Chapter 3 in the following book (here) about graph representation learning. Before I get to node embeddings, I wanted to make sure that I do understand what is meant by the phrase 'node features' used numerous times throughout the book. Examples are as follows:

Chapter 5, page 50:

Node Features: note that unlike the shallow embedding methods discussed in Part I of this book, the GNN framework requires that we node features $\mathbf{x}_{u}$, $\forall u \in \mathcal{V}$ as input to the model. In many graphs we will have rich node features to use (e.g. gene expression features in biological networks or text features in social networks)....

Question: What is a simple, concrete example of different node features? I have read the paragraph above, but I am not sure whether I have interpreted it correctly. For example, if we imagine a social network of some friends, would some example node features be: address, age, height, weight, etc.? Would it be as simple as that? What are some more advanced/subtle bits of information which could be counted as node features. Perhaps one could be 'number of friends' (i.e. the degree of the node), but what about others.

$\endgroup$

1 Answer 1

0
$\begingroup$

For example, if we imagine a social network of some friends, would some example node features be: address, age, height, weight, etc.? Would it be as simple as that?

Yes, that is correct. The idea behind Graph Neural Networks (GNNs) is that existing node features are augmented by the local graph structure to produce more accurate results.


What are some more advanced/subtle bits of information which could be counted as node features. Perhaps one could be 'number of friends' (i.e. the degree of the node), but what about others.

Yes - structural / positional properties of the graph (such as degree distribution) can also be used. They are particularly useful for graphs without existing attributes to use as node features.

An example use case of this would be modelling molecules as a graph, and trying to classify each molecule by type.

The following papers compare and discuss various different graph properties that could be used for this, depending on task / graph:


What is a simple, concrete example of different node features

Generally, you want a feature that is correlated to the task at hand. For example, user interests might be a good feature for predicting friendships between users in a social network, but less good for bot detection.

Same principle applies to positional features (for attributeless graphs) as well.

It might be helpful to look at the features given with common datasets:

https://pytorch-geometric.readthedocs.io/en/latest/modules/datasets.html

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .