Abstract
Modern microservice architectures present significant challenges for failure localization (FL) due to their complexity and the potential for cascading failures. ThinkFL is a novel framework that utilizes reinforcement fine-tuning to optimize lightweight Large Language Models (LLMs) for efficient FL. By implementing a "Recursion-of-Thought" (RoT) reasoning process and a multi-stage training pipeline, ThinkFL outperforms massive frontier models in both accuracy and latency. Experimental results demonstrate a 13.05% improvement in Recall@1 over Claude-3.5-Sonnet and a 673% speedup compared to current state-of-the-art baselines.
Introduction
The shift toward microservice-oriented architectures has increased system agility but complicated troubleshooting. Site Reliability Engineers (SREs) often struggle to identify root causes amidst thousands of interdependent components. Traditional FL methods, which rely on static causal graphs or basic statistical models, frequently fail to adapt to the dynamic nature of production environments.
While Large Language Models (LLMs) offer a promising alternative, existing LLM-based agents are often constrained by rigid, pre-defined workflows and the high computational costs of "ultra-large" models (e.g., 70B+ parameters). ThinkFL addresses these limitations by enabling lightweight models to dynamically explore diagnostic paths through self-refining reasoning.
Methodology
ThinkFL optimizes lightweight LLMs, specifically the Llama-3 3B and 8B families, through a specialized three-stage training pipeline.
Recursion-of-Thought (RoT) Actor
Unlike linear "Chain-of-Thought" approaches, ThinkFL employs a recursive loop. The model evaluates available evidence, selects appropriate diagnostic tools (such as the Trace Tool or Metrics Tool), and iteratively updates its reasoning until a root cause is identified. This allows the model to backtrack and explore alternative hypotheses, mimicking the behavior of an experienced human engineer.
Multi-Stage GRPO Fine-Tuning
The framework utilizes Group Relative Policy Optimization (GRPO) across three phases:
- Format-Aware Policy Priming: Teaches the model basic tool usage via supervised learning.
- Guided Exploration Augmentation: Uses reinforcement learning to reward the discovery of diverse, valid reasoning paths.
- Rank-Oriented Refinement: Fine-tunes the model to ensure the correct root cause is prioritized in the final output.
A Multi-Factor FL Grader provides feedback based on result correctness, reasoning path validity, and the absence of hallucinations.
Experimental Setup and Results
ThinkFL was evaluated using the AIOPS 2022 dataset, which reflects a large-scale e-commerce system, and the Train-Ticket benchmark for generalizability testing.
Key Performance Metrics
- Accuracy: ThinkFL achieved an average improvement of 13.05% in Recall@1 compared to Claude-3.5-Sonnet.
- Efficiency: The system completes localization tasks in an average of 3.4 seconds, making it over 10x faster than frontier models and significantly more cost-effective for production use.
- Generalization: In zero-shot tests on the Train-Ticket dataset, ThinkFL outperformed existing state-of-the-art methods by 15-17 points in MRR without retraining.
Discussion and Conclusion
ThinkFL demonstrates that specialized training of small-scale LLMs can yield superior performance in domain-specific tasks like failure localization. By addressing the "MRR Sparsity" problem with a linear rank-based scoring scheme and prioritizing exploration over rigid workflows, the framework provides a robust solution for modern SRE teams.
Future work will focus on bridging the gap between anomaly detection and localization, as well as extending the framework's capabilities toward automated system recovery and remediation.
Summary updated