An open set identification device and method for malicious traffic detection

By improving the generator and discriminator structures, the generator generates data of a specified category and trains adversarially against the discriminator, solving the performance degradation problem of the malicious traffic detection system under open set conditions, and achieving efficient identification of unknown classes and classification of known classes.

CN116070137BActive Publication Date: 2026-04-21UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF ELECTRONICS SCI & TECH OF CHINA
Filing Date
2023-02-08
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing malicious traffic detection systems struggle to effectively identify unknown types of attacks under open-set conditions, leading to performance degradation, and commonly used multi-model methods increase performance overhead.

Method used

A labeled generator module and a discriminator module with an auxiliary classifier are used. The generator generates data of a specified category and trains against the discriminator. The data generated by the generator is close to the distribution of real data, and the discriminator has the ability to distinguish and classify. Recognition is performed using generative adversarial and open set recognition modules.

Benefits of technology

It improves the authenticity and accuracy of generated data, reduces performance consumption, and can effectively identify unknown attacks and classify known attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116070137B_ABST
    Figure CN116070137B_ABST
Patent Text Reader

Abstract

The application discloses an open set recognition device and method for malicious traffic detection, and belongs to the technical field of malicious traffic detection, and aims to solve the problem of performance decline of a malicious traffic detection system when a new attack class appears. The main scheme comprises the following steps: a labeled generator model is used to generate images closer to real samples; the structure of a discriminator is improved, so that the discriminator has two outputs, namely a discrimination score layer and a classification layer; real images and augmented images generated by the generator are input into the discriminator for adversarial training; based on the discriminator score, the generator and the discriminator are mutually adversarial, and based on the classification layer result, an open set recognition model is trained. The implementation of the application introduces open set recognition, and the target of the open set recognition is to correctly classify known attack classes, and unknown classes can also be recognized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of malicious traffic detection technology, and provides an open set identification and detection device and method for malicious traffic detection. Background Technology

[0002] With the rise and development of IoT technology, more and more devices have achieved network access. However, most IoT devices adopt weak security measures, posing significant security risks. Network traffic is the main carrier of information interaction and transmission in cyberspace. Related research indicates that the number of network devices will reach 75.48 billion by 2025, and after 2022, this massive number of network devices will generate 4.8 ZB of traffic annually. Therefore, anomaly detection technology based on network traffic is an effective proactive defense technology in the field of malicious traffic detection. By identifying network traffic patterns, it can promptly detect abnormal traffic patterns and attack behaviors, which is of great significance for maintaining cyberspace security.

[0003] However, current research on malicious traffic detection systems often relies on models operating under the assumption of closed sets, making it difficult to adapt to real-world scenarios. During model training, no space is reserved for unknown categories, leading the model to incorrectly classify unknown classes as a subset of known classes. This results in decreased accuracy for classifying known classes and a lack of ability to handle new categories, causing omissions of novel attack types.

[0004] Researchers have proposed several methods to achieve high recognition performance even in open-set environments.

[0005] The paper "Towards open set deep networks" proposes the OpenMax model, which trains the network by minimizing the cross-entropy loss using a Softmax layer. Then, it calculates the distance between the features of the training samples and the average feature vector of their corresponding classes, and uses this distance to fit a separate Weibull distribution for each known class. The feature vectors are then redistributed based on the Weibull distribution fitting scores. Finally, Softmax is used to calculate the probabilities of the known and unknown classes.

[0006] The paper "Generative openmax for multi-class open set classification" uses a conditional generative network to generate samples of unknown classes and combines it with OpenMax to propose the G-OpenMax algorithm, which can perform probability estimation on the generated samples of unknown classes.

[0007] The paper "Open-category classification by adversarial sample generation" proposes an adversarial sample generation framework, which can be used to generate unknown class samples that are similar to known class samples. When necessary, it can also generate known class samples to expand the known class dataset.

