Graph neural network interpretability method, system and equipment for defect detection and medium

By employing random annealing and reinforcement pruning strategies, the interpretability and computational efficiency of graph neural networks in semiconductor defect detection are improved. This solves the problems of finding the global optimal solution and efficient computation in existing technologies, and enables efficient graph data analysis.

CN121788481APending Publication Date: 2026-04-03ZHEJIANG LINYAN PRECISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-04-03

Smart Images

  • Figure CN121788481A_ABST
    Figure CN121788481A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of graph neural networks, in particular to a graph neural network interpretability method, system and device for defect detection and a medium. The method comprises the following steps: firstly, constructing a semiconductor graph according to acquired industrial semiconductor data; the features are embedded into different types of nodes, and a semiconductor graph neural network is constructed; secondly, initializing interpretable model parameters of the semiconductor graph neural network; then, a random annealing algorithm is called to generate candidate nodes, marginal gains are calculated, and an approximately globally optimal explanatory subgraph is obtained; and finally, calling a pruning algorithm, predicting explanatory scores of the nodes, and filtering until the loss function converges to obtain a trained global model. And the interpretability is improved, and meanwhile, the approximation of a global optimal solution and a higher convergence speed are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of graph neural network technology, and more specifically, to a graph neural network interpretability method, system, device, and medium for defect detection. Background Technology

[0002] Currently, Graph Neural Networks (GNNs) have become an important deep learning tool in industrial semiconductor analysis, widely used in semiconductor defect analysis, semiconductor defect detection, and semiconductor performance prediction. GNNs can effectively capture the topological relationships between nodes in semiconductor material structures, such as atoms, defects, and dopant elements, and identify complex interaction patterns in the graph, demonstrating powerful data representation capabilities. However, with the widespread application of GNNs in industrial semiconductors, their "black box" characteristics have increasingly attracted attention, especially in fields such as industrial semiconductor manufacturing and defect analysis where high model interpretability is required. Improving the interpretability of GNNs has become a key issue.

[0003] To address the limitations of graph neural network interpretability methods in complex tasks, researchers have begun exploring approaches combining heuristic search and machine learning, attempting to find a balance between interpretability and efficiency. Heuristic search methods, such as Monte Carlo Tree Search (MCTS) and greedy algorithms, find interpretable subgraphs by simulating random paths, which can avoid local optima to some extent. However, these methods often suffer from high computational complexity and slow convergence speed when dealing with large-scale semiconductor graph tasks, making them difficult to adapt to diverse semiconductor graph data. In contrast, machine learning-based methods transform discrete problems into continuous, differentiable optimization problems, typically solved using gradient descent. However, since the problem space is usually non-convex, gradient descent is prone to getting trapped in local optima, making it difficult to guarantee finding the globally optimal interpretation. In specific applications of semiconductor graph neural network interpretability problems, heuristic search can provide a good global approximation, but it is inefficient on large-scale graphs; machine learning methods, while computationally efficient, are limited in their performance on non-convex problems.

[0004] With the rapid development of industrial big data technology, existing GNN interpretability methods have gradually revealed their shortcomings. For example, when dealing with large-scale and complex semiconductor defect data and material microstructure relationships, existing methods struggle to efficiently reveal the specific impact of key defect types or dopant elements on material properties. Furthermore, these methods are inadequate in handling data heterogeneity and diversity, resulting in interpretable results that are not intuitive or reliable in practical applications such as semiconductor manufacturing and reliability analysis. In summary, limited by the complexity of semiconductor material structures and the sheer volume of data, existing methods cannot guarantee a globally optimal solution and cannot achieve ideal interpretability in complex tasks involving semiconductor GNN models.

[0005] To address the limitations of interpretability methods for semiconductor graph neural networks (GNNs) in complex tasks, researchers have begun exploring more advanced interpretability techniques. These include multi-level combinations of instance-level and model-level methods, and structured interpretation methods tailored to the specific structures and defect mechanisms of semiconductor materials. These new methods attempt to provide more detailed explanations by identifying key subgraph structures and visualizing complex microscopic material interactions. However, in practice, these methods are prone to getting stuck in local optima due to non-convex optimization problems. Furthermore, when processing large-scale semiconductor device structure graphs, computational efficiency issues arise, hindering effective scaling to industrial applications. Therefore, improving computational efficiency while maintaining interpretability has become a significant challenge in semiconductor GNN interpretability research. Summary of the Invention

[0006] This invention addresses the problems of existing interpretability methods being prone to getting trapped in local optima and having slow convergence speed. It proposes a graph neural network interpretability method, system, device, and medium for defect detection. First, a semiconductor graph is constructed based on the acquired data; features are then embedded into different types of nodes to build a semiconductor graph neural network. Second, the interpretability model parameters of the semiconductor graph neural network are initialized. Then, a random annealing algorithm is called to generate candidate nodes and calculate the marginal gain, obtaining an approximately globally optimal interpretable subgraph. Finally, a pruning algorithm is called to predict the interpretability scores of nodes and filter them until the loss function converges, resulting in a trained global model. This improves interpretability while ensuring proximity to the global optimum and a higher convergence speed.

[0007] The specific implementation details of this invention are as follows: An interpretability method for graph neural networks used in defect detection includes the following steps: Step S1: Construct a semiconductor diagram based on the type of semiconductor data acquired and the information affecting the band structure; Step S2: Train a graph neural network based on the constructed semiconductor graph, embed features into different types of nodes, and construct a semiconductor graph neural network; Step S3: Initialize the interpretability model parameters of the semiconductor graph neural network; Step S4: Use the random annealing algorithm to generate candidate nodes and calculate the marginal gain to obtain an interpretive subgraph that is approximately globally optimal; Step S5: Call the pruning algorithm to predict the interpretability score of the node and filter it; Step S6: Repeat steps S2-S5 until the loss function converges, and obtain the trained global model.

[0008] To better realize the present invention, step S1 further includes the following steps: Step S11: Acquire semiconductor data, and obtain the data type of the semiconductor data and information affecting the band structure; Step S12: Represent semiconductor data of different data types as different types of nodes and use information that affects the band structure as edges to construct a semiconductor graph structure.

[0009] To better realize the present invention, step S2 further includes the following steps: Step S21: Invoke the graph neural network to embed features of different types of nodes and capture the structural relationships between nodes; Step S22: Calculate the classification error by calling the cross-entropy loss function and call the consistency regularization output to construct the semiconductor graph neural network.

[0010] To better realize the present invention, the interpretability model parameters in step S3 further include the parameters of random annealing and the parameters of reinforcement pruning; The parameters of the random annealing include the initial temperature, cooling factor, and initial acceptance probability constant; The parameters for reinforcement pruning include the learning rate of the policy network, the size of the action space, and the initial policy network parameters.

[0011] To better realize the present invention, step S4 further includes the following steps: Step S41: Call the random annealing algorithm to generate candidate nodes; Step S42: Calculate the marginal gain of the candidate node based on the candidate node, the interpretability score of the current subgraph, and the interpretability score after adding the candidate node; Step S43: Calculate the selection probability of a candidate node based on the marginal gain and the number of candidate nodes; Step S44: Converge to the global optimum based on the set temperature control factor to obtain an interpretive subgraph that is approximately globally optimal.

[0012] To better implement the present invention, step S41 further includes the following steps: Step S411: Select basic nodes as candidate nodes according to the set ratio; Step S412: Use the random annealing algorithm to anneal the elements in the candidate nodes and generate new candidate nodes.

[0013] To better realize the present invention, step S5 further includes the following steps: Step S51: Call the reinforcement pruning algorithm and predict the interpretability score of candidate nodes according to the set training policy network to obtain a subgraph with high interpretability. Step S52: Model the pruning process as a Markov decision process, select the optimal action based on the marginal gain, and filter out nodes whose interpretability scores are lower than a set threshold.

[0014] Based on the above-mentioned graph neural network interpretability method for semiconductor defect detection, in order to better realize the present invention, a graph neural network interpretability system for defect detection is further proposed, which is used to execute the above-mentioned graph neural network interpretability method for semiconductor defect detection; including a construction unit, an initialization unit, an annealing unit, a pruning unit, and a training unit; The construction unit is used to construct a semiconductor graph based on the acquired semiconductor data, using atoms of the semiconductor data as nodes and chemical bonds or adjacency relationships as edges; and to train a graph neural network based on the constructed semiconductor graph, embedding features into different types of nodes to construct a semiconductor graph neural network. The initialization unit is used to initialize the interpretability model parameters of the semiconductor graph neural network; The annealing unit is used to call the random annealing algorithm to generate candidate nodes and calculate the marginal gain to obtain an interpretable subgraph that is approximately globally optimal. The pruning unit is used to invoke the pruning algorithm to predict the interpretability score of the node and filter it. The training unit is used to iterate until the loss function converges, thus obtaining a fully trained global model.

