SMAD: A Semantics-Guided Multi-Agent Framework for Unsupervised Time-Series Anomaly Detection

Qinghua Liu, Junpeng Wang, Mingzhi Hu, Menghai Pan, Shubham Jain, Yuzhong Chen, Yan Zheng, Yiwei Cai, John PaparrizosarXiv 2026

TL;DR

Finding anomalies in time-series data is notoriously difficult because "weird" looks different in every dataset. SMAD (Semantics-Guided Multi-Agent Framework) solves this by using Large Language Models (LLMs) to first define a "semantic contract"—a clear, natural-language description of what to look for—before building and testing custom detection pipelines. It’s significantly more accurate than standard tools and up to five times cheaper than general-purpose AI coding agents.

What Problem Does This Paper Address?

Imagine you’re monitoring the power usage of a large office building. A sudden spike at noon is perfectly normal—it’s lunchtime, and the elevators are working overtime. But that same spike at 3:00 AM? That’s an anomaly.

The core challenge in Time-Series Anomaly Detection (TSAD) is that there is no "one-size-fits-all" detector. A tool that’s great at finding sudden spikes might completely miss a slow, subtle shift in the baseline or a "contextual" anomaly that only looks wrong because of when it happened.

Existing automated systems (AutoML) usually focus on how to detect things—they just try a bunch of models and see what sticks. But they often skip the most important step: explicitly defining what they are looking for. Without a clear target, these systems can be expensive, unreliable, and impossible to audit when they get things wrong.

Methods

The authors introduce SMAD, a multi-agent framework that treats anomaly detection like a structured engineering project rather than a guessing game.

Traditional AutoML vs. SMAD's semantic-guided approach

The process follows four key stages, orchestrated by LLM agents:

  1. Semantic Grounding: Instead of diving straight into the data, an agent profiles the time series (looking at trends, noise, and seasonality) and creates a Semantic Contract. This is a "job description" for anomalies, specifying patterns (like "point spikes" or "level shifts") and how a detector should respond to them.
  2. Planning: A "Planner" agent reads this contract and proposes specific detection pipelines. It uses "benchmark cards"—a library of how different models have performed on similar data in the past—to pick the best tools for the job. If standard tools aren't enough, the agent can even "code" a custom Semantic Scorer using simple mathematical building blocks.
  3. Label-Free Validation: This is the "stress test." Since we don't have labeled data in unsupervised learning, SMAD injects synthetic anomalies that match the semantic contract into the data. It then checks if the proposed detectors actually catch them. This provides a feedback loop for the agents to refine their plans.
  4. Aggregation and Auditing: Finally, SMAD combines the best-performing detectors into an ensemble. Crucially, it generates an auditable report that explains why a certain moment was flagged, tracing the alert back to the specific semantic requirement and the evidence found during validation.
Figure 2: Overview of SMAD. LLMs perform semantic grounding and candidate planning using input evidence and reusable knowledge. Candidate execution, label-free validation, aggregation, and claim auditing are deterministic. Validation feedback guides iterative refinement, while a run-specific evidence bank supports traceable outputs.

Datasets

The researchers evaluated SMAD using a massive collection of 146 time-series datasets (377 univariate and 114 multivariate series) from the TSB-AD benchmark. These cover a wide range of real-world domains:

  • Medical: ECG and heart rate data.
  • Facility: Building power demands and internet traffic.
  • Sensor: Telemetry from spacecraft and industrial equipment.
  • Human Activity: Motion sensor data from wearables.
  • Synthetic & Environment: Controlled benchmarks and environmental monitoring.

Key Insights and Ideas

  • The Power of the "Contract": By freezing a semantic contract before searching for detectors, SMAD ensures all candidate models are aiming at the same target. This makes the whole process measurable and transparent.
  • Synthetic Interventions as a Proxy for Labels: One of the cleverest tricks here is using the LLM's understanding of the data to create "fake" anomalies for testing. It turns an unsupervised problem into a semi-supervised one on the fly.
  • Reasoning vs. Brute Force: SMAD uses LLMs for high-level reasoning (planning and grounding) but leaves the heavy lifting (calculating scores) to efficient, deterministic code. This makes it much faster and cheaper than "black box" AI agents that try to process every single data point through a language model.

Key Results

SMAD doesn't just work; it dominates the current landscape:

  • Better Accuracy: It improved detection performance (measured by VUS-PR) over the strongest AutoML baselines by 11.5% on univariate data and 9.6% on multivariate data.
  • Massive Cost Savings: Compared to general-purpose coding agents (like those powered by GPT-4 or Claude), SMAD achieved higher accuracy while using 2 to 5 times fewer tokens.
  • Efficiency: As shown in the results, SMAD often needs only two or four carefully chosen "specialist" detectors to outperform massive ensembles of 15+ models.
Figure 4: Token cost against accuracy. Each point is a method that calls a hosted LLM, placed at its mean tokens per evaluation time series (log scale) and its mean VUS-PR; the upper left is better.

Limitations and Future Work

While SMAD is a leap forward, the authors note a few areas for growth:

  • Fixed Workflow: Currently, the sequence of grounding, planning, and validation is predefined. Future versions might allow the agents to be more flexible in how they tackle a problem.
  • Learning Across Episodes: The system currently treats every new dataset as a fresh start. The authors suggest using Agentic Reinforcement Learning so the planner can learn from its past successes and failures across different datasets.
  • Prompting Limits: The system relies on prompting existing LLMs. Fine-tuning models specifically for time-series reasoning could unlock even more performance.

Summary updated

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.
BibTeX
@misc{liu2026smad,
  author = {Qinghua Liu and Junpeng Wang and Mingzhi Hu and Menghai Pan and Shubham Jain and Yuzhong Chen and Yan Zheng and Yiwei Cai and John Paparrizos},
  title = {{SMAD: A Semantics-Guided Multi-Agent Framework for Unsupervised Time-Series Anomaly Detection}},
  year = {2026},
  eprint = {2611.28348},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.28348},
}
Figure