GAN-DRIVEN NETWORK TRAFFIC SAMPLING STRATEGY

An embodiment trains, using a first plurality of real data packets transmitted over a communications network, a generative adversarial network (GAN) to generate a first plurality of generated data packets corresponding to the plurality of real data packets. An embodiment generates, using the trained GAN, a second plurality of generated data packets from a second plurality of real data packets transmitted over the communications network. An embodiment generates, using a probability distribution of the second plurality of real data packets and a probability distribution of the second plurality of generated data packets, a plurality of sampling indices, each sampling index in the plurality of sampling indices comprising a packet number to be sampled for inspection. An embodiment inspects, using a packet inspector, a third plurality of data packets transmitted over the communications network, each inspected data packet having an index in the plurality of sampling indices.

BACKGROUND

The present invention relates generally to communications network management. More particularly, the present invention relates to a method, system, and computer program for a GAN-driven network traffic sampling strategy.

A generative adversarial network (GAN) is a machine learning framework that includes two artificial neural networks: a generator and a discriminator. The generator generates new, fake, instances of data and the discriminator distinguishes the generated instances from real (i.e., non-fake) data. Given a training set of real data, a GAN learns, during training, to generate new data with the same statistics as the training set. For example, a GAN trained using a training set of real images knows how to generate new images that are similar (as measured by one or more statistical measurements) to the images in the training set.

As communications networks include more devices and have more complex topologies, network uptime and performance requirements have also become more stringent. Thus, monitoring the health of devices on the network and data flows within the network, to mitigate small problems and prevent them from developing into larger problems, is increasingly important. One network management method relies on using a reverse proxy, or reverse proxy inspector, to inspect data packets sent over the network. A reverse proxy is an application that sits in front of back-end applications and forwards client requests to those applications, and application responses back to the client as if they originated from the web server itself. For example, a client makes a request to an application. A reverse proxy server intercepts and inspects the request, determines that the is valid and that the proxy does not have the requested resource in its own cache. The proxy then forwards the request to another server, which delivers the requested resource back to the proxy, which in turn delivers the requested resource to the client. A reverse proxy is also usable to forward network traffic from one device on a network to another, and thus, a reverse proxy is also in position to monitor and inspect traffic moving within a network and between logical network zones.

SUMMARY

The illustrative embodiments provide for a GAN-driven network traffic sampling strategy. An embodiment includes training, using a first plurality of real data packets transmitted over a communications network, a generative adversarial network (GAN) to generate a first plurality of generated data packets corresponding to the plurality of real data packets, the training resulting in a trained GAN. An embodiment includes generating, using the trained GAN, a second plurality of generated data packets from a second plurality of real data packets transmitted over the communications network. An embodiment includes generating, using a probability distribution of the second plurality of real data packets and a probability distribution of the second plurality of generated data packets, a plurality of sampling indices, each sampling index in the plurality of sampling indices comprising a packet number to be sampled for inspection. An embodiment includes inspecting, using a packet inspector, a third plurality of data packets transmitted over the communications network, each inspected data packet having an index in the plurality of sampling indices. Other embodiments of this aspect include corresponding computer systems, apparatus, and computer programs recorded on one or more computer storage devices, each configured to perform the actions of the embodiment.

An embodiment includes a computer usable program product. The computer usable program product includes a computer-readable storage medium, and program instructions stored on the storage medium.

An embodiment includes a computer system. The computer system includes a processor, a computer-readable memory, and a computer-readable storage medium, and program instructions stored on the storage medium for execution by the processor via the memory.

DETAILED DESCRIPTION