[0015] Based on the above-mentioned graph neural network interpretability method for defect detection, in order to better realize the present invention, an electronic device is further proposed, including a memory and a processor; the memory stores a computer program; when the computer program is executed on the processor, the above-mentioned graph neural network interpretability method for defect detection is implemented.

[0016] Based on the above-mentioned interpretability method of graph neural network for defect detection, in order to better realize the present invention, a computer-readable storage medium is further proposed, wherein computer instructions are stored on the computer-readable storage medium; when the computer instructions are executed on the above-mentioned electronic device, the above-mentioned interpretability method of graph neural network for defect detection is realized.

[0017] The present invention has the following beneficial effects: (1) This invention significantly improves the efficiency of graph neural networks (GNNs) in interpretability tasks and their ability to approximate the global optimum based on random annealing and reinforcement pruning strategies. In each iteration, feasible solutions are randomly generated by calculating the marginal gain probability, i.e., the selection probability, of each candidate element; as the temperature gradually decreases, the Metropolis criterion is applied to achieve the transition from extensive search to gradual convergence. At the same time, the policy network is trained through reinforcement learning pruning strategies to filter subgraphs with low interpretability scores, thereby converging to an approximate global optimum in a shorter time.

[0018] (2) The present invention has shown superior performance to existing technologies in small-scale graph tasks such as molecular structure classification and large-scale graph tasks such as industrial semiconductor defect detection, significantly improving the accuracy and efficiency of GNN interpretive tasks.

[0019] (3) In experiments, the present invention has shown significant advantages over the existing state-of-the-art baseline models in terms of interpretation quality and time efficiency, making it suitable for complex graph data analysis tasks and having good practicality. Attached Figure Description

[0020] Figure 1 The flowchart illustrates the interpretability method of the graph neural network for semiconductor defect analysis provided by this invention.

[0021] Figure 2 This is a schematic diagram illustrating the principles of interpretability methods for different types of graph neural networks.

[0022] Figure 3 This is a schematic diagram illustrating the principles of random annealing, enhanced pruning, and reward mechanisms. Detailed Implementation

[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments, and therefore should not be regarded as a limitation on the scope of protection. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "set up," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0025] Example 1: This embodiment proposes a graph neural network interpretability method for defect detection, which specifically includes the following steps: Step S1: Construct a semiconductor diagram based on the type of semiconductor data obtained and the information affecting the band structure.

[0026] Step S1 specifically includes the following steps: Step S11: Acquire industrial semiconductor data, and obtain the data type of the industrial semiconductor data and information affecting the band structure; Step S12: Represent industrial semiconductor data of different data types as different types of nodes and use information that affects the band structure as edges to construct a semiconductor graph structure.

[0027] Step S2: Train a graph neural network based on the constructed semiconductor graph, embed features into different types of nodes, and construct a semiconductor graph neural network.

[0028] Step S2 specifically includes the following steps: Step S21: Invoke the graph neural network to embed features of different types of nodes and capture the structural relationships between nodes; Step S22: Calculate the classification error by calling the cross-entropy loss function and call the consistency regularization output to construct the semiconductor graph neural network.

[0029] Step S3: Initialize the interpretability model parameters of the semiconductor graph neural network.

[0030] The interpretability model parameters mentioned in step S3 include the parameters of random annealing and the parameters of reinforcement pruning; The parameters of the random annealing include the initial temperature, cooling factor, and initial acceptance probability constant; The parameters for reinforcement pruning include the learning rate of the policy network, the size of the action space, and the initial policy network parameters.

[0031] Step S4: Call the random annealing algorithm to generate candidate nodes and calculate the marginal gain to obtain an interpretive subgraph that is approximately globally optimal.

[0032] Step S4 specifically includes the following steps: Step S41: Call the random annealing algorithm to generate candidate nodes; Step S41 specifically includes the following steps: Step S411: Select basic nodes as candidate nodes according to the set ratio; Step S412: Use the random annealing algorithm to anneal the elements in the candidate nodes and generate new candidate nodes.

[0033] Step S42: Calculate the marginal gain of the candidate node based on the candidate node, the interpretability score of the current subgraph, and the interpretability score after adding the candidate node; Step S43: Calculate the selection probability of a candidate node based on the marginal gain and the number of candidate nodes; Step S44: Converge to the global optimum based on the set temperature control factor to obtain an interpretive subgraph that is approximately globally optimal.

