Source code vulnerability positioning method based on interpretability model

By constructing the interpretability graph network model RG-Explainer, the problems of inaccurate positioning and excessive granularity in traditional vulnerability positioning methods are solved, and more accurate and efficient vulnerability positioning is achieved, reducing the dependence on professional knowledge.

CN118940278APending Publication Date: 2024-11-12SHIHEZI UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411040115.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Traditional vulnerability positioning methods have problems such as insufficient positioning and excessive granularity, and are labor-intensive and relying heavily on professional knowledge.

Method used

Using the source code vulnerability positioning method based on the interpretability model, RG-Explainer, the interpretability graph network model is constructed, and reinforcement learning and self-attention mechanisms are used to analyze the importance of nodes and judge specific vulnerability rows, including the selection of starting nodes. , iterative graph generation and stop standard learning section.

Benefits of technology

It achieves more accurate and high-grained vulnerability positioning, reduces dependence on professional knowledge, and improves the efficiency and accuracy of vulnerability positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940278A_ABST
    Figure CN118940278A_ABST
Patent Text Reader

Abstract

The invention provides a source code vulnerability positioning method based on an interpretable model, which comprises the following steps of: constructing an interpretable graph network model RG-Explainer based on reinforcement learning, and obtaining a plurality of graph nodes with high importance through the interpretable graph network model RG-Explainer so as to obtain line number information of vulnerability lines; wherein the interpretable graph network model RG-Explainer comprises a starting node selection part, an iterative graph generation part and a standard learning stopping part; the starting node selection part is used for determining a node with the maximum importance as a starting node; the iterative graph generation part generates an interpretation sub-graph by adding important neighbor nodes into original node features. Therefore, by the adoption of the method, the importance of the nodes can be analyzed through the interpretable graph network model, the specific vulnerability line is judged, and therefore code vulnerability positioning is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vulnerability location, and in particular to a source code vulnerability location method based on an explainability model. Background Art

[0002] Traditional vulnerability location methods not only have problems of inaccurate positioning and excessive granularity, but also have problems such as being labor-intensive and extremely dependent on the knowledge of professionals. Therefore, there is an urgent need for a location method that starts from the field of explainability. By building a vulnerability location model through a graph interpreter, the important structures in the code representation are captured to achieve location, in order to make up for the problems of inaccurate positioning and excessive granularity of traditional vulnerability location. Summary of the invention

[0003] The purpose of the present invention is to provide a source code vulnerability location method based on an interpretable model, which can analyze the importance of nodes through an interpretable graph network model, determine specific vulnerability lines, and thus achieve code vulnerability location.

[0004] To achieve the above object, the present invention provides a source code vulnerability location method based on an explainability model, comprising:

[0005] Based on reinforcement learning, we build an explainable graph network model RG-Explainer, and use it to obtain several important graph nodes, and then obtain the line number information of the vulnerability line;

[0006] Among them, the interpretable graph network model RG-Explainer includes the starting node selection part, the iterative graph generation part and the stopping standard learning part:

[0007] In the starting node selection part, the seed node is selected by designing a seed positioning module;

[0008] In the iterative graph generation part, based on the seed nodes, the nodes of the explanatory subgraph are obtained in sequence, and the node representation of the explanatory subgraph is obtained through the reward mechanism.

[0009] Stop the standard learning part and obtain the termination learning conditions and nodes based on the self-attention mechanism.

[0010] Preferably, the starting node selection part obtains the node with the greatest importance as the starting node by setting the seed node locator L, as follows:

[0011] The objective function is:

[0012]

[0013] In the formula, G is the generator and L is the locator;

[0014] Based on the KL divergence loss, the generator G and the locator L are optimized to obtain the node with the greatest importance, which is the node with the highest reward:

[0015]

[0016] In the formula, Respectively represent the instance g n , node v i,n The interpretable subgraph of .

[0017] Preferably, based on the starting node, node features are added in sequence to obtain an explanation subgraph, including:

[0018] Associate the starting node and current local subgraph information with the original node feature vector:

[0019]

[0020] In the formula, x' v represents the augmented node feature vector after association, x v is the original node feature vector, X' t represents the initial eigenvector of the augmented node after association; symbol 1 is the indicator function, When v∈S v The value is 1 when S is set, otherwise it is 0; t-1 is the subgraph of t-1, Indicates the boundary of node selection;

