π€ AI Summary
This work addresses the challenge non-expert users face in accurately retrieving events or intervals from massive time series data using natural language, a task hindered by the inability of existing Text-to-SQL systems to capture morphological semantics and the difficulty of time series models in handling extremely long contexts. To bridge this gap, we propose Sonar-TS, the first neuro-symbolic framework tailored for natural language querying over time series databases (NLQ4TSDB). Sonar-TS employs a two-stage βsearch-and-verifyβ mechanism: it first uses SQL to efficiently locate candidate windows via a feature index, then applies generated Python programs to perform precise semantic validation on the raw signals. We also introduce NLQTSBench, the first large-scale benchmark for this task, and demonstrate that Sonar-TS significantly outperforms existing methods on complex time series queries.
π Abstract
Natural Language Querying for Time Series Databases (NLQ4TSDB) aims to assist non-expert users retrieve meaningful events, intervals, and summaries from massive temporal records. However, existing Text-to-SQL methods are not designed for continuous morphological intents such as shapes or anomalies, while time series models struggle to handle ultra-long histories. To address these challenges, we propose Sonar-TS, a neuro-symbolic framework that tackles NLQ4TSDB via a Search-Then-Verify pipeline. Analogous to active sonar, it utilizes a feature index to ping candidate windows via SQL, followed by generated Python programs to lock on and verify candidates against raw signals. To enable effective evaluation, we introduce NLQTSBench, the first large-scale benchmark designed for NLQ over TSDB-scale histories. Our experiments highlight the unique challenges within this domain and demonstrate that Sonar-TS effectively navigates complex temporal queries where traditional methods fail. This work presents the first systematic study of NLQ4TSDB, offering a general framework and evaluation standard to facilitate future research.