The illustrative embodiments recognize that, when selecting samples of network traffic to detect and avert network problems, selecting an appropriate sampling rate is critical. Because sampling takes time, delaying network traffic, oversampling reduces network performance below an acceptable level. On the other hand, undersampling risks missing important data, and thus reduces monitoring quality below an acceptable level. Thus, the illustrative embodiments recognize that it is important to select a sampling rate that provides the required level of monitoring quality, but avoid a higher sampling rate than that required. Typically, the sampling rate is a constant, or adjusted in an ad hoc manner by human experts, but a constant is likely to result in oversampling for safety reasons, thus reducing network performance. In addition, the sampling rate might need to change over time, as a network's configuration and type and amount of traffic change, and human experts are unlikely to be able to anticipate such changes. Thus, the illustrative embodiments recognize that there is an unmet need to select network data samples in a manner that is adapted to a particular network being monitored, while selecting a sampling rate that is only as high as actually needed for a particular situation.

The present disclosure addresses the deficiencies described above by providing a process (as well as a system, method, machine-readable medium, etc.) that, using a first plurality of real data packets transmitted over a communications network, trains a GAN to generate a first plurality of generated data packets corresponding to the plurality of real data packets; generates, using the trained GAN, a second plurality of generated data packets from a second plurality of real data packets transmitted over the communications network; generates, using a probability distribution of the second plurality of real data packets and a probability distribution of the second plurality of generated data packets, a plurality of sampling indices; and inspects, using a packet inspector, a third plurality of data packets transmitted over the communications network, each inspected data packet having an index in the plurality of sampling indices. Thus, the illustrative embodiments provide for a GAN-driven network traffic sampling strategy.

An illustrative embodiment receives a plurality of real data packets transmitted over a communications network. One embodiment uses a portion of the plurality of real data packets as model training data. Another embodiment uses a separate plurality of real data packets (e.g., data packets transmitted over a different network, at a different time, or indicative of a particular network scenario desired to be included in the training) as model training data.

An embodiment trains a GAN to generate a first plurality of generated data packets corresponding to the real data packets. In particular, an embodiment uses a presently available technique to add noise to samples of real data packets, thus generating noisy simulated network traffic for use as training data. Learning to generate noisy traffic is a technique used to improve anomaly detection systems' ability to identify abnormal behavior within a network or system. Intentionally introducing noise or anomalies during the training process helps the model become more robust and adaptive, making the model better equipped to detect anomalous patterns that may indicate malicious or unexpected activity during real-world operations. In particular, an anomaly detection model is initially trained on a dataset of normal network traffic, representing typical patterns of communication, transactions, or user behavior within a network. The model learns the regularities and common features present in the normal data, establishing a baseline for what is considered “normal” behavior. As well, to make the model more resilient and capable of recognizing deviations from normalcy, noise is intentionally introduced into the training data. This noise can take various forms, such as random variations, simulated attacks, or anomalies injected into the training set. During training, the model is exposed to both clean and noisy data. Thus, the model learns not only to recognize the known patterns of normal behavior but also to identify anomalies, irregularities, or deviations from the expected patterns, including those introduced by noise. Once trained, the model can be deployed to monitor network traffic in real-time. When the system encounters traffic that deviates significantly from the learned normal patterns, the model can flag it as potentially anomalous or suspicious. The model's ability to generalize from noisy data allows it to detect not only known anomalies but also novel and evolving threats that may not have been explicitly seen during training. Exposing the model to a variety of noisy scenarios during training also helps the model becomes less prone to generating false positives.

A generator portion of the GAN uses the noisy simulated network traffic to generate generated data packet samples. A discriminator portion of the GAN discriminates between the real data packets and the generated data packet samples, deciding (i.e., predicting) whether a particular input is real or generated (i.e., fake). Thus, the discriminator portion outputs two distributions: a real distribution and a fake distribution. The real distribution is a distribution of the discriminator's prediction of a probability that an input sample was sampled from real data. The fake distribution is a distribution of the discriminator's prediction of a probability that an input sample was sampled from fake data.

