Summary
RSNet is an open-source R package that provides a resampling-based framework for robust and interpretable network inference, designed to address the limited-sample-size challenges common in high-dimensional (e.g., ‘omics’) data. It supports both the estimation of partial correlation networks modeled as Gaussian networks1 and conditional Gaussian Bayesian networks for mixed data types that combine continuous and discrete variables2. The framework incorporates multiple resampling strategies, including bootstrap, subsampling, and cluster-based approaches, to accommodate both independent and correlated (e.g., family-based) observations. To enhance interpretability, RSNet integrates graphlet-based topology analysis that captures higher-order connectivity and edge sign information, enabling single-node and subnetwork-level insights. Notably, RSNet is the first R package to efficiently construct signed graphlet degree vector matrices (GDVMs) in near-constant time for sparse networks, providing scalable analysis of higher-order network structure. Collectively, RSNet offers a versatile tool for statistically reliable and interpretable network inference in high-dimensional data.
Statement of need
Network inference methods are widely used to model dependencies among variables in high-dimensional data, supporting discovery and hypothesis generation in diverse research domains3–6. Commonly applied approaches such as correlation or co-expression networks7–9 are straightforward to implement but cannot distinguish direct from indirect dependencies3. In contrast, Gaussian networks, also known as partial correlation neworks,3–5 and conditional Gaussian Bayesian networks (CGBNs)10,11 estimate conditional dependencies, offering a higher-resolution representation of complex systems. However, the reliability of inferred network structures is often compromised by the limited sample sizes in high-dimensional data, a challenge commonly referred to as the “small n, large p” problem, where n denotes the number of samples and p the number of variables3,5,6,12.
RSNet addresses this limitation by introducing a resampling-based framework that quantifies edge-level uncertainty and integrates information across multiple inferred networks to construct a robust consensus network. The framework supports both Gaussian networks for continuous data and CGBNs for mixed data types and can accommodate correlated or family-based observations13. This design provides empirical confidence intervals, adjusted p-values, and edge-selection frequencies, offering a fine-grained assessment of network reliability and structure6,14,15.
In addition to improving reliability, RSNet enhances interpretability through graphlet-based topology analysis, which captures higher-order local connectivity patterns and incorporates edge sign information16–18. These functionalities enable detailed examination of node-level structural roles and facilitate comparative analyses between networks inferred under different conditions19–21. Existing R packages for network inference do not support the construction of signed graphlet degree vector matrices (GDVMs), where brute-force enumeration has complexity greater than O(p3), with p denoting the network size. RSNet overcomes this barrier by combining state-of-the-art graphlet counting algorithms22–24 with parallelization, establishing an efficient method to construct signed GDVMs in O (| d |), where | d | is the average degree, resulting in near-constant time complexity for sparse networks.
State of the field
RSNet provides a unified, resampling-based framework for network inference and analysis that supports both independent and correlated datasets. While packages with similar functionalities exist, they typically either focus on specific components of the workflow or do not support resampling-based strategies. These limitations can compromise the reliability of inferred network structures in high-dimensional settings with limited sample sizes and noisy data, as well as the interpretability of downstream analyses. In addition, the lack of support for cluster-based resampling approaches can lead to underestimation of variability, hence a false positive inflation, when analyzing correlated or family-based data13.
For Gaussian network structure inference, packages such as glasso5 and huge25 provide efficient estimation of precision matrices and corresponding network structures, but do not offer statistical inference (e.g., adjusted p-values and/or confidence intervals) for individual edges. Methods implemented in SILGGM14 extend this framework by providing edge-level inference through asymptotic normality approximations, enabling the estimation of adjusted p-values and confidence intervals. However, these approaches rely on single-network estimation and do not incorporate resampling-based strategies to assess stability. BDgraph26 uses Bayesian approaches to estimate network structures by sampling from the posterior distribution and to provide edge inclusion probabilities. While these quantify uncertainty in a Bayesian sense, they are not directly comparable to frequentist measures and primarily emphasize network structure rather than edge-level statistical significance.
For conditional Gaussian Bayesian networks, RHugin12implements efficient structure learning (e.g., PC algorithm) for mixed data types. However, it does not support resampling-based strategies and does not provide measures of stability such as edge selection frequencies or frequencies of higher-order dependencies (e.g., Markov blankets27).
For downstream network analysis, igraph28 provides a comprehensive suite of tools, including centrality analysis and community detection. However, it does not support graphlet-based analysis or the construction of GDVMs. ORCA24 provides one of the most efficient implementations for GDVM construction but is limited to unsigned networks and does not support signed graphlet analysis.
RSNet addresses these limitations by integrating existing methods within a resampling and parallelized framework, providing edge-level empirical confidence intervals, adjusted p-values, and edge-selection frequencies. This approach offers a fine-grained assessment of network reliability while maintaining computational efficiency. In addition, RSNet offers a suite of tools for downstream analysis, unifying network inference and structural interpretation within a single workflow implemented in an open-source R package.
Software design
RSNet is designed as a modular, resampling-based framework that enables flexible, end-to-end workflows from network inference to higher-order structural analysis. For Gaussian networks, these estimates include empirical confidence intervals and nominal or adjusted p-values; for conditional Gaussian Bayesian networks, they correspond to edge-selection frequencies. The resulting consensus network forms the basis for downstream analyses such as centrality analysis, community detection, graphlet-based topology analysis, and differential connectivity analysis (Figure 1).
Figure 1: Overview of RSNet.
RSNet accepts a sample-by-feature dataset and allows users to specify whether observations are independent or correlated. The resampling framework generates an ensemble of weighted or binary adjacency matrices over m iterations, which are subsequently integrated into a consensus network that serves as the basis for downstream analyses.
A central design choice is the use of resampling-based strategies instead of single-network estimation. This approach explicitly quantifies edge-level uncertainty and improves robustness in high-dimensional, limited-sample-size settings. RSNet implements multiple resampling strategies. For both Gaussian networks and conditional Gaussian Bayesian networks (CGBNs), users can choose among four general approaches: (1) unstratified bootstrap, (2) unstratified subsampling, (3) stratified bootstrap, and (4) stratified subsampling, depending on data characteristics and study design. In addition, RSNet supports cluster-based resampling methods for correlated or family-based datasets in Gaussian networks, including (1) cluster bootstrap, which samples entire clusters with replacement to preserve intra-cluster dependencies, and (2) fractional cluster bootstrap, which samples a subset of clusters with replacement. These procedures are implemented in the function “ensemble_ggm()”, which leverages inference algorithms from the SILGGM package14. For CGBNs, the function “ensemble_cgbn()” provides analogous resampling-based network inference using algorithms from the RHugin package12.
Parallelization is integrated as a core design principle across both network inference and higher-order topological analysis. In addition to accelerating the resampling-based inference pipeline, parallel computing is extended to the construction of GDVMs, enabling scalable analysis of graphlet-based representations that are otherwise computationally intensive. Beyond network inference, RSNet supports a range of downstream analyses on the consensus network, including graphlet-based topology analysis, differential connectivity analysis, centrality analysis, and community detection, providing a unified framework for both statistical inference and structural interpretation.
Research impact statement
RSNet has been applied to real-world biological datasets, including aging and longevity cohorts such as the New England Centenarian Study29,30, the Long Life Family Study31, and Integrative Longevity Omics31. In addition, RSNet has been applied to disease-related datasets, including late-onset Alzheimer’s disease (LOAD)32 and cancer cohorts from The Cancer Genome Atlas (TCGA)33. These applications demonstrate the utility of the framework for robust network inference and downstream topological analysis across diverse biological settings. RSNet is released as open-source software with documented functions and reproducible workflows to support transparent and reliable use.
Discussion
RSNet provides a versatile and scalable R package for resampling-based network inference, designed to address the challenges of limited sample size in high dimensional datasets. By integrating both Gaussian networks and conditional Gaussian Bayesian networks, RSNet supports structure learning for continuous and mixed data types within a unified framework.
The package enhances interpretability by integrating standard network analysis tools with graphlet-based methods for higher-order topological characterization. To the best of our knowledge, RSNet is the first R package to implement the construction of a signed GDVM in approximately constant time for sparse networks.
To conclude, RSNet facilitates reproducible, statistically robust, and interpretable network analysis. Its modular and parallelized design supports large-scale applications while maintaining transparency and flexibility, making it a user-friendly open-source resource for high-dimensional network inference and comparative structural analysis.
Funding
This work was supported in part by the National Institutes of Health, NIA cooperative agreements U19 AG023122-16 and UH3 AG064704, and NIDCR R01 R01DE031831. The findings and conclusions presented in this paper are those of the author(s) and do not necessarily reflect the views of the NIH.
Footnotes
AI usage disclosure
Generative AI tools were used to assist with minor aspects of manuscript preparation, including language editing and code formatting. All scientific content, methodological design, and implementation were developed by the author. Any AI-assisted outputs were carefully reviewed and validated to ensure accuracy and consistency with the intended methods and results.
Availability
The latest version of the RSNet package along with additional information on the installation process can be found on github.com/montilab/RSNet (DOI: 10.5281/zenodo.20122935).
Reference
- 1.Whittaker J. Graphical Models in Applied Multivariate Statistics. (Wiley, 1991). [Google Scholar]
- 2.Lauritzen S. L. & Jensen F. Stable local computation with conditional Gaussian distributions. Stat. Comput. 11, 191–203 (2001). [Google Scholar]
- 3.Federico A., Kern J., Varelas X. & Monti S. Structure learning for gene regulatory networks. PLoS Comput. Biol. 19, e1011118 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Fan J., Liao Y. & Liu H. An overview of the estimation of large covariance and precision matrices. Econom. J. 19, C1–C32 (2016). [Google Scholar]
- 5.Friedman J., Hastie T. & Tibshirani R. Sparse inverse covariance estimation with the graphical lasso. Biostatistics 9, 432–441 (2008). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Friedman N., Linial M., Nachman I. & Pe’er D. Using Bayesian Networks to Analyze Expression Data. [DOI] [PubMed] [Google Scholar]
- 7.Zhang B. & Horvath S. A General Framework for Weighted Gene Co-Expression Network Analysis. Stat. Appl. Genet. Mol. Biol. 4, (2005). [DOI] [PubMed] [Google Scholar]
- 8.Yang Y. et al. Gene co-expression network analysis reveals common system-level properties of prognostic genes across cancer types. Nat. Commun. 5, 3231 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Ruan J., Dean A. K. & Zhang W. A general co-expression network-based approach to gene expression analysis: comparison and applications. BMC Syst. Biol. 4, 8 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.McGeachie M. J., Chang H.-H. & Weiss S. T. CGBayesNets: Conditional Gaussian Bayesian Network Learning and Inference with Mixed Discrete and Continuous Data. PLOS Comput. Biol. 10, e1003676 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Bøttcher S. G. Learning Conditional Gaussian Networks. Learning conditional Gaussian networks (2005). [Google Scholar]
- 12.Kalisch M. Estimating High-Dimensional Directed Acyclic Graphs with the PC-Algorithm. [Google Scholar]
- 13.Song Z. et al. Learning Gaussian graphical models from correlated data. Front. Syst. Biol. 5, (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 14.Zhang R., Ren Z. & Chen W. SILGGM: An extensive R package for efficient statistical inference in large-scale gene networks. PLOS Comput. Biol. 14, e1006369 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Janková J. & van de Geer S. Honest confidence regions and optimality in highdimensional precision matrix estimation. Preprint at 10.48550/arXiv.1507.02061 (2016). [Google Scholar]
- 16.Milenković T. & Pržulj N. Uncovering Biological Network Function via Graphlet Degree Signatures. Cancer Inform. 6, CIN.S680 (2008). [PMC free article] [PubMed] [Google Scholar]
- 17.Das A., Aravind A. & Deo G. S. Signed Graphlets based Gene Expression Analysis. in 2019 IEEE International Conference on Bioinformatics and Biomedicine (BIBM) 2055–2062 (IEEE, San Diego, CA, USA, 2019). doi: 10.1109/BIBM47256.2019.8983224. [DOI] [Google Scholar]
- 18.Doria-Belenguer S., Youssef M. K., Böttcher R., Malod-Dognin N. & Pržulj N. Probabilistic graphlets capture biological function in probabilistic molecular networks. Bioinformatics 36, i804–i812 (2020). [DOI] [PubMed] [Google Scholar]
- 19.Tu J.-J. et al. Differential network analysis by simultaneously considering changes in gene interactions and gene expression. Bioinformatics 37, 4414–4423 (2021). [DOI] [PubMed] [Google Scholar]
- 20.Gill R., Datta S. & Datta S. A statistical framework for differential network analysis from microarray data. BMC Bioinformatics 11, 95 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Higgins I. A., Guo Y., Kundu S., Choi K. S. & Mayberg H. A Differential Degree Test for Comparing Brain Networks. Preprint at http://arxiv.org/abs/1809.11098 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Das A. EFFICIENT ENUMERATION OF SMALL GRAPHLETS AND ORBITS. [Google Scholar]
- 23.Das A., Aravind A. & Dale M. Algorithm and application for signed graphlets. in Proceedings of the 2019 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining 613–620 (ACM, Vancouver British Columbia Canada, 2019). doi: 10.1145/3341161.3343692. [DOI] [Google Scholar]
- 24.Hočevar T. & Demčar J. Computation of Graphlet Orbits for Nodes and Edges in Sparse Graphs. J. Stat. Softw. 71, (2016). [Google Scholar]
- 25.Zhao T. et al. The huge Package for High-dimensional Undirected Graph Estimation in R. [PMC free article] [PubMed] [Google Scholar]
- 26.Mohammadi R. & Wit E. C. An Introduction to the BDgraph for Bayesian Graphical Models. [Google Scholar]
- 27.Gao T. & Ji Q. Efficient Markov Blanket Discovery and Its Application. IEEE Trans. Cybern. 47, 1169–1179 (2017). [DOI] [PubMed] [Google Scholar]
- 28.Csardi G. & Nepusz T. The igraph software package for complex network research. [Google Scholar]
- 29.Sebastiani P. et al. Protein signatures of centenarians and their offspring suggest centenarians age slower than other humans. Aging Cell 20, e13290 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30.Monti S. et al. Metabolomic signatures of extreme old age: findings from the New England Centenarian Study. GeroScience https://doi.org/10.1007/s11357-026-02174-2 (2026) doi: 10.1007/s11357-026-02174-2. [DOI] [PubMed] [Google Scholar]
- 31.Li M. et al. Whole blood transcriptional signatures of age and survival identified in long life family and integrative longevity omics studies. GeroScience https://doi.org/10.1007/s11357-025-02090-x (2026) doi: 10.1007/s11357-025-02090-x. [DOI] [PubMed] [Google Scholar]
- 32.Zhang B. et al. Integrated Systems Approach Identifies Genetic Nodes and Networks in Late-Onset Alzheimer’s Disease. Cell 153, 707–720 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.The Cancer Genome Atlas Research Network et al. The Cancer Genome Atlas Pan-Cancer analysis project. Nat. Genet. 45, 1113–1120 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The latest version of the RSNet package along with additional information on the installation process can be found on github.com/montilab/RSNet (DOI: 10.5281/zenodo.20122935).

