stat.MLOct 28, 2026

Modular Bayesian Foundation Models: Bayesian time series encoders for OOD detection, routing and forecasting

Authors: Mame Diarra Toure, Quang Hung Pham, Mohamed Ryad Zemouri, David Stephens, Luc Vouligny, Martin Gagnon

Organizations: Department of Mathematics and Statistics McGill University · Hydro-Quebec

Abstract

Industrial systems continuously generate time series that vary in sampling frequency, scale, dynamics, and operating regime. Consequently a single time-series foundation model may not be able to represent all regimes effectively and retraining a large model for every new dataset or regime shift is computationally expensive. Modular foundation models address this issue by reusing specialised encoders trained on diverse datasets and by allowing the expansion of capabilities through the addition of new experts. This approach requires compact experts to minimize storage cost and a proper selection mechanism of experts for unseen data. We propose a modular foundation model framework that combines end-to-end Bayesian encoder training with uncertainty based routing. Using Singular Bayesian Neural Networks (SBNNs), we build a collection of compact Bayesian encoders whose epistemic uncertainty guides label-free selection. At the selected ranks, our Bayesian collection uses 63.8% less storage than its deterministic counterpart. We evaluate this framework on time-series data through distribution shift, encoder selection, and probabilistic forecasting. Across seven incoming datasets, uncertainty-based routing is competitive with distance-based routing in terms of forecast MSE, while reducing average ECE from 0.086 to 0.072 and average NLL from 0.907 to 0.836. It also increases PICP90 from 82.28% to 89.03%. In a separate model-family comparison, we evaluate the SBNN pipeline against full-rank Bayes by Backprop, deep ensembles, and MC Dropout. The SBNN pipeline achieves an average MSE of 0.390, comparable with 0.396 for deep ensembles, 0.389 for MC dropout, and 0.443 for the full-rank Bayesian model. It uses 63.9% fewer parameters than MC dropout, 81.9% fewer than the full-rank model, and 92.8% fewer than the deep ensemble.

Figures & tables

Appendix figures & tables25 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Expert-Guided Forecast Editing for Time-Series Foundation Models

    Jul 22, 2026Hung Le, Minh Hoang Nguyen, Manh Nguyen +2Black-Box OptimizationTime Series Forecasting

  2. TimeRouter: Efficient and Adaptive Routing of Time-Series Foundation Models

    Jun 10, 2026Kanghui Ning, Yushan Jiang, Kashif Rasul +3Adaptive Model RoutingTime Series Forecasting