PEFT
Safetensors
English
cybersecurity
malware-analysis
att&ck
threat-intelligence
mixtral
lora
expert-adapters
cape-sandbox
digital-forensics
Instructions to use umer07/fathom-mixtral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use umer07/fathom-mixtral with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mixtral-8x7B-Instruct-v0.1") model = PeftModel.from_pretrained(base_model, "umer07/fathom-mixtral") - Notebooks
- Google Colab
- Kaggle
latest
Browse files
README.md
CHANGED
|
@@ -1,246 +1,175 @@
|
|
|
|
|
| 1 |
---
|
| 2 |
-
language:
|
| 3 |
-
- en
|
| 4 |
license: apache-2.0
|
| 5 |
-
base_model: mistralai/Mixtral-8x7B-Instruct-v0.1
|
| 6 |
tags:
|
| 7 |
- cybersecurity
|
| 8 |
- malware-analysis
|
|
|
|
|
|
|
|
|
|
| 9 |
- lora
|
| 10 |
- peft
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
-
# Fathom — Cybersecurity
|
| 19 |
|
| 20 |
-
**
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
|
| 25 |
---
|
| 26 |
|
| 27 |
-
##
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
EvidenceBrief → _format_evidence() → structured prompt
|
| 41 |
-
│
|
| 42 |
-
▼
|
| 43 |
-
DomainRouter → selects expert adapter (E1–E9) or unified-v2
|
| 44 |
-
│
|
| 45 |
-
▼
|
| 46 |
-
Mixtral-8x7B + LoRA adapter → [INST] prompt [/INST]
|
| 47 |
-
│
|
| 48 |
-
▼
|
| 49 |
-
Malware Analysis Report
|
| 50 |
-
1. Family + confidence
|
| 51 |
-
2. ATT&CK T-codes with evidence citations
|
| 52 |
-
3. Risk rating (Critical / High / Medium / Low)
|
| 53 |
-
4. Containment & response recommendations
|
| 54 |
-
```
|
| 55 |
|
| 56 |
---
|
| 57 |
|
| 58 |
-
##
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|-----------|---------|
|
| 62 |
-
| Base Model | Mixtral-8x7B-Instruct-v0.1 (MoE, 47B params, 8 × 7B experts) |
|
| 63 |
-
| Fine-tuning Method | LoRA — rank 32, alpha 64, dropout 0.05 |
|
| 64 |
-
| Precision | BFloat16, no quantization |
|
| 65 |
-
| Training Hardware | AMD MI300X VF · 205.8 GB VRAM · ROCm 7.0 |
|
| 66 |
-
| Framework | PEFT + TRL SFTTrainer |
|
| 67 |
-
| Prompt Format | Mixtral native `[INST]...[/INST]` |
|
| 68 |
-
| Output Budget | `max_new_tokens=1024` (minimum for full analysis) |
|
| 69 |
-
| Decoding | Greedy (`do_sample=False`, `repetition_penalty=1.15`) |
|
| 70 |
-
| Adapters | 10 total — 1 unified + 9 domain experts |
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
|
| 77 |
-
|
|
| 78 |
-
|
|
| 79 |
-
|
|
| 80 |
-
| `adapters/expert-e2-dynamic` | Dynamic / Behavioral | 2,713 | Real CAPEv2 sandbox reports, API call sequences |
|
| 81 |
-
| `adapters/expert-e3-network` | Network Analysis | 19,991 | C2 traffic, DNS/HTTP IOC analysis, JA3 fingerprints |
|
| 82 |
-
| `adapters/expert-e4-forensics` | Digital Forensics | 19,183 | Memory forensics, registry artifacts, persistence |
|
| 83 |
-
| `adapters/expert-e5-threatintel` | Threat Intelligence | 9,532 | URLhaus, GTFOBins, STIX, MITRE ATT&CK, APT mapping |
|
| 84 |
-
| `adapters/expert-e6-detection` | Detection Engineering | 19,986 | YARA, Sigma, Snort rule generation |
|
| 85 |
-
| `adapters/expert-e7-reports` | Report Generation | 94,063 | Structured incident reports, executive summaries |
|
| 86 |
-
| `adapters/expert-e8-analyst` | Analyst Assistance | 19,504 | SOC triage, prioritization, analyst Q&A |
|
| 87 |
-
| `adapters/expert-e9-cot` | Chain-of-Thought | ~3,000 | Step-by-step reasoning for complex analysis |
|
| 88 |
|
| 89 |
-
-
|
| 90 |
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
-
|
| 94 |
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|-----------|--------|-------|
|
| 99 |
-
| **CyberMetric-80** (cybersecurity MCQ, 80 questions) | **91.25%** (73/80) | Best: unified-v2 and e8-analyst tied |
|
| 100 |
-
| **ATT&CK Mapping MCQ** (30 behavior→technique questions) | **80.0%** (24/30) | Handcrafted: process injection → T1055, registry Run key → T1547.001, LOLBins → T1218, ransomware → T1486/T1490 |
|
| 101 |
-
| **Malware Report Structure** (25 open-ended samples) | **1.00 / 1.00** | All outputs fully structured with required sections |
|
| 102 |
-
| **ATT&CK T-code Coverage** (presence in output) | **1.00 / 1.00** | T-codes present in 100% of malware analysis outputs |
|
| 103 |
-
| **Evidence-Based Reasoning** (rubric, 25 samples) | **0.88 / 1.00** | Artifact-cited causal reasoning; scored by rubric |
|
| 104 |
-
| **Analyst Usefulness** (rubric, 25 samples) | **1.00 / 1.00** | Actionable containment and response recommendations |
|
| 105 |
|
| 106 |
-
|
| 107 |
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
|
| 110 |
-
###
|
| 111 |
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
-
| Sample | Family | Malscore | Ground-Truth T-codes | Predicted T-codes | Exact F1 | Parent F1¹ |
|
| 115 |
-
|--------|--------|----------|---------------------|-------------------|----------|------------|
|
| 116 |
-
| 12 | Emotet | 10/10 | T1012, T1071, T1071.004, T1083 | T1012, **T1055**², T1071, T1071.004, T1083 | 0.889 | 0.857 |
|
| 117 |
-
| 15 | Formbook | 10/10 | T1012, T1055, T1071, T1071.004, T1083 | T1012, T1055, T1071, T1071.004, T1083, **T1003, T1027.002, T1059, T1497**² | 0.714 | 0.667 |
|
| 118 |
-
| 16 | Dridex (DLL) | 10/10 | T1012, T1055, T1071, T1071.004, T1083 | T1012, T1055, T1071, T1071.004, T1083 | **1.000** | **1.000** |
|
| 119 |
-
| **Average** | | | | | **0.868** | **0.841** |
|
| 120 |
|
| 121 |
-
**¹ Parent F1:** Sub-technique leniency — T1055.012 counts as T1055. Exact F1 requires full sub-technique match.
|
| 122 |
-
**² Bold predicted codes** are false positives not in ground truth. The extractor's API-to-T-code mapping surfaces these as evidence; the model faithfully reports them. Precision can be improved by tightening the extractor's `SUSPICIOUS_API_MAP` thresholds.
|
| 123 |
|
| 124 |
-
|
| 125 |
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
| Persistence (T1547, T1053) | **0.73** | Credential Access (T1555) | 0.25 |
|
| 131 |
-
| Collection (T1005, T1074) | **0.67** | Defense Evasion (T1036, T1027) | 0.22 |
|
| 132 |
-
| Impact / Ransomware (T1486) | 0.40 | Privilege Escalation (T1548) | 0.00 |
|
| 133 |
|
| 134 |
---
|
| 135 |
|
| 136 |
-
##
|
|
|
|
|
|
|
| 137 |
|
| 138 |
```python
|
| 139 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 140 |
from peft import PeftModel
|
|
|
|
| 141 |
import torch
|
| 142 |
|
| 143 |
-
|
| 144 |
-
|
|
|
|
|
|
|
| 145 |
model = AutoModelForCausalLM.from_pretrained(
|
| 146 |
-
|
|
|
|
|
|
|
|
|
|
| 147 |
)
|
| 148 |
-
|
| 149 |
-
# Load the unified adapter (or swap path for any expert adapter)
|
| 150 |
-
model = PeftModel.from_pretrained(model, "umer07/fathom-mixtral")
|
| 151 |
model.eval()
|
| 152 |
-
|
| 153 |
-
instruction = """You are Fathom, an expert malware analyst at a Security Operations Center.
|
| 154 |
-
Analyze the CAPEv2 sandbox evidence below and produce:
|
| 155 |
-
1. Malware family identification with confidence level
|
| 156 |
-
2. ALL observed MITRE ATT&CK technique IDs — cite every T-code supported by evidence (e.g. T1055, T1071.001, T1547.001)
|
| 157 |
-
3. Evidence-based reasoning for each technique — reference specific artifacts
|
| 158 |
-
4. Risk rating (Critical / High / Medium / Low) with justification
|
| 159 |
-
5. Recommended response and containment actions"""
|
| 160 |
-
|
| 161 |
-
evidence = """
|
| 162 |
-
File: suspicious.exe | CAPE Malscore: 9.5/10
|
| 163 |
-
|
| 164 |
-
── BEHAVIORAL INDICATORS ──
|
| 165 |
-
[HIGH] Process Injection: NtAllocateVirtualMemory, WriteProcessMemory, CreateRemoteThread
|
| 166 |
-
ATT&CK: T1055, T1055.002
|
| 167 |
-
|
| 168 |
-
── REGISTRY WRITES ──
|
| 169 |
-
• HKCU\Software\Microsoft\Windows\CurrentVersion\Run → malware.exe
|
| 170 |
-
ATT&CK: T1547.001
|
| 171 |
-
|
| 172 |
-
── NETWORK ──
|
| 173 |
-
DNS queries: update.malware-c2.com
|
| 174 |
-
HTTP GET http://malware-c2.com/beacon
|
| 175 |
-
ATT&CK: T1071, T1071.001
|
| 176 |
-
"""
|
| 177 |
-
|
| 178 |
-
# IMPORTANT: [INST]...[/INST] format — NOT Alpaca ### format
|
| 179 |
-
prompt = f"[INST] {instruction}\n\n{evidence} [/INST]"
|
| 180 |
-
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 181 |
-
|
| 182 |
-
outputs = model.generate(
|
| 183 |
-
**inputs,
|
| 184 |
-
max_new_tokens=1024,
|
| 185 |
-
do_sample=False,
|
| 186 |
-
repetition_penalty=1.15,
|
| 187 |
-
pad_token_id=tokenizer.eos_token_id,
|
| 188 |
-
)
|
| 189 |
-
response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
|
| 190 |
-
print(response)
|
| 191 |
```
|
| 192 |
|
| 193 |
-
---
|
| 194 |
-
|
| 195 |
-
## Critical Notes
|
| 196 |
-
|
| 197 |
-
**1. Prompt format is non-negotiable.**
|
| 198 |
-
Mixtral-8x7B-Instruct was trained on `[INST]...[/INST]` chat tokens. Using Alpaca-style `### Instruction:\n...\n### Response:` causes the model to echo the instruction back rather than generate analysis, exhausting the token budget before any output is produced. Always use:
|
| 199 |
-
```
|
| 200 |
-
[INST] {your instruction and evidence} [/INST]
|
| 201 |
-
```
|
| 202 |
|
| 203 |
-
|
| 204 |
-
Raw API call lists (e.g. `LdrpCallInitRoutine, NtWaitForSingleObject`) give the model no behavioral signal — these are loader internals, not malware actions. Use a structured extractor that groups APIs into semantic behaviors and annotates them with ATT&CK hints. The `cape_extraction_layer_v3.py` pipeline (companion repo) does this automatically.
|
| 205 |
|
| 206 |
-
|
| 207 |
-
Use `max_new_tokens=1024` at minimum. A full malware analysis with 5 techniques, evidence reasoning, and response steps requires 600–900 tokens. Shorter budgets produce truncated reports.
|
| 208 |
|
| 209 |
-
|
| 210 |
-
|
|
|
|
|
|
|
| 211 |
|
| 212 |
-
**5. Context window and long reports.**
|
| 213 |
-
For DLL samples with very large API call logs, truncate the evidence text *before* building the prompt — never rely on tokenizer truncation, which may silently remove the `[/INST]` close token and cause context-continuation instead of analysis.
|
| 214 |
|
| 215 |
---
|
| 216 |
|
| 217 |
-
## Training
|
| 218 |
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
| expert-e2-dynamic | cape_hf_reports | 2,713 | 3 | 0.501 | MI300X | — |
|
| 224 |
-
| expert-e3-network | e3_network | 19,991 | 1 | 0.727 | MI300X | — |
|
| 225 |
-
| expert-e4-forensics | e4_forensics | 19,183 | 1 | — | MI300X | — |
|
| 226 |
-
| expert-e5-threatintel | e5_threatintel_aug | 9,532 | 1 | — | MI300X | — |
|
| 227 |
-
| expert-e6-detection | e6_detection | 19,986 | 1 | — | MI300X | — |
|
| 228 |
-
| expert-e7-reports | e7_reports | 94,063 | 1 | — | MI300X | — |
|
| 229 |
-
| expert-e8-analyst | e8_analyst | 19,504 | 1 | — | MI300X | — |
|
| 230 |
-
| expert-e9-cot | CoT reasoning datasets | ~3,000 | 1 | — | MI300X | — |
|
| 231 |
-
|
| 232 |
-
LoRA configuration: rank=32, alpha=64, dropout=0.05, target modules=all linear. All training: bf16 full precision, no quantization.
|
| 233 |
|
| 234 |
---
|
| 235 |
|
| 236 |
-
##
|
| 237 |
-
|
| 238 |
-
Benchmark results and evaluation data available at [`umer07/fathom-expert-data`](https://huggingface.co/datasets/umer07/fathom-expert-data):
|
| 239 |
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
|
|
|
|
|
| 1 |
+
|
| 2 |
---
|
| 3 |
+
language: en
|
|
|
|
| 4 |
license: apache-2.0
|
|
|
|
| 5 |
tags:
|
| 6 |
- cybersecurity
|
| 7 |
- malware-analysis
|
| 8 |
+
- att&ck
|
| 9 |
+
- threat-intelligence
|
| 10 |
+
- mixtral
|
| 11 |
- lora
|
| 12 |
- peft
|
| 13 |
+
- expert-adapters
|
| 14 |
+
- cape-sandbox
|
| 15 |
+
- digital-forensics
|
| 16 |
+
library_name: peft
|
| 17 |
+
base_model: mistralai/Mixtral-8x7B-Instruct-v0.1
|
| 18 |
+
inference: false
|
| 19 |
---
|
| 20 |
|
| 21 |
+
# **Fathom** — Specialized Cybersecurity Analysis Model
|
| 22 |
|
| 23 |
+
**Mixtral-8x7B-Instruct-v0.1 + 10× LoRA adapters (rank=32, bf16)**
|
| 24 |
+
**Primary adapter:** `unified-v2` (general cybersecurity + malware analysis)
|
| 25 |
+
**9 expert adapters** for domain-specific routing (static/dynamic analysis, network, forensics, threat intel, etc.)
|
| 26 |
|
| 27 |
+
**Hugging Face Hub:** [`umer07/fathom-mixtral`](https://huggingface.co/umer07/fathom-mixtral)
|
| 28 |
+
**Datasets:** [`umer07/fathom-expert-data`](https://huggingface.co/datasets/umer07/fathom-expert-data)
|
| 29 |
+
|
| 30 |
+
**Fathom** turns raw sandbox reports (CAPE, Joe Sandbox, etc.) into high-quality ATT&CK-mapped malware analysis. It outperforms general-purpose models on cybersecurity tasks while remaining fully open-source and runnable on a single AMD MI300X / A100 80GB.
|
| 31 |
|
| 32 |
---
|
| 33 |
|
| 34 |
+
## Model Overview
|
| 35 |
|
| 36 |
+
- **Base:** Mixtral-8x7B-Instruct-v0.1 (full bf16, no quantization)
|
| 37 |
+
- **Training:** Direct PEFT+TRL (LlamaFactory dropped due to ROCm issues)
|
| 38 |
+
- **Adapters:** 1 unified + 9 expert LoRA adapters (all rank=32, α=16)
|
| 39 |
+
- **Hardware:** AMD MI300X (205.8 GB VRAM) — full bf16 training
|
| 40 |
+
- **Key Innovation:** Evidence extraction layer + structured behavioral prompts → **9× improvement** in real ATT&CK mapping
|
| 41 |
+
|
| 42 |
+
**Designed for:**
|
| 43 |
+
- Malware analysts & threat hunters
|
| 44 |
+
- SOC / DFIR teams
|
| 45 |
+
- CAPE / sandbox report enrichment
|
| 46 |
+
- Automated ATT&CK technique extraction
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
---
|
| 49 |
|
| 50 |
+
## Benchmark Results
|
| 51 |
|
| 52 |
+
All results use the **real Fathom pipeline** (`[INST]` chat template + 8192 context + structured evidence from CAPE extraction layer v3). Greedy decoding, bf16.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
+
### 1. General Cybersecurity Knowledge (vs. Closed & Open Models)
|
| 55 |
|
| 56 |
+
| Benchmark | Fathom unified-v2 | GPT-4 (ref) | GPT-3.5 (ref) | Base Mixtral-8x7B | Llama-2-70B (ref) |
|
| 57 |
+
|----------------------------|-------------------|-------------|---------------|-------------------|-------------------|
|
| 58 |
+
| **CyberMetric-80** | **91.25%** | ~87% | ~67% | 82.5% | ~57% |
|
| 59 |
+
| MMLU Computer Security | **79.0%** | ~82% | ~65% | — | ~54% |
|
| 60 |
+
| MMLU Security Studies | **64.0%** | ~74% | ~60% | — | ~48% |
|
| 61 |
+
| TruthfulQA MC1 | **65.0%** | | | | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
**Visual bar comparison (CyberMetric-80):**
|
| 64 |
|
| 65 |
+
```
|
| 66 |
+
Fathom unified-v2 ████████████████████ 91.25%
|
| 67 |
+
GPT-4 ██████████████████ ~87%
|
| 68 |
+
Base Mixtral █████████████████ 82.5%
|
| 69 |
+
GPT-3.5 ██████████████ ~67%
|
| 70 |
+
Llama-2-70B ████████████ ~57%
|
| 71 |
+
```
|
| 72 |
|
| 73 |
+
### 2. Expert Adapter Comparison (CyberMetric-80)
|
| 74 |
|
| 75 |
+
| Adapter | Score | Specialty |
|
| 76 |
+
|--------------------------|---------|------------------------------------|
|
| 77 |
+
| `unified-v2` | **91.25%** | All-domain baseline |
|
| 78 |
+
| `expert-e8-analyst` | **91.25%** | Analyst Q&A & reporting |
|
| 79 |
+
| `expert-e3-network` | 90.00% | Network traffic / C2 analysis |
|
| 80 |
+
| `expert-e4-forensics` | 90.00% | Memory & disk forensics |
|
| 81 |
+
| `expert-e6-detection` | 88.75% | Detection engineering |
|
| 82 |
+
| `expert-e7-reports` | 88.75% | Structured report generation |
|
| 83 |
+
| `expert-e2-dynamic` | 85.00% | Behavioral / sandbox analysis |
|
| 84 |
+
| `expert-e1-static` | 83.75% | Static PE + evasion detection |
|
| 85 |
+
| `expert-e9-cot` | 87.50% | Chain-of-thought reasoning |
|
| 86 |
+
| `expert-e5-threatintel` | 81.25% | Threat intel & actor profiling |
|
| 87 |
|
| 88 |
+
### 3. Core Contribution: Real ATT&CK Mapping Accuracy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
+
**Progression table** (same model weights, only input pipeline improved):
|
| 91 |
|
| 92 |
+
| Configuration | Exact F1 | Parent F1 | Improvement |
|
| 93 |
+
|----------------------------------------|----------|-----------|-------------|
|
| 94 |
+
| Raw API list (naive) | 0.083 | 0.095 | — |
|
| 95 |
+
| Structured prompt (manual) | 0.370 | 0.429 | +0.334 |
|
| 96 |
+
| Real Fathom evidence layer | 0.534 | 0.508 | +0.413 |
|
| 97 |
+
| **Real pipeline + full context fix** | **0.868**| **0.841** | **+0.746** |
|
| 98 |
+
|
| 99 |
+
**This proves the architecture (evidence extraction + structured prompts) matters more than additional fine-tuning.**
|
| 100 |
|
| 101 |
+
### 4. Real Malware Analysis — CAPE Pipeline ( malscore 10/10 samples)
|
| 102 |
|
| 103 |
+
| Sample | Family | GT T-codes | Predicted T-codes | Exact F1 | Parent F1 | Family ID |
|
| 104 |
+
|--------|----------|-----------------------------|--------------------------------------------|----------|-----------|-----------|
|
| 105 |
+
| 12 | Emotet | T1012, T1071, T1071.004, T1083 | T1012, T1055, T1071, T1071.004, T1083 | 0.889 | 0.857 | 100% conf |
|
| 106 |
+
| 15 | Formbook | T1012, T1055, T1071, T1071.004, T1083 | T1003, T1012, T1027.002, T1055, T1059, T1071, T1071.004, T1083, T1497 | 0.714 | 0.667 | 85% conf |
|
| 107 |
+
| 16 | Dridex | T1012, T1055, T1071, T1071.004, T1083 | T1012, T1055, T1071, T1071.004, T1083 | **1.000**| **1.000** | 68% conf |
|
| 108 |
+
| **Average** | | | | **0.868**| **0.841** | — |
|
| 109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
|
|
|
|
|
|
|
| 111 |
|
| 112 |
+
### 5. Additional Benchmarks
|
| 113 |
|
| 114 |
+
- **ATT&CK Mapping MCQ (30 handcrafted questions):** 80%
|
| 115 |
+
- **MMLU Machine Learning:** 60%
|
| 116 |
+
- **MMLU Electrical Engineering:** 64%
|
| 117 |
+
- **Rigorous ground-truth F1 (23 test cases):** Exact = 0.184, Parent = 0.344 (synthetic); real CAPE = 0.841 after pipeline fixes
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
---
|
| 120 |
|
| 121 |
+
## How to Use
|
| 122 |
+
|
| 123 |
+
### Loading the unified model (recommended for most users)
|
| 124 |
|
| 125 |
```python
|
|
|
|
| 126 |
from peft import PeftModel
|
| 127 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 128 |
import torch
|
| 129 |
|
| 130 |
+
model_name = "mistralai/Mixtral-8x7B-Instruct-v0.1"
|
| 131 |
+
adapter = "umer07/fathom-mixtral" # unified-v2 at root
|
| 132 |
+
|
| 133 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 134 |
model = AutoModelForCausalLM.from_pretrained(
|
| 135 |
+
model_name,
|
| 136 |
+
torch_dtype=torch.bfloat16,
|
| 137 |
+
device_map="auto",
|
| 138 |
+
trust_remote_code=True
|
| 139 |
)
|
| 140 |
+
model = PeftModel.from_pretrained(model, adapter, adapter_name="unified-v2")
|
|
|
|
|
|
|
| 141 |
model.eval()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
```
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
|
| 145 |
+
---
|
|
|
|
| 146 |
|
| 147 |
+
## Limitations
|
|
|
|
| 148 |
|
| 149 |
+
- Sub-technique precision (e.g., T1055.012 vs T1055) is lower than parent techniques.
|
| 150 |
+
- Family identification improves dramatically with KSPN enrichment.
|
| 151 |
+
- Rare techniques (UAC bypass T1548.002, exotic C2 T1095) have near-zero recall.
|
| 152 |
+
- Only 3 high-severity real CAPE samples evaluated (small but realistic test set).
|
| 153 |
|
|
|
|
|
|
|
| 154 |
|
| 155 |
---
|
| 156 |
|
| 157 |
+
## Training & Datasets
|
| 158 |
|
| 159 |
+
- **Unified-v2:** 123,912 rows (1 epoch)
|
| 160 |
+
- **Experts:** 9 specialized datasets (total > 200k rows after augmentation)
|
| 161 |
+
- **Evasive dataset (NEW):** 25,160 obfuscated C++ samples (92 evasion combinations)
|
| 162 |
+
- **ThreatIntel upgrade:** 9,532 rows (URLhaus + GTFOBins + MITRE CTI)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
---
|
| 165 |
|
| 166 |
+
## Citation
|
|
|
|
|
|
|
| 167 |
|
| 168 |
+
```bibtex
|
| 169 |
+
@misc{fathom2026,
|
| 170 |
+
title={Fathom: Expert Cybersecurity Analysis with Mixtral LoRA Adapters},
|
| 171 |
+
author={Umer},
|
| 172 |
+
year={2026},
|
| 173 |
+
howpublished={\url{https://huggingface.co/umer07/fathom-mixtral}},
|
| 174 |
+
}
|
| 175 |
+
```
|