# Design Optimization of Truss Structures Using a Graph Neural Network-Based Surrogate Model
## 3 Materials and Methods
### Graphs and Graph Neural Networks  
Graph neural networks represent a specialized category of artificial neural networks that are specifically engineered to leverage the benefits of data structured as a graph. This is applicable in two common scenarios: in some applications, the dataset is inherently organized as graphs, such as the data associated with molecules and physical systems. However, in other cases, graphs can be implicit and require structuring, such as word graphs for text interpretation [50]. Truss structures can be represented as graphs by considering the joints as vertices and the members as edges. Once the graph data are structured, the existing relationships within the graphs can be learned by establishing an optimal graph neural network architecture.  
Graphs serve as mathematical structures employed for modeling a group of objects along with their relationships. A graph is made up of a collection of vertices or nodes connected by edges or links. In this context, a graph can be denoted as \(G=(\textbf{X},\,\textbf{E})\), where **X** and **E** are node and edge features, respectively; \(\|\textbf{X}\|=N_{n}\) is the number of nodes; and \(\|\textbf{E}\|=N_{e}\) is the number of edges.  
Graphs can be classified based on several parameters, some of which are [50]:  
* **Directed or undirected graphs**. In directed graphs, directional dependencies exist between nodes, and edges only go from one node to another. In contrast, in undirected graphs, edges are considered undirected or bidirectional. Figure 2 illustrates examples of the two edge types.
* **Homogeneous or heterogeneous graphs**. Vertices and edges are of the same types in homogenous graphs, whereas they have different types in heterogenous graphs. The latter can be important information in further usage of the graph datasets.
* **Static or dynamic graphs**. The graph is regarded as dynamic when input features or graph configuration changes over time.  
The information storage capabilities of vertices and edges in a graph are sufficient for prediction tasks. Such tasks can fall into one of three categories: the node-level, edge-level, and graph-level prediction [50]:  
* **Node-level** prediction tasks revolve around node attributes and their roles within a graph. Node classification, node regression, and node clustering are examples of node-level prediction tasks. In node classification, nodes are categorized in a variety of predetermined classes. Node regression aims to predict continuous variables for each node. On the other hand, the goal of node clustering is to make groups of unlabeled nodes with similar attributes.
* **Edge-level** prediction tasks are edge classification, regression, and link prediction. Here, edge classification pertains to classifying edge types, while edge regression deals with continuous variables associated with edges. Link prediction involves determining the presence or absence of an edge between two given nodes.
* **Graph-level** prediction tasks seek to predict the properties of an entire graph, including graph classification, graph regression, and graph matching. While the notion of graph classification and regression mirrors that of other types of prediction tasks, the classes and continuous variables are now for the entire graph. Graph matching, meanwhile, aims to investigate the similarity of graphs.