MemCast is a novel framework that reformulates Time Series Forecasting (TSF) as an experience-conditioned reasoning task. It explicitly accumulates forecasting experience into a hierarchical memory and leverages it to guide the inference process of Large Language Models (LLMs).
📝 “MemCast: Memory-Driven Time Series Forecasting with Experience-Conditioned Reasoning”
Preprint | 📄 Paper
🙋 Please let us know if you find out a mistake or have any suggestions!
🌟 If you find this resource helpful, please consider starring this repository and citing our research.
@article{tao2026memcast,
title={MemCast: Memory-Driven Time Series Forecasting with Experience-Conditioned Reasoning},
author={Tao, Xiaoyu and Cheng, Mingyue and Guo, Ze and Yu, Shuo and Liu, Yaguo and Liu, Qi and Wang, Shijin},
journal={arXiv preprint arXiv:2602.03164},
year={2026}
}Existing LLM-based forecasting methods often treat instances as isolated reasoning tasks, lacking explicit experience accumulation and continual evolution. MemCast introduces a new learning-to-memory paradigm:
- Experience Accumulation: Organizes training data into a Hierarchical Memory consisting of historical patterns, reasoning wisdom, and general laws.
- Experience-Conditioned Reasoning: Retrieves relevant patterns to guide reasoning, utilizes wisdom for trajectory selection, and applies general laws for reflective iteration.
- Continual Evolution: Enables dynamic confidence adaptation to update memory entry confidence during inference without test data leakage.
- ✅ Hierarchical Memory: Structured storage of trend summaries, reasoning trajectories, and physical constraints.
- 🔗 Wisdom-Driven Exploration: Samples multiple reasoning paths and selects the optimal trajectory based on semantic consistency.
- 🔄 Rule-Based Reflection: Iterative refinement mechanism that enforces domain-specific constraints (e.g., non-negativity).
- 📊 Dynamic Adaptation: A confidence adaptation strategy that allows the model to evolve continuously in non-stationary environments.
- 🏆 SOTA Performance: Consistently outperforms deep learning and LLM-based baselines on Energy, Electricity, and Weather benchmarks.
git clone https://github.com/Xiaoyu-Tao/MemCast-TS
cd MemCastconda create -n memcast python=3.10
conda activate memcast
pip install -r requirements.txtMemCast is evaluated on diverse real-world datasets with rich contextual features: Energy (NP, PJM, BE, FR, DE) Electricity (ETTh1, ETTm1) Renewable Power (Windy Power, Sunny Power) Hydrology (MOPEX) First, the training and evaluation datasets used in our experiments can be found in Google Drive. Please place the datasets in the dataset directory.
mkdir dataset
# Download datasets to ./dataset/sh scripts/accumulation/build_memory.sh
sh scripts/short_term/NP.sh
sh scripts/long_term/ETTh.sh
After running forecasting, evaluate prediction quality using the uqmem scoring pipeline (LLM + heuristic trajectory selection):
Short-term (EPF / NP, look_back=168, pred_window=24):
bash scripts/evaluate/EPF.shLong-term (ETTh1, look_back=96, pred_window=96):
bash scripts/evaluate/ETTh.shOr run the evaluation scripts directly:
# EPF
python evaluate/EPF/evaluate_EPF_uqmem.py
# ETTh
python evaluate/ETTh/evaluate_ETT_uqmem.pyThe evaluation reports MSE and MAE metrics for each attribute and prints a per-sample summary.
Full Results:
Overall Performance: MemCast consistently achieves the best or second-best results across datasets, surpassing Time-LLM and TimeReasoner.