[0021] Based on the initial feature vector of the associated augmented node, information is associated with each node through the subgraph, and the update equation is:

[0022]

[0023] Where Θ1 is the trainable weight matrix, is a symmetric adjacency matrix, α is a hyperparameter used to control the weight, is the initial representation of the node, is the node representation of the l+1th layer, is the node representation of the lth layer;

[0024] Use MLP to enhance the updated node representation:

[0025]

[0026] In the formula, is the enhanced node representation, and Θ2 is the learning parameter of MLP.

[0027] Preferably, the softmax function is used to obtain the probability of taking action v:

[0028]

[0029] In the formula, a t (v) is the probability of taking action v->u, is the training parameter, and u is the node to be connected in the next step;

[0030] The prediction loss function is:

[0031]

[0032] Where Predictipon Loss is the prediction loss function, N is the number of explained subgraphs, S n To explain the instance of subgraph n, C is the number of predicted labels, P(Y=c) represents the probability that the trained GNNf(·) model predicts Y to be label c, and P(f(S n )=c) represents the interpretation subgraph S n Predict the probability of label x.

[0033] Preferably, the size loss function and radius penalty are defined as constraints, and the total loss is used as the objective function to optimize the iteration graph, as follows:

[0034] Size Loss=||s||1

[0035]

[0036] In the formula, is the total loss value function, Size Loss, Radius Penalty, and Similarity Loss are the size loss function, radius penalty, and similarity loss respectively, and λ1, λ2, and λ3 are hyperparameters for controlling the weight coefficients.

[0037] Preferably, based on the reward mechanism, the policy gradient optimization iterative graph is used to generate some parameters, as follows:

[0038]

[0039] In the formula, is the gradient symbol, represents the expectation, π θ (v t |S t-1 ) is the sampling strategy, Q(S t-1 ,v t ) is the value function between the iteration graph and the action;

[0040] Among them, Q(S t-1 ,v t ) is obtained through Monte Carlo estimation as follows:

[0041]

[0042] In the formula, S (i) (i=1,...,M) is the iteration graph S t-1 and node v t Explanation subgraph obtained by sampling strategy.

[0043] Preferably, the stopping criteria learning part includes aggregating node representations through a self-attention mechanism, as follows:

[0044]

[0045] In the formula, is the node representation of the stop node STOP in state t, γ t (v) is the attention value of node v in state t, is the training parameter, are the node representations of u and v in state t respectively.

[0046] Therefore, the present invention adopts the above-mentioned source code vulnerability location method based on the interpretability model, which has the following technical effects: it can analyze the importance of nodes through the interpretability graph network model, determine the specific vulnerability line, and thus realize code vulnerability location.

[0047] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a working diagram of the explainable graph network model RG-Explainer;

[0049] Figure 2 It is a vulnerability location flowchart;

[0050] Figure 3 This is a comparison chart of the interpretable graph network model RG-Explainer and existing non-graph explanation models;

[0051] Figure 4 This is a comparison chart between the interpretable graph network model RG-Explainer and existing graph explanation models. DETAILED DESCRIPTION

[0052] The present invention can be explained in more detail by the following examples. The purpose of disclosing the present invention is to protect all changes and improvements within the scope of the present invention. The present invention is not limited to the following examples.

[0053] like Figure 1As shown, the present invention provides a source code vulnerability location method based on an explainability model, comprising the following steps:

[0054] Based on reinforcement learning (RL), an explainable graph network model RG-Explainer is constructed, which includes the starting node selection part, the iterative graph generation part and the stopping standard learning part.

[0055] The starting node selection part designs a seed positioning module to select the most important nodes in the input graph data as seed nodes. When the task is different, the selected nodes are also different; if the task is to explain the prediction of a specific node for a label, the node itself is selected as the most important node.

