# DTL-GNN: Digital Twin Lightweight Method Based on Graph Neural Network
## 3 Virtual Model Lightweight Approach
### Method Main Process
During product development and debugging, the model objects are mostly independent mechatronic devices whose end effectors are relatively

Figure 4: (**a**) Importance sampling (adjacent nodes have eight different degrees); (**b**) Schematic diagram of node confidence judgment. Figure 5: Diagram neural network model building process. important. When facing intelligent management projects, their models are primarily large-scale models. The equipment in the model's center, such as mechanical arms and machine tools, is relatively critical in factories. Therefore, the Adaptation Function is proposed to improve the generalization of DTL-GNN. When DTL-GNN is applied to large-scale models, the Adaptation Function will increase the structural weight of the center node. When facing independent mechanical products, the Adaptation Function will increase the structural weight of its end parts. The node step matrix D, as an input to the fitness function, reflects the distance of a node from the center node and consists of n elements. This matrix is articulated through Equations (8) and (9). \[D=[d_{1},d_{2},d_{3},\ldots,d_{n}] \tag{8}\]

\[d_{i}=-\ln(\frac{step_{i}}{step_{max}}) \tag{9}\]

Based on the Deep First Search (DFS), the association network's center node is searched, the longest chain in the graph is found, and then its center point is taken as the center node of the graph. The Adap(\(D\)) contains three parameters: \(q\), \(\gamma\), and \(l\). \(\gamma\) is assigned the value of 1 when facing the center model, and \(\gamma\) is \(-1\) when facing the end model. \(q\) and \(l\) are the multiplicative coefficients in the transverse and longitudinal directions of the function, respectively, as shown in Equation (10). \[w=\text{Adap}(d_{i})=\gamma q(e^{-ld_{i}}-e^{ld_{i}}) \tag{10}\]

\[v=10^{[\log_{10}^{\frac{mm(h_{att})}{mm(h_{attmc})}}]} \tag{11}\]

\[M=\mathbf{h}_{att}\times v+\mathbf{h}_{struc}\times w \tag{12}\]

The Adaptation Function updates the parameters through the neural network and generates the weight matrix \(W=[w_{1},w_{2},w_{3},\ldots,w_{n}]\). To avoid an order of magnitude difference between the two embedding vectors, a parameter \(\
u\) is introduced to unify the magnitude of the two embedding vectors, as shown in Equation (11). Finally, a multi-source matrix \(M\) is generated as input to the classification model for classification prediction, as shown in Equation (12). ### Classification Iterative Model

The workflow of the Classification model is shown in Figure 6. Firstly, D and initialized \(q\), \(l\), and \(\gamma\) are used as inputs and hyperparameters of the Adap(\(D\)). Then, two embeddings are synthesized based on the weight matrix to generate multi-source embeddings M. After that, the Embedding-Classifier classifies M, and the accuracy score is derived as the supervisory index of Regression-Net to update the model parameters. Embedding-Classifier contains a fully connected layer with cross-entropy as the loss function. Regression-Net consists of three linear layers corresponding to \(q\), \(\gamma\), and \(l\), respectively, with mean square error as the loss function. Both use stochastic gradient descent to optimize the parameters. Regression-Net computes predicted values for \(q\), \(\gamma\), and \(l\) in each epoch through forward propagation. These predictions are then used to calculate the weight matrix \(W\) for multi-source embedding. Subsequently, classification is performed by Embedding-Classifier, and the accuracy score is calculated; the accuracy score is used for supervised loss by comparing it with the target value target. ### Simplification Methods

Based on structural hierarchy and attribute information classification, prediction labels are assigned to corresponding parts, and different simplification methods are assigned to them. Parts with high importance use more conservative parameters and simplification methods, while nonimportant parts prioritize reducing their storage space for ultimate simplification.