DiagCoder: Training Language Models to Diagnose Multivariate Time-Series Anomalies via Executable Code
Abstract
Diagnosing anomalies in multivariate cloud telemetry requires identifying affected metrics and time intervals and explaining their abnormal behavior. Existing approaches often produce entity-level anomaly scores, make one-shot language-model judgments, or rely on predefined diagnostic operators, limiting their ability to investigate context-dependent anomalies. We propose DiagCoder, an agentic framework that uses executable code as its action space for multivariate time-series diagnosis. Guided by diagnostic perspectives rather than a fixed workflow, DiagCoder iteratively constructs and executes analyses tailored to temporal and cross-metric context, producing metric-level anomaly intervals with inspectable computational evidence. To learn effective diagnostic strategies, DiagCoder jointly optimizes analysis construction and diagnostic decision-making through end-to-end reinforcement learning, without requiring expert reasoning trajectories. Built on Qwen3.5-27B and trained only on industrial cloud telemetry, DiagCoder achieves the best overall performance across the industrial dataset and public benchmarks, outperforming existing anomaly-detection approaches and leading closed-source large language models within the same framework.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.