In the rapidly evolving world of Large Language Models (LLMs), the "Mixture of Experts" (MoE) architecture has become the gold standard for scaling models like Mixtral and GPT-4. However, most MoE systems share a common flaw: their "gating" mechanisms—the traffic controllers that decide which expert handles which input—are typically static. They are trained once and stay the same, regardless of how the data environment changes over time.
A new paper, "Filtered not Mixed," introduces MoE-F, a framework that brings classical control theory to the LLM era. By treating expert selection as a dynamic filtering problem, the authors demonstrate how to build an ensemble of LLMs that adapts to shifting "regimes" in real-time.
TL;DR
MoE-F is a "plug-and-play" filtering harness that dynamically weights multiple LLMs for online time-series tasks using stochastic filtering theory. By framing expert selection as a Hidden Markov Model (HMM), it achieves a staggering 48.5% relative F1-score improvement in financial market prediction without requiring any retraining of the underlying models.
What Problem Does This Paper Address?
Standard MoE pipelines are designed for "static" tasks—think of a single prompt where the context doesn't evolve. But the real world is "constant-in-time." In fields like finance, electricity demand, or physics, the "best" model to use might change every hour. A model that excels during a bullish market might fail miserably during a crash.
The challenge is that we can't directly observe which expert is the "true" best at any given moment; we only see their noisy performance (loss). Current gating mechanisms don't have a "memory" of which experts have been performing well lately, making them slow to adapt to new trends or "regimes."
Methods: The Wonham-Shiryaev Filter Meets LLMs
The authors bridge the gap between Stochastic Calculus and Generative AI. Instead of a learned neural network gate, they use a Wonham-Shiryaev filter—a continuous-time version of the Hidden Markov Model.
The MoE-F algorithm operates in two elegant steps:
- Optimal Parallel Filtering: The system runs $N$ filters in parallel, one for each expert LLM. Each filter tracks the "reliability" of its expert by looking at its historical loss. It treats the "best expert" as a hidden signal that we are trying to decode from the noisy measurements of model performance.
- Robust Aggregation: These reliability scores are then aggregated using a Gibbs-style mechanism (a "softmin" function). This produces a final, robust weighting of all experts to generate a single ensemble prediction.
Crucially, this update is computed via a closed-form expression. Unlike many Bayesian methods that require slow Monte Carlo simulations, MoE-F is computationally efficient and provides theoretical guarantees of optimality.
Datasets
The researchers evaluated MoE-F on two distinct types of time-series challenges:
- Financial Market Movement (FMM): They used the NIFTY dataset, which combines US equities data ($SPY) with streaming news headlines. The task is to predict if the market will "Rise," "Fall," or stay "Neutral."
- Long-term Time-series Forecasting (LTSF): They tested the framework on the ETTh1 and ETTh2 datasets (Electricity Transformer Temperature), comparing it against specialized forecasting models like PatchTST and DLinear.
- Ablation Benchmarks: They also utilized the FLARE benchmark (StockNet, BigData22, CIKM18) to test how the filter handles different types of social media and financial data.
Key Insights and Ideas
- Regime Awareness: The most striking "aha moment" is how the filter naturally identifies market regimes. If the market turns bearish, the filter quickly shifts weight to the experts that have historically handled downturns better, even if they weren't the "best" on average over the last year.
- Hot-Swappable Experts: Because MoE-F is a "harness," it is model-agnostic. You can add a new SOTA model (like Llama-3) or remove an underperforming one on the fly without retraining the gate.
- The Power of Closed-Forms: By using the Wonham-Shiryaev filter, the authors avoid the "black box" nature of learned gates. The gating is mathematically grounded, providing a level of transparency and reliability essential for high-stakes fields like finance.
Key Results
The performance gains were significant across the board:
- Finance: On the NIFTY task, MoE-F achieved an F1-score of 0.52, compared to just 0.35 for the best individual expert (Llama-3 8B). This represents a 48.5% relative improvement.
- Electricity Forecasting: In the LTSF domain, MoE-F outperformed specialized, state-of-the-art forecasting models. It effectively combined the strengths of different architectures (like PatchTST and DLinear) to produce a more accurate global forecast.
- Robustness: Even when individual experts were "degenerate" (e.g., an adapter that only ever predicted "Neutral"), the filter was smart enough to down-weight them during volatile periods.
Limitations and Future Work
While powerful, the authors note a few areas for growth:
- Expert Diversity: The current study focused heavily on LLM experts. The authors suggest that future work should integrate more diverse "experts," such as Neural SDEs (Stochastic Differential Equations), which are specifically designed to model noise.
- Technical Dynamics: The current FMM task relies heavily on news and price data. There may be technical market micro-structures that the current LLM experts aren't yet capturing, which the filter could potentially leverage if provided with the right inputs.
MoE-F represents a sophisticated marriage of "old school" control theory and "new school" AI, proving that sometimes, the best way to manage a mixture of experts is to filter them, not just mix them.
Summary updated