Abstract
Time series forecasting can be viewed as a generative problem that requires both semantic understanding over contextual conditions and stochastic modeling of continuous temporal dynamics. Existing approaches typically rely on either autoregressive large language models (LLMs) for semantic context modeling or diffusion-like models for continuous probabilistic generation. However, neither method alone can adequately model both aspects simultaneously. In this work, we propose CoGenCast, a hybrid generative framework that couples pre-trained LLMs with flow-matching mechanism for effective time series forecasting. Specifically, we reconfigure pre-trained decoder-only LLMs into a native forecasting encoder-decoder backbone by modifying only the attention topology, enabling bidirectional context encoding and causal representation generation. Building on this, a flow-matching mechanism is further integrated to model temporal evolution, capturing continuous stochastic dynamics conditioned on the autoregressively generated representation. Notably, CoGenCast naturally supports multimodal forecasting and cross-domain unified training. Extensive experiments on multiple benchmarks show that CoGenCast consistently outperforms previous compared baselines.
Introduction
Real-world time series forecasting—predicting electricity loads, stock prices, or environmental metrics—is fundamentally a generative challenge. A robust model must possess two distinct capabilities: semantic understanding to grasp contextual conditions like weather shifts or historical trends, and stochastic modeling to capture the continuous, probabilistic nature of numerical evolution and uncertainty.
Currently, the field is divided. LLM-based methods excel at semantic reasoning but struggle with continuous numerical dynamics. Conversely, diffusion and flow-matching models are adept at probabilistic generation but lack deep semantic context. CoGenCast bridges this gap by coupling a reconfigured pre-trained LLM for semantic reasoning with a continuous flow-matching mechanism for fast, probabilistic generation.
Methodology: The CoGenCast Framework
CoGenCast marries the discrete reasoning of LLMs with the continuous generation of flow matching through a novel architecture.
LLM Reconfiguration
Instead of training from scratch, CoGenCast reconfigures a pre-trained decoder-only LLM (e.g., Qwen-0.6B) into a native encoder-decoder backbone. By modifying the attention topology, the "encoder" uses bidirectional attention to fuse historical numerical patches with textual context such as domain knowledge and statistics. The "decoder" maintains causal attention to generate future representations autoregressively.
Continuous Flow-Matching and One-Step Generation
The LLM's hidden states condition a flow-matching denoising decoder. Traditional diffusion models are slow due to iterative denoising. CoGenCast defines a linear probability path between noise and target data. By training the model to predict the average velocity along this straight-line trajectory, it can perform high-quality predictions in a single step (1-NFE), significantly boosting inference speed.
Key Insights and Results
The framework was evaluated on 10 standard benchmarks across energy, environment, finance, and health domains.
Performance and Efficiency
CoGenCast consistently outperformed eight representative baselines, achieving an average ~11% reduction in Mean Squared Error (MSE) compared to other LLM-based methods and a >7% improvement over strong transformer-based models like PatchTST. Efficiency analysis confirmed that 1-step generation (1-NFE) achieves performance parity with multi-step generation, making it highly practical for real-world deployment.
The Power of Context
A critical finding is the synergy between semantic coupling and continuous generation. Ablation studies demonstrate that explicit textual metadata—particularly statistical information like mean and variance—is vital for aligning the generative distribution with the global data scale.
As shown in the figure above, removing textual or statistical context leads to a noticeable degradation in performance (higher MSE). This suggests that such metadata helps the model ground its numerical predictions in the broader semantic context provided by the LLM.
Cross-Domain Synergy
Interestingly, training CoGenCast simultaneously across multiple domains (e.g., Energy, Finance, Health) improved performance compared to single-domain training. This highlights the strong generalization capabilities and the "structural prior" provided by the LLM backbone, which can effectively transfer patterns across different time series domains.
Conclusion and Future Work
CoGenCast demonstrates that a hybrid autoregressive-flow architecture provides a scalable blueprint for time series forecasting. While the model is sensitive to hyperparameters like patch size and is more compute-intensive than simple linear models, its ability to handle multimodal inputs and provide fast, probabilistic forecasts marks a significant advancement. Future work aims to scale this architecture into universal foundational models for time series.
Summary updated