Methods in Ecology and EvolutionEcologyPeer-reviewed journal article
sabinaHSBM: An R package for link prediction network reconstruction using Hierarchical Stochastic Block Models
Herlander LimaiD, Jennifer Morales‐BarberoiD, Rubén G. MateoiD, Ignacio Morales‐CastillaiD, Miguel Ángel RodrígueziD
- Citations
- 0
- FWCI
- 0.00
- Field percentile
- top 46%
Abstract
O_LINetwork analysis is a powerful framework for investigating complex systems across disciplines, including ecology, where it helps uncover patterns in predator-prey, host- parasite, or plant-pollinator interactions. However, ecological network data are often incomplete or error-prone due to sampling limitations, detection failures, and taxonomic uncertainty--leading to missing (false negative) and spurious (false positive) links that obscure structure and hinder inference. The hierarchical stochastic block model (HSBM), particularly in its degree-corrected form, is among the most effective tools for reconstructing networks under such uncertainty. Despite its robustness, the primary implementation of HSBM in the Python-based graph-tool library has remained largely inaccessible to ecologists. C_LIO_LIHere, we introduce sabinaHSBM, the first R package that makes degree-corrected HSBM broadly available through a user-friendly, flexible workflow. By bridging a gap between advanced network modeling and widely used ecological analysis platforms, sabinaHSBM facilitates network reconstruction and link prediction from binary bipartite data. The workflow involves three main steps: (1) preparing input data, (2) estimating posterior link probabilities, and (3) reconstructing the network. The package supports detection of undocumented and spurious links, exploration of hierarchical structure, and propagation of uncertainty throughout. Key features include cross-validation, flexible thresholding, probabilistic evaluation metrics, and two link prediction modes: estimating all link probabilities or identifying undocumented ones. C_LIO_LIWe illustrate the packages functionality through a case study using a published global dataset of carnivore-parasite associations, showing that inferred groupings are phylogenetically clustered. To assess predictive accuracy, we examined the top 10 highest-probability links identified by the model and found published evidence for 8, despite their absence from the original dataset. This highlights the models ability to recover biologically meaningful but underreported interactions. C_LIO_LIBy integrating all components of HSBM-based reconstruction into an accessible R package, sabinaHSBM empowers researchers to improve relational data quality and uncover overlooked patterns in complex ecological networks and beyond. C_LI
- research focus: benchmarking
- research focus: database / resource
- approach: deep learning
- approach: statistical model
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Predicting ecological interactions across space through pairwise integration of latent network patterns
Kesem Abramov, Geut Galai, … Shai Pilosof·Methods in Ecology and EvolutionPeer-reviewed·Jul 4, 2026
- Machines learn ecological networks: automated discovery of ecological networks based on empirical data
H. Ko, A. A. Kim, H. H. Zhang·bioRxiv·Mar 4, 2023
- Finding missing links in interaction networks
J. C. Terry, O. Lewis·bioRxiv·Nov 18, 2019
- ILSM: A package for analyzing the interconnection structure of tripartite interaction networks
Weicheng Sun, Yangyang Zhao, Chuan Yan·EcographyPeer-reviewed·Oct 10, 2025
- Analyzing ecological networks of species interactions
- Inference of ecological networks and possibilistic dynamics based on Boolean networks from observations and prior knowledge
Loïc Paulevé, Cédric Gaucherel·Methods in Ecology and EvolutionPeer-reviewed·Jul 3, 2025