A Story About Cohesion and Separation: Label-Free Metric for Log Parser Evaluation

Qiaolin Qin, Jianchen Zhao, Heng Li, Weiyi Shang, Ettore Merlo

TL;DR

Evaluating log parsers currently requires labor-intensive, subjective "ground-truth" labels that are often unavailable or inconsistent. This paper introduces PMSS (Parser Medoid Silhouette Score), a label-free metric that uses unsupervised clustering principles and Levenshtein distance to evaluate parser performance, providing a reliable and efficient alternative for real-world industrial logs.

What Problem Does This Paper Address?

Log parsing—the process of turning raw, unstructured log messages into structured templates—is the foundational step for automated system monitoring and anomaly detection. However, evaluating how well a parser performs is surprisingly difficult.

Existing metrics like Grouping Accuracy (GA) and F1-score of Template Accuracy (FTA) rely on "ground-truth" labels. The authors identify three critical flaws in this approach:

  1. Limited Availability: Real logging statements are often hidden in private source code, forcing researchers to rely on a small set of manually labeled public datasets.
  2. Subjectivity: Different experts have different opinions on what a "correct" template looks like, leading to "diverged correction rules."
  3. Conclusion Inconsistency: Because labels are subjective, a parser that looks like the "winner" on one version of a dataset might be a "loser" on another version of the same data.

The authors seek a way to evaluate parsers without needing labels at all, treating the problem as a task of unsupervised text clustering and summarization.

Methods

The authors propose PMSS (Parser Medoid Silhouette Score). The core idea is to measure how well a parser achieves two goals: Cohesion (how similar a log message is to its assigned template) and Separation (how different it is from other templates).

Key components include:

  • Medoid-based Silhouette Analysis: In clustering, a silhouette score measures how close a point is to its own cluster versus others. PMSS treats the extracted templates as "medoids" (representative centers) of the log groups.
  • Levenshtein Distance: To quantify similarity, the metric uses edit distance. This captures the structural and semantic alignment between a raw log message and its template.
  • Near-Linear Complexity: To handle the massive volume of modern logs, the algorithm uses alphanumeric sorting of templates to reduce the search space for "neighboring" clusters, ensuring the metric can be calculated quickly.
  • Variable Filtering: The method incorporates heuristics to ignore pure numerical values, which are almost always dynamic variables rather than part of the static template.

Datasets

The study utilizes the Loghub 2.0 dataset, which contains 14 diverse log sources (e.g., HDFS, Spark, OpenStack, BGL) totaling millions of messages.

To demonstrate the instability of current metrics, the authors generated five different versions of ground truth for these datasets by applying various correction rules found in recent literature (e.g., rules from LogBatcher, UNLEASH, and LUNAR).

Key Insights and Ideas

  • The "Ground Truth" is a Moving Target: The most striking insight is that changing the labeling rules can change the performance ranking of parsers. For example, on the OpenStack dataset, the parser LUNAR’s accuracy score varied by over 200% depending on which "ground truth" version was used.
  • High-Performers are More Fragile: Advanced parsers (like LLM-based ones) are more sensitive to label inconsistencies than simpler, less accurate parsers.
  • Parsing as Summarization: By framing the template as a "summary" of a group of logs, the authors justify using distance-based metrics rather than binary "correct/incorrect" matches.
  • Strong Correlation: Despite being label-free, PMSS shows a significant positive correlation (Spearman’s $\rho \approx 0.6$) with traditional label-based metrics (FGA and FTA). This suggests PMSS is a valid proxy for "true" performance.

Key Results

  • Parser Selection: PMSS identified the same "best" parser as the label-based FGA metric in 7 out of 14 datasets. On average, the FGA score of the parser chosen by PMSS was within 2.1% of the absolute best possible FGA score.
  • Robustness: Unlike PA and FTA, PMSS does not fluctuate based on human labeling bias, providing a stable benchmark for industrial users who have no labels at all.
  • Efficiency: PMSS is computationally practical, averaging about 15ms per 1,000 log lines. While slower than simple label-matching (which takes <1ms), it remains near-linear and scales well to large datasets.

Limitations and Future Work

  • Tokenization Dependency: PMSS relies on white-space tokenization. If a log message uses unusual delimiters that aren't properly handled, the distance calculation might be skewed.
  • Heuristic Limits: The current variable filtering (removing numbers) is a heuristic. More complex dynamic variables (like UUIDs or file paths) might still introduce noise into the cohesion score.
  • Downstream Validation: While the paper discusses the theory of how PMSS relates to tasks like anomaly detection, it does not provide experimental results showing that a higher PMSS score directly leads to better anomaly detection accuracy.
  • Future Directions: The authors plan to refine the data preprocessing steps and investigate how PMSS can be used to automatically tune parser hyperparameters in production environments.

Summary updated

Abstract

