Source-linked AI summary

MemCast: Memory-Driven Time Series Forecasting with Experience-Conditioned Reasoning

Xiaoyu Tao, Mingyue Cheng, Ze Guo, Shuo Yu, Yaguo Liu, Qi Liu, Shijin Wang

arXiv:2602.03164v2cs.LGcs.AI

TL;DR

Existing LLM forecasters often lack explicit accumulation and continual evolution of forecasting experience. MemCast builds hierarchical memory from training data and uses it to condition reasoning, select trajectories, and reflect on predictions; experiments across multiple datasets report that it consistently outperforms previous methods.

  • Problem

    Existing LLM-based forecasters often lack explicit experience accumulation and continual evolution, despite their promising forecasting advances.

    Source: §1 · p. 2
  • Method

    MemCast learns hierarchical memory from training-set outcomes, reasoning trajectories, and temporal features, then uses it to guide inference and adapt entry confidence.

    Source: §1 · p. 2
  • Results

    MemCast consistently outperforms existing approaches across diverse datasets.

    Source: §1 · p. 2, §5 · p. 9
  • Takeaways & Limitations

    The reported results support explicit forecasting-experience abstraction and reuse as an effective approach to experience-conditioned reasoning.

    Source: §5 · p. 9

Abstract

from arXiv · show

Time series forecasting (TSF) plays a critical role in decision-making for many real-world applications. Recently, large language model (LLM)- based forecasters have made promising advancements. Despite their effectiveness, existing methods often lack explicit experience accumulation and continual evolution. In this work, we propose MemCast, a learning-to-memory framework that reformulates TSF as an experience-conditioned reasoning task. Specifically, we learn experience from the training set and organize it into a hierarchical memory. This is achieved by summarizing prediction results into historical patterns, distilling inference trajectories into reasoning wisdom, and inducing extracted temporal features into general laws. Furthermore, during inference, we leverage historical patterns to guide the reasoning process and utilize reasoning wisdom to select better trajectories, while general laws serve as criteria for reflective iteration. Additionally, to enable continual evolution, we design a dynamic confidence adaptation strategy that updates the confidence of individual entries without leaking the test set distribution. Extensive experiments on multiple datasets demonstrate that MemCast consistently outperforms previous methods, validating the effectiveness of our approach. Our code is available at https://github.com/Xiaoyu-Tao/MemCast-TS.

1. Introduction

Time series forecasting supports decisions across real-world applications, and LLM-based forecasting has recently advanced. MemCast addresses the limited reuse and continual refinement of forecasting experience by organizing training-set knowledge into memory for inference.

1. Introduction

  • Existing forecasting approaches include statistical, deep-learning, and LLM-based methods, with LLM forecasters using either weight updates or prompting.Weight-updating approaches typically adapt smaller LLMs, while prompting methods use large LLMs without backpropagation.Source: §1 · p. 1
  • Many existing methods treat forecasts independently, leaving prediction outcomes, reasoning processes, and temporal regularities unused as reusable experience.The introduction also identifies limited continual evolution of stored experience as a constraint.Source: §1 · p. 2
  • MemCast builds hierarchical memory from training data: prediction outcomes become historical patterns, inference trajectories become reasoning wisdom, and temporal features become general laws.During inference, these components guide reasoning, trajectory selection, and reflective iteration; entry confidence adapts without test-distribution leakage.Source: §1 · p. 2
  • MemCast consistently outperforms existing methods across multiple real-world datasets, supporting experience-conditioned reasoning for forecasting.The paper reports that its approach enables memory-enhanced forecasting.Source: §1 · p. 2

2. Related Work

Related work spans conventional forecasting, LLM-based forecasting, and memory-augmented reasoning. The discussion positions MemCast against methods that either learn temporal representations, prompt LLMs, or store and retrieve experience.

2.1. Conventional Time Series Forecasting

  • Conventional forecasting progressed from statistical models with predefined assumptions to deep-learning models that learn representations from data.Deep models include CNNs, RNNs, GNNs, Transformers, and MLPs; they learn nonlinear dynamics but can require large labeled datasets and struggle to incorporate context.Source: §2.1 · p. 2