[0034] Step S5: Call the pruning algorithm to predict the interpretability score of the node and filter it.

[0035] Step S5 specifically includes the following steps: Step S51: Call the reinforcement pruning algorithm and predict the interpretability score of candidate nodes according to the set training policy network to obtain a subgraph with high interpretability. Step S52: Model the pruning process as a Markov decision process, select the optimal action based on the marginal gain, and filter out nodes whose interpretability scores are lower than a set threshold.

[0036] Step S6: Repeat steps S2-S5 until the loss function converges, and obtain the trained global model.

[0037] Working Principle: This embodiment first trains a graph neural network based on a semiconductor graph to obtain a semiconductor graph neural network. Then, using the random annealing algorithm, the selection probability of candidate nodes is controlled by gradually decreasing the temperature, transitioning from a broad search at high temperatures to convergence at low temperatures, resulting in a near-globally optimal interpretable subgraph. A policy network is trained based on a reinforcement learning pruning strategy. This policy network predicts the interpretability scores of nodes and prunes nodes with scores below a threshold, thereby selecting subgraphs with higher interpretability from the solution space. This embodiment demonstrates significant advantages in interpretation quality and time efficiency, significantly improving the accuracy and efficiency of GNN interpretability tasks, making it better suited for complex graph data analysis tasks, and ensuring the approximation of the global optimum and higher convergence speed while improving interpretability.

[0038] Example 2: This embodiment is based on the above embodiment 1, such as... Figure 1 , Figure 2 , Figure 3 As shown, a specific embodiment will be described in detail.

[0039] Step S1: Construct a semiconductor graph, using atoms in industrial semiconductor data as nodes, chemical bonds or adjacency relationships as edges, and combining lattice parameters and material properties as features of nodes and edges; The specific operation of step S1 is as follows: Construct a semiconductor graph, select the main data types in the data, such as material atoms, dopant elements, defect types, crystal structure units, etc., and represent them as different node types. Then, based on information such as the bonding relationship between atoms, the correlation between defects and material properties, and the influence of dopant elements on the band structure, construct the edge relationships between nodes to form a complete semiconductor graph structure.

[0040] Step S2: Train a graph neural network based on the semiconductor graph, embed the features of different types of nodes using the graph neural network, capture the structural relationships between nodes for defect detection, and construct the semiconductor graph neural network; The specific operation of step S2 is as follows: a semiconductor graph neural network is trained; after constructing the semiconductor graph, the features of different types of nodes are embedded using the graph neural network GNN to capture the structural relationships between nodes, the classification error is calculated using the cross-entropy loss function, and consistency regularization is used to ensure the consistency of the model output on perturbed data. The model parameters are updated through multiple rounds of iteration, so that the constructed semiconductor graph neural network can effectively capture and express the complex relationships in semiconductor data.

[0041] Step S3: Initialize the interpretability model parameters of the semiconductor graph neural network, including the parameters for random annealing and the parameters for reinforcement pruning.

[0042] Specifically, based on the semiconductor graph neural network obtained in step S2, the interpretability model parameters of the semiconductor graph neural network are initialized, including the parameters of random annealing, namely the initial temperature, cooling factor and initial acceptance probability constant, as well as the learning rate, action space size and initial policy network parameters of the reinforcement pruning policy network. In step S3, the parameters of the random annealing include the initial temperature, cooling factor, and initial acceptance probability constant, and the parameters of the reinforcement pruning include the learning rate of the policy network, the size of the action space, and the initial policy network parameters.

[0043] Step S4: Using the random annealing algorithm, by gradually reducing the temperature, the selection probability of candidate nodes is controlled, and the extensive search in the high-temperature stage is gradually transitioned to the convergence in the low-temperature stage, so as to obtain an interpretable subgraph that is close to the global optimum.

[0044] In step S4, nodes with strong interpretability are selected based on the selection probability, and nodes are gradually selected according to the Metropolis criterion during the high-temperature stage.

[0045] In step S4, basic nodes are selected proportionally to reach the number of candidate nodes required for the current optimization process; then, using the marginal gain of the candidate nodes as input, annealing is performed on them through a temperature control function to obtain the selection probability of new candidate nodes; the temperature control function is:

[0046] Wherein: T i The temperature after the i-th iteration; T i-1 The temperature after the (i-1)th iteration; α is the temperature control factor.

