Faithful reproduction of:
Almodovar, C., Sabrina, F., Karimi, S., Azad, S. (2024). LogFiT: Log Anomaly Detection Using Fine-Tuned Language Models. IEEE Transactions on Network and Service Management, 21(2), 1715-1723.
Methodology locked at v1.2 after tri-LLM adversarial review (v1.0 -> v1.1 -> v1.2). All decisions documented in docs/logfit-repro-decisions-v1.2.md. Implementation spec in docs/logfit-repro-spec-v1.2.md.
- Datasets: HDFS, BGL, Thunderbird (first 20M lines)
- Protocol: 5-fold CV with random 25k normal + 2k anomaly sampling per paper Section IV-A
- Backbone:
roberta-baseorallenai/longformer-base-4096selected by 0.8-quantile word length - Training: HuggingFace Trainer + OneCycleLR + gradual unfreezing
- Metrics: Precision, Recall, F1, Specificity per fold + mean
logfit-repro/
src/ Implementation modules
utils/ Determinism, IO helpers
*.py Pipeline stages (prep, splits, mask, train, score, eval, variability)
configs/ YAML run configs (one per dataset x window)
scripts/ SLURM wrappers for Narval
tests/ Test suite (one regression test per BLOCKING/IMPORTANT finding)
docs/ Decisions + spec docs (v1.2 locked)
See docs/logfit-repro-decisions-v1.2.md Section 8. Order:
- Supervisor sign-off on v1.2
- Repo scaffold (this commit)
- Preprocessing (
prepare_hdfs.py,prepare_bgl_tbird.py) - Token-length validation gate
- Backbone selection
- 5-fold splitter
- Single-fold smoke test on HDFS 8-13. Full runs + variability + throughput
- Results writeup
Training is implemented in src/train.py as library functions. The
main entrypoint is train_fold_from_paths(...), which loads the YAML config,
paragraphs, and splits, then trains one fold.
Backbone selection is resolved in this order:
- YAML defaults (
backbone.roberta_id/training.use_longformer). - Backbone decision artifact (from src/select_backbone.py)
if
backbone_decision_pathis provided. - Explicit YAML override (
training.backbone) if set.
This preserves the v1.4 phase-override behavior while allowing the automated selection artifact to drive training.
- Global
seed=42 transformers.TrainingArguments(full_determinism=True, ...)CUBLAS_WORKSPACE_CONFIG=:4096:8exported in SLURM scriptsPYTHONHASHSEED=0exported in SLURM scripts- Per-fold model-weight SHA256 logged for cross-run audit
fp16=Trueaccepted with residual non-determinism caveat
Reproduction claimed successful if reproduced F1 falls within +/-0.02 of paper Tables III/IV/V means. Per-fold values persisted, not just means.
Cross-fold anomaly overlap (~50% between any two folds' test sets) is a methodology consequence of the paper's 2k anomaly budget vs 1k+1k per-fold allocation. Disclosed in docs/logfit-repro-decisions-v1.2.md Section 2.3.