Rule extraction method and device for network security anomaly detection model

Through the root regression tree generation and data augmentation methods, the global rules of the deep learning model are extracted, which solves the problem of insufficient interpretability of the deep learning model in network security, and improves transparency and trust in the anomaly detection system.

CN119089987AActive Publication Date: 2024-12-06TSINGHUA UNIVERSITY

Patent Information

Application Number
CN202410992017.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-12-06
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

Deep learning models lack interpretability in network security anomaly detection, making it difficult to provide security analysts with transparency in decision-making processes, and traditional interpretation methods are not suitable for anomaly detection models.

Method used

The root regression tree generation method is used to train the regression tree using the exception probability values ​​output by the original model, locate the low confidence area, perform data augmentation, generate subtrees, and merge the root regression tree with the subtree to extract comprehensive and accurate Rule set to ensure consistent decision boundaries.

Benefits of technology

Provides reliable explanatory, improves transparency and trust in anomaly detection system, and is suitable for a variety of anomaly detection models, assists in security expert verification and decision support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089987A_ABST
    Figure CN119089987A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of anomaly detection, in particular to a rule extraction method and device for a network security anomaly detection model, electronic equipment and a storage medium, and the method comprises the steps: based on a root regression tree generation method, employing an anomaly probability value outputted by an original model as a label to train a regression tree model, and generating a root regression tree; performing positioning processing on the root regression tree to obtain a low-confidence region; performing data augmentation processing on the low-confidence region to obtain augmented data; generating a root regression tree sub-tree based on the augmented data, and merging the root regression tree and the root regression tree sub-tree to obtain a merged tree; and performing rule extraction processing on the combined tree to obtain a complete rule set. The method is independent of a specific anomaly detection learning mechanism and is suitable for various anomaly detection models; the security expert can be effectively assisted to perform model verification, knowledge discovery and decision support through the extracted rules, and the transparency and credibility of an anomaly detection system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of anomaly detection technology, and in particular to a rule extraction method, device, electronic device and storage medium for a network security anomaly detection model. Background Art

[0002] With the rapid development of Internet technology, network security issues have become increasingly prominent, and anomaly detection has become one of the important means to protect network security. The purpose of anomaly detection is to identify behaviors that are significantly different from normal behavior patterns. In network security tasks, these abnormal behaviors refer to potential security threats or system failures. Traditional anomaly detection methods mainly rely on manually formulated rules or statistical-based methods, but these methods have limitations when processing large-scale, high-dimensional data and are difficult to adapt to new or unknown attack patterns. In recent years, deep learning technology has shown great potential and advantages in the field of anomaly detection. Due to its excellent feature extraction and pattern recognition capabilities, deep learning models have been widely used in various security-related anomaly detection tasks, such as network intrusion detection, system abnormal state detection, host-based threat detection, and advanced persistent threat detection.

[0003] However, deep learning models have black-box characteristics, that is, the working mechanism and decision-making process inside the model are often opaque and difficult to explain, which poses a huge challenge to the actual deployment of network security applications. Security analysts need to have some understanding of the decision-making process of the model to ensure that the anomaly detection system can correctly identify real threats. The lack of explainability makes security personnel skeptical about the effectiveness of anomaly detection models and it is difficult to determine whether the model captures expected or reasonable knowledge. In order to address the challenges of interpretability of deep learning models, some explanation techniques have been proposed in the fields of text and images. In the field of network security, existing methods mainly focus on providing local explanations for individual samples, while ignoring the importance of global understanding of model knowledge. In addition, most explanation methods for supervised models are not applicable to anomaly detection because their learning mechanisms are different from anomaly detection. Summary of the invention

[0004] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0005] To this end, the first purpose of this application is to propose a rule extraction method for a network security anomaly detection model to solve the problems that the existing technical means are relatively limited and not suitable for anomaly detection.

[0006] The second object of the present application is to provide a device.

[0007] The third objective of the present application is to provide an electronic device.

[0008] A fourth objective of the present application is to provide a computer-readable storage medium.

[0009] To achieve the above objectives, the first embodiment of the present application proposes a rule extraction method for a network security anomaly detection model, comprising:

[0010] Based on the root regression tree generation method, the abnormal probability value output by the original model is used as a label to train the regression tree model and generate a root regression tree;

[0011] Performing positioning processing on the root regression tree to obtain a low confidence area;

[0012] Performing data augmentation processing on the low confidence region to obtain augmented data;

[0013] Generate a root regression tree subtree based on the augmented data, merge the root regression tree and the root regression tree subtree to obtain a merged tree;

[0014] The merged tree is subjected to rule extraction processing to obtain a complete rule set.

[0015] Preferably, the rooted regression tree generation method uses the abnormal probability value output by the original model as a label to train the regression tree model, and the generation of the rooted regression tree includes:

[0016] Take the training set of the original anomaly detection model as input and fit the tree model to get the output of the original model;

[0017] Based on the CART algorithm, the output of the original model is used to train and generate a rooted regression tree.

[0018] Preferably, the performing positioning processing on the root regression tree to obtain the low confidence area comprises:

[0019] Use anomaly scores or probabilities to measure low confidence areas that appear when fitting the original model;

[0020] The impurity of leaf nodes is used to measure the low confidence area that appears when fitting the root regression tree;

[0021] An anomaly score threshold and an impurity quantile threshold are defined, and the low confidence region is located using the anomaly score threshold and the impurity score threshold.

[0022] Preferably, performing data augmentation processing on the low confidence region to obtain augmented data comprises:

[0023] Sample augmentation is performed from two directions. Multiple rounds of iterations are performed on each low-confidence leaf node using the original training set. The samples of the previous iteration are continuously modified based on the gradient information of the model to obtain samples with inconsistent decisions.

[0024] Preferably, the iterative calculation formula is:

[0025]

[0026] in, and For X-based i The normal sample set and abnormal sample set generated by augmentation, and are the normal sample set and abnormal sample set generated in the jth round of iteration, β is the hyperparameter for modifying the step size, σ is the upper bound, and X i is the set of samples in the training set that falls into the i-th low-confidence leaf node in the training set, and f is the original anomaly detection model.

[0027] Preferably, generating a rooted regression tree subtree based on the augmented data comprises:

[0028] When iteratively modifying sample feature values ​​based on gradient information, all feature values ​​contained in the predecessor nodes from the root node to the low-confidence leaf corresponding to the sample are fixed, and the features that have not been used on this decision path are modified. For each low-confidence leaf node, the augmented samples obtained from all rounds of iterations will be fitted to generate a subtree using the same method as the root regression tree.

[0029] Preferably, the merging the root regression tree and the root regression tree subtree to obtain a merged tree comprises:

[0030] The root regression tree subtree is used to replace the low-confidence leaf nodes corresponding to the root regression tree and the continuous values ​​in the leaf nodes are discretized, and a recursive traversal is performed from the deepest non-leaf node upward to the root node.

[0031] To achieve the above-mentioned purpose, the second embodiment of the present application proposes a rule extraction device for a network security anomaly detection model, comprising:

[0032] The root regression tree generation module uses the abnormal probability value output by the original model as a label to train the regression tree model and generate a root regression tree based on the root regression tree generation method;

[0033] A positioning module performs positioning processing on the root regression tree to obtain a low confidence area;

[0034] An augmentation module performs data augmentation processing on the low confidence area to obtain augmented data;

[0035] A merging module, which generates a root regression tree subtree based on the augmented data, and merges the root regression tree and the root regression tree subtree to obtain a merged tree;

[0036] The rule extraction module performs rule extraction processing on the merged tree to obtain a complete rule set.

[0037] To achieve the above-mentioned purpose, the third aspect of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0038] The memory stores computer-executable instructions;

[0039] The processor executes the computer-executable instructions stored in the memory to implement any of the above methods.

[0040] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, including computer-executable instructions stored in the computer-readable storage medium, and the computer-executable instructions are used to implement any of the methods described above when executed by a processor.

[0041] The present application provides a rule extraction method for a network security anomaly detection model, which extracts comprehensive and accurate global rules from a deep learning model by generating a root regression tree, performs data augmentation processing on low-confidence areas, facilitates the generation of subtrees, and merges the subtrees with the root regression tree to ensure consistency with the decision boundary of the original model, thereby providing a reliable explanation for security experts. The method should be independent of the specific anomaly detection learning mechanism and be applicable to a variety of anomaly detection models; finally, the method should be able to effectively assist security experts in model verification, knowledge discovery and decision support through the extracted rules, thereby improving the transparency and trust of the anomaly detection system.

