Reynier commited on
Commit
982d628
·
verified ·
1 Parent(s): 84f657b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +62 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - dga
5
+ - cybersecurity
6
+ - domain-generation-algorithm
7
+ - text-classification
8
+ - pytorch
9
+ license: mit
10
+ ---
11
+
12
+ # DGA-Bilbo: CNN + LSTM for DGA Detection
13
+
14
+ Parallel CNN + LSTM architecture (Higham et al. 2021) trained on 54 DGA families.
15
+ Part of the **DGA Multi-Family Benchmark** (Reynier et al., 2026).
16
+
17
+ ## Model Description
18
+
19
+ - **Architecture:** Parallel CNN (filters 2–6, 60 each) + LSTM(256) → ANN(100) → sigmoid
20
+ - **Input:** Character-level encoding, left-padded to 75 chars
21
+ - **Output:** Binary classification — `legit` (0) or `dga` (1)
22
+ - **Framework:** PyTorch
23
+ - **Reference:** Higham et al., 2021
24
+
25
+ ## Performance (54 DGA families, 30 runs each)
26
+
27
+ | Metric | Value |
28
+ |-----------|--------|
29
+ | Accuracy | 0.9207 |
30
+ | F1 | 0.8999 |
31
+ | Precision | 0.9303 |
32
+ | Recall | 0.8954 |
33
+ | FPR | 0.0540 |
34
+ | Query Time| 0.078 ms/domain (CPU) |
35
+
36
+ ## Usage
37
+
38
+ ```python
39
+ from huggingface_hub import hf_hub_download
40
+ import importlib.util, torch
41
+
42
+ weights = hf_hub_download("Reynier/dga-bilbo", "bilbo_best.pth")
43
+ model_py = hf_hub_download("Reynier/dga-bilbo", "model.py")
44
+
45
+ spec = importlib.util.spec_from_file_location("bilbo_model", model_py)
46
+ mod = importlib.util.module_from_spec(spec)
47
+ spec.loader.exec_module(mod)
48
+
49
+ model = mod.load_model(weights)
50
+ results = mod.predict(model, ["google.com", "xkr3f9mq.ru"])
51
+ print(results)
52
+ ```
53
+
54
+ ## Citation
55
+
56
+ ```bibtex
57
+ @article{reynier2026dga,
58
+ title={DGA Multi-Family Benchmark: Comparing Classical and Transformer-based Detectors},
59
+ author={Reynier et al.},
60
+ year={2026}
61
+ }
62
+ ```