Answers.Body: <blockquote>
  <p>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?</p>
  </blockquote>
  <p>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.</p>
  <hr />
  <blockquote>
  <p>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.</p>
  </blockquote>
  <p>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.</p>
  <p>An example use case of this would be modelling molecules as a graph, and trying to classify each molecule by type.</p>
  <p>The following papers compare and discuss various different graph properties that could be used for this, depending on task / graph:</p>
  <ul>
  <li><a href="https://doi.org/10.48550/arXiv.2107.01495" rel="nofollow noreferrer">https://doi.org/10.48550/arXiv.2107.01495</a></li>
  <li><a href="https://doi.org/10.48550/arXiv.1911.08795" rel="nofollow noreferrer">https://doi.org/10.48550/arXiv.1911.08795</a></li>
  </ul>
  <hr />
  <blockquote>
  <p>What is a simple, concrete example of different node features</p>
  </blockquote>
  <p>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.</p>
  <p>Same principle applies to positional features (for attributeless graphs) as well.</p>
  <p>It might be helpful to look at the features given with common datasets:</p>
  <p><a href="https://pytorch-geometric.readthedocs.io/en/latest/modules/datasets.html" rel="nofollow noreferrer">https://pytorch-geometric.readthedocs.io/en/latest/modules/datasets.html</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-17T12:19:17.943Z
Answers.LastActivityDate: 2023-07-17T12:31:59.480Z
Answers.LastEditDate: 2023-07-17T12:31:59.480Z
Answers.UserDisplayName: niklasdewally
Body: <p><strong>Context:</strong> I was reading Chapter 3 in the following book (<a href="https://www.cs.mcgill.ca/%7Ewlh/grl_book/files/GRL_Book.pdf" rel="nofollow noreferrer">here</a>) 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:</p>
  <p>Chapter 5, page 50:</p>
  <blockquote>
  <p><strong>Node Features</strong>: note that unlike the shallow embedding methods discussed in Part I of this book, the GNN framework requires that we
  node features <span class="math-container">$\mathbf{x}_{u}$</span>, <span class="math-container">$\forall u \in \mathcal{V}$</span> 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)....</p>
  </blockquote>
  <p><strong>Question:</strong> 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.</p>
  
Tags: <geometric-deep-learning><graph-neural-networks><graphs><features>
Title: What are examples of node 'features' in graph networks?
UserDisplayName: Rocky the Owl
ThreadText: # What are examples of node 'features' in graph networks?
  
  (Asked by: username_0 on 2021-09-19)
  
  **Context:** I was reading Chapter 3 in the following book ([here](https://www.cs.mcgill.ca/%7Ewlh/grl_book/files/GRL_Book.pdf)) 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.
  
  **Tags:** geometric-deep-learning, graph-neural-networks, graphs, features
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-07-17. Score: 0
  
  > 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:
  
  * <https://doi.org/10.48550/arXiv.2107.01495>
  * <https://doi.org/10.48550/arXiv.1911.08795>
  
  ---
  
  > 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>
  
  
  ---
  
  