[0042] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0044] Figure 1 A flowchart of a first specific embodiment of a rule extraction method for a network security anomaly detection model provided by the present invention;

[0045] Figure 2 This is the overall flow chart of this method;

[0046] Figure 3 A comparison chart of the quality of rule interpretations produced by this method;

[0047] Figure 4 A structural block diagram of a rule extraction device for a network security anomaly detection model provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The core of the present invention is to provide a rule extraction method, device, electronic device and storage medium for a network security anomaly detection model. By extracting rules from a deep learning model, fine-grained detection rules representing the model decision logic are generated, which helps security personnel understand the model decision process.

[0049] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0050] Please refer to Figure 1 , Figure 1 This is a flowchart of a first specific embodiment of a rule extraction method for a network security anomaly detection model provided by the present invention; the specific operation steps are as follows:

[0051] Step S101: Based on the root regression tree generation method, the abnormal probability value output by the original model is used as a label to train the regression tree model to generate a root regression tree;

[0052] Take the training set of the original anomaly detection model as input and fit the tree model to get the output of the original model;

[0053] Based on the CART algorithm, the output of the original model is used to train and generate a rooted regression tree.

[0054] Step S102: performing positioning processing on the root regression tree to obtain a low confidence area;

[0055] Use anomaly scores or probabilities to measure low confidence areas that appear when fitting the original model;

[0056] The impurity of leaf nodes is used to measure the low confidence area that appears when fitting the root regression tree;

[0057] An anomaly score threshold and an impurity quantile threshold are defined, and the low confidence region is located using the anomaly score threshold and the impurity score threshold.

[0058] Step S103: performing data augmentation processing on the low confidence region to obtain augmented data;

[0059] Sample augmentation is performed from two directions. Multiple rounds of iterations are performed on each low-confidence leaf node using the original training set. The samples of the previous iteration are continuously modified based on the gradient information of the model to obtain samples with inconsistent decisions.

[0060] The calculation formula of the iteration is:

[0061]

[0062] in, and For X-based i The normal sample set and abnormal sample set generated by augmentation, and are the normal sample set and abnormal sample set generated in the jth round of iteration, β is the hyperparameter for modifying the step size, σ is the upper bound, and X i is the set of samples in the training set that falls into the i-th low-confidence leaf node in the training set, and f is the original anomaly detection model.

[0063] Step S104: generating a root regression tree subtree based on the augmented data, merging the root regression tree and the root regression tree subtree to obtain a merged tree;

[0064] When iteratively modifying sample feature values ​​based on gradient information, all feature values ​​contained in the predecessor nodes from the root node to the low-confidence leaf corresponding to the sample are fixed, and the features that have not been used on this decision path are modified. For each low-confidence leaf node, the augmented samples obtained from all rounds of iterations will be fitted to generate a subtree using the same method as the root regression tree.

[0065] The root regression tree subtree is used to replace the low-confidence leaf nodes corresponding to the root regression tree and the continuous values ​​in the leaf nodes are discretized, and a recursive traversal is performed from the deepest non-leaf node upward to the root node.

[0066] Step S105: performing rule extraction processing on the merged tree to obtain a complete rule set.

[0067] This embodiment provides a rule extraction method for a network security anomaly detection model. By generating a root regression tree, comprehensive and accurate global rules are extracted from a deep learning model, and data augmentation processing is performed on low-confidence areas to facilitate the generation of subtrees. The subtrees are merged with the root regression tree to ensure consistency with the decision boundary of the original model, thereby providing a reliable explanation for security experts. This method should be independent of the specific anomaly detection learning mechanism and be applicable to a variety of anomaly detection models. Finally, the method should be able to effectively assist security experts in model verification, knowledge discovery and decision support through the extracted rules, thereby improving the transparency and trust of the anomaly detection system.

[0068] Based on the above embodiment, this embodiment describes a rule extraction method for a network security anomaly detection model. Figure 2 As shown, the details are as follows:

[0069] First, this method treats the deep learning anomaly detection model to be explained as a black box, uses the same training data as the original model as input, and uses the anomaly probability value output by the corresponding original model as a label to train a regression tree model, called a root tree. Limited by the distribution of the original training data, the root tree may not be well consistent with the original model in some data distributions or local feature spaces. Therefore, this method locates the areas corresponding to the inconsistent decision samples, which correspond to certain specific leaf nodes on the root regression tree, called low-confidence areas or leaf nodes. In order to eliminate the decision inconsistency caused by the low-confidence area, it is necessary to replace the low-confidence leaf nodes with high-fidelity rules. Therefore, this method further designs a training data augmentation strategy for the low-confidence area, and based on this, generates a subtree for each low-confidence interval. Next, each low-confidence leaf in the root tree is replaced by the corresponding subtree to form a merged tree. Considering that in actual scenarios, security personnel tend to focus more on abnormal or normal rules or approximate abnormality levels rather than specific anomaly scores, this method further merges the rule branches of the tree for simplification. The simplified merged tree is divided into normal and abnormal rule sets, and the decision thresholds in non-leaf nodes can be simplified to increase the readability of the interpretation results.

[0070] Rooted regression tree generation:

[0071] This method uses a tree-based interpretable model because it contains multiple rules from the root to the leaf nodes, and rules are a form of domain knowledge expression widely used in the security field. When training the tree model, the same training set as the original anomaly detection model is used as input, and the tree model is fitted to simulate the output of the original model. This method first trains a regression tree to approximate the output probability (i.e., anomaly score) of the original anomaly detection model, which is called the root tree in this method. In this way, the tree model can fit the different anomaly degrees and probability distributions learned by the original model, rather than just the discrete binary classification results, thereby improving fidelity. This method trains the root tree based on the CART (Classification And Regression Tree) algorithm. CART contains algorithms for building classification and regression tree models. When building a regression tree, the training goal of CART is to predict a given continuous output value as accurately as possible. The principle of the regression tree in CART is to divide the input space into different regions to ensure that the variance of the predicted values ​​in each region is minimized. The CART regression tree uses mean squared error (MSE) as the default partitioning criterion, and the error of all predicted values ​​in each node is called impurity. When the regression tree splits, it will select the one with the smallest impurity as the best partition among all the possible partitions. Each non-leaf node on the trained regression tree contains features and decision thresholds, and the leaf nodes are anomaly scores (probabilities) similar to the output of the original anomaly model. The decision path from the root node to each leaf node forms a rule that explains the relationship between the features and thresholds based on which the original model formed the final decision.

[0072] Low confidence area positioning:

[0073] After the root tree is generated, the proposed method will find the feature subspaces where the decision of the explanatory model and the original model are inconsistent. From the perspective of the tree model, it is necessary to find and correct the decisions corresponding to the leaf nodes that are currently untrustworthy. Such feature subspaces or leaf nodes are called low confidence intervals or leaves in this method.

[0074] There are two reasons for the existence of low-confidence regions: one is the low-confidence region that appears in the original model fitting, and the other is the low-confidence region that appears in the root tree fitting process. Among them, the low-confidence region of the original model can be measured by anomaly score or probability. In reconstruction-based anomaly detection, the goal of the model in the training phase is to reduce the reconstruction error of normal samples. Therefore, the lower the anomaly score (reconstruction error), the more common the sample is in the normal data distribution. On the contrary, the higher the anomaly score, the more likely it is a sample outside the normal data distribution. Therefore, the region with a higher anomaly score (leaf node) can be directly selected as the low-confidence region of the original model. On the other hand, the low-confidence region appears in the root tree fitting because some leaf nodes do not fit the original model decision well, which has nothing to do with the anomaly scores corresponding to these decisions. These underfitting decisions (leaf nodes) will directly lead to inconsistent decisions of the two models. Such low-confidence regions can be directly measured by the impurity of the leaf nodes. Two key parameters α are defined in this method: o and α e , used to locate two types of low confidence regions, representing the quantile thresholds of anomaly scores and impurity, respectively. For example, if α o =α e =0.99, the anomaly scores of all training samples and the 99th percentile of the impurity of all leaf nodes are set as two thresholds. If the predicted probability or impurity of a leaf node in the root tree is greater than any corresponding threshold, the leaf node will be marked as a low confidence leaf node.

[0075] Data augmentation and subtree generation in low confidence regions:

