FBMS: An R Package for Flexible Bayesian Model Selection and Model Averaging

Florian Frommlet, Jon Lachmann, Geir Storvik, Aliaksandr HubinarXiv 2025 · DOI

Introduction

In modern statistical modeling, researchers frequently encounter "model uncertainty." While identifying significant predictors is a standard task, determining the precise functional form of their relationships—whether linear, polynomial, or complex non-linear interactions—remains a significant challenge. Traditional selection methods often falter when the search space becomes astronomical or multi-modal. The FBMS (Flexible Bayesian Model Selection) R package addresses these issues by providing a unified, computationally efficient framework for exploring vast non-linear spaces across diverse statistical tasks, including Gaussian, logistic, mixed-effects, and survival models.

Methodology

The core of the FBMS package relies on two synergistic algorithms designed to navigate complex posterior landscapes:

  1. MJMCMC (Mode Jumping Markov Chain Monte Carlo): To prevent the search from becoming trapped in local probability peaks, MJMCMC employs specialized "jumps" to traverse the model space effectively, ensuring the discovery of the most probable models even in jagged landscapes.
  2. GMJMCMC (Genetically Modified MJMCMC): This algorithm introduces a genetic layer to the search. It maintains a population of features and uses operators such as mutation (adding variables), modification (applying transforms like log or exp), and interaction (multiplying variables) to evolve sophisticated predictors.

Symbolic Regression and Feature Evolution

FBMS treats the discovery of functional relationships as a model selection problem. By representing complex expressions as trees, the package can automatically discover physical laws or hidden non-linearities without prior specification of the exact functional form.

A tree-based representation of a complex non-linear feature evolved via symbolic regression in FBMS.

Statistical Flexibility and Priors

Unlike many "black-box" machine learning tools, FBMS is a "glass-box" framework that allows for significant customizability. Users can define their own likelihood functions and choose from a variety of priors tailored to specific model families, such as Generalized Linear Models (GLM).

Overview of supported priors and model families within the FBMS framework.

Key Applications and Results

The package's versatility has been demonstrated across several high-dimensional and complex datasets:

  • Symbolic Regression: In astronomical benchmarks, the algorithm successfully re-discovered Kepler’s Third Law by identifying the $P^{2/3}$ relationship from raw measurements.
  • Predictive Performance: In the Abalone dataset, the non-linear projection method achieved an RMSE of 2.035, outperforming standard linear models (2.078).
  • Survival Analysis: For breast cancer prognosis (GSGB dataset), Bayesian Model Averaging (BMA) achieved a C-index of 0.687, significantly outperforming the full linear model (0.643).
  • Scalability for "Tall" Data: By integrating Stochastic Iteratively Reweighted Least Squares (S-IRLS-SGD), the package can handle massive datasets. On a heart disease dataset with over 250,000 observations, a novel subsampling approach reduced runtime from 8 minutes to 2 minutes while maintaining feature identification accuracy.

Conclusion and Future Directions

FBMS provides a robust toolset for researchers dealing with model uncertainty and non-linear discovery. While the genetic search for features is computationally more intensive than simple regression, the inclusion of parallel processing and subsampling techniques makes it viable for modern data science. Future development aims to incorporate Evolutionary Variational Bayes for faster inference and expanded support for longitudinal and streaming data.

Summary updated

BibTeX
@misc{frommlet2025fbms,
  author = {Florian Frommlet and Jon Lachmann and Geir Storvik and Aliaksandr Hubin},
  title = {{FBMS: An R Package for Flexible Bayesian Model Selection and Model Averaging}},
  year = {2025},
  eprint = {2509.00753},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.00753},
}
Figure