
@Article{cmc.2026.085032,
AUTHOR = {Gobinda Bhattacharjee, Joy Dey, Tanjim Mahmud, Mohammad Shahadat Hossain, Karl Andersson},
TITLE = {SemBERT: Semantic BERT Embeddings and HDBSCAN Clustering for Unsupervised Log Parsing and Template Mining in Large-Scale Distributed Systems<sup></sup>},
JOURNAL = {Computers, Materials \& Continua},
VOLUME = {89},
YEAR = {2026},
NUMBER = {2},
PAGES = {--},
URL = {http://www.techscience.com/cmc/v89n2/68780},
ISSN = {1546-2226},
ABSTRACT = {Log parsing is a fundamental prerequisite for automated system monitoring, anomaly detection, and root cause analysis in large-scale distributed environments. However, existing parsing approaches often rely on heuristic rules, manually engineered features, or fixed similarity thresholds, limiting their adaptability to heterogeneous and evolving log structures. To address these challenges, this study presents SemBERT, a fully unsupervised log parsing framework that integrates semantic BERT embeddings, Incremental Principal Component Analysis (IPCA), HDBSCAN clustering, and adaptive centroid-based cluster merging for robust template mining. Unlike conventional methods that employ fixed merging criteria, SemBERT adaptively determines semantic merging thresholds according to the distribution of cluster centroids, reducing parameter sensitivity across datasets. Experiments on the LogHub HDFS benchmark demonstrated that SemBERT achieved perfect Grouping Accuracy (GA = 100.00%), Parsing Accuracy (PA = 95.82 ± 0.44%), and Template Accuracy (TA = 76.59 ± 4.49%), outperforming several classical parsers in semantic template discovery while maintaining competitive parsing performance. Repeated reproducibility experiments using three different random seed initializations (42, 123, and 999) produced identical adaptive thresholds and final template counts across all evaluated data scales, confirming the deterministic behavior and reproducibility of the proposed framework. Additional scalability experiments on randomly sampled subsets ranging from 50K to 1M log entries demonstrated stable threshold estimation and controlled template growth, highlighting the effectiveness of the adaptive semantic merging strategy. To validate the practical utility of the extracted templates, downstream anomaly detection experiments were conducted using representative machine learning, deep learning, and transformer-based models. The semantic templates generated by SemBERT provide informative representations suitable for downstream log analytics. Furthermore, experiments on the BGL dataset indicate that the framework generalizes effectively to heterogeneous logging environments through lightweight dataset-specific preprocessing. These findings suggest that SemBERT provides a scalable and semantically informed solution for unsupervised log parsing in modern distributed systems.},
DOI = {10.32604/cmc.2026.085032}
}



