LagLLM: LLM-empowered lead–lag dependency learning for spatial-temporal time series forecasting
Abstract
Spatial–temporal time series forecasting is challenging due to complex lead–lag dependencies, which are often ignored or inadequately modeled by existing methods. Thus, we propose LagLLM, the first LLM-empowered framework that explicitly models lead–lag dependencies by unifying data-driven dynamics modeling and knowledge-driven semantic reasoning. Specifically, LagLLM constructs a lead–lag graph by integrating learnable embeddings, spatial proximity, and prompt-guided reasoning from a frozen LLM, which can capture lead-lag dependencies informed by underlying data structure and semantic knowledge. In addition, LagLLM introduces structural token sorting based on the graph, which can make a fine-turned LLM explicitly perceive directional and delayed interactions. Experiments on eight real-world datasets show that LagLLM achieves the state-of-the-art performance with improved accuracy, robustness, and interpretability. The code is available at https://anonymous.4open.science/r/LagLLM.