File size: 2,321 Bytes
dd6d08d 1eb5c3f dd6d08d 1eb5c3f dd6d08d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ---
language:
- en
tags:
- network-intrusion-detection
- explainable-ai
- cybersecurity
- llm-generated
---
# FlowExplain Training Dataset — Network Intrusion Explanations
711 examples pairing a classified network flow (from CICIDS2017) with a winning,
natural-language explanation (label, reasoning, mitigation recommendation). Collected as part
of **FlowExplain**, the system built for the diploma thesis *"Explainable Network Intrusion
Detection with Large Language Models"* (Faculty of Computer and Information Science,
University of Ljubljana).
- **Code:** [mmalensek/SNIC_Network_Security](https://github.com/mmalensek/SNIC_Network_Security)
- **Companion model (LoRA fine-tuned on this data):** [mmalensek/flowexplain-deepseek-r1-8b-lora](https://huggingface.co/mmalensek/flowexplain-deepseek-r1-8b-lora)
## How the winning explanation was chosen
For each flow, three candidate explanations were generated in parallel:
1. a local model (`deepseek-r1:8b` via Ollama),
2. a cloud reference model (`gpt-5.2`),
3. the current fine-tuned local model (self-improving loop).
Candidates were scored by (1) deterministic checks (format compliance, label match, feature
grounding), (2) an LLM-as-a-judge, and — for a subset — (3) pairwise comparison by human
experts; the highest-scoring explanation per flow was kept as the training target.
## Format
`training_dataset.jsonl` — one chat-format record per line:
```json
{"messages": [
{"role": "system", "content": "You are a network security expert..."},
{"role": "user", "content": "Analyze this network traffic...\n\nCurrent flow:\n{...}"},
{"role": "assistant", "content": "LABEL:\n...\n\nREASONING:\n...\n\nSOLUTION:\n..."}
]}
```
`training_dataset.json` contains the same examples with additional metadata (source file,
predicted/actual label, raw flow features).
## Source
Flow features are derived from [CICIDS2017](https://www.unb.ca/cic/datasets/ids-2017.html)
(Sharafaldin, Lashkari & Ghorbani, 2018). Please also credit the original dataset when using
this derived data.
## Citation
If you use this dataset, please cite the thesis ([mmalensek/SNIC_Network_Security](https://github.com/mmalensek/SNIC_Network_Security)).
## Authors
Martin Malenšek — author. Mentor: izr. prof. dr. Veljko Pejović. Co-mentor: asist. Miha Grohar.
|