[0047] The formula for calculating the marginal gain of the candidate node is:

[0048] Where: r i,j Let be the marginal gain of the j-th candidate node; G i,j-1 Indicates the current subgraph; e j Indicates candidate nodes; The explanatory score for the current subgraph; The new explanatory score after adding the node; The formula for calculating the selection probability of a candidate node is:

[0049] Where: B is the total number of candidate nodes.

[0050] Step S5: Train the policy network based on the reinforcement learning pruning strategy. During the reinforcement learning process, the parameters of the policy network are gradually optimized to improve the expected value of the cumulative reward. The marginal gain and interpretability score of the nodes are used as reward signals. The policy network is used to predict the interpretability score of the nodes and prune the nodes with scores below the threshold, thereby selecting subgraphs with higher interpretability in the solution space.

[0051] In step S5, the pruning process is modeled as a Markov decision process, and the optimal action is selected based on the marginal gain of each node, thereby gradually filtering out explanatory nodes with scores below the threshold.

[0052] Step S6: Repeat steps S2-S5 until the loss function converges to obtain the global model of the trained semiconductor graph neural network, which can then be used to handle the semiconductor graph defect analysis task.

[0053] This embodiment controls the randomness of the search process by adjusting the annealing temperature, gradually transitioning from a broad search at high temperatures to convergence at low temperatures. This design reduces randomness by dynamically adjusting the temperature, allowing the model to fully explore the possible solution space in the early stages and focus more on fine-tuning the current best solution in the later stages, thus ensuring the approximation of the global optimum. Furthermore, the introduction of enhanced pruning strategies reduces redundant nodes in the search space, further improving the overall convergence speed and computational efficiency.

[0054] Preferably, the Random Annealing (RA) algorithm uses the marginal gain of candidate nodes as input and performs annealing calculations using a temperature control function to obtain the selection probability of new candidate nodes. The process of generating candidate nodes using the Random Annealing (RA) algorithm is as follows: 1) Select base nodes proportionally to achieve the number of candidate nodes required for the current optimization process; 2) Annealing is performed on each element in the candidate nodes using RA to obtain new candidate node selection probabilities. During training, forward propagation calculates the feature map that matches each input using the generated candidate nodes, while in backpropagation, only the basic nodes existing in the initial graph neural network are updated, and the generated candidate nodes are not updated.

[0055] Preferably, the random annealing algorithm formula of this embodiment is used to describe the method for calculating the marginal gain. In each iteration, the probability of selecting a node is based on its marginal gain definition, as shown in the following formula:

[0056] in, r i,j For the first j The marginal gain of each candidate node. This marginal gain value is calculated as the difference between the interpretability score (fidelity, a common scoring criterion in GNN interpretability) of the current subgraph and the new interpretability score after adding the node. B This represents the total number of candidate nodes. Specifically, the marginal gain... r i,j The calculation formula is:

[0057] in, G i,j-1 Indicates the current subgraph. e jThis represents a candidate node. Through a probabilistic selection mechanism based on marginal gain, this embodiment effectively selects nodes that offer greater improvement in model interpretability in each iteration, further enhancing the quality of interpretability.

[0058] Preferably, the reinforcement pruning strategy in this embodiment uses a neural network to predict the interpretability score of the current candidate node, which serves as the pruning basis. By utilizing a pre-trained policy network to predict the importance score of a node, nodes with scores below a threshold are pruned, thereby reducing the search space. Specifically, in each iteration, the policy network uses the node's marginal gain and interpretability score as reward signals to guide the model to retain only candidate nodes with potentially high interpretability, making the subsequent annealing process more efficient.

[0059] Preferably, the random annealing strategy in this embodiment uses a gradually decreasing temperature for search control. In each iteration, the temperature T is determined according to the formula:

[0060] in: T i The temperature after the i-th iteration; T i-1 For the first i Temperature after -1 iteration; α is a temperature control factor used to lower the temperature after each iteration, allowing the search to gradually converge from extensive exploration to an approximate global optimum, preventing exponential operations from causing some nodes to have a zero selection probability. This gradual temperature reduction process allows the model to perform a wider search during the high-temperature phase, avoiding getting trapped in local optima. During the low-temperature phase, the search gradually converges, achieving a more refined adjustment. This temperature control method effectively combines exploration and convergence characteristics, thus ensuring the approximation of the global optimum.

