arXiv:2606.12481cs.LGcs.AI2026-06

将时间序列转为符号程序,让大模型更高效地推理时间数据。

Representing Time Series as Structured Programs for LLM Reasoning

论文配图:Representing Time Series as Structured Programs for LLM Reasoning
图 1 · 摘自论文原文
  • 把时间序列分解为趋势、周期和关键事件,生成代码化程序表达
  • 在编辑、描述和问答任务中性能提升,错误率降低30%以上
  • 无需训练,适配现成大模型,特别适合非专业人士使用

大语言模型(LLMs)具备强大的推理与指令遵循能力,有望成为时间序列分析的强大工具。然而,时间序列属于数值型数据,与语言模型的文本模态存在根本性不匹配,如何有效表示时间序列以支持模型推理成为关键问题。现有方法通常将原始数值序列线性化或对预训练模型进行微调,导致模型需自行提取时间结构,造成长序列性能下降及计算开销增加。本文提出时间序列到结构化程序表示(T2SP),一种无需训练、确定性的方法,将时间序列分解为趋势、周期和显著事件,并以程序友好的符号格式表达,使其与大模型原生训练的文本与代码模态对齐。通过将时间结构提取任务从模型转移到表示层,T2SP使现成大模型能直接运用其已有推理能力理解时间序列。我们在三个推理任务(编辑、描述生成、问答)上评估,结果表明,相比原始字符串表示,T2SP在性能、推理速度和失败率方面均有显著提升。

原文摘要 · Abstract (English)

Large language models (LLMs) have demonstrated strong reasoning and instruction-following capabilities, making them potentially powerful tools for time-series analysis. However, time series lie outside their native textual modality, raising a fundamental question: how should time series be represented so that LLMs can reason about them effectively? Existing work typically serializes raw numerical sequences or fine-tunes pre-trained LLMs on time-series data. These approaches place the burden of extracting temporal structure directly on the LLM, creating a modality mismatch that often degrades performance on long sequences and introduces substantial computational overhead. In this work, we introduce Time-Series-to-Structured-Program representation (T2SP), a deterministic, training-free method that represents a time series as a structured symbolic program. T2SP decomposes time series into trends, periods, and salient events, expressing them in a program-friendly format aligned with the textual and code-like modalities on which LLMs are natively trained. By shifting temporal-structure extraction from the model to the representation itself, T2SP enables off-the-shelf LLMs to leverage their existing reasoning capabilities for time-series understanding. We evaluate T2SP on three reasoning tasks -- editing, captioning, and question answering -- where it consistently improves performance, reduces reasoning time, and lowers failure rates compared with raw-string representations. Our results demonstrate that T2SP provides an effective interface between time series and LLMs.

时间序列大模型结构化表示推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。