STAN: Synthetic Network Traffic Generation using Autoregressive Neural Models

Shengzhe Xu, Manish Marwah, Naren RamakrishnanarXiv 2020

Abstract

STAN (Synthetic network Traffic generation with Autoregressive Neural models) is a novel generative framework designed to produce realistic, privacy-preserving network traffic data. By combining convolutional neural networks with mixture density layers, it captures complex temporal and attribute-level dependencies, allowing researchers to train high-performing cybersecurity models without ever touching sensitive "real" data.

Introduction

In the world of cybersecurity, data is gold, but it is often locked behind a vault of privacy concerns. Organizations are hesitant to share network traffic logs because they contain sensitive information about user behavior and infrastructure. While synthetic data is a promising alternative, existing methods—like standard Generative Adversarial Networks (GANs)—often fail to capture the "sticky" dependencies found in network traffic. Specifically, they struggle to model how one packet relates to the next (temporal dependency) and how different fields within a single log entry, like protocol and port number, relate to each other (attribute dependency).

Problem Statement

Network data is inherently "messy": it contains a mix of continuous values (like duration), discrete categories (like protocols), and specialized formats (like IP addresses) that do not fit neatly into standard machine learning architectures. The primary challenge lies in generating synthetic data that maintains the statistical and semantic integrity of the original dataset while ensuring that no private information is compromised.

Comparison of the current workflow vs. the proposed STAN workflow for privacy-preserving machine learning.

The STAN Framework

The authors propose STAN, an autoregressive generative model. Unlike GANs, which can be unstable to train, STAN focuses on explicitly estimating the joint probability distribution of the data.

Key Technical Components

  • Window CNN (wCNN): A convolutional architecture that slides over a window of historical traffic to extract features, capturing how the past influences the present.
  • Hybrid Output Layers: To handle heterogeneous data, STAN uses Mixture Density Networks (MDN) to model continuous variables (like bytes) as a mix of Gaussian distributions, and Softmax layers for discrete categorical variables.
  • Specialized Domain Modeling:
    • IP Addresses: Instead of treating them as numbers, STAN splits them into four 256-categorical octets.
  • Port Numbers: A hybrid approach treats well-known ports (<1024) as discrete categories and bins higher ports into groups of 100.
  • Causal Masking: The model uses specific masks (Mask A and Mask B) to control whether attributes within the same row are treated as independent or sequentially dependent.
The STAN architecture featuring a window CNN (a), hybrid output layers (b), and specialized loss functions (c).

Evaluation and Results

The researchers evaluated STAN using two primary sources: a simulated two-variable dataset with known linear dependencies and the UGR’16 Dataset, a massive, real-world benchmark containing netflow data captured by a Tier-3 ISP.

Key Insights

  • Attribute Dependence: Modeling dependencies within a single row (e.g., knowing the port helps predict the protocol) significantly improved data quality. The "Mask B" approach, which generates attributes sequentially within a row, outperformed simpler independence assumptions.
  • Domain Knowledge: By structuring the model to "understand" the format of IP addresses and the significance of well-known ports, the synthetic data became much more realistic.
  • Self-Supervision Utility: To prove the data's utility, the authors used synthetic data to train anomaly detection models. A model trained entirely on synthetic data achieved an F1-score of 0.97, compared to 0.99 for a model trained on real data—a negligible 2% performance drop.

Comparative Performance

STAN significantly outperformed traditional methods (Gaussian Mixture Models, Bayesian Networks) and recent deep learning models (WPGAN, CTGAN) in terms of Jensen-Shannon (JS) divergence and Negative Log-Likelihood. Furthermore, STAN-generated data passed "sanity checks" (e.g., ensuring TCP flags aren't present in UDP flows) at a rate of 93-100%, whereas some GAN-based baselines struggled to maintain these basic networking rules.

Conclusion and Future Work

While the results are impressive, the authors note several areas for growth. Future work includes formal privacy validation through membership inference attacks to empirically prove that no training data is leaked. Additionally, the team plans to explore architectures capable of capturing longer-term temporal dependencies beyond the current window-based CNN, improve generation efficiency for massive datasets, and extend support to IPv6.

Summary updated

BibTeX
@misc{xu2020stan,
  author = {Shengzhe Xu and Manish Marwah and Naren Ramakrishnan},
  title = {{STAN: Synthetic Network Traffic Generation using Autoregressive Neural Models}},
  year = {2020},
  eprint = {2009.12740},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2009.12740},
}
Figure