LogPurge:基于规则增强过滤的异常检测日志数据净化方法
LogPurge: Log Data Purification for Anomaly Detection via Rule-Enhanced Filtering
AI总结:
针对日志异常检测中干净训练数据获取成本高、现有自动清洗方法未结合日志特性的问题,提出规则增强的两阶段过滤净化框架LogPurge,在多数据集上实现了更优的异常净化与检测性能。
摘要:
日志异常检测对于识别系统故障、预判安全漏洞至关重要,其通过在海量日志数据中检测异常模式,为服务可靠性、性能优化、数据库日志分析等领域提供支撑。当前主流日志异常检测方法依赖在无异常的干净日志序列上训练深度学习模型,但获取这类干净日志数据需要成本高昂且繁琐的人工标注,现有自动清洗方法在净化过程中也未能充分结合日志的专属特征与实际语义。本文提出一种成本感知的规则增强净化框架LogPurge,可自动从受污染的日志序列中筛选出足量的正常日志序列子集,用于训练异常检测模型。该方法采用两阶段过滤算法:第一阶段使用大语言模型(LLM)移除聚类后的异常模式,同时增强系统规则以提升大语言模型对系统日志的理解能力;第二阶段采用分治策略,将剩余受污染区域拆解为更小的子问题,每个子问题均可通过第一阶段流程完成有效净化。我们在两个公开数据集与一个工业数据集上开展实验,结果表明本方法平均可移除98.74%的异常,同时保留82.39%的正常样本。与最新的无监督日志样本选择算法相比,本方法在公开数据集上的F-1值分别提升35.7%和84.11%,在私有数据集上的F-1值提升幅度更是达到149.72%,充分验证了方法的有效性。
英文摘要:
Log anomaly detection, which is critical for identifying system failures and preempting security breaches, detects irregular patterns within large volumes of log data, and impacts domains such as service reliability, performance optimization, and database log analysis. Modern log anomaly detection methods rely on training deep learning models on clean, anomaly-free log sequences. However, obtaining such clean log data requires costly and tedious human labeling, and existing automatic cleaning methods fail to fully integrate the specific characteristics and actual semantics of logs in their purification process. In this paper, we propose a cost-aware, rule-enhanced purification framework, LogPurge, that automatically selects a sufficient subset of normal log sequences from contamination log sequences to train a anomaly detection model. Our approach involves a two-stage filtering algorithm: In the first stage, we use a large language model (LLM) to remove clustered anomalous patterns and enhance system rules to improve LLM's understanding of system logs; in the second stage, we utilize a divide-and-conquer strategy that decomposes the remaining contaminated regions into smaller subproblems, allowing each to be effectively purified through the first stage procedure. Our experiments, conducted on two public datasets and one industrial dataset, show that our method significantly removes an average of 98.74% of anomalies while retaining 82.39% of normal samples. Compared to the latest unsupervised log sample selection algorithms, our method achieves F-1 score improvements of 35.7% and 84.11% on the public datasets, and an impressive 149.72% F-1 improvement on the private dataset, demonstrating the effectiveness of our approach.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。