Compare commits
4 Commits
c050733c54
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| c7eacb45ed | |||
| 04cad0f50d | |||
| 623f365915 | |||
|
|
ddc06aa8a7 |
84
API/system_design.md
Normal file
84
API/system_design.md
Normal file
@@ -0,0 +1,84 @@
|
||||
# System design
|
||||
In this document, the original paper is refer as "Spatio-Temporal Diffusion Model for Cellular Traffic Generation (STOUTER)".
|
||||
|
||||
>[!WARNING]
|
||||
> We should decide which option to use, A or B.
|
||||
>
|
||||
> Check "High level" section for details.
|
||||
|
||||
# Questions to be considered
|
||||
1. Do we need time series graph model?
|
||||
- If so, how do we show key points aside from the original paper? (Like, just applying it to other protocols?)
|
||||
|
||||
2. If we focusing on security level, should we use time-focusing model?
|
||||
|
||||
## The original approach
|
||||
|
||||
### What do they generate
|
||||
The STOUTER model generates synthetic traffic features, such as the spatio-temporal distribution of cellular traffic, including:
|
||||
|
||||
- The timing and frequency of requests.
|
||||
|
||||
- The spatial distribution (e.g., base station-specific traffic).
|
||||
|
||||
- The uncertainty in traffic demand (fluctuations in traffic patterns).
|
||||
|
||||
These are aggregated features of the traffic and do not represent raw packet data (like what you would capture in a pcap file).
|
||||
|
||||
The generated features can be used for network performance analysis, resource optimization, and traffic prediction, rather than for raw traffic simulation.
|
||||
|
||||
|
||||
### What kinds of data needed
|
||||
**tl;dr**: Features-extracted traffic
|
||||
|
||||
|
||||
The paper specifically mentions the use of aggregated traffic data, which likely includes pre-processed or feature-extracted information, such as:
|
||||
|
||||
- Hourly traffic statistics: For example, the traffic volume at a base station for each hour of the day.
|
||||
|
||||
- Weekly patterns: Patterns showing traffic fluctuations across different days of the week (e.g., weekends vs. weekdays).
|
||||
|
||||
- Base station features: Features derived from geographical and operational data about base stations, such as the number of points of interest (POIs) in the area covered by the base station (e.g., shops, schools, hospitals, etc.).
|
||||
|
||||
- Spatio-temporal data: This includes encoding spatial dependencies (proximity between base stations) and temporal dependencies (time of day, day of the week) using graphs.
|
||||
|
||||
|
||||
### The workflow
|
||||
1. **Input**: The user provides initial traffic data for a base station or multiple base stations (historical data). This input is processed and used to initialize the temporal and base station graphs.
|
||||
|
||||
2. **Forward Process (Noise Addition)**: The model adds noise to the input traffic data over multiple steps until it is close to a Gaussian distribution. This is done by iteratively applying the forward diffusion process.
|
||||
|
||||
3. **Reverse Process (Denoising)**: Starting from the noisy data (Gaussian distribution), the STUnet model is used to predict and iteratively remove the noise, reconstructing realistic traffic data.
|
||||
|
||||
4. **Generated Traffic Output**: The final denoised data represents synthetic cellular traffic that preserves both spatio-temporal and uncertainty patterns, making it highly realistic for use in downstream applications.
|
||||
|
||||
|
||||
## Our design
|
||||
We should discuss these!
|
||||
|
||||
Should we like, generating raw packets?
|
||||
|
||||
### High level
|
||||
**NB**: There's like feature-extracted dataset(For industral network, should double check if it's modbus/dnp3).
|
||||
|
||||
We don't need to write parser if using existing dataset.
|
||||
|
||||
So the workflow is like:
|
||||
|
||||
1. Train the model based on input
|
||||
|
||||
2. Model generates features
|
||||
|
||||
3. Generator(written in rust) uses features to generate raw traffic.
|
||||
|
||||
Between step 2 and step 3, we need to define APIs.
|
||||
|
||||
|
||||
Here's two options:
|
||||
|
||||
- Option A: Rust binary calls functions from python(The diffusion stuffs, which should like return features)
|
||||
|
||||
- Option B: Python calls rust exposed generator APIs(like passing features to them, and get raw packets)
|
||||
|
||||
We need to decide which one to use.
|
||||
|
||||
@@ -44,8 +44,142 @@ Optional: low level language, experience on **network programming**
|
||||
|
||||
## ML/DL
|
||||
|
||||
> WIP(Work in Process)
|
||||
>
|
||||
> To be finished by Mingzhe Yang and Hongyu Yan
|
||||
## ML / DL
|
||||
|
||||
> This section focuses on **practical, engineering-oriented understanding and usage** of ML/DL,
|
||||
> rather than theoretical derivation or cutting-edge research.
|
||||
>
|
||||
> You are **NOT required** to be an ML researcher,
|
||||
> but you should be able to **read code, run experiments, and explain model behaviors**.
|
||||
|
||||
---
|
||||
|
||||
### 1. Foundations
|
||||
|
||||
> Assumed background: completion of a **Year 3 “AI Foundations” (or equivalent)** course.
|
||||
> If you have not formally taken such a course, **understanding the core concepts is sufficient**.
|
||||
> No in-depth theoretical derivations are required.
|
||||
|
||||
You should know:
|
||||
|
||||
- The difference between **Machine Learning (ML)** and **Deep Learning (DL)**
|
||||
- Learning paradigms:
|
||||
- Supervised / Unsupervised / Self-supervised learning
|
||||
- Basic concepts:
|
||||
- Dataset / Batch / Epoch
|
||||
- Loss function
|
||||
- Optimizer (eg. SGD, Adam)
|
||||
- Overfitting / Underfitting
|
||||
- The difference between training and inference
|
||||
|
||||
You should be able to:
|
||||
|
||||
- Train a basic model using common frameworks (eg. `PyTorch`, `TensorFlow`)
|
||||
- Understand and implement a standard training loop:
|
||||
- Forward pass → loss computation → backward pass → parameter update
|
||||
|
||||
---
|
||||
|
||||
### 2. Neural Network Basics
|
||||
|
||||
You should know:
|
||||
|
||||
- Common network layers:
|
||||
- Linear / Fully Connected layers
|
||||
- Convolution layers
|
||||
- Normalization layers (BatchNorm / LayerNorm)
|
||||
- Common activation functions:
|
||||
- ReLU / LeakyReLU / Sigmoid / Tanh
|
||||
- The **conceptual role** of backpropagation (no formula derivation required)
|
||||
|
||||
You should understand:
|
||||
|
||||
- How data flows through a neural network
|
||||
- How gradients affect parameter updates
|
||||
- Why deeper networks are harder to train
|
||||
|
||||
---
|
||||
|
||||
### 3. Generative Models (Overview Level)
|
||||
|
||||
You should take a glance at the following models and understand their **core ideas and behavioral characteristics**.
|
||||
|
||||
#### GAN (Generative Adversarial Network)
|
||||
|
||||
You should know:
|
||||
|
||||
- The roles of the Generator and the Discriminator
|
||||
- The adversarial training process
|
||||
- What the loss functions roughly represent
|
||||
|
||||
You should understand:
|
||||
|
||||
- Why GAN training can be unstable
|
||||
- What *mode collapse* means
|
||||
- Typical use cases (eg. image generation, data augmentation)
|
||||
|
||||
Optional but recommended:
|
||||
|
||||
- Run or read code of a simple GAN implementation (eg. DCGAN)
|
||||
|
||||
---
|
||||
|
||||
#### Diffusion Models
|
||||
|
||||
You should know:
|
||||
|
||||
- The forward process: gradually adding noise to data
|
||||
- The reverse process: denoising and sampling
|
||||
- Why diffusion models can generate high-quality samples
|
||||
|
||||
You should understand:
|
||||
|
||||
- Differences between diffusion models and GANs in training stability
|
||||
- Why diffusion sampling is usually slower
|
||||
- High-level ideas of noise prediction vs data prediction
|
||||
|
||||
Optional but recommended:
|
||||
|
||||
- Run inference using a pretrained diffusion model
|
||||
- Understand the role of timestep / scheduler
|
||||
|
||||
---
|
||||
|
||||
### 4. Engineering Perspective
|
||||
|
||||
You should be familiar with:
|
||||
|
||||
- Differences between GPU and CPU training / inference
|
||||
- Basic memory and performance considerations
|
||||
- Model checkpoint loading and saving
|
||||
- Reproducibility basics (random seed, configuration, logging)
|
||||
|
||||
You should be able to:
|
||||
|
||||
- Read and modify existing ML/DL codebases
|
||||
- Debug common issues:
|
||||
- NaN loss
|
||||
- No convergence
|
||||
- OOM (out-of-memory)
|
||||
- Integrate ML/DL components into a larger system (eg. networked services, data pipelines)
|
||||
|
||||
---
|
||||
|
||||
### 5. Relation to This Project
|
||||
|
||||
You should understand:
|
||||
|
||||
- ML/DL models are treated as **modules**, not black boxes
|
||||
- Model outputs should be **interpretable or observable** when possible
|
||||
- ML components may interact with:
|
||||
- Network traffic
|
||||
- Logs / metrics
|
||||
- Online or streaming data
|
||||
|
||||
You are expected to:
|
||||
|
||||
- Use ML/DL as a **tool**, not an end goal
|
||||
- Be comfortable combining ML logic with system / network code
|
||||
|
||||
|
||||
Take a glance on `GAN` and `Diffusion`.
|
||||
|
||||
Reference in New Issue
Block a user