An embodiment computes an infinium regularization of error by computing a Wasserstein distance, resulting in a regularization. A Wasserstein distance is a presently available technique that measures the minimum cost required to transform a real distribution (denoted by Pr) into a fake distribution (denoted by Pg), where the cost is defined as the distance between a sample from Pr (denoted by x) and a sample from Pg (denoted by y), using the expression W(Pr, Pg)=inf{E(x, y)˜γ [∥x−y∥]}, where ∥x−y∥ is the distance (e.g., Euclidean distance) between points x and y, y denotes joint distributions (a probability distribution over pairs of random variables (X,Y) where X follows the distribution Pr and Y follows the distribution Pg), and inf{ } denotes the infimum of a set, i.e., a value that is less than or equal to all the elements in the set but as small as possible. In other words, the infimum of a set is the greatest lower bound of the set. The infimum is taken over all joint distributions γ with Pr and Pg as their marginal functions, and W(Pr, Pg) represents the set of all such joint distributions. Marginal functions describe how the probability mass is distributed over the entire range of possible data values for both real data and generated data. This regularization improves the stability of the training process and the quality of the generated samples, and is used to minimize the adjusted loss function.

An embodiment, using a presently available GAN training technique, uses the computed regularization to compute a generator loss, and uses the generator loss to adjust one or more parameters of the generator, thus training the generator. An embodiment, using a presently available GAN training technique, uses the computed regularization and a penalty term to compute a gradient loss, and uses the gradient loss to adjust one or more parameters of the discriminator, thus training the discriminator.

An embodiment receives a second plurality of real data packets transmitted over the communications network and uses the trained GAN to generate a second plurality of generated data packets from the real data packets. Both the second plurality of real data packets and the second plurality of generated data packets have corresponding probability distributions.

An embodiment generates, using a probability distribution of the second plurality of real data packets and a probability distribution of the second plurality of generated data packets, a plurality of sampling indices. In particular, an embodiment uses a presently available pseudo-random number generator technique to generate a plurality of random numbers Z, with a uniform distribution. An embodiment computes an interpolation between a probability distribution of the real data and a probability distribution of the generated data, by converting each probability distribution to a corresponding cumulative distribution function, converting each cumulative distribution function to a discrete form (e.g., by rounding each value down, up, or to the nearest integer) denoted by Preal and Pnoisy respectively, and computing sampling-index=Z*Preal+ (1−Z)*Pnoisy for each random number Z.

An embodiment uses a presently available packet inspection technique, such as a reverse proxy, to inspect data packets transmitted over the communications network. Each inspected data packet has an index in the plurality of sampling indices. For example, if the plurality of sampling indices includes indices 1, 4, 10, 25, 42, etc., an embodiment samples the first, fourth, tenth, twenty-fifth, and forty-second packets, and so on.

An embodiment uses the plurality of inspected data packets and a presently available technique to detect an anomalous behavior of the communications network. For example, network traffic data might be sampled to detect and avert network problems such as a distributed attack that is disguised as ‘good’ network traffic, or unusual traffic spikes that are associated with a particular group of devices or a geography, and include unusual network hops. As another example, an embodiment might be used to understand the commissioning of new network campuses that should be behaving synonymously to alternative campuses that have been commissioned earlier, as new commissions are more vulnerable to attacks and spurious activities.

An embodiment retrains the GAN with new real data, to adapt the GAN to changing network traffic characteristics. Another embodiment uses a presently available technique to analyze the GAN's output and provides feedback when sampling network traffic according to the selected sampling indices fails to detect an anomalous behavior of the communications network. An embodiment uses the feedback to adjust the GAN or to adjust one or more anomalous behavior detection criteria, using presently available techniques.

Furthermore, simplified diagrams of the data processing environments are used in the figures and the illustrative embodiments. In an actual computing environment, additional structures or components that are not shown or described herein, or structures or components different from those shown but for a similar function as described herein may be present without departing the scope of the illustrative embodiments.

Furthermore, the illustrative embodiments are described with respect to specific actual or hypothetical components only as examples. Any specific manifestations of these and other similar artifacts are not intended to be limiting to the invention. Any suitable manifestation of these and other similar artifacts can be selected within the scope of the illustrative embodiments.

Measured service: cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, reported, and invoiced, providing transparency for both the provider and consumer of the utilized service.