[0008] However, the above methods all use multiple models to achieve open set recognition and known class classification, which greatly increases performance overhead. Summary of the Invention

[0009] To address the aforementioned problems in the prior art, the present invention aims to provide an open-set identification and detection device for malicious traffic detection. This system can solve the problem of performance degradation caused by the difficulty of trained models detecting unknown types of attacks under open-set conditions. The system initializes a generator structure with two inputs: random noise and random labels. The noise and category labels are concatenated as input to the generator, enabling it to generate data for the specified category. A discriminator structure is initialized, and a k+1-dimensional classification branch is added to the last layer of the discriminator to output the results of unknown class and known class classification, where k represents the number of attack categories in the training set. Based on the discriminator score, the discriminant score of the generated data is made closer to 0, and the discriminant score of the real data is made closer to 1. For the generator, the discriminant score of the generated data is made closer to 1, i.e., the generated data is close to the sample distribution of the real data. The data generated by the generator is used as an extension of the open-set data. Based on the loss function, the classification layer can identify unknown data and classify known attacks.

[0010] To achieve the above objectives, the present invention adopts the following technical solution:

[0011] This invention provides an open-set identification and detection device for malicious traffic, comprising the following modules:

[0012] The labeled generator module includes a generator and a discriminator. It takes randomly generated noise and randomly generated class labels as input to the generator, enabling it to generate data of the specified class. The generated data is then input into the discriminator to obtain a discrimination score, which represents the discriminator's evaluation of the real data and the generated data. The goal is to make the discrimination score of the generated data close to that of the real data, thereby optimizing the generated data and making it closer to the distribution of the real data samples.

[0013] Discriminator module with auxiliary classifier: Add a k+1 dimension classification branch to the last layer of the discriminator, so that the discriminator has two output layers: a discrimination score layer and a classification layer. The discrimination score layer generates true and false discrimination scores for the input data, and the classification layer classifies multi-class data and outputs the unknown class discrimination and known class classification results, where k represents the number of attack categories in the training set;

[0014] Generative adversarial and open set identification module: Based on the discrimination score output by the discriminator module, the generated data and real data generated by the generator are distinguished, so that the generator and discriminator modules can compete against each other and train together. The pseudo data generated by the generator, i.e., the generated data, is used as an extension of the open set data, so that the classification layer can identify and classify unknown data and also classify known attacks, thus obtaining the open set identification and monitoring model.

[0015] The specific implementation steps of the tagged generator module in the above technical solution are as follows:

[0016] S1: Initialize the generator's model structure. The generator has two inputs: random noise and random labels, enabling it to generate data of various categories. Before training begins, initialize the generator's model parameters using a Gaussian distribution.

[0017] S2: Concatenate the randomly generated noise and class labels together and input them into the generator to generate generated data of the specified class. Based on the discrimination score of the discriminator, optimize the generated data to make the discrimination score of the generated data close to 1, that is, close to the distribution of the real data samples. Finally, input the generated data and the real sample data into the discriminator module together.

[0018] The specific implementation steps of the discriminator module with auxiliary classifier in the above technical solution are as follows:

[0019] S1: Define the model structure of the discriminator. The discriminator has one input and two outputs. Generated data and real data are input into the discriminator. The last layer of the discriminator adds a k+1 dimension classification branch, where k represents the number of attack categories in the training set, so that it has two output layers: a discriminant score layer and a classification layer.

[0020] S2: Initialize the discriminant's discrimination score layer so that its discrimination score for the generated data is close to 0 and its discrimination score for the real data samples is close to 1;

[0021] S3: Initialize the classification layer of the discriminator so that it classifies the generated data generated by the generator into the (k+1)th class, thereby achieving the discrimination of unknown classes and the classification of known classes.

[0022] The specific implementation steps of the generative adversarial response and open set recognition module in the above technical solution are as follows:

[0023] S1: Based on the discriminator score of the discriminator module, the generator and discriminator modules compete against each other and train together, specifically as follows:

[0024] The discriminator is trained so that its discrimination score for generated data is close to 0, and its discrimination score for real data is as close to 1 as possible.

[0025] The generator is trained so that the generated data has a discrimination score close to 1, which is close to the distribution of real data. This allows the generator to learn the distribution of real data and the discriminator module to have the ability to distinguish between real and fake samples.

[0026] S2: If the generated data is close to the data distribution of the real sample and its feature space is close to the real sample but different from the real sample, it is considered as an expansion of the open set data. The loss function is adjusted so that the classification layer predicts k+1 for the open set data and k classes for the closed set data, so that the classification layer can identify unknown data and classify known attacks.

[0027] This invention also provides an open-set identification and detection method for malicious traffic, comprising the following steps:

[0028] S1: Initialize the generator structure to have two inputs: random noise and random class labels. Concatenate the noise and class labels as the input to the generator, so that the generator can generate generated data of the specified class.

[0029] S2: Initialize the discriminator structure and add a k+1 dimension classification branch to the last layer of the discriminator to obtain the discriminator module, which is used to output the results of unknown class discrimination and known class classification, where k represents the number of attack categories in the training set;

[0030] S3: Train the discriminator module so that the discriminator's discrimination score is close to 0 for generated data and close to 1 for real data;

[0031] The generator is trained to make the discrimination score of the generated data closer to 1, that is, the generated data is close to the sample distribution of the real data; the data generated by the generator is used as an expansion of the open set data, and based on the loss function, the classification layer can identify unknown data and classify known attacks.

[0032] In the above method, step 1 specifically includes the following steps:

[0033] S1.1: Initialize the generator model structure. The generator has two inputs: random noise and random labels, which enables it to generate data of various categories. Before training begins, the model parameters are initialized using a Gaussian distribution.

[0034] S1.2: Concatenate the randomly generated noise and class labels together and input them into the generator to generate generated data of the specified class. Based on the discriminator score, optimize the data generated by the generator so that the discrimination score of the generated data is close to 1, that is, close to the distribution of the real data samples. Finally, input the generated data and the real sample data into the discriminator module together.

[0035] In the above method, step 2 specifically includes the following steps:

[0036] S2.1: Define the discriminator module structure, add a k+1 dimension classification branch to the last layer of the discriminator, where k represents the number of attack categories in the training set, so that it has two output layers: a discriminant score layer and a classification layer;

[0037] S2.2: Initialize the discrimination score layer of the discriminator module so that its discrimination score for the pseudo data generated by the generator is close to 0, and its discrimination score for the real data samples is close to 1.

[0038] S2.3: Initialize the classification layer of the discriminator module so that it classifies the data generated by the generator into the (k+1)th class, thereby realizing the discrimination of unknown classes and the classification of known classes.

[0039] In the above method, step 3 specifically includes the following steps:

[0040] S3.1: Based on the discrimination score of the discriminator module, the generator and discriminator modules compete against each other and train together, specifically as follows:

[0041] The discriminator is trained so that its discrimination score for generated data is close to 0, and its discrimination score for real data is as close to 1 as possible.

[0042] The generator is trained so that the generated data has a discrimination score close to 1, which is close to the distribution of real data. This allows the generator to learn the distribution of real data and the discriminator module to have the ability to distinguish between real and fake samples.

[0043] S3.2: If the data generated by the generator is close to the data distribution of the real samples, and its feature space is close to the real samples but different from the real samples, it is considered an expansion of the open set data. The loss function is adjusted so that the classification layer predicts k+1 for the open set data and k classes for the closed set data, so that the classification layer can identify unknown data and classify known attacks.

[0044] Compared with the prior art, the beneficial effects of this invention are as follows:

[0045] I. Currently used generator models often produce generated data that resembles the distributions of multiple data categories, leading to significant discrepancies between the generated data and real data. This invention improves the generator structure by using a concatenation of random noise and random labels as input, effectively enhancing the realism of the generated data. Ordinary generators have only one input: random noise. However, real-world data has multiple categories with different distributions. Data generated by such a generator adversarial against a discriminator may resemble both categories. By inputting a concatenation of random noise and random labels into the generator, the discriminator also includes a classification layer. During the adversarial generation process, the focus is not only on the discriminant score but also on ensuring that the classifier's prediction is as close as possible to the random label value. After adversarial training, the generated data resembles the data with the random labels.

[0046] Second, this invention utilizes a generative adversarial model, which generates data that can simulate the sample distribution of unknown categories and expand the feature space of known categories, thus helping the model to better learn the sample distribution.

[0047] Third, this invention improves the discriminator network by adding a branch in the last layer, enabling the discriminator to simultaneously possess a discrimination score layer and a classification layer. The classification layer enables the rejection of unknown classes and the classification of known classes, while the discrimination score layer enables generative adversarial processes, greatly reducing performance consumption. Attached Figure Description

[0048] Figure 1 This is the overall architecture diagram of the present invention. Detailed Implementation

[0049] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.

[0050] An open-set identification and detection device for detecting malicious traffic includes the following components:

[0051] Labeled generator module: GANs typically consist of two parts: a generator and a discriminator. Through a "game" between the two, the generator continuously improves the quality of the generated data, while the discriminator gradually enhances its ability to identify whether a sample is true or false. To further improve the quality of the generator's generated data, noise and class labels are concatenated as input to the generator, enabling it to generate data of the specified class.

[0052] The discriminator module with an auxiliary classifier adds a k+1-dimensional classification branch to the last layer of the discriminator, where k represents the number of attack categories in the training set, giving it two output layers: a discriminant score layer and a classification layer. The discriminant score layer generates true / false scores for the input data, while the classification layer classifies multi-class data and outputs the classification results for unknown and known classes.

[0053] Generative Adversarial and Open-Set Recognition Modules: Based on the output scores of the discriminator module's discrimination score layer, the module distinguishes between the data generated by the generator and the real data, enabling the generator and discriminator modules to compete against each other and train together. Pseudo-data generated by the generator is used as an extension of the open-set data, allowing the classification layer to recognize unknown data and classify known attacks, resulting in an open-set recognition model.

[0054] The specific implementation steps of the tagged generator module in the above technical solution are as follows:

[0055] S1: Initialize the model structure, improving upon the standard generator model to provide two inputs: random noise and random labels, enabling it to generate data across various categories. Before training begins, initialize the model parameters using a Gaussian distribution.

[0056] S2: Concatenate the randomly generated noise and class labels, and input them into the generator to generate data for the specified class. Based on the discriminator score, optimize the generated data to make the discriminator score as close to 1 as possible, i.e., as close as possible to the distribution of the real data samples. Finally, input the generated data and the real sample data into the discriminator model.

[0057] The specific implementation steps of the discriminator module with auxiliary classifier in the above technical solution are as follows:

[0058] S1: Define the model structure and improve the ordinary discriminator network by adding a k+1 dimension classification branch to the last layer of the discriminator, where k represents the number of attack categories in the training set, so that it has two output layers: a discriminant score layer and a classification layer.

[0059] S2: Initialize the discriminant's discrimination score layer so that its discrimination score for the pseudo data generated by the generator is as close to 0 as possible, and its discrimination score for the real data samples is as close to 1 as possible;

[0060] S3: Initialize the classification layer of the discriminator so that it classifies the data generated by the generator into the (k+1)th class, thereby achieving the discrimination of unknown classes and the classification of known classes.

[0061] The specific implementation steps of the generative adversarial response and open set recognition module in the above technical solution are as follows:

[0062] S1: Based on the discriminator score, the generator and discriminator compete against each other and train together. When the generator generates data, its discriminator score is made as close to 1 as possible, that is, close to the distribution of the real data; for the data generated by the generator, its discriminator score is made as close to 0 as possible, and the discriminator score of the real data is made as close to 1 as possible. This competition allows the generator to learn the distribution of the real data and the discriminator to have the ability to distinguish between real and fake samples.

[0063] S2: The data generated by the generator approximates the data distribution of real samples, and its feature space is similar to but different from that of real samples. Therefore, it can be regarded as an expansion of open-set data. The loss function is adjusted so that the classification layer predicts k+1 classes for open-set data and k classes for closed-set data, thereby enabling the classification layer to identify unknown data and classify known attacks.

[0064] This invention also provides an open set identification and detection method for malicious traffic detection, which is divided into three parts: a labeled generator module, a discriminator module with an auxiliary classifier, and a generative adversarial mechanism and open set identification module. The method mainly includes the following steps:

[0065] S1: Initialize the generator structure to have two inputs: random noise and random labels. Concatenate the noise and category labels as the input to the generator, so that the generator can generate generated data of the specified category.

[0066] S2: Initialize the discriminator structure and add a k+1 dimension classification branch to the last layer of the discriminator to output the results of unknown class discrimination and known class classification, where k represents the number of attack categories in the training set;

[0067] S3: Based on the discriminator score, make the discriminant score of the generated data closer to 0 and the discriminant score of the real data closer to 1; for the generator, make the discriminant score of the generated data closer to 1, that is, make the generated data closer to the sample distribution of the real data; use the data generated by the generator as an extension of the open set data, and according to the loss function, enable the classification layer to identify unknown data and classify known attacks.

Claims

1. An open set identification detection device for malicious traffic, characterized in that, Includes the following modules: The labeled generator module includes a generator and a discriminator. It takes randomly generated noise and randomly generated class labels as input to the generator, enabling it to generate data of the specified class. The generated data is then input into the discriminator to obtain a discrimination score, which represents the discriminator's evaluation of the real data and the generated data. The goal is to make the discrimination score of the generated data close to that of the real data, thereby optimizing the generated data and making it closer to the distribution of the real data samples. Discriminator module with auxiliary classifier: Add a k+1 dimension classification branch to the last layer of the discriminator, so that the discriminator has two output layers: a discrimination score layer and a classification layer. The discrimination score layer generates true and false discrimination scores for the input data, and the classification layer classifies multi-class data and outputs the unknown class discrimination and known class classification results, where k represents the number of attack categories in the training set; Generative adversarial and open set identification module: Based on the discrimination score output by the discriminator module, the generated data and real data generated by the generator are distinguished, so that the generator and discriminator modules can compete against each other and train together. The pseudo data generated by the generator, i.e. the generated data, is used as an extension of the open set data, so that the classification layer can identify and classify unknown data and also classify known attacks, thus obtaining the open set identification and monitoring model. The specific implementation steps of the discriminator module with auxiliary classifier are as follows: S1: Define the model structure of the discriminator. The discriminator has one input and two outputs. Generated data and real data are input into the discriminator. The last layer of the discriminator adds a k+1 dimension classification branch, where k represents the number of attack categories in the training set, so that it has two output layers: a discriminant score layer and a classification layer. S2: Initialize the discriminant's discrimination score layer so that its discrimination score for the generated data is close to 0 and its discrimination score for the real data samples is close to 1; S3: Initialize the classification layer of the discriminator so that it classifies the generated data generated by the generator into the (k+1)th class, thereby achieving the discrimination of unknown classes and the classification of known classes; The specific implementation steps of the generative adversarial and open set recognition modules are as follows: S1: Based on the discriminator score of the discriminator module, the generator and discriminator modules compete against each other and train together, specifically as follows: The discriminator is trained so that its discrimination score for generated data is close to 0, and its discrimination score for real data is as close to 1 as possible. The generator is trained so that the generated data has a discrimination score close to 1, which is close to the distribution of real data. This allows the generator to learn the distribution of real data and the discriminator module to have the ability to distinguish between real and fake samples. S2: If the generated data is close to the data distribution of the real sample and its feature space is close to the real sample but different from the real sample, it is considered as an expansion of the open set data. The loss function is adjusted so that the classification layer predicts k+1 for the open set data and k classes for the closed set data, so that the classification layer can identify unknown data and classify known attacks.

