VarParser: Unleashing the Neglected Power of Variables for LLM-based Log Parsing Conference: Proceedings of the ACM Web Conference 2026; April 13–17, 2026; Dubai, United Arab Emirates. Proceedings of the ACM Web Conference 2026 (WWW ’26), April 13–17, 2026, Dubai, United Arab Emirates ISBN: 979-8-40
Jinrui Sun, Tong Jia, Minghua He, Ying Li · 2026
Read VarParser: Unleashing the Neglected Power of Variables for LLM-based Log Parsing Conference: Proceedings of the ACM Web Conference 2026; April 13–17, 2026; Dubai, United Arab Emirates. Proceedings of the ACM Web Conference 2026 (WWW ’26), April 13–17, 2026, Dubai, United Arab Emirates ISBN: 979-8-40 by Jinrui Sun, Tong Jia, Minghua He, Ying Li (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-22676.txt.
Introduction
Jinrui Sun, Tong Jia, Minghua He, and Ying Li built VarParser, a log parser that leans on the variables inside log lines. Logs are the first place engineers look when a big service fails. Their 2026 preprint notes that parsing — turning raw lines into clean events — is the first step for fault hunts.
Past parsers lean on the fixed text and slight the variable parts. VarParser flips that focus, and finds the variables carry rich signal. Better parses mean faster, truer fault diagnosis. The work serves the teams that keep online services alive. It is a small shift with wide reach.
Catalog record
| CREATOR | Jinrui Sun, Tong Jia, Minghua He, Ying Li |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 50 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2601-22676
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
VarParser: Unleashing the Neglected Power of Variables for LLM-based Log Parsing Conference: Proceedings of the ACM Web Conference 2026; April 13–17, 2026; Dubai, United Arab Emirates. Proceedings of the ACM Web Conference 2026 (WWW ’26), April 13–17, 2026, Dubai, United Arab Emirates ISBN: 979-8-4007-2307-0/2026/04 DOI: 10.1145/3774904.3792095 CCS: Software and its engineering Software maintenance tools CCS: Information systems Web log analysis Jinrui Sun, Tong Jia, Minghua He, Ying Li Abstract . Logs serve as a primary source of information for engineers to diagnose failures in large-scale online service systems. Log parsing, which extracts structured events from massive unstructured log data, is a critical first step for downstream tasks like anomaly detection and failure diagnosis. With advances in large language models (LLMs), leveraging their strong text understanding capabilities has proven effective for accurate log parsing. However, existing LLM-based log parsers all focus on the constant part of logs, ignoring the potential contribution of the variable part to log parsing. This constant-centric strategy brings four key problems. First, inefficient log grouping and sampling with only constant information. Second, a relatively large number of LLM invocations due to constant-based cache, leading to low log parsing accuracy and efficiency. Third, a relatively large number of consumed constant tokens in prompts leads to high LLM invocation costs. At last, these methods only retain placeholders in the results, losing the system visibility brought by variable information in logs. Facing these problems, we propose a variable-centric log parsing strategy named VarParser. Through variable contribution sampling, variable-centric parsing cache, and adaptive variable-aware in-context learning, our approach can efficiently capture the variable parts of logs and leverage their contributions to parsing. By introducing variable units, we preserve rich variable information, enhancing the integrity of log parsing results. Extensive evaluations on large-scale datasets demonstrate that VarParser achieves higher accuracy compared to existing methods, significantly improving parsing efficiency while reducing the LLM invocation costs. † † cc-license: by 1. Introduction In recent years, online services such as Google Search, Bing, Facebook, and Twitter have grown rapidly, providing 24/7 support to millions of users. Despite significant efforts to ensure service reliability and availability, hardware and software failures remain inevitable in practice, often leading to unplanned outages. To address these incidents, practitioners heavily rely on system logs as a key diagnostic resource. These logs contain rich historical records of events and system states, enabling effective anomaly detection, failure diagnosis, and recovery support. However, with the rapid growth in raw log volume, identifying valuable information from massive log data has become increasingly challenging, even for experienced engineers ( 43 ) . To address this issue, automated log analysis techniques have emerged in recent years. A critical and widely adopted first step in this process is log parsing, which involves converting semi-structured console logs into a structured format. This conversion serves as a crucial preliminary step for automated log analysis tasks such as anomaly detection ( 5 ; 8 ; 41 ; 13 ; 14 ) , root cause analysis ( 1 ; 30 ; 44 ; 42 ) , and failure diagnosis ( 33 ; 40 ; 23 ; 16 ; 15 ) , etc. Typically, raw log messages consist of two parts: (1) Log constants, which represent the constant part describing the main content of the recorded event; (2) Log variables, which contain the dynamic part associated with the event (determined at runtime). Figure 1 shows the procedure of log parsing. Figure 1. An example of log parsing procedure. The red part of raw logs represents timestamps, the brown part represents the host and process information, the blue part represents the log level, and the green part represents the log content. Existing log parsing methods can be categorized into three types: Syntax-based parsers, Semantic-based parsers, and LLM-based parsers. Syntax-based parsers ( 9 ; 34 ; 37 ; 39 ) extract templates using strategies such as frequency-based, similarity-based, and heuristic methods, which often struggle to accurately identify templates when log messages deviate from manually defined rules. Semantic-based parsers rely on neural networks to differentiate templates from variables but require large amounts of labeled data for training. LLM-based parsers leverage pre-trained large language models and optimize template extraction through in-context learning (ICL). Many studies have shown that, compared to syntax-based and semantic parsers, LLM-based parsers achieve significantly higher accuracy ( 28 ; 18 ; 45 ; 10 ; 29 ) . LLM-based log parsing methods typically involve three steps: (1) log sampling, where a candidate sampling algorithm selects a small set of diverse and information-rich historical logs to provide effective demonstrations for the LLM; (2) log matching, which matches the already parsed templates with the new logs to avoid redundant LLM invocations; (3) in-context learning, which allows the LLM to learn domain-specific knowledge and generate log templates based on provided log examples. Existing LLM-based log parsers all focus on the constants of logs, ignoring the potential contribution of variable information in the original logs to log parsing. This constant-centric strategy suffers from four key problems. First, inefficient log grouping and sampling with only constant information. Second, a relatively large number of LLM invocations due to constant-based cache, leading to low log parsing efficiency. Third, a relatively large number of consumed constant tokens in prompts leads to high LLM invocation costs. Lastly, these methods only retain placeholders in the results, losing the system visibility brought by variable information in logs. The specific approach of the existing method ( 38 ; 36 ; 29 ; 10 ; 45 ; 18 ) is constant-centric in the following way: • In log sampling : Existing methods are dominated by the constants in logs for grouping criteria (e.g., top-k frequent tokens, log similarity, etc.), aiming to group logs with the same constants together. This results in the number of log groups being approximately equal to the number of templates, thereby limiting sampling efficiency. • In log matching : Existing methods only store the constants in cache and fail to capture dynamically variable positions, supporting only token matching, which leads to a high frequency of matching failures. • In in-context learning : Existing methods select log-template pairs as examples based on the similarity of log levels. Since constants typically account for a large proportion of logs, the constant part often dominates the selection of examples. However, as LLMs can understand natural language, the repeated natural language in the examples contributes little to understanding the new logs to be parsed, resulting in token wastage and higher LLM invocation costs. • Result integrity : Existing log parsing methods only preserve log templates (constants + placeholders), discarding all variable information during parsing. However, log variables often carry critical content such as system states, internal details, and encoded values. Losing this information greatly reduces system visibility and weakens the effectiveness of downstream tasks. Facing these problems, we demonstrate a new log parsing strategy called the variable-centric strategy. We propose VarParser, a var iable-centric log parser with large language models. We focus on the variable part of the logs throughout parsing to fully leverage the contribution of the variables to the log parsing process. Specifically, our approach is variable-centric in the following way: • In log sampling : VarParser clusters uncommon tokens to group historical logs with