[论文解读] SemParser: A Semantic Parser for Log Analysis
SemParser 是一种用于日志分析的新型语义解析器,通过从日志消息中引入显式和隐式语义,解决了基于语法的日志解析器的局限性。它采用两阶段方法——端到端语义挖掘,随后结合上下文知识进行联合解析——在语义挖掘中实现了平均 F1 得分为 0.985,并将下游异常检测和故障识别模型的性能分别提升了最高 11.7% 和 8.65%。
Logs, being run-time information automatically generated by software, record system events and activities with their timestamps. Before obtaining more insights into the run-time status of the software, a fundamental step of log analysis, called log parsing, is employed to extract structured templates and parameters from the semi-structured raw log messages. However, current log parsers are all syntax-based and regard each message as a character string, ignoring the semantic information included in parameters and templates. Thus, we propose the semantic-based parser SemParser to unlock the critical bottleneck of mining semantics from log messages. It contains two steps, an end-to-end semantic miner and a joint parser. Specifically, the first step aims to identify explicit semantics inside a single log, and the second step is responsible for jointly inferring implicit semantics and computing structural outputs based on the contextual knowledge base. To analyze the effectiveness of our semantic parser, we first demonstrate that it can derive rich semantics from log messages collected from six widely-applied systems with an average F1 score of 0.985. Then, we conduct two representative downstream tasks, showing that current downstream models improve their performance with appropriately extracted semantics by 1.2%-11.7% and 8.65% on two anomaly detection datasets and a failure identification dataset, respectively. We believe these findings provide insights into semantically understanding log messages for the log analysis community.
研究动机与目标
- 解决基于语法的日志解析器忽略参数和模板中语义意义的局限性。
- 识别有信息量的标记,提取消息内部的语义,并推断消息之间的关系。
- 通过更丰富的语义表示,提升下游日志分析任务(如异常检测和故障识别)的性能。
- 开发一种可扩展、可泛化的解析器,以克服先前基于命名实体识别(NER)方法的封闭世界假设。
- 证明语义理解能显著提升现有日志分析模型的性能。
提出的方法
- 采用两阶段架构:首先,端到端语义挖掘器在单个日志消息内识别显式语义角色。
- 其次,联合解析器利用从历史日志中提取的上下文知识库,推断隐式语义。
- 该模型利用领域特定知识来解析参数含义(例如,将 '949e1227' 映射为 'cell ID')。
- 它整合日志之间的上下文依赖关系,以推断单条消息中未明确陈述的语义。
- 该框架端到端训练,不依赖手工规则或预定义的实体类型。
- 它使用深度学习组件编码日志消息,并联合优化语义标注和结构解析。
实验结果
研究问题
- RQ1语义解析器能否在多种软件系统中有效从单个日志消息中提取显式语义?
- RQ2从历史日志中获得的上下文知识在多大程度上能提升对日志参数中隐式语义的推断?
- RQ3语义感知解析如何提升下游日志分析任务(如异常检测和故障诊断)的性能?
- RQ4所提出的解析器能否在无需系统特定规则工程的情况下泛化到不同系统?
- RQ5在语义准确性和下游任务有效性方面,语义解析是否优于基于语法的解析器?
主要发现
- SemParser 在六个广泛使用的软件系统中实现了平均 F1 得分为 0.985 的语义挖掘性能,证明了其在识别显式语义方面的高准确性。
- 在异常检测中,使用 SemParser 输出的模型相比基于语法规则的解析器,性能提升了 1.2% 至 11.7%。
- 在故障识别任务中,使用 SemParser 提取的语义时,下游模型性能提升了 8.65%。
- 联合解析机制成功利用历史日志的上下文知识,推断出隐式语义(例如,参数类型,如 'cell ID')。
- 该方法通过消除对手动规则创建的需求并减少对基于频率启发式方法的依赖,优于基于规则和启发式的解析器。
- 结果证实,语义理解能显著提升下游人工智能驱动分析所用日志表示的质量。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。