Time series anomaly detection (TSAD) supports the analysis of web service key performance indicators (KPIs) by identifying anomalous intervals. Recent large language model (LLM)-based agentic approaches have achieved promising results through reasoning and tool use. Despite their effectiveness, precise anomaly localization remains challenging, as diverse anomaly patterns demand targeted numerical evidence and iterative refinement to accurately determine anomaly boundaries. In this work, we propose AnomaMind, a coarse-to-fine agentic diagnosis framework for TSAD. AnomaMind first identifies suspicious regions from time-series visualizations, then adaptively acquires targeted numerical evidence through multi-turn tool interactions, and finally refines anomaly decisions through self-reflection. This process is supported by a tool engine that integrates knowledge memory and numerical analysis. To coordinate this diagnostic process, we design a hybrid inference strategy that employs frozen general-purpose LLMs for initial localization, tool orchestration, and evaluation, alongside a specialized LLM detector for evidence-grounded interval prediction. We optimize only the specialized detector through supervised fine-tuning (SFT) on diagnostic trajectories and reinforcement learning (RL) with verifiable detection rewards. Experiments on four benchmarks spanning web traffic, service KPIs, and system-monitoring signals, under both in-domain and multi-domain training settings, demonstrate competitive performance and support the effectiveness of coarse-to-fine adaptive diagnosis through targeted evidence acquisition and self-reflective refinement.The code is available at https://github.com/Xiaoyu-Tao/AnomaMind-TS.
Figures & tables
Figure 1. Overview of AnomaMind. A coarse-to-fine workflow integrates adaptive evidence acquisition through contextual knowledge and numerical tools with self-reflective interval refinement. Hybrid inference keeps general-purpose LLMs frozen while optimizing the specialized detector through SFT on diagnostic trajectories and RL with verifiable detection rewards. The Locator proposes suspicious intervals, the Actor obtains numerical evidence, the Detector predicts anomaly intervals, and the Evaluator reviews the result and may request another diagnostic pass.
Datasets
Total Points
Train Points
Test Points
Anomaly Type
YAHOO
182,600
107,200
75,400
Point & Segment
KPI
1,071,000
483,000
588,000
Segment
IOPS
309,000
147,000
162,000
Segment
WSD
203,000
89,000
114,000
Segment
Table 1. Statistics of the four TSAD benchmarks.
Methods
YAHOO
KPI
WSD
IOPS
F1
Best-F1
AUC-PR
Range-F1
F1
Best-F1
AUC-PR
Range-F1
F1
Best-F1
AUC-PR
Range-F1
F1
Best-F1
AUC-PR
Range-F1
DWT_MLEAD
0.268
0.314
0.205
0.407
0.227
0.306
0.181
0.360
0.472
0.614
0.534
0.642
0.388
0.451
0.413
0.431
FFT
0.361
0.689
0.623
0.695
0.267
0.305
0.194
0.373
0.159
0.230
0.186
0.292
0.172
0.287
0.181
0.389
SR
0.573
0.727
0.657
0.759
0.293
0.316
0.273
0.573
0.296
0.539
0.461
0.625
0.127
0.419
0.290
0.542
MatrixProfile
0.459
0.641
0.542
0.658
0.396
0.407
0.364
0.529
0.324
0.468
0.347
0.460
0.369
0.453
0.381
0.486
Sub_PCA
0.249
0.364
0.219
0.385
0.219
0.475
0.376
0.557
0.381
0.475
0.416
0.589
0.453
0.523
0.492
0.538
Table 2. Comparison of anomaly detection performance across multiple benchmark datasets. The best and second-best results are highlighted in bold and underlined , respectively.
Figure 2. Ablation study on the contributions of different roles in the diagnostic workflow. F1 and Range-F1 for the complete workflow and variants without the Evaluator or Locator across four datasets. F1 and Range-F1 for Detector-only, Actor-only, and Actor plus Detector training across four datasets.
Diagnostic Variants
YAHOO
KPI
WSD
IOPS
F1
Range-F1
F1
Range-F1
F1
Range-F1
F1
Range-F1
w/o Feature Extraction
0.875
0.871
0.569
0.738
0.698
0.712
0.842
0.820
w/o Value-based Detection
0.863
0.863
0.528
0.697
0.647
0.693
0.796
0.786
w/o Change-based Detection
0.771
0.771
0.587
0.764
0.735
0.724
0.808
0.810
w/o Contextual Guidance
0.845
0.845
0.610
0.784
0.720
0.753
0.845
0.827
Ours
0.891
0.892
0.606
0.800
0.805
0.842
0.855
0.909
Table 3. Ablation study of the different diagnostic tool variants across diverse datasets.
Tool-Use Strategies
YAHOO
KPI
WSD
IOPS
F1 ↑
Calls ↓
F1 ↑
Calls ↓
F1 ↑
Calls ↓
F1 ↑
Calls ↓
Fixed Tool
0.782
3.44
0.574
3.95
0.635
3.57
0.712
3.44
Random Tool
0.740
2.16
0.423
2.52
0.455
2.38
0.392
2.41
Ours
0.891
3.73
0.606
4.26
0.805
3.81
0.855
3.67
Table 4. Impact of tool-use strategies on anomaly detection performance and efficiency.
Training Strategies
YAHOO
KPI
WSD
IOPS
F1
Range-F1
F1
Range-F1
F1
Range-F1
F1
Range-F1
w/o Both
0.220
0.528
0.065
0.424
0.404
0.558
0.400
0.673
w/o RL
0.782
0.807
0.475
0.724
0.742
0.777
0.801
0.820
w/o SFT
0.607
0.661
0.334
0.673
0.691
0.690
0.728
0.797
Ours
0.891
0.892
0.606
0.800
0.805
0.842
0.855
0.909
Table 5. Ablation study of SFT and RL contributions to anomaly detection performance.
Figure 4. Training reward trajectories for different initialization strategies and detector model sizes, shown in the left and right panels, respectively. Reward trajectories comparing supervised initialization followed by reinforcement learning with pure reinforcement learning, and comparing Detector sizes.
General-Purpose LLMs
YAHOO
KPI
WSD
IOPS
F1
Range-F1
F1
Range-F1
F1
Range-F1
F1
Range-F1
Gemini-3.1-flash
0.891
0.892
0.606
0.800
0.805
0.842
0.855
0.909
grok-4-1-fast
0.848
0.860
0.424
0.749
0.836
0.856
0.871
0.909
GPT-5-mini
0.774
0.853
0.447
0.691
0.766
0.840
0.740
0.796
Table 6. Experimental results with different general-purpose model variants under the proposed framework.
Detector Sizes
YAHOO
KPI
WSD
IOPS
F1
Range-F1
F1
Range-F1
F1
Range-F1
F1
Range-F1
Qwen3-0.6B
0.827
0.833
0.533
0.737
0.705
0.763
0.806
0.811
Qwen3-1.7B
0.852
0.854
0.523
0.751
0.699
0.758
0.803
0.807
Qwen3-4B
0.870
0.867
0.575
0.802
0.728
0.767
0.837
0.895
Qwen3-8B
0.891
0.892
0.606
0.800
0.805
0.842
0.855
0.909
Table 7. Impact of specialized detector size on anomaly detection performance.
Figure 5. An illustrative example of a coarse-to-fine diagnostic workflow for agentic time series anomaly detection. A Locator proposes a suspicious valley, an Actor gathers numerical evidence, a Detector localizes a brief dip, and an Evaluator checks consistency.
Figure 6. Detector-temperature sensitivity. Dashed lines mark the default temperature T=0.6 .
Detectors Memory
Conc.
Thpt. requests/s
Mean lat. ms
TTFT ms
Decode tokens/s
Qwen3-0.6B 1.12 GB
32
6.26
4,939
157
977
64
9.90
6,137
245
1,543
128
12.46
9,593
598
1,943
Qwen3-8B 15.27 GB
32
3.53
8,854
320
550
64
4.45
13,965
646
684
128
4.95
24,951
1,626
771
Table 8. Inference efficiency by detector size and concurrency.
Time-Series Anomaly Detection identifies unusual patterns or events in sequential data, from sensor readings and network traffic to health and industrial telemetry.
Department of Industrial and Management Engineering Korea University · Mirae Asset Securities · Department of Industrial Engineering Seoul National University
Department of Artificial Intelligence, Hanyang University Seoul, Republic of Korea · Department of Data Science, Hanyang University Seoul, Republic of Korea