2.2. LLM-based Time Series Forecasting

  • LLM-based forecasters divide into training-based methods that update parameters and training-free methods that use prompts or in-context learning.Training-based methods are often applied to smaller LLMs under computational constraints; training-free approaches retain large models but depend on prompts, retrieved examples, or designed reasoning instructions.Source: §2.2 · p. 2
  • Both LLM-based forecasting approaches commonly handle instances in isolation, leaving accumulated forecasting experience insufficiently explored.This limitation motivates memory-augmented reasoning as a route to experience accumulation, strategy reuse, and continual adaptation.Source: §2.2 · p. 2, §2.3 · p. 3

2.3. Memory-Augmented Reasoning

  • Memory-augmented models range from recurrent hidden states and external read-write memory to compressed histories and LLM systems that store, retrieve, or update information.Such systems support reuse of historical cases or interaction records for factual grounding, contextual adaptation, and experience-conditioned reasoning.Source: §2.3 · p. 3

3. Methodology

MemCast frames forecasting as mapping historical series and contextual features to future values, then uses text-based hierarchical memory to condition reasoning. It accumulates experience from training data, deploys it through retrieval, trajectory selection, and reflection, and evolves confidence without changing memory content during inference.

3.1. Problem Definition

  • Forecasting maps historical time series and aligned static and dynamic contextual features to future values.The problem definition represents the historical series over T steps and d dimensions and predicts over horizon H.Source: §3.1 · p. 3

3.2. Framework Overview

  • MemCast accumulates training-set experience, uses hierarchical memory to support reasoning and reflection without parameter retraining, and adapts entry confidence over time.The framework separates memory accumulation from its inference-time utilization.Source: §3.2 · p. 3

3.3. Experience Memory Encoding

  • Each forecasting case is encoded as structured natural-language memory, preserving patterns, reasoning wisdom, and general laws in a form directly usable by LLMs.The representation can enter context without additional memory encoders and supports interpretable traces and flexible updates.Source: §3.3 · p. 3

3.4. Experience Memory Accumulation

  • Accumulation abstracts outcomes into pattern summaries, distills successful and failed trajectories into compact wisdom, and induces general laws from textualized temporal features.Pattern summaries capture trend, volatility, and peaks; wisdom filtering combines feature-level cosine similarity with DTW, while induced laws guide self-reflection.Source: §3.4 · pp. 3–4

3.5. Experience Memory Utilization

  • At inference, retrieved historical patterns condition reasoning, validated wisdom guides selection among sampled trajectories, and general laws trigger corrective re-reasoning when predictions violate constraints.Trajectory selection scores semantic consistency with retrieved wisdom; reflection continues until constraints are met or a retry limit is reached.Source: §3.5 · pp. 4–5

3.6. Experience Memory Evolution

  • MemCast preserves memory content during inference to avoid test-distribution leakage, updating confidence only for contributing experiences after forecasts outperform a moving-average baseline.When the LLM loss is not lower than the baseline loss, the strategy makes no confidence update.Source: §3.6 · p. 5

4. Experiments

Across diverse short- and long-term benchmarks, MemCast achieves the best results on most metrics. Ablations and sensitivity analyses examine its memory components, inference choices, and behavior under an out-of-distribution shift.

4.1. Experimental Settings

  • Experiments cover electricity, transformer, renewable-energy, and hydrological forecasting, compare statistical, deep-learning, and LLM-based baselines, and report MSE and MAE on raw series.Long-term tasks use 96-step look-back and prediction windows; short-term tasks use 168-step look-back and a 24-step horizon.Source: §4.1 · pp. 5–6

4.2. Main Results

  • MemCast achieves the best results on most metrics across diverse context-rich benchmarks, with gains over deep-learning baselines on volatile NP and PJM and lower errors than Time-LLM on noisy BE.Compared with TimeReasoner, it is more stable on most benchmarks, although TimeReasoner remains competitive on several metrics.Source: Table 2 · p. 6, §4.2 · pp. 6–7