[0076] After locating the low-confidence regions, this method eliminates the inconsistency in the low-confidence regions by generating fine-grained rules for each low-confidence region. This method proposes a data augmentation method based on the gradient of the original model. The core idea is to generate samples whose decisions are inconsistent with those of the explanatory model and the original model. Specifically, X i Denotes the set of samples in the training set that fall into the i-th low-confidence leaf node, and f(·) denotes the original anomaly detection model. Since the decision obtained from the low-confidence leaf node is unreliable, regardless of whether the original decision of each sample in the low-confidence leaf node is normal or abnormal, this method will perform sample augmentation from two directions (abnormal or normal), denoted as and Respectively represent based on X i The normal sample set and abnormal sample set generated by augmentation. The specific augmentation process is: for each low confidence leaf node, take the X in the original training set i As the seed, multiple rounds of iterations are performed. The normal or abnormal sample set generated in the jth round of iteration is recorded as and Based on the gradient information of the model, the samples of the previous iteration are continuously modified to find the samples that lead to inconsistent decisions. The initialization method of the augmentation process is to let In each subsequent round (hereinafter, j is used to represent any non-initial iteration round), the iterative modification method is as follows:

[0077]

[0078] The two lines in the above formula represent the update methods of the two gradient directions respectively. The second item in each line is to calculate how to modify the gradient in each direction (normal or abnormal). β is a hyperparameter representing the modification step size. In the normal (negative) direction, it is necessary to calculate and subtract the reconstruction error gradient of the sample in the previous iteration, because when augmenting normal samples, the samples that need to be augmented have a smaller reconstruction error. In the abnormal (positive) direction, it is difficult to reduce the reconstruction error between the input and output of the model, but it is very easy to increase it. Therefore, in addition to flipping the direction of the gradient, it is also necessary to limit the upper bound of the reconstruction error to prevent the problem of numerical explosion. Therefore, the ReLU function and upper bound are introduced when increasing the reconstruction error. According to experience, it is set to twice the abnormal threshold of the original model, that is, the optimization is stopped when the reconstruction error increases to twice the abnormal threshold of the original model.

[0079] The area corresponding to each leaf node in the tree model is a feature subspace. Since this method only augments samples in low-confidence feature subspaces, it is necessary to limit the range of augmented samples. To achieve this, when iteratively modifying sample feature values ​​based on gradient information, all feature values ​​contained in the predecessor nodes from the root node to the low-confidence leaf corresponding to the sample will be fixed, and only the features that have not been used on this decision path will be modified. Figure 2 As shown in the figure, for the low-confidence leaf node (0.9) on the first root tree, since the first dimension feature has been used by the root tree, only the last two dimensions of features are modified during augmentation. Similarly, the second low-confidence leaf node (0.3) can only modify the third dimension feature. This method ensures that the rules of non-low-confidence leaf nodes will not be modified. The iterative process will continue until there is no gradient on the modified feature dimension. Finally, for each low-confidence leaf node, the augmented samples obtained from all rounds of iterations will use the same method as the first step to generate the root tree to fit a subtree.

[0080] Tree merging and rule generation:

[0081] After the above steps, this method obtains a root tree and several subtrees corresponding to low-confidence leaf nodes. Next, they need to be merged into a tree to represent a complete set of rules. Because the features in the decision path are guaranteed not to be changed during the data augmentation in the previous step, the corresponding low-confidence leaf nodes can be directly replaced with subtrees, and finally a merged tree is formed. Like the root tree, the non-leaf nodes on the merged tree represent the relationship between the features used for decision-making and the decision threshold, while the leaf nodes represent the anomaly scores corresponding to the decision. In practical applications, security personnel are more concerned about whether the rules are abnormal (or the coarse-grained abnormal level) rather than the specific value of the abnormal probability. Therefore, this method discretizes the continuous values ​​in the leaf nodes into ranges representing different levels or degrees of abnormality to simplify the complexity of the merged tree. The discretization process is to recursively traverse from the deepest non-leaf node to the root node, and each time it is necessary to determine whether the values ​​of the left and right leaf nodes belong to the same abnormal range. If they do, they are merged into a leaf node representing the range of the abnormal degree. The division of the abnormal degree range needs to be specifically analyzed according to the specific network security scenarios and application requirements.

[0082] The last step is the process of rule generation and simplification. This method extracts each rule from the discretized merged tree. Each path from the root node to the leaf node is a rule, and the importance of the rules is sorted according to different abnormalities. The rules contain several features, decision thresholds, and the relationship between the two. In order to further increase the readability of the generated rules, the decision thresholds of continuous features can also be discretized. Figure 2 The simple example in shows how to classify the relationship between a feature and a decision threshold into two types: "too large" and "too small".

