Answers.Body: <p>Yes, there are numerous, coming under the umbrella term <a href="https://ai.stackexchange.com/questions/11169/what-is-a-graph-neural-network/20626#20626"><strong>Graph Neural Networks</strong></a> (GNN).</p>
  
  <p>The most common input structures accepted by these techniques are the adjacency matrix of the graph (optionally accompanied by its node feature matrix and/or edge feature matrix, if the graph has such information).</p>
  
  <p><a href="https://arxiv.org/abs/1901.00596" rel="nofollow noreferrer">A Comprehensive Survey on Graph Neural Networks</a>, Wu et al (2019) divides GNN's into four subgroups:</p>
  
  <ul>
  <li>Recurrent graph neural networks (RecGNN)</li>
  <li>Convolutional graph neural networks (ConvGNN)</li>
  <li>Graph autoencoders (GAE)</li>
  <li>Spatial-temporal graph neural networks (STGNN)</li>
  </ul>
  
  <p>ConvGNN's can themselves be classified by whether they use Spectral methods or Spatial methods, and GAE's by whether they are designed for Network embedding or Graph generation.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-25T18:19:02.103Z
Answers.LastActivityDate: 2020-05-26T19:44:30.120Z
Answers.LastEditDate: 2020-05-26T19:44:30.120Z
Answers.UserDisplayName: brazofuerte
Answers.Body: <p>There are types of neural networks designed exactly for that purpose. For example, <a href="https://arxiv.org/pdf/1609.02907.pdf" rel="nofollow noreferrer"><em>graph convolutional networks</em></a> (GCN) by Thomas N. Kipf. The input to the network will be a matrix of size <span class="math-container">$N \times F$</span>, where <span class="math-container">$N$</span> is the number of nodes and <span class="math-container">$F$</span> the number of features (for each node). You then can multiply the feature matrix with the adjacency matrix (each node is going to be a weighted sum of its first-degree neighbors). There are a lot of other variations, such as <a href="https://arxiv.org/pdf/1511.02136.pdf" rel="nofollow noreferrer"><em>diffusion convolutional networks</em></a>, <a href="https://arxiv.org/pdf/1511.05493.pdf" rel="nofollow noreferrer"><em>gated graph neural networks</em></a>, etc. There is a nice survey that describes most of the recent related work in the field <a href="https://arxiv.org/pdf/1812.08434.pdf" rel="nofollow noreferrer">Graph Neural Networks: A review of methods and applications</a> by Jie Zhou et al.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-06T12:10:41.107Z
Answers.Text: 'The input to the network will be a matrix of size NxF' of fixed size, i guess?
Answers.UserDisplayName: user8426627
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-07T08:44:37.547Z
Answers.Text: Yes, usually the input if fixed. Is that a problem for your setting?
Answers.UserDisplayName: razvanc92
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-06T06:20:05.690Z
Answers.LastActivityDate: 2019-07-06T12:42:08.420Z
Answers.LastEditDate: 2019-07-06T12:42:08.420Z
Answers.UserDisplayName: razvanc92
Body: <p>As far I know, the RNN accepts a sequence as input and can produce as a sequence as output.</p>
  
  <p>Are there neural networks that accept graphs or trees as inputs, so that to represent the relationships between the nodes of the graph or tree?</p>
  
Tags: <neural-networks><recurrent-neural-networks><geometric-deep-learning><graphs><graph-neural-networks>
Title: Are there neural networks that accept graphs or trees as inputs?
UserDisplayName: user8426627
ThreadText: # Are there neural networks that accept graphs or trees as inputs?
  
  (Asked by: username_0 on 2019-06-06)
  
  As far I know, the RNN accepts a sequence as input and can produce as a sequence as output.
  
  Are there neural networks that accept graphs or trees as inputs, so that to represent the relationships between the nodes of the graph or tree?
  
  **Tags:** neural-networks, recurrent-neural-networks, geometric-deep-learning, graphs, graph-neural-networks
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-04-25. Score: 2
  
  Yes, there are numerous, coming under the umbrella term [**Graph Neural Networks**](https://ai.stackexchange.com/questions/11169/what-is-a-graph-neural-network/20626#20626) (GNN).
  
  The most common input structures accepted by these techniques are the adjacency matrix of the graph (optionally accompanied by its node feature matrix and/or edge feature matrix, if the graph has such information).
  
  [A Comprehensive Survey on Graph Neural Networks](https://arxiv.org/abs/1901.00596), Wu et al (2019) divides GNN's into four subgroups:
  
  * Recurrent graph neural networks (RecGNN)
  * Convolutional graph neural networks (ConvGNN)
  * Graph autoencoders (GAE)
  * Spatial-temporal graph neural networks (STGNN)
  
  ConvGNN's can themselves be classified by whether they use Spectral methods or Spatial methods, and GAE's by whether they are designed for Network embedding or Graph generation.
  
  
  ---
  
  ### Answer by username_2 on 2019-06-06. Score: 1
  
  There are types of neural networks designed exactly for that purpose. For example, [*graph convolutional networks*](https://arxiv.org/pdf/1609.02907.pdf) (GCN) by Thomas N. Kipf. The input to the network will be a matrix of size $N \times F$, where $N$ is the number of nodes and $F$ the number of features (for each node). You then can multiply the feature matrix with the adjacency matrix (each node is going to be a weighted sum of its first-degree neighbors). There are a lot of other variations, such as [*diffusion convolutional networks*](https://arxiv.org/pdf/1511.02136.pdf), [*gated graph neural networks*](https://arxiv.org/pdf/1511.05493.pdf), etc. There is a nice survey that describes most of the recent related work in the field [Graph Neural Networks: A review of methods and applications](https://arxiv.org/pdf/1812.08434.pdf) by Jie Zhou et al.
  
  > **Comments:**
  > **username_0**: 'The input to the network will be a matrix of size NxF' of fixed size, i guess?  
  > **username_2**: Yes, usually the input if fixed. Is that a problem for your setting?  
  
  ---
  
  