Log parsing converts log messages into structured event templates, allowing for automated log analysis and reducing manual inspection effort. To select the most compatible parser for a specific system, multiple evaluation metrics are commonly used for performance comparisons. However, existing evaluation metrics heavily rely on labeled log data, which limits prior studies to a fixed set of datasets and hinders parser evaluations and selections in the industry. Further, we discovered that different versions of ground-truth used in existing studies can lead to inconsistent performance conclusions. Motivated by these challenges, we propose a novel label-free template-level metric, PMSS (parser medoid silhouette score), to evaluate log parser performance. PMSS evaluates both parser grouping and template quality with medoid silhouette analysis and Levenshtein distance within a near-linear time complexity in general. To understand its relationship with label-based template-level metrics, FGA and FTA, we compared their evaluation outcomes for six log parsers on the standard corrected Loghub 2.0 dataset. Our results indicate that log parsers achieving the highest PMSS or FGA exhibit comparable performance, differing by only 2.1% on average in terms of the FGA score; the difference is 9.8% for FTA. PMSS is also significantly (p<1e-8) and positively correlated to both FGA and FTA: the Spearman's rho correlation coefficient of PMSS-FGA and PMSS-FTA are respectively 0.648 and 0.587, close to the coefficient between FGA and FTA (0.670). We further extended our discussion on how to interpret the conclusions from different metrics, identifying challenges in using PMSS, and provided guidelines on conducting parser selections with our metric. PMSS provides a valuable evaluation alternative when ground-truths are inconsistent or labels are unavailable.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Loghub-2.0 · Loghub 2.0 · 14 datasetsPMSS vs FGASpearman's ρ correlation, PMSS–FGA0.648Log Parser Evaluation · datasets=14 · log-parsers=6 · sample-points=84
Source quote
L814: PMSS shows significant positive correlations with both FGA and FTA. Considering the small sample size (i.e., 6 log parsers), we did not compare metric rankings per dataset. Instead, we conducted Spearman's \rho analyses with all 84 sample points to understand the correlations between PMSS and FGA-FTA. The correlations of PMSS–FGA and PMSS–FTA are statistically significant (p<1e (-8)), with coefficients of 0.648 and 0.587, respectively. For reference, the correlation between FGA and FTA is 0.670 (p<1e (-8)), indicating that PMSS exhibits a level of alignment with the label-based metrics comparable to the relationship between FGA and FTA themselves. These results suggest that PMSS effectively evaluates log parsers in terms of both event grouping and template quality, reinforcing its potential as a label-free yet integrative proxy for overall parsing performance.
Loghub-2.0 · Loghub 2.0 · 14 datasetsPMSS vs FTASpearman's ρ correlation, PMSS–FTA0.587Log Parser Evaluation · datasets=14 · log-parsers=6 · sample-points=84
Source quote
L814: PMSS shows significant positive correlations with both FGA and FTA. Considering the small sample size (i.e., 6 log parsers), we did not compare metric rankings per dataset. Instead, we conducted Spearman's \rho analyses with all 84 sample points to understand the correlations between PMSS and FGA-FTA. The correlations of PMSS–FGA and PMSS–FTA are statistically significant (p<1e (-8)), with coefficients of 0.648 and 0.587, respectively. For reference, the correlation between FGA and FTA is 0.670 (p<1e (-8)), indicating that PMSS exhibits a level of alignment with the label-based metrics comparable to the relationship between FGA and FTA themselves. These results suggest that PMSS effectively evaluates log parsers in terms of both event grouping and template quality, reinforcing its potential as a label-free yet integrative proxy for overall parsing performance.
Reported baseline / comparator measurements (1)
BenchmarkMethodMetricScoreProtocol / Evidence
Loghub-2.0 · Loghub 2.0 · 14 datasetsFGA vs FTA baselineSpearman's ρ correlation, FGA–FTA0.670Log Parser Evaluation · datasets=14 · log-parsers=6 · sample-points=84
Source quote
L814: PMSS shows significant positive correlations with both FGA and FTA. Considering the small sample size (i.e., 6 log parsers), we did not compare metric rankings per dataset. Instead, we conducted Spearman's \rho analyses with all 84 sample points to understand the correlations between PMSS and FGA-FTA. The correlations of PMSS–FGA and PMSS–FTA are statistically significant (p<1e (-8)), with coefficients of 0.648 and 0.587, respectively. For reference, the correlation between FGA and FTA is 0.670 (p<1e (-8)), indicating that PMSS exhibits a level of alignment with the label-based metrics comparable to the relationship between FGA and FTA themselves. These results suggest that PMSS effectively evaluates log parsers in terms of both event grouping and template quality, reinforcing its potential as a label-free yet integrative proxy for overall parsing performance.
BibTeX
@inproceedings{qin2026story,
  author = {Qiaolin Qin and Jianchen Zhao and Heng Li and Weiyi Shang and Ettore Merlo},
  title = {{A Story About Cohesion and Separation: Label-Free Metric for Log Parser Evaluation}},
  booktitle = {SANER},
  year = {2026},
  doi = {10.1109/saner67736.2026.00079},
}
Figure