[0061] This embodiment significantly improves interpretability and efficiency on large-scale graph tasks by fusing reinforcement learning and annealing strategies. During model building, each iteration adjusts the temperature and pruning threshold based on the interpretability score, and through multiple iterations of optimization, a global model is finally obtained when the loss function converges.

[0062] This embodiment not only overcomes the convergence speed problem of traditional heuristic methods, but also avoids the local optimum dilemma of gradient-based machine learning methods, especially showing excellent computational efficiency and interpretability when processing large-scale graph data.

[0063] This embodiment calculates the marginal gain of candidate nodes using a random annealing algorithm in each iteration and progressively selects nodes according to the Metropolis criterion. Simultaneously, it employs a reinforcement pruning strategy to predict the interpretability score of nodes and filter out low-scoring nodes. This embodiment effectively addresses the local optima problem inherent in traditional GNN interpretability methods for large-scale graph tasks, improving convergence speed. In the initial stage, this embodiment explores the global space at high temperatures, gradually reducing the temperature to achieve convergence. Combined with reinforcement learning for effective pruning, it reduces the search space, further improving model computational efficiency and the quality of interpretability results. In this way, this embodiment ensures proximity to the global optimum while significantly improving the model's interpretability and processing efficiency in large-scale graph tasks.

[0064] In this embodiment, publicly available semiconductor datasets were selected, and experiments were conducted on two tasks: semiconductor intrinsic defect detection and semiconductor foreign impurity defect detection. The former includes defect types such as vacancies, self-interstitials, and inversion sites, with five different charge states calculated for each defect. The latter includes 77 possible impurity atoms occupying five different point defect locations, totaling 12,474 possible defects. These datasets were chosen to evaluate the performance of the proposed method in large-scale graph neural network interpretability tasks.

[0065] In the two tasks of semiconductor intrinsic defect detection and semiconductor foreign impurity defect detection, this embodiment combines random annealing and reinforcement pruning strategies, and selects the Crystal Graph Convolutional Neural Network (CGCNN) model to adapt to the characteristics of industrial semiconductor defect detection tasks.

[0066] To verify the effectiveness of this embodiment in semiconductor graph neural networks, as shown in Table 1, compared with six existing benchmark GNN interpretability methods, this embodiment demonstrates significant advantages in positive fidelity and stability, while also exhibiting a shorter convergence time. As shown in Table 2, in the semiconductor foreign impurity defect task, this embodiment outperforms other methods in positive fidelity, negative fidelity, and stability, while maintaining high efficiency in terms of time. Overall, this embodiment demonstrates higher positive fidelity and stability across various tasks, while significantly reducing computation time, highlighting its superiority in industrial semiconductor-related graph neural network tasks.

[0067] Table 1. Experimental results on GNN interpretability for semiconductor intrinsic defect detection tasks.

[0068] Table 2. Experimental results on GNN interpretability for the semiconductor foreign impurity defect task.

[0069] Working Principle: The random annealing algorithm in this embodiment selects candidate elements based on marginal gain probability (selection probability) and gradually reduces the temperature, achieving a convergence process from extensive exploration to near-global optimum. Compared to existing methods that rely solely on machine learning to transform discrete problems into continuous optimization problems, this embodiment better avoids getting trapped in local optima and provides explanations closer to the global optimum. The reinforcement learning pruning strategy in this embodiment uses a neural network model to predict the interpretability score (fidelity) of each candidate subgraph, employing common scoring criteria in GNN interpretability, and filters out explanations with lower scores based on expected rewards. During the search process, reinforcement learning is used to prune, narrowing the solution space of the combinatorial optimization problem, accelerating the convergence process, and improving the efficiency of the explanation task. Unlike traditional greedy pruning methods, this embodiment improves time efficiency while ensuring the quality and accuracy of the explanation. Figure 2 As shown, Figure 2 In the diagrams (a), (b), and (c), we can see the schematics of the GNN interpretable method based on machine learning, the GNN interpretable method based on heuristic search, and the interpretable method of this embodiment, respectively.

[0070] like Figure 2 As shown in (a) of the figure, machine learning-based GNN interpretability methods solve discrete combinatorial optimization problems by transforming them into continuously differentiable problems. However, since such problems are typically non-convex, commonly used gradient descent algorithms are prone to getting trapped in local optima. The dashed circles in the figure indicate that these methods can only approximate the optimal solution within a certain range, but cannot guarantee proximity to the global optimum.

