SMAD: A Semantics-Guided Multi-Agent Framework for Unsupervised Time-Series Anomaly Detection
Organizations: The Ohio State University · Visa Research · Aristotle University of Thessaloniki
Abstract
Time-series anomaly detection (TSAD) lacks a one-size-fits-all detector for heterogeneous data and anomaly types. Existing automation is limited by implicit objectives, potentially unreliable historical knowledge, or high computational costs. More fundamentally, it selects how to detect anomalies without explicitly defining what to detect. We propose SMAD, an LLM-based multi-agent framework that translates anomaly intent into executable, testable detection pipelines. Rather than selecting detectors against an implicit target, SMAD establishes a natural-language semantic contract grounded in measurable time-series properties, specifying target event patterns, expected score responses, and validation questions. This contract governs both detector construction and evaluation: LLM agents propose pipelines, while contract-matched synthetic interventions provide label-free evidence from the target series to assess semantic coverage and guide iterative self-refinement. A semantics-aware ensemble integrates validated candidates and attributes each alert to contributing detectors and supporting evidence. On univariate and multivariate TSAD benchmarks, SMAD improves detection performance over the strongest baseline by 11.5% and 9.6%, respectively, while outperforming general-purpose coding agents at 2-5x lower language-model token cost.
Figures & tables
| Method | Hist. | Run-All | Univariate | Multivariate | |||
| AUC-PR | VUS-PR | AUC-PR | VUS-PR | ||||
| Global Best | ✓ | ✗ | 0.3534 | 0.3712 | 0.2506 | 0.2510 | |
| Supervised Selection | ✓ | ✗ | 0.4502 | 0.4826 | 0.3003 | 0.3087 | |
| Random Ensemble | ✗ | ✗ | 0.2146 | 0.2519 | 0.1684 | 0.1750 | |
| AvgEns | ✗ | ✓ | 0.4206 | 0.4673 | 0.2663 | 0.2906 | |
| MetaOD | ✓ | ✗ | 0.3000 | 0.3479 | 0.2495 | 0.2632 | |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Component | Fixed setting | Role and rationale |
| Semantic contract | At most five semantics; four equally weighted validation checks | Bounds the grounding schema and treats the four label-free checks symmetrically. |
| Planning budget | Four candidate proposals; 600-second wall-clock cap per episode | Provides the same bounded planning and execution budget to every time series; the budget changes cost, not the definition of a valid candidate. |
| Benchmark retrieval | Exact global scan; pool size 30; eight retained cards; profile/reliability coefficients | Makes time-series structure the primary retrieval signal while record reliability acts as secondary evidence. |
| Semantic-scorer gate | At least one model candidate; coverage, model-support, benchmark-confidence, and redundancy cutoffs | Implements a conservative model-first policy: a deterministic scorer is considered only when current evidence indicates an uncovered or weakly supported semantic. |
| Validation syllabus | At most three specifications; synthetic anomaly rate ; magnitude scale ; perturbation-noise scale | Bounds validation cost and uses one sparse, nontrivial intervention battery and one small stability perturbation shared by all candidates in an episode. |
| Validation frame | Full time series through 2,048 points; otherwise stride-10 sampling; 10,000-point cap with informative contiguous windows | Bounds repeated validation cost while retaining global temporal coverage; informative windows are used only for very long time series. |
| Semantic bias | Score operator | Planner-set parameters | Targeted behavior |
| Robust tail | Robust -score | – | Point / tail outliers |
| Local context residual | Rolling-median residual | window | Local contextual deviations |
| Seasonal phase residual | Same-phase peer residual | period | Seasonal phase breaks |
| Abrupt change | First difference | – | Sudden point-to-point change |
| Curvature impulse | Second difference | – | Sharp impulses, point shocks |
| Multiscale context | Multiscale residual | windows | Multi-scale local deviations |
| Domain | Univariate | Multivariate | Source datasets | ||
| Total | Train / Eval | Total | Train / Eval | ||
| Medical | 144 | 104 / 40 | 49 | 36 / 13 | LTDB, MITDB, SVDB, UCR |
| Facility | 101 | 70 / 31 | 22 | 16 / 6 | SMD, UCR |
| Human Activity | 58 | 41 / 17 | 9 | 6 / 3 | Daphnet, OPP, UCR |
| Sensor | 34 | 25 / 9 | 34 | 25 / 9 | CATSv2, GECCO, SMAP, UCR |
| Synthetic | 24 | 12 / 12 | – | – | MGAB, TODS |
| Family | Candidate Model | U | M | Score principle |
| Statistical | MCD Rousseeuw and Driessen (1999) | ✓ | ✓ | Robust covariance deviation |
| OCSVM Schölkopf et al. (1999) | ✓ | ✓ | One-class decision boundary | |
| LOF Breunig et al. (2000) | ✓ | ✓ | Local-density deviation | |
| KNN Ramaswamy et al. (2000) | ✓ | ✓ | Nearest-neighbor distance | |
| KMeansAD Yairi et al. (2001) | ✓ | ✓ | Distance to cluster centroid | |
| IForest Liu et al. (2008) | ✓ | ✓ | Isolation depth |
| Dataset | AvgEns | MetaOD | MSAD | TSADAMS | AutoOD | LLMAD | MLLMAD | MLLM4TS | Claude Code | Codex | AD-AGENT | SMAD | |
| Univariate | |||||||||||||
| UCR | 64 | 0.3561 | 0.2849 | 0.3230 | 0.2200 | 0.0196 | 0.0636 | 0.0491 | – | 0.2455 | 0.2274 | 0.3244 | 0.3910 |
| SMD | 15 | 0.5683 | 0.2362 | 0.1412 | 0.1771 | 0.3962 | 0.1485 | 0.1714 | – | 0.5188 | 0.5303 | 0.1426 | 0.7710 |
| SVDB | 8 | 0.6052 | 0.4019 | 0.3175 | 0.0728 | 0.1088 | 0.1744 | 0.2054 | – | 0.4224 | 0.3274 | 0.3009 | 0.3532 |
| TODS | 8 | 0.6873 | 0.6536 | 0.6088 | 0.6779 | 0.5351 | 0.7800 | 0.7693 | – | 0.7882 | 0.8661 | 0.7748 | 0.8187 |
| OPP | 7 | 0.6914 | 0.4925 | 0.8285 | 0.2200 | 0.7236 | 0.1332 | 0.1521 | – | 0.3613 | 0.1875 | 0.2553 | 0.7221 |
| Method | Wall-clock (s) |
| AvgEns | 747.3 |
| LLMAD | 245 |
| MLLMAD | 314 |
| Claude Code | 130.3 |
| Codex | 378.7 |
| AD-AGENT | 251.0 |
| ID | Type | Prio. | Shape | Operational description | Expected score behavior |
| SMAP #17 (multivariate): 25 channels, weak autocorrelation, heavy right tail, low cross-channel correlation | |||||
| AS1 | point spike | 0.34 | point | Isolated extreme observations in one or more channels, especially large positive excursions, are anomalous because the value distribution is strongly right-skewed and heavy-tailed while serial dependence is weak. | Sharp peaks at isolated extreme samples with rapid return to baseline. |
| AS2 | collective | 0.28 | segment | Short runs of unusual volatility, repeated outliers, or abnormal motif/transition structure are anomalous even when individual samples are not uniquely extreme; local features show long stretches and burst-like structure despite weak global autocorrelation. | Sustained high over the abnormal run, with elevated segment-level score rather than a single-sample peak. |
| AS3 | contextual | 0.18 | contextual | Values or local patterns that are plausible marginally but abnormal for their local channel context are anomalous, reflecting weak seasonality, moderate nonstationarity, and high noise where context-sensitive deviations matter more than global thresholds alone. | Localized elevation where the observation or short pattern departs from its recent local baseline. |
| AS4 | level shift | 0.12 | segment | A persistent upward or downward change in a channel’s baseline level is anomalous, but lower priority because the profile shows weak trend strength and limited autocorrelation rather than strong stable regimes. | Step-like increase near the change point followed by sustained elevation while the shifted level persists. |
| AS5 | correlation change | 0.08 | multivariate | A temporary change in cross-channel dependence is anomalous only when multiple channels move together or decouple in a way that contrasts with the normally low mean absolute correlation across 25 channels. | Elevated multivariate score over windows where cross-channel correlation structure changes. |
| Step | Target entry | Prio. | Detector | Window | Flagged (labeled) | VUS-PR | |||
| With benchmark cards (final VUS-PR ; s; K tokens) | |||||||||
| 0 | AS1 contextual | 0.38 | KNN | 48 | 0.74 | 0.344 | 20.5% | 310 (70) | 0.6742 |
| 1 | AS2 collective | 0.27 | LOF | 48 | 0.72 | 0.851 | 30.0% | 554 (130) | 0.7039 |
| 2 | AS3 point spike | 0.18 | IForest | 5 | 0.64 | 0.497 | 23.9% | 893 (0) | 0.0056 |
| 3 | AS4 level shift | 0.11 | KMeansAD | 48 | 0.58 | 0.588 | 25.6% | 1,243 (0) | 0.0051 |
| Without benchmark cards (final VUS-PR ; s; K tokens) | |||||||||
| ID | Claim | Cited | Verdict | Kept | Auditor note |
| C1 | The input series has 7331 points across 25 channel(s) with seasonality strength 0.15, mean cross-channel correlation 0.07, and stationarity proxy 0.42. | E1 | supported | ✓ | – |
| C2 | Anomaly semantics suggest these types: point_spike, collective, contextual, level_shift, correlation_change. | E2 | supported | ✓ | – |
| C3 | IForest was selected as a candidate anomaly semantic/score stream with final score 0.552 (synthetic AP=0.08, recall@k=0.02, perturbation stability=0.72). | E19, E28 | supported | ✓ | – |
| C4 | KMeansAD was selected as a candidate anomaly semantic/score stream with final score 0.695 (synthetic AP=0.13, recall@k=0.12, perturbation stability=0.32). | E30, E36 | supported | ✓ | – |
| C5 | PCA was selected as a candidate anomaly semantic/score stream with final score 0.728 (synthetic AP=0.09, recall@k=0.03, perturbation stability=0.50). | E38, E44 | supported | ✓ | – |
| C6 | KNN was selected as a candidate anomaly semantic/score stream with final score 0.774 (synthetic AP=0.37, recall@k=0.34, perturbation stability=0.82). | E46, E52 | supported | ✓ | – |
Unsupervised Anomaly Detection
Unsupervised anomaly detection finds unusual patterns without labeled examples of faults, attacks, defects, or other rare events.
See all 248 papers