[0083] The present method embodiment provides a rule extraction method for a network security anomaly detection model. The method regards the deep learning anomaly detection model to be explained as a black box, uses the same training data as the original model as input, and uses the anomaly probability value output by the corresponding original model as a label to train the regression tree model. By generating a root regression tree, comprehensive and accurate global rules are extracted from the deep learning model, and data augmentation processing is performed on low-confidence areas to facilitate the generation of subtrees. The subtrees are merged with the root regression tree to ensure consistency with the decision boundary of the original model, thereby providing a reliable explanation for security experts. The method should be independent of the specific anomaly detection learning mechanism and applicable to a variety of anomaly detection models; finally, the method should be able to effectively assist security experts in model verification, knowledge discovery and decision support through the extracted rules, thereby improving the transparency and trust of the anomaly detection system.

[0084] Based on the above embodiments, this embodiment provides specific experiments to illustrate the method, which are as follows:

[0085] First, the interpretation quality of this method is compared with that of various existing tree-based rule extraction methods on three public data sets for traffic intrusion detection: CICIDS2017, Kitsune, and Kyoto2006+, and a public data set for log anomaly detection: HDFS. The results are as follows: Figure 3 As shown in the figure. The horizontal axis in the figure represents the maximum number of rules generated, which limits the number of rules extracted by different methods. The vertical axis represents the consistency / reliability of abnormal / normal rules, which measures the degree of fidelity of the generated rules compared with the original anomaly detection model. Consistency refers to the proportion of decisions in the generated rules that are consistent with the original model; reliability refers to how many decisions in the generated rules are reliable (consistent with the original model). From the results, it can be seen that compared with other methods, this method can achieve better fidelity with fewer rules.

[0086] Secondly, this method was also deployed in the national grid environment. The security protection system of the power monitoring system in the national grid will continuously monitor important equipment and generate logs, which can be divided into two categories: the collection type log regularly records the relevant information of the equipment (such as CPU and memory utilization, fan speed, etc.); the trigger type log records the relevant events that occur on the device (such as USB insertion and removal, directory changes, etc.). Each log will be classified into dangerous, important and general according to industry standards and expert knowledge, and dangerous and some important logs will be reported in real time for operators to analyze and process. Therefore, the classification of logs can be regarded as a rule set based on expert knowledge. In addition, this method is used to extract detection rules in the log anomaly model based on deep learning. Then, the expert knowledge and model knowledge are fused, and the detection effects of using expert knowledge alone, model knowledge, and the fusion of the two types of knowledge based on this method are compared. The results are shown in Table 1, showing the number of false positives and missed positives on the two devices.

[0087] Table 1 Deployment test results in the national grid environment

[0088]

[0089] It can be seen that although only using dangerous level logs for detection will not result in false positives, a large number of important anomalies will be missed (for example, device 2 has no dangerous level logs, so no anomalies are detected). If all important level logs are judged as anomalies, a large number of false positives will be introduced. Detection based on deep learning models can better balance false positives and missed negatives, but there is still a lot of room for improvement in performance. The detection effect of combining models and expert knowledge rules is the best.

[0090] Please refer to Figure 4 , Figure 4A structural block diagram of a rule extraction device for a network security anomaly detection model provided by an embodiment of the present invention; the specific device may include:

[0091] The root regression tree generation module 100 uses the abnormal probability value output by the original model as a label to train the regression tree model and generate a root regression tree based on the root regression tree generation method;

[0092] A positioning module 200 performs positioning processing on the root regression tree to obtain a low confidence area;

[0093] An augmentation module 300 performs data augmentation processing on the low confidence region to obtain augmented data;

[0094] A merging module 400 generates a root regression tree subtree based on the augmented data, and merges the root regression tree and the root regression tree subtree to obtain a merged tree;

[0095] The rule extraction module 500 performs rule extraction processing on the merged tree to obtain a complete rule set.

[0096] A rule extraction device for a network security anomaly detection model in this embodiment is used to implement the aforementioned rule extraction method for a network security anomaly detection model. Therefore, the specific implementation method of the rule extraction device for a network security anomaly detection model can be seen in the embodiment part of the rule extraction method for a network security anomaly detection model in the previous text. For example, the root regression tree generation module 100, the positioning module 200, the augmentation module 300, the merging module 400, and the rule extraction module 500 are respectively used to implement steps S101, S102, S103, S104, and S105 in the rule extraction method for a network security anomaly detection model. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part, which will not be repeated here.