4.3. Ablation Studies

  • Removing a memory component degrades forecasting, while dynamic confidence adaptation lowers MSE and MAE across volatile and long-term datasets.Memory-component ablations show distinct domain dependencies; confidence-adaptation gains are particularly noticeable on NP and PJM and also occur on ETTh and ETTm.Source: §4.3 · p. 7, Table 3 · p. 7, Figure 3 · p. 7

4.4. Exploration Analysis

  • Active selection using semantic consistency outperforms passive aggregation, which averages predictions from both high-quality and inconsistent trajectories.The method scores generated trajectories against retrieved reasoning wisdom and selects the highest-reliability path.Source: Figure 4 · p. 7, §4.4 · pp. 7–8
  • Performance varies across LLM backbones, but the framework is applicable across backbones with different capacities.The reported results suggest the framework can use backbone reasoning capacity while retaining a unified memory-based design.Source: Table 4 · p. 8, §4.4 · p. 8
  • Contextual features generally improve forecasting, with dynamic context usually contributing more than static context and NP MAE as an exception.Static context remains complementary, and the contributions of static and dynamic context vary by dataset.Source: Table 5 · p. 8, §4.4 · p. 8

4.5. Hyperparameter Sensitivity Analysis

  • Moderate retrieval, trajectory sampling, and sampling temperature settings perform best; excessive retrieval or sampling can introduce noise or redundant reasoning paths.The reported trajectory gains tend to saturate or slightly degrade above m > 4; both high and extremely low temperatures are suboptimal.Source: Table 6 · p. 8, §4.5 · pp. 8–9, Figure 6 · p. 9

4.6. Case Study

  • In the OT case study, a 28°C out-of-distribution peak prompts a recent-window baseline, trajectory filtering, and validation against the physical range [3.1, 12.0].The selected trajectory uses moderate sensitivity (k = 0.6) to balance covariate influence with historical inertia.Source: §4.6 · p. 9

5. Conclusion

MemCast frames forecasting as experience-conditioned reasoning, using hierarchical memory and dynamic confidence adaptation to support guided inference and continual evolution. Experiments across diverse datasets show consistent gains over existing approaches.

5. Conclusion

  • MemCast builds hierarchical memory from training-set forecasting experience: historical patterns, reasoning wisdom, and general laws guide reasoning, trajectory selection, and reflective correction.Dynamic confidence adaptation supports continual evolution without test-data leakage.Source: §5 · p. 9
  • Experiments across diverse datasets show that MemCast consistently outperforms existing approaches.The conclusion highlights explicit experience abstraction and controlled memory utilization as effective for accurate time series forecasting.Source: §5 · p. 9

Impact Statement

The paper presents MemCast as an experience-conditioned reasoning framework intended to enhance interpretability and reliability in critical domains such as energy and healthcare.

Impact Statement

  • MemCast is presented as enhancing interpretability and reliability in critical domains such as energy and healthcare.The statement associates general laws with physical constraints and dynamic confidence adaptation with autonomous evolution, and says the approach mitigates generative hallucinations and adapts to non-stationary environments.Source: Impact Statement · p. 10

A.1. Dataset Descriptions

The evaluation spans short- and long-term forecasting across electricity markets, energy systems, renewable generation, and hydrology, with data sampled at frequencies from 15 minutes to 24 hours.

A.1. Dataset Descriptions

  • Table 7 reports dataset descriptions and organizes dataset sizes as (Train, Validation, Test).The evaluation covers electricity prices, power load, renewable generation, and hydrological factors, with sampling frequencies from 15 minutes to 24 hours.Source: Table 7 · p. 13, §A.1 · p. 13
  • The hourly short-term benchmarks comprise five Electricity Price Forecasting datasets: Nord Pool, PJM, Belgium, France, and Germany.They pair electricity prices with market-specific exogenous forecasts or covariates.Source: §A.1 · p. 13
  • Long-term benchmarks include ETTh1 and ETTm1, which record transformer oil temperature and six load-type features at hourly and 15-minute frequencies, respectively.The benchmarks span industrial power transformers, renewable energy telemetry, and hydrological systems.Source: §A.1 · p. 13
  • Additional datasets cover 15-minute wind and sunny power generation and daily MOPEX streamflow discharge prediction.Wind Power and Sunny Power include six meteorological covariates; MOPEX includes four meteorological drivers.Source: §A.1 · pp. 13–14