[0056] The iterative graph generation part is used to obtain the explanatory subgraph, which is the most important part of the model. It obtains other nodes in the explanatory subgraph in order based on the nodes selected by the starting node selection part, and together with them, it forms an iterative graph. Specifically, for an iterative graph, the iterative graph generation part will add the most influential node from the neighbor nodes to the graph to obtain the explanatory subgraph structure. Adding nodes from the neighbors of the iterative graph can ensure the connectivity of the generated graph. At the same time, since the entire graph generation process is controlled by the reward mechanism, that is, the mutual information between the original predicted labels and the labels predicted by the generated graph. Similar constraints such as size loss, radius penalty and similarity loss will be added to the reward mechanism to ensure that a small and meaningful explanatory graph subgraph is obtained.

[0057] The stopping criterion learning part can further avoid generating large explanation subgraphs. Since the stopping criterion learning part is designed using transductive and inductive learning methods, the stopping criterion and interpretability of untrained data can be inferred by inductive learning on the training data.

[0058] In the explanation process of the interpretable graph network model RG-Explainer, given an input graph data G = (V, E) and a trained GNN model f(·), the goal of the interpretable graph network model RG-Explainer is to obtain an explanation subgraph S = (V S ,E S ), where V S ∈V, E S∈E, in the process of obtaining subgraph S, RG-Explainer maximizes the mutual information between the initial label prediction value Y=f(G) and the label prediction distribution output by the explainable subgraph S, that is, max SMI(Y,S)=H(Y)-H(Y|S) to get the smallest effective explanation subgraph. MI(·) represents the mutual information function, and H(·) represents the entropy function. When H(Y) is fixed, the goal of this formula becomes to minimize the value of H(Y|S), denoted as min S H(Y|S). In the explanation subgraph acquisition, obtain the min S The H(Y|S) process is usually regarded as a combinatorial optimization problem. RG-Explainer optimizes this process in the following three aspects:

[0059] (1) Starting node selection

[0060] For node classification tasks, the starting node is used to explain the instance of its predicted label. However, for graph classification tasks, it is difficult to choose a suitable starting node. In order to choose a suitable starting point, a seed node locator L is set in the explanatory model. The seed node locator L is used to identify the most important node in the graph, and then the final explanation subgraph is generated with this node as the starting point.

[0061] Assume that given N graph instances g n , the objective function is defined as:

[0062]

[0063] In the formula, both the generator G and the locator L need to be optimized through learning, and a coordinated training method is adopted. First, the parameters of one module are fixed, and then the parameters of the other module are trained to obtain the optimized generator G and locator L. When the generator G is fixed, the locator L can use the generator G to generate a subgraph S for each node in the graph instance and calculate the corresponding reward After that, the model uses a three-layer MLP to process node v i Modeling is performed to obtain the influence of nodes on graph instances, thereby obtaining the node with the highest reward v i :

[0064]

[0065] In the formula, Respectively represent the instance g n , node v i,n The final representation of the interpretable subgraph is to obtain the highest contribution value ω i,n , the model uses divergence loss Calculate the loss and pass ω through a softmax i,n and Convert to g n and v i,nThe two distributions on , train the MLP through examples, and obtain the node with the maximum reward value.

[0066] (2) Subgraph generation module

[0067] Given a starting point v0, the interpretable graph network model RG-Explainer uses the graph generator to generate a connected subgraph S = {v0,v1,···,v T}, the model selects a node in each step, and T is the total number of steps. Specifically, the current partial solution S is obtained in the tth step t ={v0,v1,···,v t-1}; Next, the model will go from Select a new node v on the boundary of t , and obtain the result S of the tth part t =S t-1 ∪{v t}, that is, v0 and S t-1 The definition of the combined representation; then, the bounds are calculated as The solution is associated with a reward value. At step t, the model increases the feature vector of each node by adding the information of the starting node and the current local subgraph. t or For each node v in , these two values ​​are combined with their original feature vector X by the formula v The values ​​are associated with:

[0068]

[0069] In the formula, x' v represents the augmented node feature vector after association, symbol 1 is the indicator function, When v∈S v The value is 1 when X is t Represents the feature vector after connecting the augmented nodes; Indicates the boundary of node selection, that is, the set of next nodes to be expanded. The nodes in the set are related to S t-1 The nodes are related and do not exist in the explanation subgraph S t-1 .

[0070] In order to allow each node to further combine information from the current neighborhood, RG-Explainer uses the existing GNN method APPNP to separate nonlinear transformation and information propagation. The update equation is as follows:

