bioRxiv Science⌕ Search

bioRxiv · 10.1101/2024.02.13.580046

Accelerating joint species distribution modeling with Hmsc-HPC: A 1000x faster GPU deployment

Abstract

Joint Species Distribution Modelling (JSDM) is a powerful and increasingly widely used statistical methodology in biodiversity modelling, enabling researchers to assess and predict the joint distribution of species across space and time. However, JSDM can be computationally intensive and even prohibitive, especially for large datasets and sophisticated model structures. To address computational limitations of JSDM, we expanded one widely used JSDM framework, Hmsc-R, by developing a Graphical Processing Unit (GPU) -compatible implementation of its model fitting algorithm. While our augmented framework retains the original user interface in R, its new computational core is coded in Python and dominantly uses TensorFlow library. This enhancement primarily targets to enable leveraging high-performance computing resources effectively, though it also accelerates model fitting with consumer-level machines. This upgrade is designed to leverage high-performance computing resources more effectively. We evaluated the performance of the proposed implementation across diverse model configurations and dataset sizes. Our results indicate significant model fitting speed-up compared to the existing Hmsc-R package across most models. Notably, for the largest datasets, we achieved >1000 times speed-ups. This GPU-compatible enhancement boosts the scalability of Hmsc-R package by several orders of magnitude, reaching a significantly higher level. It opens promising opportunities for modeling extensive and intricate datasets, enabling better-informed conservation strategies, environmental management, and climate change adaptation planning. Author summaryOur study addresses the computational challenges associated with Joint Species Distribution Modelling (JSDM), a critical statistical methodology for understanding species distributions in biodiversity research. Despite its utility, JSDM often faces computational limitations, particularly for large datasets. To overcome this hurdle, we enhance the widely used Hmsc-R framework by introducing a GPU-compatible implementation of its model fitting algorithm. Our upgraded framework, while retaining the user-friendly R interface, leverages Python and TensorFlow for its computational core, enabling efficient utilization of high-performance computing resources. Through extensive evaluation across diverse model configurations and dataset sizes, we demonstrate substantial speed-ups compared to the original Hmsc-R package, with over 1000 times speed-ups observed for the largest datasets. This GPU-compatible enhancement significantly improves the scalability of JSDM, enabling the analysis of extensive and complex biodiversity datasets. Our work has far-reaching implications for informing conservation strategies, environmental management, and climate change adaptation planning by facilitating more efficient and accurate biodiversity modeling, ultimately contributing to better-informed decision-making in ecological research and practice.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Rahman, A. U., Tikhonov, G., Oksanen, J., Rossi, T., Ovaskainen, O.. 2024-02-14. Accelerating joint species distribution modeling with Hmsc-HPC: A 1000x faster GPU deployment. https://doi.org/10.1101/2024.02.13.580046

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Host availability, climate and pupal-stage ecology shape the predicted environmental suitability of the New World screwworm across Central and South America

