TimeRLM: Recursive Language Models Enable Precise Anomaly Localization in Long-Context Time-Series

📅 2026-08-04
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenging task of anomaly localization in long-context time series, where critical evidence is often embedded within long-range dependencies of high-frequency data. To tackle this, we propose TimeRLM—the first recurrent language model specifically designed for time series anomaly localization—integrating code-driven signal operations, vision-assisted comprehension, an external context querying mechanism, and reinforcement learning-based post-training. We also introduce AnomalyXL, a synthetic benchmark for systematic evaluation. Experimental results demonstrate that TimeRLM achieves an IoU of 0.682 and a classification-with-evidence accuracy of 0.745 on AnomalyXL-Localize, substantially outperforming existing time series language models, while maintaining or even improving performance on real-world ECG, sleep, and software monitoring datasets.
📝 Abstract
Precise anomaly localization over long-context time series is a crucial task in monitoring applications across clinical care, industrial operations, financial services, and logistics, where brief evidence may hide inside long spans of high-frequency data. Time-Series Language Models (TSLMs) are able to ingest time series data and verbalize findings on anomalies in natural language; however, recent benchmarks report a decrease in retrieval performance at long contexts, mirroring failure modes in text, vision, and audio. In the text domain, Recursive Language Models (RLMs) can recover much of this lost performance by keeping context external to the large language model (LLM), allowing the model to query it through code. We present TimeRLM, an RLM formulation for time-series that sequentially manipulates the signal using code and vision capabilities. We further introduce AnomalyXL, a synthetic long-context anomaly localization benchmark with programmatically injected anomalies that require precise retrieval. We implement five different task categories and two variants: AnomalyXL-MCQ and AnomalyXL-Localize. TimeRLM outperforms every evaluated TSLM and single-pass baseline on four of the five AnomalyXL-Localize tasks, reaching 0.682 IoU on localization and 0.745 on classify-with-evidence, versus at most 0.329 and 0.072 across all baselines. We post-train TimeRLM using reinforcement learning. The resulting model further improves performance and requires approximately one-third as many agent interaction turns as its untrained base model to produce a final answer. On unseen real-world ECG, sleep and software observability recordings, the post-trained TimeRLM retains or improves performance, surpassing TSLMs despite being trained exclusively on synthetic data. Our findings suggest recursive interaction with time-series is an effective approach for long-horizon retrieval.
Problem

Research questions and friction points this paper is trying to address.

anomaly localization
long-context time series
time-series monitoring
precise retrieval
high-frequency data
Innovation

Methods, ideas, or system contributions that make the work stand out.

Recursive Language Models
Time-Series Anomaly Localization
Long-Context Retrieval
Reinforcement Learning Post-Training
Synthetic Benchmark
🔎 Similar Papers
No similar papers found.
N
Nicolas Zumarraga
Agentic Systems Lab, ETH Zürich
L
Lorenzo Steno
Agentic Systems Lab, ETH Zürich; Seldon Technologies
N
Ning Wang
Agentic Systems Lab, ETH Zürich
M
Max Rosenblattl
Stanford University
T
Thomas Kaar
Stanford University
M
Maxwell A. Xu
University of Illinois Urbana-Champaign; Google
K
Kevin O'Sullivan
Agentic Systems Lab, ETH Zürich
Markus Kreft
Markus Kreft
ETH Zurich
machine learningenergy efficiencysmart gridelectric vehiclessustainability
Elgar Fleisch
Elgar Fleisch
Professor for Information and Technology Management
Internet of ThingsInformation ManagementTechnology Management
Paul Schmiedmayer
Paul Schmiedmayer
Stanford University
Digital HealthTSLMAISoftware EngineeringMobile Applications
P
Patrick Langer
Agentic Systems Lab, ETH Zürich; Stanford University
R
Robert Jakob
Agentic Systems Lab, ETH Zürich