LanG 2.0: Energy-Efficient Agentic AI for Semi-Automated Security Operations at Scale
Organizations: Department of Software Engineering and IT, École de technologie supérieure (ÉTS), Montreal, QC, Canada · Department of Mathematics and Computer Science, Université du Québec à Trois-Rivières (UQTR), Trois-Rivières, QC, Canada
Abstract
Security operations centers (SOCs) need to turn terabytes of alerts, logs and flows into trusted, affordable decisions to unveil hidden threats. We present LanG 2.0, an agentic system that detects threats, correlates evidence and writes rules, investigating whether small local models can replace frontier models affordably and safely when structural safeguards, not model accuracy, provide the guarantees. It incorporates entity-anchored correlation, human approval of rule changes and a tamper-evident ledger. Tests span eight flow datasets from five networks, real XDR alerts and multistage campaigns. Against its predecessor, campaign correlation precision rises from 18.75% to 51.81%, and rule acceptance from at most 60.00% to 98.33%. Against Claude Opus 5.5, scoring flows against each network's normal traffic detects attacks on unseen networks at 73.42% F1 without false positives, versus 58.10% with 49.00% false positives, for at least 650 times less energy. Finetuned models statistically match it on alert classification and rule writing for 5.6 to 59 times less energy. The work demonstrates LanG's practical scalability, processing 3.33 million records in 6.4 minutes, over 30 million hourly, and its safeguards resisted prompt injection, label poisoning and ledger tampering, so small local models can carry most SOC detection affordably and safely.
Figures & tables
| Work | Input data | Multisource | Output | Explanation | Energy report | Budget | Core technique |
|---|---|---|---|---|---|---|---|
| Alert2Vec [ 3 ] | network, host alerts | partial | threat levels | – | – | – | alert subgraph embedding |
| GraphWeaver [ 4 ] | XDR alerts | partial | incidents | – | – | – | shared entities, spanning tree |
| MuSAR [ 5 ] | alarms, application logs | ✓ | attack chains | – | – | – | ATT&CK stage linking |
| Carbon Filter [ 24 ] | EDR alerts | – | false alert clusters | – | – | – | similarity hashing |
| KAIROS [ 6 ] | kernel audit | – | summary graph | – | – | – | temporal GNN |
| ORTHRUS [ 7 ] | kernel audit | – | attack paths | – | – | – | GNN, dependency analysis |
| Symbol | Meaning | Symbol | Meaning |
|---|---|---|---|
| Events and correlation (Sections III to IV-C ) | |||
| , | event (Eq. ( 1 )), set | attack campaign | |
| , | process, parent process | , | ATT&CK tactics, severity |
| , | indicators, ATT&CK techniques | command line | |
| event confidence (Eq. ( 2 )) | primary set of events | ||
| hook (Table III ) | , | entity, context hooks | |
| Hook | Class | Weight rule |
|---|---|---|
| Temporal | C | for ( s) |
| IP linkage | E | 1.0 shared address, 0.8 NAT pivot ( ), 0.7 same /24 |
| Host cooccurrence | E | 0.85 same host within 120 s, 0.4 same host otherwise |
| Flow pattern | C | protocol 0.3, destination port 0.4 (0.15 if within 100), source port 0.2, volume ratio above 0.8 adds 0.1 |
| IoC overlap | E | |
| Kill chain | C | phase distance rule (0.8, 1.0, 0.6, decaying) |
| Benchmark B | GUIDE | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| one day | 7 days | ||||||||
| Method | P | R | F1 | NI | F1 | P | R | F1 | F1 |
| Time window | 18.80 | 99.88 | 31.17 | 0.00 | 31.13 | 42.68 | 48.57 | 28.82 | 59.78 |
| IP only | 99.67 | 44.83 | 60.12 | 99.65 | 42.12 | 84.38 | 59.87 | 60.41 | 71.58 |
| Entity union | 39.06 | 83.33 | 45.42 | 29.32 | 30.77 | 41.68 | 85.47 | 45.70 | 41.81 |
| Hub-pruned union | 42.10 | 78.77 | 48.21 | 47.48 | 40.82 | 46.08 | 82.53 | 47.43 | 44.10 |
| No labels from the network | Family macro F1 (%) | |||||
|---|---|---|---|---|---|---|
| Dataset (export) | AUC | Detected % | False al. % | |||
| UNSW-NB15 (NF) | 0.997 | 92.48 | 0.88 | 6.94 | 51.01 | 50.89 |
| UNSW-NB15 (CIC) | 0.914 | 35.61 | 1.13 | 9.24 | 47.29 | 51.93 |
| ToN-IoT (NF) | 0.881 | 8.54 | 1.10 | 4.17 | 79.82 | 85.71 |
| ToN-IoT (CIC) | 0.896 | 5.13 | 1.22 | 3.83 | 46.29 | 53.75 |
| BoT-IoT (NF) | 0.968 | 87.71 | 1.31 | 8.51 | 88.48 | 90.09 |
| System | P | R | F1 | FPR | Family | Wh per flow |
|---|---|---|---|---|---|---|
| LanG, unseen network | 100.00 | 58.00 | 73.42 | 0.00 | 4.50 | and |
| LanG, adapted | 91.95 | 80.00 | 85.56 | 7.00 | 62.57 | |
| LanG, same dataset | 98.84 | 85.00 | 91.40 | 1.00 | 71.32 | |
| Claude Opus 5.5 | 55.45 | 61.00 | 58.10 | 49.00 | 43.26 | 0.24 to 0.34 |
| Qwen 2.5 7B | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.026 |
| Llama 3.2 3B | 0.00 | 0.00 | 0.00 | 0.00 | 2.28 | 0.015 |
| Operation | Unit | LanG | Frontier |
| Inference | |||
| Flow detector, batches (CPU) | flow | [ ] | 0.24 to 0.34 |
| Flow detector, one call (CPU) | flow | [ ] | 0.24 to 0.34 |
| Classical agents (CPU) | alert, flow | [about ] | 0.24 to 0.34 |
| Alert analyst, 4B | alert | 0.0137 | 0.24 to 0.34 |
| Incident grader, 1.7B | incident | 0.0058 | 0.24 to 0.34 |
| Flows | Logs | |
| Records | 2,365,424 | 965,067 |
| Suspects after the filter | 143,073 | 57,041 |
| Attack records kept by the filter | 92.69% | 68.37% |
| Incidents, work units | 6, 238 | 57,041, 577 |
| Front stage time, throughput | 51.5 s, 45,957/s | 18.2 s, 52,822/s |
| Workflows run (failed), policy decisions | 25 (0), 50 | 25 (0), 50 |
| System | Acc. | Det. | Recall | Wh per rule | p50 (s) |
|---|---|---|---|---|---|
| Local models finetuned for rule generation (previous work in 4 bits) | |||||
| LanG v2 + loop, 16 bits | 98.33 | 82.14 | 98.41 | 0.128 | 3.37 † |
| LanG v2 + loop, 8 bits | 97.50 | 79.76 | 98.37 | 0.047 | 1.00 † |
| LanG v2, 8 bits, one attempt | 95.00 | 82.14 | 98.41 | 0.043 | 0.78 |
| Previous work [ 4 ] , Qwen3 1.7B ∗ | 60.00 | 29.03 | 73.86 | 0.169 | 7.00 |
| Previous work [ 4 ] , Mistral 7B ∗ | 57.50 | 29.03 | 79.25 | 0.352 | 9.81 |
| Alert step | Incident grade | Flow family | ||||
|---|---|---|---|---|---|---|
| System | Sub. | All | Sub. | All | Sub. | All |
| LanG finetuned | 97.31 | 90.75 | 42.83 | 40.95 | 12.14 | 16.27 |
| base size | 4B | 1.7B | 8B | |||
| Claude Opus 5.5 | 95.19 | 27.24 | 26.78 | |||
| gpt-oss-20b | 53.64 | 30.07 | 14.78 | |||
| Classical | 98.32 | 93.10 | 43.41 | 42.16 | 12.24 | 12.58 |
| Agent | Base | F1 | Frontier | Gain | kWh | Decision |
|---|---|---|---|---|---|---|
| Alert analyst | 1.7B | 85.10 | 89.76 | 0.136 | escalate | |
| (109 alerts) | 4B | 89.63 | 89.76 | 4.53 | 0.272 | escalate |
| 8B | 72.97 | 89.76 | 0.429 | keep 4B | ||
| Incident grader | 1.7B | 55.13 | 29.40 | 0.141 | keep | |
| (30 incidents) | ||||||
| Family namer | 1.7B | 17.52 | 52.61 | 0.130 | escalate |
| Macro F1 [95% CI] | |||
|---|---|---|---|
| Network | Flows | Finetuned 8B | LightGBM |
| UNSW-NB15 | 2,535 | 9.20 [8.34, 10.11] | 11.43 [10.52, 12.42] |
| ToN-IoT | 2,405 | 19.20 [17.88, 20.69] | 10.06 [9.25, 10.97] |
| CSE-CIC-IDS2018 | 1,059 | 15.65 [14.19, 17.37] | 13.65 [12.21, 15.07] |
| All (distinct flows) | 5,495 | 16.27 [15.35, 17.26] | 12.58 [11.92, 13.23] |
| Pattern layer | With Prompt Guard 2 | ||
|---|---|---|---|
| % [95% CI] | |||
| Texts | flagged | flagged | quarantined |
| BIPIA instructions (150) | 0.00 [0.00, 2.43] | 0.67 [0.12, 3.68] | 0.00 [0.00, 2.43] |
| BIPIA in log lines (150) | 0.00 [0.00, 2.43] | 0.67 [0.12, 3.68] | 0.00 [0.00, 2.43] |
| deepset injections (263) | 5.32 [3.20, 8.74] | 26.24 [21.29, 31.87] | 19.39 [15.07, 24.60] |
| deepset benign (399) | 0.00 [0.00, 0.92] | 0.25 [0.04, 1.41] | 0.00 [0.00, 0.92] |
| Severity | Priority | Log risk | ||||
|---|---|---|---|---|---|---|
| Configuration | Flagged | lower | higher | lower | changed | Benign |
| No filter | 0.00 | 15.00 | 25.00 | 0.00 | 47.50 | 0 of 30 |
| Pattern filter | 0.00 | 30.00 | 20.00 | 2.50 | 55.00 | 0 of 30 |
| Prompt Guard 2, spotlighting | 0.00 | 37.50 | 30.00 | 10.00 | 55.00 | 0 of 30 |
| Benign text control | 0.00 | 32.50 | 30.00 | 7.50 | 45.00 | 0 of 30 |
| Clean rerun | n/a | 10.00 | 32.50 | 0.00 | 57.50 | n/a |
| Labels | FPR | Det. | Fam. F1 | Named | Alerted | Gate | Audit |
|---|---|---|---|---|---|---|---|
| Clean | 2.57 | 89.24 | 61.01 | 80.97 | 92.86 | 9 | n/a |
| Targeted, | 2.56 | 83.57 | 59.38 | 70.12 | 84.87 | 8 | 70.83 |
| Targeted, | 2.64 | 78.53 | 56.53 | 55.95 | 75.59 | 7 | 66.11 |
| Targeted, | 2.31 | 73.00 | 53.74 | 38.34 | 68.07 | 10 | 63.89 |
| Targeted, | 1.82 | 69.00 | 43.51 | 10.97 | 64.12 | 12 | 65.00 |
| Availability, | 2.47 | 88.40 | 60.34 | 78.68 | 91.24 | 12 | 0.00 |
| Without key | With HMAC key | |||
|---|---|---|---|---|
| Attack | chain | anchor | chain | anchor |
| Edit one record | 200 | 200 | 200 | 200 |
| Delete one record | 200 | 200 | 200 | 200 |
| Truncate 1, 10 or 100 records | 0 | 200 | 0 | 200 |
| Forge a record after the head | 0 | 0 | 200 | 200 |
| Swap two records | 200 | 200 | 200 | 200 |
| Fix | Metric | Before | After |
|---|---|---|---|
| Greedy decoding, fixed seed | severity changed, clean rerun | 42.50 | 0.00 |
| log risk changed, clean rerun | 57.50 | 25.00 | |
| 50 site labels (family namer) | F1, three new networks | 12.31 | 55.07 |
| 200 site labels | 67.08 | ||
| frontier names as labels | 23.33 | ||
| 10 labels per organization | F1, 17 GUIDE organizations | 28.25 | 69.53 |
Cybersecurity
Cybersecurity develops methods to protect digital and cyber-physical systems from attacks, vulnerabilities, data loss, and misuse.
See all 368 papers