OTU MITS · Group 6 · OWASP A09:2025
Contextual log anomaly detection and alert triage
One pipeline from raw system logs to ranked, explained security alerts, evaluated under a protocol fixed before the experiments: chronological splits, deduplicated test sets, three seeds and paired 95% bootstrap intervals.
- 1ParseRaw log lines to event templates: Drain, digit mask or a local LLMRQ2
- 2DetectScore sessions with DeepLog, LogRobust or a parser-free transformerRQ1
- 3TriageRank Sysmon events for an analyst and explain each one with the LLMRQ3
Architecture
How the pipeline and the models fit together
Two paths lead to a session score: parsed event sequences for DeepLog and LogRobust, or raw messages through frozen BERT for the transformer. Triage ranks Windows Sysmon events with the local LLM, a text detector, or both, and cuts each ranking at a threshold fixed on validation.
Coloured edges mark the models compared in RQ1 and the triage scorers in RQ3. Each stage is its own notebook that saves its outputs, so any stage can be rerun alone.
Semi-supervised: trained on normal sessions only.
Supervised: trained on normal and anomalous sessions.
Supervised, parser-free, in the style of NeuralLog.
No training: one prompt per event, answers cached.
RQ1 · Detection
Does a transformer beat DeepLog and LogRobust?
Yes. The parser-free transformer is clearly best on both datasets on F1, AUPRC and false alarms. Dots are seed means; bars are 95% bootstrap intervals on the deduplicated test set.
A difference counts only when its 95% interval excludes zero. For false alarms, below zero is better.
Table: detection on the deduplicated test sets
Table: paired differences
RQ2 · Parsing
Does LLM parsing beat Drain?
On grouping, yes. On detection, no. The local LLM groups 11.2M HDFS lines almost perfectly, but simple digit masking gets most of the way, and better templates did not produce better detectors.
Axis starts at 0.80.
Seed mean ± one standard deviation.
Table: grouping accuracy on all HDFS lines
Table: downstream detection by parser
Table: parsing accuracy on Loghub's 2,000-line samples
RQ3 · Triage
Can LLM triage cut workload while keeping 95% of attacks?
No, not under the pre-registered protocol. Cutoffs chosen on validation did not transfer to new attacks: detector rankings reviewed about 1% of items but caught about 55% of attacks, while the LLM alone kept every attack only by flagging everything.
2,160 test items, 38 attacks (hand-checked labels). The shaded zone is the goal: at least 95% recall with less than the full workload. LLM and severity rule sit on the same point: they review everything.
0.74%
LLM answers unparseable after one retry (target under 1%)
1.35%
Answers citing evidence not in the event (hallucination)
Explanation ratings, 1 to 5
Two blind passes by an LLM judge, not human raters (protocol D10).
Read from the test curve after the fact, so it is descriptive only and never a usable cutoff. It shows the detector ranking does order attacks well (8% of items for 95% recall); the cutoff picked on validation was what failed to transfer.
Table: triage results by ranking
Table: workload needed on the test curve
Robustness · RQ1 and RQ2
What happens when log lines change?
LogRobust holds up best; DeepLog collapses on HDFS. 5, 10 and 20% of test lines were altered (insertions, deletions, replacements, swaps) and every saved model re-scored with its clean-validation settings.
F1 drop = altered minus clean. Bands are paired 95% intervals. One draw of alterations (seed 0).
Table: F1 drop by detector, parser and altered share
Data and status
What was measured, and on what
Every planned measure was run, except one that was dropped and one that was replaced; both are recorded as deviations in the protocol.
Planned measures
ATLASv2 triage data (RQ3)
Attack labels were hand-checked; "original" counts the dataset's own labels.
Method
How the numbers were produced
Chronological splits
Earliest 70% trains, next 10% validates, latest 20% tests. Test sessions that repeat a training sequence are removed for the primary results.
Settings on validation only
Each detector starts at its published default (DeepLog g = 9, P(anomaly) ≥ 0.5); validation may only make it stricter.
Honest uncertainty
Three seeds, 1,000 stratified bootstrap resamples. One model "beats" another only when the paired interval excludes zero.
Detectors
DeepLog (LSTM, semi-supervised), LogRobust (attention Bi-LSTM on FastText + TF-IDF vectors) and a NeuralLog-style transformer on frozen BERT vectors.
Local LLM
Qwen3-4B-Instruct-2507 run inside Colab with greedy decoding and cached answers, for both parsing and triage.
Data
Loghub HDFS_v1 (575k sessions) and BGL (47k windows); ATLASv2 Windows Sysmon process starts (65k items) for triage.
Limitations
- Small validation splits that are not representative of the test periods.
- 38 test attacks on ATLASv2, so one attack is about 2.6 points of recall.
- Synthetic alterations in the robustness test, not real software updates.
- One 4B-parameter LLM for all parsing and triage results.
- Explanation ratings by an LLM judge rather than human analysts.