Abstract
Time series forecasting in real-world scenarios is frequently complicated by non-stationarity, where the underlying data distribution shifts over time. While ensemble methods offer a potential solution by combining multiple models, determining optimal, time-varying weights remains a significant challenge. This paper introduces RLMC (Reinforcement Learning based Model Combination), a framework that treats model weighting as a sequential decision-making task. Using Deep Deterministic Policy Gradient (DDPG), RLMC dynamically adapts ensemble weights based on local data characteristics and historical model performance. Evaluations on four diverse real-world datasets show that RLMC consistently outperforms traditional statistical methods and state-of-the-art meta-learning baselines.
Introduction
Real-world time series data—ranging from financial markets to weather patterns—is often non-stationary. Seasonal shifts, sudden demand changes, or evolving physical dynamics mean that a model performing well today may fail tomorrow. Consequently, no single "universal" forecasting model exists. Ensemble learning, which aggregates predictions from multiple "base models," is a common strategy to mitigate this. However, static weighting schemes or simple heuristics often fail to capture the nuances of shifting data regimes.
The core problem addressed here is how to automatically and dynamically assign weights to an ensemble of base models so the system can "pivot" to the most accurate expert for any given moment.
Methods: The RLMC Framework
The authors formulate the model combination problem as a Markov Decision Process (MDP) and solve it using the Deep Deterministic Policy Gradient (DDPG) algorithm.
MDP Formulation
- State ($s_t$): The agent observes a window of raw time series data and the recent historical performance (e.g., loss or rank) of all $N$ base models.
- Action ($a_t$): The agent outputs a continuous weight vector $w_t = (w_t^1, \dots, w_t^N)$, where $\sum w_t^i = 1$.
- Reward ($r_t$): The reward is a composite metric involving the ensemble's forecasting error (sMAPE) and its rank relative to the individual base models.
Architecture
The RLMC actor network is designed to handle multi-modal inputs. It employs dilated causal convolutions to extract temporal features from the raw time series and an embedding table to process historical model performance metrics. These features are fused and passed through a softmax layer to generate the final model weights.
Key Insights and Training Strategies
The development of RLMC revealed several critical technical insights:
- Stability via DDPG: Standard policy-gradient methods like REINFORCE proved unstable. In many cases, one model is significantly better than others, leading the optimal policy to be nearly deterministic. This causes the log-probabilities of "sub-optimal" actions to explode toward negative infinity, disrupting training. DDPG, being an off-policy, value-based method, avoids this instability.
- Model-Based Exploration: In this specific RL setting, the agent's action (choosing weights) does not influence the next state (the next time series value). This decoupling allows for "hallucinated" transitions, enabling the agent to explore the state space more efficiently by generating arbitrary transitions from training data.
- Sparsity Inductive Bias: Since optimal weights are often concentrated on a few models, the authors implemented an $\epsilon$-greedy strategy that samples weights near "one-hot" vectors, accelerating convergence toward sparse, effective combinations.
Experimental Results
RLMC was evaluated against four diverse datasets: M4-Daily, Climate, GEFCOM, and ETT.
- Performance: RLMC consistently achieved lower error rates than the "single best" model and popular meta-learning approaches like FFORMA. For instance, on the ETT dataset, RLMC reached an MAE of 4.39, compared to 4.59 for the best single model and 5.42 for FFORMA.
- Robustness: While many meta-learning methods struggle to beat a strong "single best" baseline across different datasets, RLMC's dynamic adaptation provided consistent gains across all benchmarks.
- Ablation: Ablation studies highlighted that the specialized exploration strategy (pre-training combined with sparsity bias) was the most vital component for achieving high performance.
Conclusion and Future Work
RLMC demonstrates the power of reinforcement learning for dynamic model selection in non-stationary environments. While effective, the current framework produces deterministic weights; future work may explore probabilistic weights to improve uncertainty estimation. Additionally, the authors plan to investigate unsupervised representation learning to further enhance the agent's understanding of complex time series dynamics.
Summary updated