RAVEN: A Regime-Aware Variable-context Expert Network for Financial Time Series Forecasting

Cheng He, Zhenyu Guan, Xijie Liang, Defu Lian, Jiajia Li, Enhong Chen, Patrick P. C. Lee, Geng Hu, Zehao ChenarXiv 2026

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.

Figure 1: CWT scalograms for multi-scale analysis. Financial data (a) exhibits non-stationary energy distribution with no fixed periodicity, while traffic data (b) shows stable, periodic patterns.

Methods

RAVEN introduces a dual-branch backbone that processes data through a patch-based pipeline in reverse chronological order (most recent data first).

Figure 2: Overview of RAVEN. The pipeline consists of three modules. Preprocess applies instance normalization, channel-independent processing, and patch partitioning to produce embedded patches E = [e1,...,eN]. Backbone operates via two parallel branches. (i) The local adaptive branch scores patch importance and accumulates scores in reverse chronological order against CIT-based thresholds, generating K nested contiguous look-back windows {Gk}. Each window is processed by a scale-specialized expert, and the variable-length outputs are shape-aligned via average pooling into fixed-dimensional vectors for aggregation into zlocal. (ii) The GCR branch captures holistic historical dependencies across the full sequence E via a Self-Attention layer, then distills a global context vector zglobal through average pooling. Output Projection concatenates [zlocal;zglobal] and projects them through an MLP head to output the final H-period cumulative log-return ˆy(H) t . The nested routing topology introduces collinearity among experts, which is jointly suppressed by the CAW scheme and the expert diversity regularizer.
  1. 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).
  2. 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.
  3. 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.
  4. 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

BibTeX
@misc{he2026raven,
  author = {Cheng He and Zhenyu Guan and Xijie Liang and Defu Lian and Jiajia Li and Enhong Chen and Patrick P. C. Lee and Geng Hu and Zehao Chen},
  title = {{RAVEN: A Regime-Aware Variable-context Expert Network for Financial Time Series Forecasting}},
  year = {2026},
  eprint = {2606.24062},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.24062},
}
Figure