## 2 Related Methods  
### Graph Neural Networks  
Graph neural networks (GNNs) [14] are a type of deep learning model used for processing graph-structured data. The core idea of GNNs is to learn representations for each node by propagating and aggregating information from the nodes and edges of the graph. GNNs can automatically learn complex relationships between nodes and the global structure of a graph without relying on manually engineered feature engineering. Due to their strong performance, interpretability, and powerful expressive capabilities for graph structures, GNNs have recently emerged as a practical method for graph analysis. They are widely applied in various domains such as social network analysis, recommendation systems, image and vision tasks, molecular chemistry, text and natural language processing, and more.  
A graph is composed of many nodes and edges, and each node is defined by its own characteristics and the characteristics of the nodes connected to it. When we visualize the syntax tree, it becomes a graph, as shown in Figure 1. The structural information of the syntax tree can be extracted by traversing the input syntax tree graph structure using a GNN. Nodes are established to represent each word or piece of punctuation in the input, and edges represent the relationships between them. GNNs can extract the dependency relationship between different nodes in the syntax tree and effectively encode the structure information of the syntax tree into a vector, facilitating better integration into the neural machine translation model. A graph can be represented by a set \(V\) of vertices or nodes and a set \(E\) of edges, namely:  
\[G=(V,E) \tag{1}\]  
where \(v_{i}\) belongs to \(V\) to represent a node, and \(e_{ij}\) represents an edge from \(v_{j}\) to \(v_{i}\), as shown in Figure 2. \(e_{ij}=(v_{i},v_{j})\in E\). \(A\) is an adjacency matrix and \(A\in R^{n\times n}\), when \(e_{ij}\in E\), then \(A_{ij}=1\); when \(e_{ij}\
otin E\), then \(A_{ij}=0\).  
A GNN iteratively updates the feature vectors of nodes. In each iteration, the feature vector of a node interacts and aggregates information with the feature vectors of its neighboring nodes to capture the dependency relationships between nodes. The model formula expression for a GNN is as follows:  
In each iteration, for node \(v\), its updated feature vector can be expressed as:  
\[h_{v}^{(t+1)}=\text{AGGREGATE}\Big{\{}f(h_{v}^{(t)}+N_{v})\Big{\}} \tag{2}\]  
Figure 2: Schematic diagram of edges and nodes of syntactic tree graph.  
\[N_{v}=\sum_{j\in N_{i}}W_{j}\bullet x_{j} \tag{3}\]  
Among them, \(h_{v}^{(t)}\) represents the feature vector of node \(v\) after the \(t\)-th round of iterations, and \(N_{v}\) represents the feature vector set of neighbor nodes of node \(v\). \(x_{j}\) represents the feature vector of the \(j\)-th neighbor node, and \(W_{j}\) is the weight matrix. AGGREGATE represents an aggregation operation, the purpose being to merge the information of neighbor nodes into the feature vector of node \(v\) to reflect the relationship between node \(v\) and its neighbor nodes. \(f\) represents an update function used to update the feature vector of node \(v\), with which can interact and aggregate information between the feature vector of node \(v\) and the feature vectors of its neighbor nodes. The illustration of GNN aggregation operation is shown in Figure 3.  
Using multiple iterations, the GNN model can progressively update the feature vectors of nodes and extract information between different nodes in the syntactic tree.