With reference to FIG. 2, this figure depicts a flowchart of an example process for loading of process software in accordance with an illustrative embodiment. The flowchart can be executed by a device such as computer 101, end user device 103, remote server 104, or a device in private cloud 106 or public cloud 105 in FIG. 1.

Step 202 begins the deployment of the process software. An initial step is to determine if there are any programs that will reside on a server or servers when the process software is executed (203). If this is the case, then the servers that will contain the executables are identified (229). The process software for the server or servers is transferred directly to the servers' storage via FTP or some other protocol or by copying though the use of a shared file system (230). The process software is then installed on the servers (231).

Next, a determination is made on whether the process software is to be deployed by having users access the process software on a server or servers (204). If the users are to access the process software on servers, then the server addresses that will store the process software are identified (205).

A determination is made if a proxy server is to be built (220) to store the process software. A proxy server is a server that sits between a client application, such as a Web browser, and a real server. It intercepts all requests to the real server to see if it can fulfill the requests itself. If not, it forwards the request to the real server. The two primary benefits of a proxy server are to improve performance and to filter requests. If a proxy server is required, then the proxy server is installed (221). The process software is sent to the (one or more) servers either via a protocol such as FTP, or it is copied directly from the source files to the server files via file sharing (222). Another embodiment involves sending a transaction to the (one or more) servers that contained the process software, and have the server process the transaction and then receive and copy the process software to the server's file system. Once the process software is stored at the servers, the users via their client computers then access the process software on the servers and copy to their client computers file systems (223). Another embodiment is to have the servers automatically copy the process software to each client and then run the installation program for the process software at each client computer. The user executes the program that installs the process software on his client computer (232) and then exits the process (210).

In step 206 a determination is made whether the process software is to be deployed by sending the process software to users via e-mail. The set of users where the process software will be deployed are identified together with the addresses of the user client computers (207). The process software is sent via e-mail to each of the users' client computers (224). The users then receive the e-mail (225) and then detach the process software from the e-mail to a directory on their client computers (226). The user executes the program that installs the process software on his client computer (232) and then exits the process (210).

Lastly, a determination is made on whether the process software will be sent directly to user directories on their client computers (208). If so, the user directories are identified (209). The process software is transferred directly to the user's client computer directory (227). This can be done in several ways such as, but not limited to, sharing the file system directories and then copying from the sender's file system to the recipient user's file system or, alternatively, using a transfer protocol such as File Transfer Protocol (FTP). The users access the directories on their client file systems in preparation for installing the process software (228). The user executes the program that installs the process software on his client computer (232) and then exits the process (210).

With reference to FIG. 3, this figure depicts a block diagram of an example configuration for a GAN-driven network traffic sampling strategy in accordance with an illustrative embodiment. Application 300 is the same as application 200 in FIG. 1.

In the illustrated embodiment, application 300 receives a plurality of real data packets transmitted over a communications network. One implementation of application 300 uses a portion of the plurality of real data packets as model training data. Another implementation of application 300 uses a separate plurality of real data packets (e.g., data packets transmitted over a different network, at a different time, or indicative of a particular network scenario desired to be included in the training) as model training data.

GAN training module 310 trains a GAN to generate a first plurality of generated data packets corresponding to the real data packets. In particular, module 310 uses a presently available technique to add noise to samples of real data packets, thus generating noisy simulated network traffic for use as training data. A generator portion of the GAN uses the noisy simulated network traffic to generate generated data packet samples. A discriminator portion of the GAN discriminates between the real data packets and the generated data packet samples, deciding (i.e., predicting) whether a particular input is real or generated (i.e., fake). Thus, the discriminator portion outputs two distributions: a real distribution and a fake distribution. The real distribution is a distribution of the discriminator's prediction of a probability that an input sample was sampled from real data. The fake distribution is a distribution of the discriminator's prediction of a probability that an input sample was sampled from fake data.