Background: The New World screwworm, Cochliomyia hominivorax, causes primary myiasis in warm-blooded vertebrates. Its recent resurgence in Central America has renewed the need for spatial tools that identify environmentally suitable areas and surveillance gaps. Most previous distribution models have emphasized climate and livestock, whereas ecological constraints acting during the free-living pupal stage have rarely been incorporated. Methods: We compiled 2,461 georeferenced occurrence reports from the literature across Central and South America and linked them to climate, livestock density, forest cover and superficial soil predictors. Four sequential (nested) logistic models quantified the incremental contribution of predictor blocks, compared using likelihood-ratio tests, AIC and discrimination metrics. Logistic regression and Random Forest were then compared using five-fold spatial block cross-validation, which we treat as the primary measure of generalisation, and an independent municipality-level 70:30 train-test split. Variable importance was assessed using Random Forest Mean Decrease Accuracy together with partial-dependence profiles. Because presence and pseudo-absence classes were balanced before fitting, model outputs are interpreted as relative environmental suitability rather than absolute probability of occurrence. Results: The literature database represented 2,589 infected hosts, dominated by cattle, pigs, dogs and humans. Across the sequential models, AUC increased from 0.780 for climate alone to 0.898 with livestock density, 0.908 with forest cover and 0.918 with superficial soil properties; the increment attributable to the soil block ({Delta}AUC = 0.010) was smaller than the between-fold variability observed under spatial cross-validation (SD 0.049) and is therefore reported as suggestive rather than established. Sheep and horse density and cold-quarter soil temperature showed the highest Mean Decrease Accuracy values, while silt texture ranked above cattle density and forest cover. Under spatial block cross-validation Random Forest was markedly more stable than the GLM (mean AUC 0.926 {+/-} 0.049 versus 0.814 {+/-} 0.157) and was retained as the final model. On the independent municipality-level test set it achieved AUC 0.981, TSS 0.824, sensitivity 0.850 and specificity 0.972, values we regard as optimistic relative to the spatially blocked estimates. Predicted suitability was highest across Central America and parts of northern and tropical South America. Conclusions: C. hominivorax occurrence was associated with interacting climatic, host and landscape conditions. Superficial soil variables added a small, biologically interpretable signal consistent with constraints acting during pupation, but one that lies within the uncertainty of our spatial validation and requires confirmation with independent data. The maps estimate relative environmental suitability rather than infection incidence, and are intended to identify areas where surveillance could be strengthened rather than to guide control operations directly.

ecology↗

Phenotypic variation in divergent mitochondrial haplotypes in migratory three-spined stickleback

Mitochondria are essential components in life-sustaining organismal processes. The mitochondrial genome can be influenced by selection, and divergent mitochondrial haplotypes have substantial potential to affect interspecies variation in life-history and physiology, yet little is known about whole organism phenotypic changes that might accompany mitochondrial genomic divergence. Three-spined stickleback on the Scottish island of North Uist provide a model to study this as their populations exhibit a well-mixed nuclear genome, yet two highly diverged mitochondrial haplotypes ( trans-Atlantic and European). Three-spined stickleback were sampled from six lochs to investigate associations between mitochondrial haplotype and phenotypic traits including organ size, body size, and ovule volume/clutch size, as well as citrate synthase enzyme activity. Results showed that mitochondrial haplotype has an influence on male gonadosomatic index (GSI) and potentially citrate synthase (CS) enzyme activity. Differences in male GSI may be explained by the timing of male spermatogenesis or potentially a need for larger testes in European haplotype fish. While no other phenotypic trait showed differences between mitochondrial haplotypes, there were many differences between sexes and populations e.g. in body size and organ/muscle size.

ecology↗

Gregariousness can promote invasion success of pest insects while higher environmental heterogeneity decreases it

Climate change and environmental homogenization are expected to facilitate the expansion of many forest pest insect species and increase the vulnerability of forest ecosystems to insect outbreaks. At present, we lack empirical data on how the antipredator defence traits of pest insects interact with the local environmental conditions and shape outbreak risk. Here we study this and ask 1) how the antipredator defence strategy of pest insects shapes survival under naturally varying predator community, and 2) how is predation risk shaped by the diversity and structure of forests? We tested these questions by conducting a field predation experiment with artificial prey system (prey items made from edible dough) where we manipulated the gregariousness, unpalatability and defensive colouration of prey and tested their effects on prey survival. Additionally, we measured environmental variables and invertebrate predator community structure along the prey transects to analyse how they shape overall predation risk. Our results show that the predation risk was always lowest for gregarious prey irrespective of other defence strategies. Furthermore, our results indicate that predation pressure was lower in more homogenously structured forest areas or areas with a weak quality deadwood continuum in comparison to locations with more natural state forests and good quality deadwood continuum. Altogether, our results suggest that gregariousness can facilitate pest insects to form outbreaks by increasing their survival against generalist predators. However, by maintaining higher heterogeneity in forests, it is possible to ensure higher predation pressure to regulate their population growth.

ecology↗