[0071] like Figure 2 As shown in (b), heuristic search-based GNN interpretability methods, such as Monte Carlo Tree Search (MCTS), can effectively avoid getting trapped in local optima by repeatedly exploring local random paths to find the optimal subgraph. However, as the graph size increases, the number of branches in the search tree grows exponentially, causing these methods to exhibit low convergence efficiency in large-scale graph tasks. The figure uses an extended tree structure to represent the search process of the heuristic search method; although it can approach the global optimum, its efficiency is affected.

[0072] like Figure 2As shown in (c), this embodiment combines the advantages of machine learning and heuristic search based on the random annealing method, exhibiting significant advantages in global optimum approximation and convergence efficiency, thus improving the efficiency and global optimum approximation capability of graph neural networks in interpretability tasks. First, candidate elements are selected using the Random Annealing algorithm, with the selection probability calculated based on marginal gain in each iteration. By gradually decreasing the temperature and introducing the Metropolis criterion, random annealing achieves a process from extensive exploration to gradual convergence, ultimately approaching the global optimum. Furthermore, random annealing introduces a reinforcement pruning strategy, using the predicted interpretability score of the subgraph as a reward. Pruning reduces the solution space for solving combinatorial optimization problems, accelerating convergence. The policy network of the random annealing proposed in this embodiment demonstrates that effective pruning of the search space through reinforcement learning improves the algorithm's efficiency.

[0073] like Figure 3 As shown, Figure 3 (a) in the diagram describes the random annealing process, demonstrating the selection process of candidate nodes at different temperatures. As the temperature gradually decreases, the system transitions from random exploration to the convergence phase, eventually approaching the global optimum. Figure 3 (b) in the figure demonstrates the process of predicting the importance of nodes through a policy network, using reinforcement learning to prune and select the subgraph nodes that are most likely to be close to the global optimum, thereby effectively reducing the search space. Figure 3 Section (c) summarizes the reward mechanism of the entire reinforcement pruning process. The reinforcement learning policy network evaluates and predicts which nodes contribute the most to interpretability based on their reward scores. This embodiment combines annealing and reinforcement learning, demonstrating that reinforcement annealing exhibits higher efficiency and accuracy in finding the optimal solution for interpretability in graph neural networks (GNNs).

[0074] Specifically, in the task of semiconductor defect detection, this embodiment can be used to explain which material composition and microstructure features have a significant impact on semiconductor performance. In this task, this embodiment first uses a random annealing algorithm to randomly select material features with high marginal gain in each iteration, such as specific doping elements or point defect types like vacancies, interstitial atoms, and antisite defects. Subsequently, through a pruning process, it further filters out the material features that contribute most to the semiconductor's electrical or optical performance, such as key doping concentration, energy level distribution, or defect state density. This embodiment effectively narrows the search space, retaining only the key features crucial to semiconductor performance, thereby providing a clear explanation of the core role of these features in semiconductor device performance optimization and reliability analysis.

[0075] The other parts of this embodiment are the same as those in Embodiment 1 above, so they will not be described again.

[0076] Example 3: Based on any one of Embodiments 1-2 above, this embodiment proposes a graph neural network interpretability system for defect detection, used to execute the above-described graph neural network interpretability method for industrial semiconductor defect detection; it includes a construction unit, an initialization unit, an annealing unit, a pruning unit, and a training unit; The construction unit is used to construct a semiconductor graph based on the acquired industrial semiconductor data, using atoms of the industrial semiconductor data as nodes and chemical bonds or adjacency relationships as edges; and to train a graph neural network based on the constructed semiconductor graph, embedding features into different types of nodes to construct a semiconductor graph neural network. The initialization unit is used to initialize the interpretability model parameters of the semiconductor graph neural network; The annealing unit is used to call the random annealing algorithm to generate candidate nodes and calculate the marginal gain to obtain an interpretable subgraph that is approximately globally optimal. The pruning unit is used to invoke the pruning algorithm to predict the interpretability score of the node and filter it. The training unit is used to iterate until the loss function converges, thus obtaining a fully trained global model.

[0077] This embodiment also proposes an electronic device, including a memory and a processor; the memory stores a computer program; when the computer program is executed on the processor, it implements the above-described graph neural network interpretability method for industrial semiconductor defect detection.

[0078] This embodiment also proposes a computer-readable storage medium storing computer instructions; when the computer instructions are executed on the aforementioned electronic device, the aforementioned graph neural network interpretability method for industrial semiconductor defect detection is implemented.

