A Time Series Multitask Framework Integrating a Large Language Model, Pre-Trained Time Series Model, and Knowledge Graph
Shule Hao, Junpeng Bao, Chuncheng Lu
TL;DR
This work tackles the limitation of purely temporal time-series models by proposing LTM, a multi-task framework that fuses time-series data with semantic context through a pre-trained TS backbone, a frozen LLM, and a knowledge graph. The two core innovations are the Fusion-Aware Temporal Module which deeply integrates semantic prompts with temporal patches, and the Knowledge-Driven Temporal Prompt which enriches prompts via knowledge graphs; these operate under a training regime that keeps the LLM frozen and optimizes a combined loss that includes a cosine-similarity penalty between prompts and temporal features: $L_{total} = L_{reg} + \lambda \cdot \left(1 - \frac{1}{n} \sum_{i=1}^{n} \mathrm{CosSim}(P_i, F_i)\right)$. Empirical results across long-term forecasting, few-shot forecasting, imputation, and anomaly detection demonstrate state-of-the-art performance with substantially fewer trainable parameters and improved efficiency. Overall, LTM provides a practical and versatile solution for multi-task time-series analysis with strong semantic grounding and scalable deployment potential.
Abstract
Time series analysis is crucial in fields like finance, transportation, and industry. However, traditional models often focus solely on temporal features, limiting their ability to capture underlying information. This paper proposes a novel time series multitask framework, called LTM, which integrates temporal features with textual descriptions to enhance analytical and predictive capabilities. LTM combines pre-trained time series model, large language model (LLM), and knowledge graph to tackle time series tasks, including forecasting, imputation, and anomaly detection. LTM achieves improved performance with a few trainable parameters. It is very efficient and practical. LTM encodes time series data into patches and enriches user-provided prompts using knowledge graphs to generate enhanced prompts. A novel feature fusion method embeds prompts into each patch encoding, which is processed by a frozen LLM, followed by a feature enhancement module and a time decoder module. During fine-tuning stage, cosine similarity between prompts and temporal patches is integrated into the loss function to boost performance. Experiments on benchmark datasets show that LTM significantly outperforms existing methods. It provides a robust and versatile solution for time series tasks.
