arXiv:2609.31371cs.LGSep 2026

Manuscript Offprint

arXiv:2609.31371

Towards Understanding LLM-Based Log Anomaly Detection: An Empirical Study of Performance, Efficiency, and Robustness

Bin Li, Dongdong Wang, Siyang Lu

ABSTRACT

Large language models (LLMs) have demonstrated promising performance in log anomaly detection, yet how their adaptation strategies, architectures, and deployment configurations affect detection effectiveness remains insufficiently understood. To investigate these factors, we conduct a systematic empirical analysis across three public log datasets, examining different adaptation strategies, model architectures, parameter scales, and quantization settings. Our results reveal substantial performance differences across adaptation strategies, while model scaling yields varying detection gains across datasets. We further observe that models with comparable detection accuracy can exhibit markedly different computational costs, and that low-bit quantization largely preserves detection performance in the evaluated configurations. Finally, we examine detection robustness under structural, semantic, and label noise at different perturbation levels. These findings provide empirical insights into the performance, efficiency, and robustness of LLM-based log anomaly detection, highlighting practical considerations beyond conventional accuracy-oriented evaluation.

Index Terms— Large language models, log anomaly detection, evaluation framework, model efficiency, robustness.

1. INTRODUCTION

System logs record the runtime states and execution behaviors of modern computing systems and have been widely used for fault diagnosis and anomaly detection. Traditional log anomaly detection methods [1–5] typically model parsed event templates or their sequential patterns, but their reliance on log parsing and discrete event representations may introduce parsing errors and lose semantic information. With the rapid development of large language models (LLMs) [6, 7], recent studies have begun to exploit their strong semantic modeling capabilities to capture richer semantic and contextual information from textual logs. Various adaptation strategies, including prompting and parameter-efficient fine-tuning [7,8], have further demonstrated the potential of LLMs for log anomaly detection [9, 10].

However, current evaluations of LLM-based log anomaly detectors are largely dominated by predictive metrics such as Precision, Recall, and F1-score, providing only a partial view of practical performance. Higher accuracy may come at the cost of longer inference time, greater adaptation overhead, or a larger deployment footprint, while quantization and noisy logs may further affect reliability. Thus, accuracy alone cannot fully characterize the practical trade-offs of LLM-based log anomaly detection.

To address this limitation, we propose a six-dimensional evaluation framework covering Detection Performance, Inference Efficiency, Adaptation Efficiency, Deployment Efficiency, Quantization Resilience, and Noise Robustness. We benchmark representative adaptation strategies, model architectures, model scales, and quantization settings across BGL, HDFS, and Thunderbird to reveal trade-offs overlooked by accuracy-oriented evaluation.

The main contributions of this work are summarized as follows:

• Detection performance analysis. We systematically investigate the effects of adaptation strategies, model architectures, and parameter scales on LLM-based log anomaly detection across three public datasets, revealing performance differences across adaptation strategies and varying detection gains from model scaling.

• Efficiency analysis. We examine the trade-offs among detection performance, inference efficiency, adaptation overhead, and deployment cost, showing that comparable detection accuracy can entail different computational costs.

• Robustness analysis. We evaluate the effects of low-bit quantization and structural, semantic, and label noise, revealing largely preserved detection performance under quantization and varying sensitivity to noise.

∗^{*}Equal contribution. †\daggerCorresponding author.

Figure

Fig. 1: Overview of the proposed evaluation framework. Specialized language models are evaluated across six dimensions covering detection performance, inference efficiency, adaptation efficiency, deployment efficiency, quantization resilience, and noise robustness.

Table 1: Configurations of evaluated language models.

ModelArchitectureContext
Llama2-7B32 Decoder4096
Llama3-8B32 Decoder8192
RoBERTa [11]24 Encoder512
DeBERTa [12]24 Encoder512
BART [13]12 Enc. + 12 Dec.1024
T5 [14]24 Enc. + 24 Dec.512
DeepSeek-7B [15]28 Decoder131072
GPT-2 Variants24/36/48 Decoder1024