R-Log: Incentivizing Log Analysis Capability in LLMs via Reasoning-based Reinforcement Learning

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Liu, Yilun, Chen, Ziang, Xu, Song, He, Minggui, Tao, Shimin, Meng, Weibin, Xie, Yuming, Han, Tao, Zhao, Chunguang, Du, Jingzhou, Wei, Daimeng, Zhang, Shenglin, Sun, Yongqian
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911342296825856
author Liu, Yilun
Chen, Ziang
Xu, Song
He, Minggui
Tao, Shimin
Meng, Weibin
Xie, Yuming
Han, Tao
Zhao, Chunguang
Du, Jingzhou
Wei, Daimeng
Zhang, Shenglin
Sun, Yongqian
author_facet Liu, Yilun
Chen, Ziang
Xu, Song
He, Minggui
Tao, Shimin
Meng, Weibin
Xie, Yuming
Han, Tao
Zhao, Chunguang
Du, Jingzhou
Wei, Daimeng
Zhang, Shenglin
Sun, Yongqian
contents The growing complexity of log data in modern software systems has prompted the use of Large Language Models (LLMs) for automated log analysis. Current approaches typically rely on direct supervised fine-tuning (SFT) on log-label pairs. However, this exacerbates the domain discrepancy between general-purpose LLMs and specialized log data, causing overfitting. Furthermore, SFT's imbalanced loss computation often allows lengthy contexts to overwhelm critical, concise details in model answers, leading to hallucinations. To address these limitations, we propose R-Log, a novel reasoning-based paradigm that mirrors the structured, step-by-step analytical process of human engineers. This approach enhances generalizability by learning the underlying rules behind conclusions. We further employ Reinforcement Learning (RL) to optimize the model within a simulated O&M environment, thereby reducing hallucinations by directly rewarding correct outcomes. R-Log is first cold-started on a curated dataset of 2k+ reasoning trajectories, guided by 13 strategies from manual O&M practices, to establish an initial reasoning capability. This ability is then refined via RL using a joint reward function. Empirical evaluations on real-world logs show that R-Log outperforms existing methods across five log analysis tasks, particularly in unseen scenarios (by 228.05%). We also designed R-Log-fast with 5x speedup while keeping 93% of the efficacy.
format Preprint
id arxiv_https___arxiv_org_abs_2509_25987
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle R-Log: Incentivizing Log Analysis Capability in LLMs via Reasoning-based Reinforcement Learning
Liu, Yilun
Chen, Ziang
Xu, Song
He, Minggui
Tao, Shimin
Meng, Weibin
Xie, Yuming
Han, Tao
Zhao, Chunguang
Du, Jingzhou
Wei, Daimeng
Zhang, Shenglin
Sun, Yongqian
Software Engineering
Artificial Intelligence
The growing complexity of log data in modern software systems has prompted the use of Large Language Models (LLMs) for automated log analysis. Current approaches typically rely on direct supervised fine-tuning (SFT) on log-label pairs. However, this exacerbates the domain discrepancy between general-purpose LLMs and specialized log data, causing overfitting. Furthermore, SFT's imbalanced loss computation often allows lengthy contexts to overwhelm critical, concise details in model answers, leading to hallucinations. To address these limitations, we propose R-Log, a novel reasoning-based paradigm that mirrors the structured, step-by-step analytical process of human engineers. This approach enhances generalizability by learning the underlying rules behind conclusions. We further employ Reinforcement Learning (RL) to optimize the model within a simulated O&M environment, thereby reducing hallucinations by directly rewarding correct outcomes. R-Log is first cold-started on a curated dataset of 2k+ reasoning trajectories, guided by 13 strategies from manual O&M practices, to establish an initial reasoning capability. This ability is then refined via RL using a joint reward function. Empirical evaluations on real-world logs show that R-Log outperforms existing methods across five log analysis tasks, particularly in unseen scenarios (by 228.05%). We also designed R-Log-fast with 5x speedup while keeping 93% of the efficacy.
title R-Log: Incentivizing Log Analysis Capability in LLMs via Reasoning-based Reinforcement Learning
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2509.25987