[0071]

[0072] Where Θ1 is the trainable weight matrix, is a symmetric adjacency matrix, α is a hyperparameter used to control the weight, is the initial representation of the node, is the node representation of the l+1th layer, is the node representation of the lth layer.

[0073] After the lth layer of the network is updated, the updated nodes are represented Input into MLP to improve the representation capability of this node

[0074]

[0075] Where Θ2 is a learnable parameter in MLP. For the t-th step, we only need to consider S t-1 and The nodes in The value of , other nodes do not affect the state and action space.

[0076] In order to ensure the connectivity of the generated subgraphs, the interpretable graph network model RG-Explainer uses As the action space, the softmax function is used to calculate the probability of taking an action v->u, and based on the obtained probability, the node to be connected in the next step is determined.

[0077] Among them, the probability a of taking action v->u t (v) is:

[0078]

[0079] In the formula, u is the node to be connected in the next step. Is a trainable vector parameter, and the resulting prediction loss function is:

[0080]

[0081] In the formula, S n To explain the instance of subgraph n, C is the number of possible predicted labels, P(Y=c) represents the probability that the trained GNNf(·) model predicts that Y is label c, and P(f(S n )=c) represents the interpretation subgraph S n Predict the probability of label c.

[0082] Since the interpretable graph network model RG-Explainer introduces some items to limit the generation of useless features of the explanation subgraph; therefore, in order to obtain a compact and concise explanation subgraph S, the interpretable graph network model RG-Explainer defines a size loss function and a radius penalty as constraints. The size loss is used to limit the number of nodes in the generated subgraph, and the radius penalty is used to calculate the maximum value of the shortest path from the seed node to other nodes. In addition, the interpretable graph network model RG-Explainer uses the similarity loss Similarity Loss in the calculation to evaluate the similarity between the initial node representation and the newly generated node representation to prevent the subgraph from being too sparse. The specific definition is as follows:

[0083]

[0084] In the formula, Size Loss and Radius Penalty are the size loss function and radius penalty respectively.

[0085] In summary, in the process of generating the explanation subgraph, the total loss value function is used is the objective function, and seeks to minimize the objective function to obtain the explanation subgraph for each step.

[0086] Among them, the total loss value function The specific expression is as follows:

[0087]

[0088] Where λ1, λ2, and λ3 are hyperparameters that control the weight coefficients, which are used to adjust the relative importance of different parts during model training, thereby affecting the performance and convergence of the model.

[0089] (3) Reward mechanism

[0090] The interpretable graph network model RG-Explainer converts the objective function loss As the reward value, since the loss value cannot be decomposed into each step, simply calculating the negative objective function value of the tth step as the reward for each step will lead to a local optimum. Therefore, the RG-Explainer explanation model does not calculate the current reward value when adding a new node to the generated explanation subgraph, but calculates it after the entire subgraph is generated, thereby returning the overall reward. Among them, the model uses the policy gradient method to optimize the parameters of the iterative graph generation part, that is, to maximize The expectations are as follows:

[0091]

[0092] In the formula, πθ (v t |S t-1 ) is the sampling strategy, that is, to maximize the conditional probability distribution, where π θ Where π is the model, θ is the parameter; v0 is the given seed node, represents the expectation, that is, the expectation of the reward of the instance set S under the condition that the random seed node v0 obeys the G distribution; Q(S t-1 ,v t ) represents the value function between the state and action pair; in fact, the Monte Carlo estimation is used in the construction of the RG-Explainer explanation model to approximate the value of the formula Q, as follows:

[0093]

[0094] In the formula, S (i) (i=1,...,M) is the state S t-1 and node v t The subgraph obtained by the sampling strategy is the complete explanation subgraph of the current node. In this way, the reward signal can be distributed to all steps.

[0095] The interpretability graph network model RG-Explainer evaluates the effectiveness of the current generated explanation subgraph by learning termination conditions, including adding stop actions to the STOP action space and learning node selection and stopping conditions.

[0096] Since the node representation in the current state has been obtained Therefore, the stop action STOP can be obtained by aggregating these representations through the self-attention mechanism:

[0097]

