pyreml: a general-purpose, GPU-accelerated mixed model solver in Python
- 1Institut de Genetique Moleculaire de Montpellier, CNRS, Universite de Montpellier
Abstract
Linear mixed models (LMM) are a popular modeling and inference framework, widely used in bioinformatics and other scientific fields. To obtain an unbiased estimation of the variance components, an LMM has to be fitted using restricted maximum likelihood (REML), a computationally intensive step. Most REML software is closed source, and currently there is no Python library offering complete LMM functionalities, such as the specification of spatial and genomic variance structures, multivariate analyses, random regression and factors, and heteroscedastic residuals. Here we propose pyreml, an LMM solver that fills this gap, comes with a user-centered interface and speeds up calculations by running on GPU. We show that pyreml fits a genomic best linear unbiased prediction (GBLUP) model more than one order of magnitude (>12\times) faster than the current state-of-the-art, closed source REML software. We also show that \pyreml can estimate a latent factor-analytic variance structure, a challenging feature that no current open source REML solution implements. Finally, we illustrate the use of pyreml to analyze longitudinal data, and to perform spatial analysis. Anchored by 500+ functional tests assessing the equivalence of its outputs to those from reference software (lme4, rrBLUP and BLUPF90), we demonstrate pyreml to be a performant, reliable and open-source solution available for academic, research and industrial LMM users.
Related
- GGE: General-purpose deep meta-learning for classification of human transcriptomes with limited data
- A general-purpose multi-path stacked coupling for stochastic reaction networks
- From the Drosophila Visual Connectome to General-Purpose Computer Vision
- General Purpose AI for Public Data Analysis and Experimental Hypothesis Generation
- Small Average Error, Wide Individual Error: General-Purpose LLMs Estimating Energy Intake from Meal Photos in a Feeding Trial
BibTeX
@misc{marchal2026pyreml,
title = {{pyreml: a general-purpose, GPU-accelerated mixed model solver in Python}},
author = {A. Marchal and C. Trottier and X. Bry and D. Raimondi},
howpublished = {bioRxiv},
year = {2026},
month = oct,
doi = {10.64898/2026.10.20.757556},
url = {https://www.biorxiv.org/content/10.64898/2026.10.20.757556v1},
note = {CC BY},
}
RIS
TY - UNPB
TI - pyreml: a general-purpose, GPU-accelerated mixed model solver in Python
AU - A. Marchal
AU - C. Trottier
AU - X. Bry
AU - D. Raimondi
PY - 2026
DA - 2026/10/20
PB - bioRxiv
DO - 10.64898/2026.10.20.757556
UR - https://www.biorxiv.org/content/10.64898/2026.10.20.757556v1
AB - Linear mixed models (LMM) are a popular modeling and inference framework, widely used in bioinformatics and other scientific fields. To obtain an unbiased estimation of the variance components, an LMM has to be fitted using restricted maximum likelihood (REML), a computationally intensive step. Most REML software is closed source, and currently there is no Python library offering complete LMM functionalities, such as the specification of spatial and genomic variance structures, multivariate analyses, random regression and factors, and heteroscedastic residuals. Here we propose pyreml, an LMM solver that fills this gap, comes with a user-centered interface and speeds up calculations by running on GPU. We show that pyreml fits a genomic best linear unbiased prediction (GBLUP) model more than one order of magnitude (>12\times) faster than the current state-of-the-art, closed source REML software. We also show that \pyreml can estimate a latent factor-analytic variance structure, a challenging feature that no current open source REML solution implements. Finally, we illustrate the use of pyreml to analyze longitudinal data, and to perform spatial analysis. Anchored by 500+ functional tests assessing the equivalence of its outputs to those from reference software (lme4, rrBLUP and BLUPF90), we demonstrate pyreml to be a performant, reliable and open-source solution available for academic, research and industrial LMM users.
ER -