Module 310 computes an infinium regularization of error by computing a Wasserstein distance, resulting in a regularization. A Wasserstein distance is a presently available technique that measures the minimum cost required to transform a real distribution (denoted by Pr) into a fake distribution (denoted by Pg), where the cost is defined as the distance between a sample from Pr (denoted by x) and a sample from Pg (denoted by y), using the expression W(Pr, Pg)=inf{E(x,y)˜γ[∥x−y∥]}, where ∥x−y∥ is the distance (e.g., Euclidean distance) between points x and y, y denotes joint distributions (a probability distribution over pairs of random variables (X,Y) where X follows the distribution Pr and Y follows the distribution Pg), and inf{ } denotes the infimum of a set, i.e., a value that is less than or equal to all the elements in the set but as small as possible. In other words, the infimum of a set is the greatest lower bound of the set. The infimum is taken over all joint distributions γ with Pr and Pg as their marginal functions, and W(Pr, Pg) represents the set of all such joint distributions. Marginal functions describe how the probability mass is distributed over the entire range of possible data values for both real data and generated data. This regularization improves the stability of the training process and the quality of the generated samples, and is used to minimize the adjusted loss function.

Module 310, using a presently available GAN training technique, uses the computed regularization to compute a generator loss, and uses the generator loss to adjust one or more parameters of the generator, thus training the generator. Module 310, using a presently available GAN training technique, uses the computed regularization and a penalty term to compute a gradient loss, and uses the gradient loss to adjust one or more parameters of the discriminator, thus training the discriminator.

Data sample generation module 320 receives a second plurality of real data packets transmitted over the communications network and uses the trained GAN to generate a second plurality of generated data packets from the real data packets. Both the second plurality of real data packets and the second plurality of generated data packets have corresponding probability distributions.

Sampling index generation module 330 generates, using a probability distribution of the second plurality of real data packets and a probability distribution of the second plurality of generated data packets, a plurality of sampling indices. In particular, module 330 uses a presently available pseudo-random number generator technique to generate a plurality of random numbers Z, with a uniform distribution. Module 330 computes an interpolation between a probability distribution of the real data and a probability distribution of the generated data, by converting each probability distribution to a corresponding cumulative distribution function, converting each cumulative distribution function to a discrete form (e.g., by rounding each value down, up, or to the nearest integer) denoted by Preal and Pnoisy respectively, and computing sampling-index=Z*Preal+(1−Z)*Pnoisy for each random number Z.

Application 300 uses a presently available packet inspection technique, such as a reverse proxy, to inspect data packets transmitted over the communications network, or cause the data packets to be inspected by another application. Each inspected data packet has an index in the plurality of sampling indices. For example, if the plurality of sampling indices includes indices 1, 4, 10, 25, 42, etc., application 300 samples, or causes to be sampled, the first, fourth, tenth, twenty-fifth, and forty-second packets, and so on. Application 300 reports a result of the inspection.

Application 300 uses the plurality of inspected data packets and a presently available technique to detect an anomalous behavior of the communications network. For example, network traffic data might be sampled to detect and avert network problems such as a distributed attack that is disguised as ‘good’ network traffic, or unusual traffic spikes that are associated with a particular group of devices or a geography, and include unusual network hops. As another example, application 300 might be used to understand the commissioning of new network campuses that should be behaving synonymously to alternative campuses that have been commissioned earlier, as new commissions are more vulnerable to attacks and spurious activities.

Application 300 retrains the GAN with new real data, to adapt the GAN to changing network traffic characteristics. Another implementation of application 300 uses a presently available technique to analyze the GAN's output and provides feedback when sampling network traffic according to the selected sampling indices fails to detect an anomalous behavior of the communications network. Application 300 uses the feedback to adjust the GAN or to adjust one or more anomalous behavior detection criteria, using presently available techniques.

With reference to FIG. 4, this figure depicts an example of a GAN-driven network traffic sampling strategy in accordance with an illustrative embodiment. The example can be executed using application 300 in FIG. 3.

