TL;DR
RAVEN (Regime-Aware Variable-context Expert Network) challenges a foundational assumption in time series forecasting: that models should use a fixed historical look-back window. By combining a dynamic Mixture-of-Experts (MoE) architecture with a cumulative importance thresholding mechanism, RAVEN adaptively resizes its context window for every single data sample. This approach yields state-of-the-art performance across financial benchmarks and general time series datasets while maintaining high computational efficiency.
What Problem Does This Paper Address?
Standard deep learning models for time series forecasting rely on a fixed historical context window ($L$). In stable, periodic domains (like traffic or weather), this works perfectly. However, financial time series are notoriously non-stationary, feature low signal-to-noise ratios (SNR), and undergo sudden regime shifts.
This creates an irreconcilable dilemma for fixed-window models:
- Too short a window lacks the memory to span structural market shifts.
- Too long a window mistakenly injects stale, irrelevant noise from past market regimes into current predictions.
Using Continuous Wavelet Transform (CWT) analysis, the authors demonstrate that the dominant temporal scales in financial data migrate unpredictably over time, meaning no single fixed look-back horizon is universally optimal.
Methods
RAVEN introduces a dual-branch backbone that processes data through a patch-based pipeline in reverse chronological order (most recent data first).
- Local Branch (Patch-Weighted MoE): Instead of routing individual tokens to experts based on content (like standard MoEs), RAVEN routes based on temporal scale. A lightweight MLP scores the importance of each historical patch. The model accumulates these scores backwards in time and applies Cumulative Importance Thresholding (CIT) to carve out nested, variable-length look-back windows. These windows are then sent to scale-specialized experts (short-, medium-, and long-term encoders).
- Global Branch (Global Compressed Representation - GCR): Operating in parallel, a self-attention layer processes the full context window to extract macro-level, holistic features that local experts might miss.
- Correlation-Aware Weighting (CAW): Because the experts receive nested, overlapping inputs, their outputs are inherently collinear. To prevent redundant noise from drowning out the signal, CAW calculates the pairwise cosine similarity of expert representations and applies an exponential penalty to down-weight redundant experts during aggregation.
- Regularized Training: The network is optimized using a composite loss function that includes MSE, a router negative-entropy penalty (to prevent the router from collapsing into a single scale), and an expert diversity regularizer (to enforce representation orthogonality).
Datasets
The authors evaluated RAVEN across three distinct domains:
- FinMultiTime: A cross-market equity dataset containing daily price and volume data for 892 HS300 constituents and 4,694 S&P 500 constituents (2009–2024).
- Fund: Daily user transaction records for mutual fund subscriptions and redemptions on Alipay (2015–2023).
- PEMS (03, 04, 07, 08): Four standard highway traffic flow datasets used to test cross-domain generalization.
Key Insights and Ideas
- Temporal-Scale Routing vs. Content Routing: Traditional MoE architectures route tokens based on semantic content. RAVEN shifts this paradigm to route based on temporal horizons, ensuring each expert processes a contiguous, positionally coherent slice of history.
- Data-Driven Context Carving: The model naturally learns when to look far back and when to focus purely on the present. During highly volatile periods (e.g., market crises), RAVEN automatically concentrates its attention on the most recent patches; during stable trending regimes, it flattens its attention to leverage longer historical contexts.
- Mitigating Redundancy is Crucial: Simply aggregating multi-period inputs introduces correlated noise. Explicitly penalizing representation overlap (via CAW and diversity losses) is essential to making MoE architectures viable in low-SNR environments.
Key Results
- Financial Forecasting: RAVEN outperformed SOTA baselines, improving the Pearson correlation by 9.2% on HS300 and 20.2% on S&P500, while reducing Mean Squared Error (MSE) by 18.2% on fund sales forecasting.
- Trading Backtests: In a simulated 10-day rebalancing portfolio strategy on the HS300 index from 2020 to 2024, RAVEN achieved a +12.79% cumulative return advantage over the strongest baseline (MLF).
- Generalization: Despite lacking explicit spatial modeling, RAVEN achieved the best results in 14 out of 16 metrics on the PEMS traffic benchmarks, proving its utility for handling localized temporal disruptions.
- Efficiency: RAVEN maintains a favorable accuracy-efficiency profile. It reduces training time by 89.1% and inference latency by 78.3% compared to heavier routing baselines like PathFormer.
Limitations and Future Work
The authors note a few areas for improvement:
- Systemic Market Movements: The current routing mechanism operates on individual asset series and does not explicitly integrate cross-asset dependencies or macro-regime indicators.
- Granularity: The model relies on fixed-resolution patching; incorporating variable-resolution patching could further enhance its multi-scale expressiveness.
- High-Frequency Data: Testing RAVEN on high-frequency intraday data and alternative asset classes (commodities, fixed income) remains an open direction.
Summary updated