{"id":31446668,"url":"https://github.com/iitis/llm-network-traffic-generation","last_synced_at":"2025-10-01T00:48:28.621Z","repository":{"id":312838342,"uuid":"972559663","full_name":"iitis/LLM-Network-Traffic-Generation","owner":"iitis","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-02T10:26:52.000Z","size":29774,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-02T10:31:17.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iitis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-25T09:22:35.000Z","updated_at":"2025-09-02T10:26:56.000Z","dependencies_parsed_at":"2025-09-02T10:41:24.741Z","dependency_job_id":null,"html_url":"https://github.com/iitis/LLM-Network-Traffic-Generation","commit_stats":null,"previous_names":["iitis/llm-network-traffic-generation"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/iitis/LLM-Network-Traffic-Generation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2FLLM-Network-Traffic-Generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2FLLM-Network-Traffic-Generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2FLLM-Network-Traffic-Generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2FLLM-Network-Traffic-Generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iitis","download_url":"https://codeload.github.com/iitis/LLM-Network-Traffic-Generation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2FLLM-Network-Traffic-Generation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277777982,"owners_count":25875397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-01T00:48:27.052Z","updated_at":"2025-10-01T00:48:28.615Z","avatar_url":"https://github.com/iitis.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Network Traffic Generation by Large Language Models (LLMs)\n\nThis repository presents a novel approach for generating **realistic network traffic** using **Large Language Models (LLMs)**, specifically **OpenAI’s GPT-4.1** and **GPT-5**.  \n\nOur method, called the **Large Language Model Network Traffic Generator (LLM-NTG)**, aims to bridge the gap between **realistic traffic generation** and the **expressive capabilities of LLMs**.  \nWe employ a few-shot learning framework combined with a **human-in-the-loop feedback mechanism**, where generated traffic is continuously evaluated and refined.\n\n---\n\n## 📂 Repository Structure\n\n### 1. `Datasets/`\nContains datasets required for traffic generation:\n- **One-way** and **two-way traffic datasets**.\n- **Sample inputs** in `.json`, `.pcapng`, and `.csv` formats for traffic generation.\n\n---\n\n### 2. `GPT-4.1/`\nExperiments performed with **GPT-4.1**.  \nThis folder has two subfolders: `Experiment_1/` and `Experiment_2/`.\n\nEach experiment includes:\n- **`Exp1_Sample_Packets_Extraction.ipynb`**  \n  Extracts traffic data from the dataset and prepares **sample packets** for generation.\n- **`Exp1_Traffic_Generation_gpt4.1.ipynb`**  \n  Generates synthetic traffic and saves the output as `.json` files.\n- **`Exp1_Statistics_of_Generated_Traffics_gpt4.1.ipynb`**  \n  Computes statistics of the generated traffic.\n\n(`Experiment_2/` follows the same structure.)\n\n---\n\n### 3. `GPT-5/`\nExperiments performed with **GPT-5**.  \nThis folder also has `Experiment_1/` and `Experiment_2/`.\n\nSince the **same input samples** are used as in GPT-4.1, there is no extraction notebook here.  \nEach experiment includes:\n- **`Exp1_Traffic_Generation_gpt5.ipynb`**  \n  Generates synthetic traffic with GPT-5.\n- **`Exp1_Statistics_of_Generated_Traffics_gpt5.ipynb`**  \n  Computes statistics of the generated traffic.\n\n(`Experiment_2/` follows the same structure.)\n\n---\n\n### 4. `Generated_Traffic/`\nContains the **generated traffic outputs** in `.json` format and .pcap files.  \n- Each experiment’s results are stored here.\n- The `JSON_files/` subfolder contains details such as: .json format of generated traffic\n- The `PCAP_files/` subfolder contains details such as: There are .pcap files of the generated traffi,c and Wireshark can be used to view them.\n- The `Results/` subfolder contains details such as:\n  - **Token usage**\n  - **Computation time**\n\n---\n\n### 5. `pcap_converter.py`   \nA transformation script that converts generated `.json` traffic files into **`.pcap` format**, enabling further analysis with standard network traffic tools (e.g., Wireshark).\n\n---\n\n### 6. PCAP_GPT4.1_Experiment_1.png and  PCAP_GPT5_Experiment_1.png   \nWireshark representation of traffic generated by GPT 4.1 and 5 for Experiment~1.\n\n---\n\n## 🚀 Usage\n1. Explore the **datasets** under `Datasets/`.  \n2. Run the notebooks in `GPT-4.1/` or `GPT-5/` for traffic generation.  \n3. Generated traffic will be saved under `Generated_Traffic/`.  \n4. Optionally, convert `.json` traffic files into `.pcap` format using:\n   ```bash\n   python pcap_converter.py input.json output.pcap\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitis%2Fllm-network-traffic-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiitis%2Fllm-network-traffic-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitis%2Fllm-network-traffic-generation/lists"}