As depicted, application 300 receives real data packets 400, a plurality of real data packets transmitted over a communications network, and samples real data packets 400, resulting in real samples 402. Mixer 420 adds noise 410 to real samples 402, thus generating noisy simulated network traffic 422 for use as training data. Generator 430 uses noisy simulated network traffic 422 to generate generated data packet samples 432. Discriminator 440 discriminates between real samples 402 and generated data packet samples 432, deciding (i.e., predicting) whether a particular input is real or generated (i.e., fake). Thus, discriminator 440 outputs two distributions: real distribution 442 and fake distribution 444.

Infinium regularization of error 450 computes a Wasserstein distance in a manner described herein, resulting in regularization 452. This regularization improves the stability of the training process and the quality of the generated samples, and is used to minimize the adjusted loss function.

Generator loss computation 470 uses regularization 452 to compute generator loss 472, which is used to adjust one or more parameters of generator 420, thus training generator 430. Gradient loss computation 460 uses regularization 452 and gradient penalty 454 to compute gradient loss 462, which is used to adjust one or more parameters of discriminator 440, thus training discriminator 440.

With reference to FIG. 5, this figure depicts a continued example of a GAN-driven network traffic sampling strategy in accordance with an illustrative embodiment. Generator 430 and discriminator 440 are the same as generator 430 and discriminator 440 in FIG. 4.

As depicted, application 300 receives real data packets 500, a plurality of real data packets transmitted over a communications network, and samples real data packets 500, resulting in real samples 502. Generator 430 generates generated samples 532. Discriminator 440 discriminates between real samples 502 and generated samples 532, deciding (i.e., predicting) whether a particular input is real or generated (i.e., fake). Thus, discriminator 440 outputs two distributions: real distribution 542 and fake distribution 544.

With reference to FIG. 6, this figure depicts a continued example of a GAN-driven network traffic sampling strategy in accordance with an illustrative embodiment. Sampling index generation module 330 is the same as sampling index generation module 330 in FIG. 3. Real distribution 542 and fake distribution 544 are the same as real distribution 542 and fake distribution 544 in FIG. 5.

Sampling index generation module 330 uses real distribution 542 and fake distribution 544 to generate sampling indices 610. Packet inspector 620 inspects real data packets 600, generating inspection result 622.

With reference to FIG. 7, this figure depicts a flowchart of an example process for a GAN-driven network traffic sampling strategy in accordance with an illustrative embodiment. Process 700 can be implemented in application 200 in FIG. 3.

In the illustrated embodiment, at block 702, the process, using a first plurality of real data packets transmitted over a communications network, trains a GAN to generate a first plurality of generated data packets corresponding to the plurality of real data packets. At block 704, the process, using the trained GAN, generates a second plurality of generated data packets from a second plurality of real data packets transmitted over the communications network. At block 706, the process, using a probability distribution of the second plurality of real data packets and a probability distribution of the second plurality of generated data packets, generates a plurality of sampling indices, each sampling index comprising a packet number to be sampled for inspection. At block 708, the process, using a packet inspector, inspects a third plurality of data packets transmitted over the communications network, each inspected data packet having an index in the plurality of sampling indices. At block 710, the process, using the plurality of inspected data packets, detects an anomalous behavior of the communications network. Then the process ends.

Embodiments of the present invention may also be delivered as part of a service engagement with a client corporation, nonprofit organization, government entity, internal organizational structure, or the like. Aspects of these embodiments may include configuring a computer system to perform, and deploying software, hardware, and web services that implement, some or all of the methods described herein. Aspects of these embodiments may also include analyzing the client's operations, creating recommendations responsive to the analysis, building systems that implement portions of the recommendations, integrating the systems into existing processes and infrastructure, metering use of the systems, allocating expenses to users of the systems, and billing for use of the systems. Although the above embodiments of present invention each have been described by stating their individual advantages, respectively, present invention is not limited to a particular combination thereof. To the contrary, such embodiments may also be combined in any way and number according to the intended deployment of present invention without losing their beneficial effects.