Back to directory

Time Series Forecasting as Reasoning: A Slow-Thinking Approach with Reinforced LLMs

Research code for a two-stage reinforcement fine-tuning method that trains large language models to reason step by step about time series data before producing a forecast.

Time Series Forecasting as Reasoning: A Slow-Thinking Approach with Reinforced LLMs

Time-R1 is the official code for a paper studying slow-thinking reasoning applied to time series forecasting. Its two-stage reinforcement fine-tuning curriculum first uses supervised fine-tuning on synthetic chain-of-thought data so a model learns the structure and format of temporal reasoning, then uses reinforcement learning with a custom multi-objective reward covering ground-truth alignment, multi-horizon accuracy and domain principles to develop more effective reasoning patterns.

The reinforcement stage uses GRIP, a group-based sampling strategy that applies non-uniform sampling and adaptive weighting to strengthen useful reasoning paths during policy optimization. The repository includes the scripts and configuration for preparing training and evaluation datasets, training and running inference with the resulting Time-R1 model, and the complete training and evaluation source code.

The paper reports that the approach improves forecasting accuracy and generalization across multiple real-world datasets compared with baselines that lack the reasoning curriculum.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.