2. The open set identification and detection device for malicious traffic of claim 1, wherein, The specific implementation steps of the tagged generator module are as follows: S1: Initialize the generator's model structure. The generator has two inputs: random noise and random labels, enabling it to generate data of various categories. Before training begins, initialize the generator's model parameters using a Gaussian distribution. S2: Concatenate the randomly generated noise and class labels together and input them into the generator to generate generated data of the specified class. Based on the discrimination score of the discriminator, optimize the generated data to make the discrimination score of the generated data close to 1, that is, close to the distribution of the real data samples. Finally, input the generated data and the real sample data into the discriminator module together.

3. An open set identification detection method for malicious traffic, characterized in that, Includes the following steps: S1: Initialize the generator structure to have two inputs: random noise and random class labels. Concatenate the noise and class labels as the input to the generator, so that the generator can generate generated data of the specified class. S2: Initialize the discriminator structure and add a k+1 dimension classification branch to the last layer of the discriminator to obtain the discriminator module, which is used to output the results of unknown class discrimination and known class classification, where k represents the number of attack categories in the training set; S3: Train the discriminator module so that the discriminator's discrimination score is close to 0 for generated data and close to 1 for real data; The generator is trained to make the discrimination score of the generated data closer to 1, that is, the generated data is close to the sample distribution of the real data; the data generated by the generator is used as an expansion of the open set data, and according to the loss function, the classification layer can identify unknown data and classify known attacks. Step 2 specifically includes the following steps: S2.1: Define the discriminator module structure, add a k+1 dimension classification branch to the last layer of the discriminator, where k represents the number of attack categories in the training set, so that it has two output layers: a discriminant score layer and a classification layer; S2.2: Initialize the discrimination score layer of the discriminator module so that its discrimination score for the pseudo data generated by the generator is close to 0, and its discrimination score for the real data samples is close to 1. S2.3: Initialize the classification layer of the discriminator module so that it classifies the data generated by the generator into the (k+1)th class, thereby realizing the discrimination of unknown classes and the classification of known classes; S3.1: Based on the discrimination score of the discriminator module, the generator and discriminator modules compete against each other and train together, specifically as follows: The discriminator is trained so that its discrimination score for generated data is close to 0, and its discrimination score for real data is as close to 1 as possible. The generator is trained so that the generated data has a discrimination score close to 1, which is close to the distribution of real data. This allows the generator to learn the distribution of real data and the discriminator module to have the ability to distinguish between real and fake samples. S3.2: If the data generated by the generator is close to the data distribution of the real samples, and its feature space is close to the real samples but different from the real samples, it is considered an expansion of the open set data. The loss function is adjusted so that the classification layer predicts k+1 for the open set data and k classes for the closed set data, so that the classification layer can identify unknown data and classify known attacks.

4. The open-set recognition detection method for malicious traffic of claim 3, wherein, Step 1 specifically includes the following steps: S1.1: Initialize the generator model structure. The generator has two inputs: random noise and random labels, which enables it to generate data of various categories. Before training begins, the model parameters are initialized using a Gaussian distribution. S1.2: Concatenate the randomly generated noise and class labels together and input them into the generator to generate generated data of the specified class. Based on the discriminator score, optimize the data generated by the generator so that the discrimination score of the generated data is close to 1, that is, close to the distribution of the real data samples. Finally, input the generated data and the real sample data into the discriminator module together.