Intent2Query: From Natural Language Intent to Executable Spatiotemporal Queries for Multi-Agent Trajectory Retrieval
Abstract
Retrieving semantically meaningful spatiotemporal trajectories from large-scale driving data is essential for analyzing complex traffic behaviors and improving autonomous systems, yet remains challenging. Multi-agent interactions evolve over continuous space and time, making retrieval inherently difficult. Meanwhile, existing systems lack both formally verifiable query constraints and an accessible interface aligned with natural language intent, which is typically more intuitive and flexible than example-driven similarity mining. Moreover, such intent is frequently ambiguous and requires semantic grounding together with quantitative, verifiable evidence to ensure correctness. We introduce Intent2Query, a framework that translates natural language (NL) intent into a formally defined spatiotemporal query language and executes retrieval programs under Boolean and quantitative semantics. The proposed domain-specific language (DSL) is grounded in signal temporal logic (STL), enabling precise specification of multi-agent behaviors and spatiotemporal reasoning with quantitative robustness. To ensure reliability, parsing is constrained by schema and grammar rules, followed by deterministic validation, guaranteeing executable queries. We further construct a human-annotated scene-level benchmark over intersection LiDAR data to evaluate both parsing fidelity and retrieval performance. Results show that Intent2Query outperforms all ten baselines on all three datasets and at every difficulty level, improving F1 from 0.496 to 0.682 on our benchmark with non-overlapping confidence intervals and nearly doubling the precision of an untyped temporal-logic parser at comparable recall (0.636 v.s. 0.330), highlighting the necessity of typed formal semantic grounding for reliable spatiotemporal retrieval.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.