[0098] In the formula, in the formula, It represents the STOP node in the stopped state; γ t (v) is the probability of the self-attention mechanism, obtained by calculation; is the training parameter, i.e., the seed self-intention mechanism, which is used to calculate the attention value γ of each node v in the current state t (v), thus obtaining the stop node representation in state t And we can get a through the action probability formula t (STOP), so that it can execute the STOP action at the appropriate time; are the node representations of u and v in the stopped state respectively.

[0099] Among them, when the aggregated node represents When a certain set value is exceeded, the subgraph expansion action ends and the node representation in the current state is no longer calculated. Then the process ends. In addition, in the specific calculation, the probability of the next action is calculated. When aggregated When passed into it, you will get the termination action a t (STOP), Will make a t (STOP) is infinitely close to a set value for stopping the subgraph expansion. Setting the STOP value and setting the number of expansion steps are two mechanisms for stopping the expansion of the subgraph, and in practical applications, both are used at the same time.

[0100] Therefore, the interpretable graph network model RG-Explainer sets an upper limit on the number of generation steps to prevent the generated subgraph from being too large.

[0101] like Figure 2 As shown in the figure, first, the vulnerability code with annotations that can form vulnerability lines is obtained from the vulnerability dataset, and the representation structure of the code, that is, the input graph data, is obtained through the feature extraction method; then, the importance subgraph construction function of the interpretable graph network model RG-Explainer is used to obtain and analyze the explanation subgraph to obtain the N most important graph nodes, where N is set to no more than 10 in the experiment according to the characteristics of the dataset and the time of the experiment; finally, the predicted vulnerability line is obtained based on the obtained graph nodes, and the positioning effect is obtained by comparing the actual vulnerability line.

[0102] The essence of the explainable graph network model RG-Explainer is to analyze the importance of the subgraphs of the graph in the entire input graph data by iterating the subgraphs and maximizing the prediction results. If removing a subgraph makes the prediction result of the original graph change from 1 to 0, then the subgraph is a potential subgraph with important contributions. Among all potential subgraphs, the subgraph with the smallest number of nodes is the result of the experiment.

[0103] Verification Example

[0104] In the process of vulnerability detection, although the more graph data nodes are selected, the more accurate the positioning is, the actual computing cost will increase; therefore, this verification example selects 10 graph nodes as the limit points for subgraph mining, selects data with no more than 10 code vulnerability lines in the existing Fan dataset as the verification dataset, and uses the accuracy of predicting the number of vulnerability lines as the evaluation indicator. For example, when the target vulnerability line is "1", if the predicted line number result is "1", the Accuracy value this time is 100%, if the predicted line number is other values, the Accuracy value is 0, and the accuracy is the average of all prediction results.

[0105] This verification example uses LA_SGAT (combining the self-supervised attention model SGAT and the local enhancement model LA) trained on the existing FUNDED and CVE+Github datasets as the pre-training model, enhances the features of the graph nodes, and uses the interpretable graph network model RG-Explainer as the core model for vulnerability location. It is compared and analyzed with the existing vulnerability location methods to verify the effectiveness of the interpretable graph network model RG-Explainer. Figure 3 and Figure 4 shown.

[0106] from Figure 3 It can be seen that the existing non-graph explanation model positioning methods ATT and GRAD have a maximum accuracy of 0.67, while the vulnerability positioning accuracy of the interpretable graph network model RG-Explainer (Ours Method) reaches 0.76, an increase of 13.4%.

[0107] from Figure 4 It can be seen that the current graph explanation model has a maximum vulnerability location accuracy of 0.70, while the interpretable graph network model RG-Explainer has a vulnerability location accuracy of 0.72, an increase of 5.2%; in addition, when the number of graph nodes selected is 3, the current graph explanation model has a vulnerability location accuracy of 0.38, while the interpretable graph network model RG-Explainer has an accuracy of 0.54, an increase of 34.2%. In summary, the interpretable graph network model RG-Explainer has a very obvious advantage in a small number of graph nodes.

