Table of Contents
Fetching ...

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.

A Time Series Multitask Framework Integrating a Large Language Model, Pre-Trained Time Series Model, and Knowledge Graph

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: . 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.

Paper Structure

This paper contains 32 sections, 11 equations, 6 figures, 5 tables.

Figures (6)

  • Figure 1: The framework of LTM. (1)Input Embedding Module: Converts time series into discrete tokens; (2)Knowledge-Driven Temporal Prompt (KDTP):Generates semantic-rich instructions using task-specific documents; (3)Fusion-Aware Temporal Module (FATM): Fuses temporal and textual features for better task alignment; (4)Frozen Pre-trained LLM Module: Utilizes a frozen LLM backbone for efficient processing; (5)Feature Enhancement Module: Refines fused features to improve downstream task performance; (6)Pre-trained LTSM: Augments temporal modeling without additional training overhead.
  • Figure 2: Fusion-Aware Temporal Module.
  • Figure 3: Instruction-Enhanced Framework.
  • Figure 4: Comparison of the MSE of imputed sequences across different models under varying missing rates on the PEMS datasets.
  • Figure 5: Comparison of the number of anomalies detected by different models at a given confidence quantile on the UCR Anomaly Detection Archive.
  • ...and 1 more figures