Latest Findings · ASI Lab

When parsing goes wrong: How tiny log parsing mistakes quietly break AI anomaly detection

Modern software systems generate millions of log messages, and AI systems are used to spot the rare ones that signal a real problem. But before any AI can analyze logs, the raw text must be cleaned up by a step called log parsing, and this study finds that small parsing mistakes systematically weaken downstream anomaly detection. Across 20 datasets, the researchers show that fixing these parsing errors reliably improves detection accuracy, especially on hard, messy industrial logs.

Yicheng Sun, Jacky Wai Keung, Yishu Li, Xiaoxue Ma, Hi Kuen Yu
Agentic Software Intelligence Research Lab · Department of Computer Science, City University of Hong Kong
Journal of Systems and Software · 2027

Modern software systems generate millions of log messages, and AI systems are used to spot the rare ones that signal a real problem. But before any AI can analyze logs, the raw text must be cleaned up by a step called log parsing, and this study finds that small parsing mistakes systematically weaken downstream anomaly detection. Across 20 datasets, the researchers show that fixing these parsing errors reliably improves detection accuracy, especially on hard, messy industrial logs.

![Table showing F1 score improvements of five anomaly detection models when log parsing errors are corrected across 16 public and 4 industrial datasets]
Table 7: F1 score (%) of five anomaly detection models across 16 LogHub datasets and 4 industrial datasets, on original parsed logs (Orig.) versus corrected parsed logs (Corr.). Every dataset and model pair improves after parsing errors are fixed.

Why it matters

Every AI system that watches over software first needs the raw log text to be turned into a clean, structured form. This cleaning step is called log parsing, and it is usually treated as a boring preprocessing detail. This study shows it is not boring at all: when a parser merges two different events into one, or splits one event into many, or mangles a key identifier, it quietly changes what the downstream AI sees. The result is that genuinely anomalous logs get missed, and normal logs get flagged as problems. The paper is the first to name six recurring parsing error types and to prove, with statistics, that correcting them lifts detection accuracy across every dataset and model tested.

The researchers went far beyond public benchmarks. They built four real industrial log datasets from live production systems in manufacturing, process control, energy infrastructure, and enterprise services, then interviewed 11 engineers who maintain those systems. The headline finding: fixing parsing errors raised anomaly detection F1 scores by an average of 3.61 points, a gain that was statistically reliable in all 100 dataset and model combinations. On industrial logs, the relative improvement was even larger, reaching about 7%. This is not a marginal theory result, it is evidence that practitioners can reclaim real detection performance simply by taking parsing fidelity seriously.

Key findings

Small parsing mistakes, big detection losses

What it means for practitioners

For engineers who build or run log based monitoring, the practical message is clear: log parsing is not a throwaway preprocessing step, it is a first order driver of detection quality. Six concrete error types are worth auditing for, led by template over splitting, where minor lexical variation fragments one event into dozens of templates, and template over merging, where distinct success and failure events collapse into a single template. Both quietly blur the boundary between normal and anomalous behavior, inflating false alarms while suppressing real signals.

The augmentation finding is equally actionable. When industrial training data is scarce, borrowing curated logs from public datasets can be genuinely helpful, raising detection by an average of 7.30 F1 points. But more data is not automatically better. The gains are model dependent and they can reverse into negative transfer when the borrowed logs are semantically mismatched, with LogBERT dropping about 2% on two industrial datasets. Practitioners should treat cross dataset training as a compatibility sensitive decision, favoring diversity aware and domain compatible sampling over indiscriminate scaling.

The interviews add a more human caution. Engineers consistently valued robustness, faithfulness, and traceability over marginal benchmark gains, and several were wary of LLM based parsers whose fluent rewrites can omit the exact error codes, thresholds, and identifiers needed for debugging and auditing. Even a 16% semantic rewriting error rate in LLM parsing is a real concern when every alert must be traced back to an original log line. For production, the winning configuration appears to be a robust semi supervised detector, like SemiRALD, paired with parsing outputs that stay faithful to the raw log.

Related reading

Get the paper & cite it

Download full PDF ↓ View at DOI

Official citation: Yicheng Sun, Jacky Wai Keung, Yishu Li, Xiaoxue Ma, Hi Kuen Yu (2027). When parsing goes wrong: Revisiting log anomaly detection from parsing to deployment.. Journal of Systems and Software. DOI: 10.1016/j.jss.2026.113161.

log anomaly detection log parsing log analysis system reliability deep learning