[0079] The other parts of this embodiment are the same as any one of the above embodiments 1-2, so they will not be described again.

[0080] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A graph neural network interpretability method for defect detection, characterized in that, Specifically, the following steps are included: Step S1: Construct a semiconductor diagram based on the type of semiconductor data acquired and the information affecting the band structure; Step S2: Train a graph neural network based on the constructed semiconductor graph, embed features into different types of nodes, and construct a semiconductor graph neural network; Step S3: Initialize the interpretability model parameters of the semiconductor graph neural network; Step S4: Use the random annealing algorithm to generate candidate nodes and calculate the marginal gain to obtain an interpretive subgraph that is approximately globally optimal; Step S5: Call the pruning algorithm to predict the interpretability score of the node and filter it; Step S6: Repeat steps S2-S5 until the loss function converges, and obtain the trained global model.

2. The graph neural network interpretability method for defect detection according to claim 1, characterized in that, Step S1 specifically includes the following steps: Step S11: Acquire semiconductor data, and obtain the data type of the semiconductor data and information affecting the band structure; Step S12: Represent semiconductor data of different data types as different types of nodes and use information that affects the band structure as edges to construct a semiconductor graph structure.

3. The graph neural network interpretability method for defect detection according to claim 1, characterized in that, Step S2 specifically includes the following steps: Step S21: Invoke the graph neural network to embed the features of different types of nodes and capture the structural relationships between nodes; Step S22: Calculate the classification error by calling the cross-entropy loss function and call the consistency regularization output to construct the semiconductor graph neural network.

4. The graph neural network interpretability method for defect detection according to claim 1, characterized in that, The interpretability model parameters mentioned in step S3 include the parameters of random annealing and the parameters of reinforcement pruning; The parameters of the random annealing include the initial temperature, cooling factor, and initial acceptance probability constant; The parameters for reinforcement pruning include the learning rate of the policy network, the size of the action space, and the initial policy network parameters.

5. The graph neural network interpretability method for defect detection according to claim 1, characterized in that, Step S4 specifically includes the following steps: Step S41: Call the random annealing algorithm to generate candidate nodes; Step S42: Calculate the marginal gain of the candidate node based on the candidate node, the interpretability score of the current subgraph, and the interpretability score after adding the candidate node; Step S43: Calculate the selection probability of a candidate node based on the marginal gain and the number of candidate nodes; Step S44: Converge to the global optimum based on the set temperature control factor to obtain an interpretive subgraph that is approximately globally optimal.

6. The graph neural network interpretability method for defect detection according to claim 5, characterized in that, Step S41 specifically includes the following steps: Step S411: Select basic nodes as candidate nodes according to the set ratio; Step S412: Use the random annealing algorithm to anneal the elements in the candidate nodes and generate new candidate nodes.

7. The graph neural network interpretability method for defect detection according to claim 1, characterized in that, Step S5 specifically includes the following steps: Step S51: Call the reinforcement pruning algorithm and predict the interpretability score of candidate nodes according to the set training policy network to obtain a subgraph with high interpretability. Step S52: Model the pruning process as a Markov decision process, select the optimal action based on the marginal gain, and filter out nodes whose interpretability scores are lower than a set threshold.

8. A graph neural network interpretability system for defect detection, used to perform the graph neural network interpretability method for defect detection as described in claim 1; characterized in that, It includes building units, initialization units, annealing units, pruning units, and training units; The construction unit is used to construct a semiconductor graph based on the acquired semiconductor data, using atoms of the semiconductor data as nodes and chemical bonds or adjacency relationships as edges. The graph neural network is trained based on the constructed semiconductor graph, and features are embedded into different types of nodes to construct the semiconductor graph neural network. The initialization unit is used to initialize the interpretability model parameters of the semiconductor graph neural network; The annealing unit is used to call the random annealing algorithm to generate candidate nodes and calculate the marginal gain to obtain an interpretable subgraph that is approximately globally optimal. The pruning unit is used to invoke the pruning algorithm to predict the interpretability score of the node and filter it. The training unit is used to iterate until the loss function converges, thus obtaining a fully trained global model.

9. An electronic device, characterized in that, It includes a memory and a processor; the memory stores a computer program; when the computer program is executed on the processor, it implements the graph neural network interpretability method for defect detection as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions; when the computer instructions are executed on the electronic device as claimed in claim 9, they implement the graph neural network interpretability method for defect detection as claimed in any one of claims 1-7.