[0108] Therefore, the present invention adopts the above-mentioned source code vulnerability location method based on the interpretability model, which can analyze the importance of nodes through the interpretability graph network model, determine the specific vulnerability line, and thus realize code vulnerability location.

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A source code vulnerability location method based on an explainability model, characterized in that: include: Based on reinforcement learning, we build an explainable graph network model RG-Explainer, and use it to obtain several important graph nodes, and then obtain the line number information of the vulnerability line; Among them, the interpretable graph network model RG-Explainer includes the starting node selection part, the iterative graph generation part and the stopping standard learning part: In the starting node selection part, the seed node is selected by designing a seed positioning module; In the iterative graph generation part, based on the seed nodes, the nodes of the explanatory subgraph are obtained in sequence, and the node representation of the explanatory subgraph is obtained through the reward mechanism. Stop the standard learning part and obtain the termination learning conditions and nodes based on the self-attention mechanism.

2. The source code vulnerability location method based on an explainability model according to claim 1, characterized in that: The starting node selection part sets the seed node locator L to obtain the node with the greatest importance as the starting node, as follows: The objective function is: In the formula, G is the generator, L is the locator, and g n For example; Based on the KL divergence loss, the generator G and the locator L are optimized to obtain the most important nodes: In the formula, ω i,n is the weight coefficient of the node, Respectively represent the instance g n , node v i,n The interpretable subgraph of .

3. The source code vulnerability location method based on an explainability model according to claim 1, characterized in that: Based on the starting node, node features are added in sequence to obtain the explanation subgraph, including: Associate the starting node and current local subgraph information with the original node feature vector: In the formula, x′ v represents the augmented node feature vector after association, x v is the original node feature vector, X′ t represents the initial eigenvector of the augmented node after association; symbol 1 is the indicator function, When v∈S v The value is 1 when S is set, otherwise it is 0; t-1 is the explanation subgraph at step t-1, Indicates the boundary of node selection; Based on the initial feature vector of the associated augmented node, information is associated with each node, and the update equation is: Where Θ1 is the trainable weight matrix, is a symmetric adjacency matrix, α is a hyperparameter used to control the weight, is the initial representation of the node, is the node representation of the l+1th layer, is the node representation of the lth layer; Use MLP to enhance the updated node representation: In the formula, is the enhanced node representation, and Θ2 is the learning parameter of MLP.

4. The source code vulnerability location method based on an explainability model according to claim 3, characterized in that: Using the softmax function, the probability formula for taking the connection action v is: In the formula, a t (v) is the probability of taking action v->u, is the training parameter, and u is the node to be connected in the next step; The prediction loss function is: In the formula, Prediction Loss is the prediction loss function, N is the number of explained subgraphs, S n To explain the instance of subgraph n, C is the number of predicted labels, P(Y=c) represents the probability that the trained GNNf(·) model predicts Y to be label c, and P(f(S n )=c) represents the interpretation subgraph S n Predict the probability of label c.

5. The source code vulnerability location method based on an explainability model according to claim 4, characterized in that: Define the size loss function and radius penalty as constraints, and use the total loss as the objective function to optimize the iteration graph as follows: Size Loss=||S||1 In the formula, is the total loss value function, Size Loss, Radius Penalty, and Similarity Loss are the size loss function, radius penalty, and similarity loss respectively, and λ1, λ2, and λ3 are hyperparameters for controlling the weight coefficients.

6. The source code vulnerability location method based on an explainability model according to claim 5, characterized in that: Based on the reward mechanism, the policy gradient optimization iterative graph is used to generate some parameters, as follows: In the formula, is the gradient symbol, represents the expectation, π θ (v t |S t-1 ) is the sampling strategy, Q(S t-1 , v t ) is the value function between the iteration graph and the action; Among them, Q(S t-1 , v t ) is obtained through Monte Carlo estimation as follows: In the formula, S (i) (i=1,...,M) is the iteration graph S t-1 and node v t Explanation subgraph obtained by sampling strategy.

7. The source code vulnerability location method based on an explainability model according to claim 6, characterized in that: The stopping criterion learning part involves aggregating node representations through a self-attention mechanism as follows: In the formula, is the node representation of the stop node STOP in state t, γ t (v) is the attention value of node v in state t, is the training parameter, are the node representations of u and v in state t respectively.

Citation Information

Cited By

  • Molecular property interpretation method based on deep learning

    CN119993292A