Answers.Body: <p>You can flatten the graph into a matrix and then train it like a normal neural network input. Perhaps an adjacency graph or maybe simply a series of linear equations representing the nodes and convert it into matrix form.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-13T17:33:42.980Z
Answers.LastActivityDate: 2017-11-13T17:33:42.980Z
Answers.UserDisplayName: user3551708
Answers.Body: <p>If the circuit has only passive electronic components like resistor, capacitor or coil then ML can figure out their characters with sufficient training but if there are <strong>programmable</strong> active components like MCU/FPGA then it will be a tricky problem to solve.
  Even active components like transistors, SCR, TRIAC have well-defined response characteristics under a normal working condition, but programmable components could run different firmware and behave differently.</p>
  
  <p>I think you should see this as a time series problem where you will find out the possible output signal for a given component values in the mesh and the input signal parameters like Voltage and Current. </p>
  
  <p>And if your circuits are really big you might want to break it down into isolated sections, then run a model for each of them separately, feed the output of one model as input to next one and so on. I guess this is where you got the graph idea.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-15T16:40:00.600Z
Answers.LastActivityDate: 2017-09-15T16:40:00.600Z
Answers.UserDisplayName: Karan
Body: <p>In my application, I have inputs and outputs that could be represented as graphs. I have a number of acceptable pairs of input and output graphs. I want to use these to train a model.</p>
  
  <p>I am looking for pointers where simple examples of learning methods with graphs as input are discussed. Please note that the graph size is not fixed.</p>
  
  <p>A sample input is</p>
  
  <pre><code>Graph:
    Node A: Component X with parameter size = 12
    Node B: Component Y with parameter size = 30
    Node C: Component Y with parameter size = 30
    A connects to B
    A connects to C
  </code></pre>
  
  <p>Sample output:</p>
  
  <pre><code>Node A: x=0, y=0
  Node B: x=-21, y=0
  Node C: x=21, y=0
  </code></pre>
  
  <p>In this case, we expect the model to understand that input graph is symmetric and a particular way of arranging them is preferred. We want to train the model over a large set of such input-output pairs and then use it to generate output on new inputs.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-25T18:20:11.590Z
Comments.Text: Does this answer your question? [Are there neural networks that accept graphs or trees as inputs?](https://ai.stackexchange.com/questions/12712/are-there-neural-networks-that-accept-graphs-or-trees-as-inputs)
Comments.UserDisplayName: brazofuerte
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-15T09:18:33.480Z
Comments.Text: Could you elaborate on the problem you are trying to solve? What does your data represent?
Comments.UserDisplayName: Karan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-15T09:40:18.110Z
Comments.Text: The input graph represents a circuit - the nodes being components and nets/connections are the edges. I thought providing these details in the question might confuse people.
Comments.UserDisplayName: Suresh
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-15T09:50:58.180Z
Comments.Text: Very interesting problem, so you're trying to verify the circuit and component values or is it like auto routing the circuit copper track?
Comments.UserDisplayName: Karan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-15T13:30:53.750Z
Comments.Text: Mostly to infer patterns in the input, and to generate the an acceptable output which we think depends on these patterns.
Comments.UserDisplayName: Suresh
Tags: <neural-networks><machine-learning><models><graphs><graph-neural-networks>
Title: Machine learning with graph as input and output
UserDisplayName: Suresh
ThreadText: # Machine learning with graph as input and output
  
  (Asked by: username_0 on 2017-09-15)
  
  In my application, I have inputs and outputs that could be represented as graphs. I have a number of acceptable pairs of input and output graphs. I want to use these to train a model.
  
  I am looking for pointers where simple examples of learning methods with graphs as input are discussed. Please note that the graph size is not fixed.
  
  A sample input is
  
  ```
  Graph:
    Node A: Component X with parameter size = 12
    Node B: Component Y with parameter size = 30
    Node C: Component Y with parameter size = 30
    A connects to B
    A connects to C
  
  ```
  
  Sample output:
  
  ```
  Node A: x=0, y=0
  Node B: x=-21, y=0
  Node C: x=21, y=0
  
  ```
  
  In this case, we expect the model to understand that input graph is symmetric and a particular way of arranging them is preferred. We want to train the model over a large set of such input-output pairs and then use it to generate output on new inputs.
  
  **Tags:** neural-networks, machine-learning, models, graphs, graph-neural-networks
  
  > **Comments:**
  > **username_2**: Could you elaborate on the problem you are trying to solve? What does your data represent?  
  > **username_0**: The input graph represents a circuit - the nodes being components and nets/connections are the edges. I thought providing these details in the question might confuse people.  
  > **username_2**: Very interesting problem, so you're trying to verify the circuit and component values or is it like auto routing the circuit copper track?  
  > **username_0**: Mostly to infer patterns in the input, and to generate the an acceptable output which we think depends on these patterns.  
  > **username_1**: Does this answer your question? [Are there neural networks that accept graphs or trees as inputs?](https://ai.stackexchange.com/questions/12712/are-there-neural-networks-that-accept-graphs-or-trees-as-inputs)  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2017-11-13. Score: 3
  
  You can flatten the graph into a matrix and then train it like a normal neural network input. Perhaps an adjacency graph or maybe simply a series of linear equations representing the nodes and convert it into matrix form.
  
  
  ---
  
  ### Answer by username_2 on 2017-09-15. Score: 0
  
  If the circuit has only passive electronic components like resistor, capacitor or coil then ML can figure out their characters with sufficient training but if there are **programmable** active components like MCU/FPGA then it will be a tricky problem to solve.
  Even active components like transistors, SCR, TRIAC have well-defined response characteristics under a normal working condition, but programmable components could run different firmware and behave differently.
  
  I think you should see this as a time series problem where you will find out the possible output signal for a given component values in the mesh and the input signal parameters like Voltage and Current.
  
  And if your circuits are really big you might want to break it down into isolated sections, then run a model for each of them separately, feed the output of one model as input to next one and so on. I guess this is where you got the graph idea.
  
  
  ---
  
  