[0097] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.

[0098] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.

[0099] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.

[0100] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0101] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.

[0102] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.

[0103] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0104] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0105] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0106] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0107] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0108] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0109] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0110] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A rule extraction method for a network security anomaly detection model, characterized in that: include: Based on the root regression tree generation method, the abnormal probability value output by the original model is used as a label to train the regression tree model and generate a root regression tree; Performing positioning processing on the root regression tree to obtain a low confidence area; Performing data augmentation processing on the low confidence region to obtain augmented data; Generate a root regression tree subtree based on the augmented data, merge the root regression tree and the root regression tree subtree to obtain a merged tree; The merged tree is subjected to rule extraction processing to obtain a complete rule set.

2. The rule extraction method of the network security anomaly detection model according to claim 1 is characterized in that: The rooted regression tree generation method uses the abnormal probability value output by the original model as a label to train the regression tree model, and generates a rooted regression tree, including: Take the training set of the original anomaly detection model as input and fit the tree model to get the output of the original model; Based on the CART algorithm, the output of the original model is used to train and generate a rooted regression tree.

3. The rule extraction method of the network security anomaly detection model according to claim 1 is characterized in that: The performing positioning processing on the root regression tree to obtain the low confidence area comprises: Use anomaly scores or probabilities to measure low confidence areas that appear when fitting the original model; The impurity of leaf nodes is used to measure the low confidence area that appears when fitting the root regression tree; An anomaly score threshold and an impurity quantile threshold are defined, and the low confidence region is located using the anomaly score threshold and the impurity score threshold.

4. The rule extraction method of the network security anomaly detection model according to claim 1 is characterized in that: The performing data augmentation processing on the low confidence region to obtain augmented data includes: Sample augmentation is performed from two directions. Multiple rounds of iterations are performed on each low-confidence leaf node using the original training set. The samples of the previous iteration are continuously modified based on the gradient information of the model to obtain samples with inconsistent decisions.

5. The rule extraction method of the network security anomaly detection model according to claim 4 is characterized in that: The calculation formula of the iteration is: in, and For X-based i The normal sample set and abnormal sample set generated by augmentation, and are the normal sample set and abnormal sample set generated in the jth round of iteration, β is the hyperparameter for modifying the step size, σ is the upper bound, and X i is the set of samples in the training set that falls into the i-th low-confidence leaf node in the training set, and f is the original anomaly detection model.

6. The rule extraction method of the network security anomaly detection model according to claim 1 is characterized in that: Generating a rooted regression tree subtree based on the augmented data comprises: When iteratively modifying sample feature values ​​based on gradient information, all feature values ​​contained in the predecessor nodes from the root node to the low-confidence leaf corresponding to the sample are fixed, and the features that have not been used on this decision path are modified. For each low-confidence leaf node, the augmented samples obtained from all rounds of iterations will be fitted to generate a subtree using the same method as the root regression tree.

7. The rule extraction method of the network security anomaly detection model according to claim 1 is characterized in that: The merging of the root regression tree and the root regression tree subtree to obtain a merged tree comprises: The root regression tree subtree is used to replace the low-confidence leaf nodes corresponding to the root regression tree and the continuous values ​​in the leaf nodes are discretized, and a recursive traversal is performed from the deepest non-leaf node upward to the root node.

8. A rule extraction device for a network security anomaly detection model, characterized in that: include: The root regression tree generation module uses the abnormal probability value output by the original model as a label to train the regression tree model and generate a root regression tree based on the root regression tree generation method; A positioning module performs positioning processing on the root regression tree to obtain a low confidence area; An augmentation module performs data augmentation processing on the low confidence area to obtain augmented data; A merging module, which generates a root regression tree subtree based on the augmented data, and merges the root regression tree and the root regression tree subtree to obtain a merged tree; The rule extraction module performs rule extraction processing on the merged tree to obtain a complete rule set.

9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Method and device for generating association rules of abnormal events in power system

    CN109389181A

  • System and method for extending machine learning to edge devices

    US20190251469A1

  • System and method for blockchain transaction risk management using machine learning

    US20220067752A1

  • General form of the tree alternating optimization (TAO) for learning decision trees

    WO2020247949A1

Cited By

  • Method and device for training result prediction model, storage medium and electronic equipment

    CN119884761A