Datasets:
sync README with paper-final numbers (8× A100, 13 sources, 78,358 samples)
Browse files
README.md
CHANGED
|
@@ -15,45 +15,90 @@ size_categories:
|
|
| 15 |
|
| 16 |
# Beam Training Data
|
| 17 |
|
| 18 |
-
Supervised fine-tuning (SFT) dataset used to train
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
## Dataset
|
| 21 |
|
| 22 |
-
- **
|
| 23 |
-
- **3,917 validation samples** (`sft/val_alpaca.jsonl`)
|
| 24 |
- Alpaca format: `instruction`, `input`, `output`
|
| 25 |
-
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
| Source | License | Content |
|
| 30 |
-
|---|---|---|
|
| 31 |
-
| AI4Privacy (300K PII) | Apache 2.0 | PII samples |
|
| 32 |
-
| Enron (FERC release) | Public domain | Email/financial data |
|
| 33 |
-
| NVD/NIST | Public domain (US Gov) | Vulnerability descriptions |
|
| 34 |
-
| SecLists | MIT | Security payloads |
|
| 35 |
-
| PayloadsAllTheThings | MIT | Attack payloads |
|
| 36 |
-
| Prompt Injection datasets | Apache 2.0 | Injection attacks |
|
| 37 |
-
| GHSA | CC-BY 4.0 | Security advisories |
|
| 38 |
-
| Loghub | Research-free | System logs (safe class) |
|
| 39 |
-
| Synthetic | Generated | Hard negatives, edge cases |
|
| 40 |
|
| 41 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
| 44 |
-
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
```bash
|
| 50 |
-
# LoRA training on Qwen 3.5 27B
|
| 51 |
-
python train_lora.py # r=128, alpha=256, 5 epochs, H100 80GB
|
| 52 |
-
python export_gguf.py # Export to GGUF for Ollama
|
| 53 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
## License
|
| 58 |
|
| 59 |
-
Apache 2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# Beam Training Data
|
| 17 |
|
| 18 |
+
Supervised fine-tuning (SFT) dataset used to train **TorchSight Beam** — a
|
| 19 |
+
cybersecurity document classifier built by LoRA-fine-tuning Qwen 3.5 27B.
|
| 20 |
+
|
| 21 |
+
> Dobrovolskyi, I. *Security Document Classification with a Fine-Tuned Local
|
| 22 |
+
> Large Language Model: Benchmark Data and an Open-Source System.* Journal of
|
| 23 |
+
> Information Security and Applications, 2026.
|
| 24 |
|
| 25 |
## Dataset
|
| 26 |
|
| 27 |
+
- **78,358 balanced samples** (95 / 5 split → 74,441 train + 3,917 validation)
|
|
|
|
| 28 |
- Alpaca format: `instruction`, `input`, `output`
|
| 29 |
+
- Output is a JSON array of findings, each with `category`, `subcategory`,
|
| 30 |
+
`severity`, `explanation`
|
| 31 |
+
- Stratified across 7 categories × 51 subcategories
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
## Composition
|
| 34 |
+
|
| 35 |
+
The initial corpus contained 116,956 raw samples drawn from 13 publicly
|
| 36 |
+
available sources. To remove the NVD-dominated skew, each subcategory was
|
| 37 |
+
capped at 5,000 samples and underrepresented subcategories were augmented with
|
| 38 |
+
GPT-4–generated synthetic data and hard-negative boundary cases.
|
| 39 |
|
| 40 |
+
| Source | Raw | Balanced | License | Categories |
|
| 41 |
+
|---|---:|---:|---|---|
|
| 42 |
+
| NVD CVE Database | 50,000 | 8,475 | Public domain | `malicious.exploit` |
|
| 43 |
+
| Synthetic augmentation| 33,100 | 39,754 | Generated (GPT-4) | All categories |
|
| 44 |
+
| Hard negatives | 6,400 | 6,134 | Generated (GPT-4) | Boundary cases |
|
| 45 |
+
| AI4Privacy | 5,000 | 4,851 | Apache 2.0 | `pii.*` |
|
| 46 |
+
| Fenrir v2.0 | 5,000 | 4,573 | Apache 2.0 | `malicious.*` |
|
| 47 |
+
| SEC EDGAR | 3,000 | 3,000 | Public domain | `financial.*` |
|
| 48 |
+
| SecLists | 3,229 | 1,708 | MIT | `malicious.injection` |
|
| 49 |
+
| Phishing Dataset | 3,000 | 2,796 | Apache 2.0 | `malicious.phishing` |
|
| 50 |
+
| NIST Training | 3,000 | 2,761 | Public domain | `safe.documentation` |
|
| 51 |
+
| Enron Email Corpus | 2,000 | 1,902 | Public domain | `pii.*`, `credentials.*` |
|
| 52 |
+
| MITRE ATT&CK v14 | 1,620 | 871 | Royalty-free | `malicious.malware` |
|
| 53 |
+
| Loghub | 1,280 | 1,280 | Research-free | `safe.config` |
|
| 54 |
+
| Other (3 sources) | 327 | 253 | Permissive | Multiple |
|
| 55 |
+
| **Total** | **116,956** | **78,358** | | |
|
| 56 |
|
| 57 |
+
All sources have been verified safe for AI training. Copyleft-licensed
|
| 58 |
+
(GPL/LGPL) and ShareAlike-licensed (CC BY-SA) materials are excluded so the
|
| 59 |
+
corpus is suitable for commercial training use.
|
| 60 |
+
|
| 61 |
+
Of the final 78,358 samples, 39,754 (50.7%) are GPT-4–generated synthetic
|
| 62 |
+
augmentation and 6,134 (7.8%) are hard-negative boundary cases. The remaining
|
| 63 |
+
32,470 (41.5%) come from the 13 external sources listed above.
|
| 64 |
+
|
| 65 |
+
## Structure
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
```
|
| 68 |
+
sft/
|
| 69 |
+
├── train_alpaca.jsonl # 74,441 samples
|
| 70 |
+
└── val_alpaca.jsonl # 3,917 samples
|
| 71 |
+
processed/ # intermediate per-source files
|
| 72 |
+
synthetic/ # GPT-4 generations and hard negatives
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
## LoRA training configuration
|
| 76 |
+
|
| 77 |
+
| Parameter | Value |
|
| 78 |
+
|---|---|
|
| 79 |
+
| Base model | Qwen 3.5 27B (dense) |
|
| 80 |
+
| LoRA rank (r) | 128 |
|
| 81 |
+
| LoRA alpha (α) | 256 |
|
| 82 |
+
| Target modules | q/k/v/o_proj, gate/up/down_proj |
|
| 83 |
+
| Dropout | 0.05 |
|
| 84 |
+
| Learning rate | 2 × 10⁻⁵, cosine decay, 10% warmup |
|
| 85 |
+
| Effective batch size | 16 (4 × 4 gradient accumulation) |
|
| 86 |
+
| Epochs | 5 |
|
| 87 |
+
| Precision | bf16 |
|
| 88 |
+
| Max sequence length | 4,096 tokens |
|
| 89 |
+
| Hardware | 8× NVIDIA A100 80GB SXM4 |
|
| 90 |
+
| Wall-clock time | 10.5 hours |
|
| 91 |
|
| 92 |
+
Library versions: `trl == 0.11.4`, `transformers == 4.45.2`, `peft == 0.13.2`.
|
| 93 |
|
| 94 |
## License
|
| 95 |
|
| 96 |
+
Apache 2.0.
|
| 97 |
+
|
| 98 |
+
## Companion artifacts
|
| 99 |
+
|
| 100 |
+
- Benchmark: [`torchsight/cybersecurity-classification-benchmark`](https://huggingface.co/datasets/torchsight/cybersecurity-classification-benchmark)
|
| 101 |
+
- Models: [`torchsight/beam-q4_K_M`](https://huggingface.co/torchsight/beam-q4_K_M),
|
| 102 |
+
[`torchsight/beam-q8_0`](https://huggingface.co/torchsight/beam-q8_0),
|
| 103 |
+
[`torchsight/beam-f16`](https://huggingface.co/torchsight/beam-f16)
|
| 104 |
+
- Source: [github.com/IvanDobrovolsky/torchsight](https://github.com/IvanDobrovolsky/torchsight)
|