A.2. Compared Baselines

The comparison spans classical statistical, deep-learning, Transformer, and LLM-based forecasting methods, alongside state-of-the-art foundation models.

A.2. Compared Baselines

  • ARIMA models temporal patterns with autoregression, differencing, and moving averages, while Prophet decomposes business time series into trends, seasonality, and holiday effects.Both are included among the compared baselines.Source: §A.2 · p. 14
  • DLinear separates trend and seasonal components, while PatchTST uses channel independence and patch-based tokenization.These are among the deep-learning and Transformer baselines.Source: §A.2 · p. 14
  • iTransformer embeds each variate’s whole series as a token for cross-channel attention, and TimeXer incorporates and aligns exogenous variables.Both are included in the baseline comparison.Source: §A.2 · pp. 14–15
  • ConvTimeNet captures multi-scale temporal patterns through adaptive segmentation and deformable patching.It is included among the compared state-of-the-art methods.Source: §A.2 · pp. 14–15
  • LLM-Time tokenizes numerical data for zero-shot next-token prediction, TimeReasoner infers temporal dynamics and causal relationships, and Time-LLM aligns time series with text.LSTPrompt decomposes series into trend and seasonal components to construct prompts for an LLM.Source: §A.2 · p. 15

A.3. Visualization

The qualitative comparison shows MemCast tracking sharp, nonstationary changes more accurately than the illustrated baselines, while the failure analysis identifies vulnerabilities under out-of-distribution conditions.

  • ARIMA collapses to a flat line, Prophet diverges with an incorrect linear trend, and deep models smooth peaks and valleys while lagging.Source: §A.3 · p. 16
  • Time-LLM introduces high-frequency noise, while LSTPrompt shows abrupt discontinuities and hallucinations.Source: §A.3 · p. 16
  • On a high-nonstationarity, sharply fluctuating case, MemCast tracks evolving trends without deep-model lag and reconstructs extreme-fluctuation amplitudes.Source: §A.3 · p. 16
  • Under Oil Temperature forecasting with OOD covariates, MemCast exhibits copy-paste repetition, wrong trends, peak overestimation, and constant collapse.Source: §A.3 · p. 16
  • The authors identify memory-current-context conflict resolution and physical-plausibility constraints as future-work targets.Source: §A.3 · p. 16

A.4. Detailed Prompt Construction

MemCast uses a modular prompt to adapt LLMs to time series forecasting, defining the task and incorporating retrieved experience, including prior failures and preventative rules.

  • The prompt is a dynamic, modular instruction set intended to bridge numerical time series data and textual reasoning.Source: §A.4 · p. 16
  • Role initialization establishes an expert-forecaster persona and specifies the forecast horizon and available information.Source: §A.4 · p. 16
  • In-context memory retrieval supplies past failure modes and preventative rules alongside positive examples.Source: §A.4 · p. 16

Forecasting Prompt

The forecasting prompt combines task scope, retrieved experience, and multiple views of the time series; a reflective loop adds feedback and constraints when quality checks fail.

  • The example defines a Nord Pool price forecast over a 24-hour horizon using 168 hours of history and 24-hour future covariate forecasts.Source: Forecasting Prompt · p. 17
  • Retrieved examples pair documented errors with preventative rules, including avoiding unvalidated absolute linear adjustments when deviations exceed 15% of the historical range.Source: Forecasting Prompt · p. 17
  • The prompt combines serialized history and future covariates, statistical summaries, and textual descriptions of temporal morphology.Source: Forecasting Prompt · p. 17
  • For a stable regime, the example prompt directs the model to prioritize autoregressive patterns over covariate signals.Source: Forecasting Prompt · p. 17
  • When a forecast fails quality control, the reflective loop appends error feedback and hard constraints for iterative refinement.Source: Forecasting Prompt · p. 17
Loading 2602.03164v2…