Dynamic TMoE: A Drift-Aware Dynamic Mixture of Experts Framework for Non-Stationary Time Series Forecasting
This repository contains the official implementation of Dynamic TMoE, accepted as a poster at ICML 2026.
Dynamic TMoE framework architecture
Dynamic TMoE is an adaptive Mixture of Experts (MoE) framework for non-stationary time series forecasting. It overcomes the rigidity of traditional MoEs by using Maximum Mean Discrepancy (MMD) to detect distribution shifts, dynamically expanding or pruning its heterogeneous expert pool to optimize capacity. Paired with a temporal memory router for stable, context-aware expert selection, Dynamic TMoE achieves state-of-the-art results across nine benchmarks, outperforming advanced baselines by reducing MSE and MAE by an average of 10.4% and 7.8%, respectively.
To set up the environment, install Python 3.10 and the required dependencies:
conda create -n dynamic_tmoe python=3.10
conda activate dynamic_tmoe
pip install -r requirements.txtPlace the benchmark datasets in the ./dataset folder with the following structure:
dataset/
├── ETT-small/
│ ├── ETTh1.csv
│ ├── ETTh2.csv
│ ├── ETTm1.csv
│ └── ETTm2.csv
├── electricity/
│ └── electricity.csv
├── traffic/
│ └── traffic.csv
├── weather/
│ └── weather.csv
├── exchange_rate/
│ └── exchange_rate.csv
└── illness/
└── national_illness.csv
Run the following scripts for different long-term forecasting benchmarks:
# eg. ETTh1 benchmarks
bash ./scripts/ETTh1.sh
If you find this repository useful, please cite our paper:
@inproceedings{zhu_2026_dynamic_tmoe,
title={Dynamic {TM}oE: A Drift-Aware Dynamic Mixture of Experts Framework for Non-Stationary Time Series Forecasting},
Author={Zhu, Jiawen and Liu, Shuhan and Weng, Di and Wu, Yingcai},
booktitle={Forty-third International Conference on Machine Learning},
year={2026}
}We thanks to the following repositories for their invaluable code and datasets:
