bioRxiv Science⌕ Search

Biology subjects

Sosa, S.

Publications and source records attributed to Sosa, S..

4 recordsLinked to original sources

The Bayesian Inference library for Python R and Julia

O_LIBayesian modeling is a cornerstone of modern ecological and evolutionary research, offering the flexibility to account for hierarchical structures, imperfect detection, and spatial dependencies. However, as ecological datasets grow in scale and complexity--from high-resolution telemetry to phylogenomics--researchers increasingly face a "computational ceiling" where traditional CPUbound inference becomes prohibitively slow. C_LIO_LIThe current software landscape is fragmented. Researchers must often choose between high-level interfaces (e.g., brms in R) that are intuitive but sometimes rigid or slow for massive datasets, and low-level probabilistic programming languages (e.g., Stan, PyMC, JAX) that offer high performance but require specialized programming expertise. C_LIO_LIThis fragmentation is compounded by an "interoperability tax," where code developed in one language (e.g., R) cannot easily leverage the hardware-accelerated backends (GPUs/TPUs) typically found in Python-centric machine learning frameworks. C_LIO_LITo address these issues, we introduce BayesForge(BF), a cross-platform software ecosystem available in Python, R, and Julia. BF provides a unified, intuitive syntax that bridges the gap between ease-of-use and high-performance computation. By leveraging JAX-based backends (NumPyro and TensorFlow Probability), BF enables seamless hardware acceleration under-the-hood. C_LIO_LIWe demonstrate BFs utility through three ecological case studies: social network analysis (Social Relations Model), macroevolutionary uncertainty propagation across posterior tree sets, and latent-variable estimation for vocal repertoires. Benchmarks reveal that BF can achieve up to a 270-fold speedup over Stan implementations for large-scale networks, transforming weeks of computation into minutes and enabling more robust, uncertainty-aware ecological inference. C_LI

bioinformatics↗

Robust Bayesian analysis of animal networks subject to biases in sampling intensity and censoring

Data collection biases are a persistent issue for studies of social networks. This issue has been particularly important in Animal Social Network Analysis (ASNA), where data are unevenly sampled and such biases may potentially lead to incorrect inferences about animal social behavior. Here, we address the issue by developing a Bayesian generative model, which not only estimates network structure, but also explicitly accounts for sampling and censoring biases. Using a set of simulation experiments designed to reflect various sampling and observational biases encountered in real-world scenarios, we systematically validate our model and evaluate its performance relative to other common ASNA methodologies. By accounting for differences in node-level censoring (i.e., the probability of missing an individual interaction.), our model permits the recovery of true latent social connections, even under a wide range of conditions where some key individuals are intermittently unobserved. Our model outperformed all other existing approaches and accurately captured network structure, as well as individual-level and dyad-level effects. Antithetically, permutation-based and simple linear regression aprroaches performed the worst across many conditions. These results highlight the advantages of generative network models for ASNA, as they offer greater flexibility, robustness, and adaptability to real-world data complexities. Our findings underscore the importance of generative models that jointly estimate network structure and adjust for measurement biases typical in empirical studies of animal social behaviour.

animal behavior and cognition↗

Reliable hypotheses testing in animal social network analyses: global index, index of interactions and residual regression

Animal social network analyses (ASNA) have led to a foundational shift in our understanding of animal sociality that transcends the disciplinary boundaries of genetics, spatial movements, epidemiology, information transmission, evolution, species assemblages and conservation. However, some analytical protocols (i.e., permutation tests) used in ASNA have recently been called into question due to the unacceptable rates of false negatives (type I error) and false positives (type II error) they generate in statistical hypothesis testing. Here, we show that these rates are related to the way in which observation heterogeneity is accounted for in association indices. To solve this issue, we propose a method termed the "global index" (GI) that consists of computing the average of individual associations indices per unit of time. In addition, we developed an "index of interactions" (II) that allows the use of the GI approach for directed behaviours. Our simulations show that GI: 1) returns more reasonable rates of false negatives and positives, with or without observational biases in the collected data, 2) can be applied to both directed and undirected behaviours, 3) can be applied to focal sampling, scan sampling or "gambit of the group" data collection protocols, and 4) can be applied to first- and second-order social network measures. Finally, we provide a method to control for non-social biological confounding factors using linear regression residuals. By providing a reliable approach for a wide range of scenarios, we propose a novel methodology in ASNA with the aim of better understanding social interactions from a mechanistic, ecological and evolutionary perspective.

animal behavior and cognition↗

A multilevel statistical toolkit to study animal social networks: Animal Network Toolkit (ANT) R package

How animals interact and develop social relationships regarding, individual attributes, sociodemographic and ecological pressures is of great interest. New methodologies, in particular Social Network Analysis, allow us to elucidate these types of questions. However, the different methodologies developed to that end and the speed at which they emerge make their use difficult. Moreover, the lack of communication between the different software developed to provide an answer to the same/different research questions is a source of confusion. The R package Animal Network Toolkit (ANT) was developed with the aim of implementing in one package the many different social network analysis techniques currently used in the study of animal social networks. Hence, ANT is a toolkit for animal research allowing among other things to: 1) measure global, dyadic and nodal networks metrics; 2) perform data randomization: pre-network and network (node and link) permutations; 3) perform statistical permutation tests. The package is partially coded in C++ for an optimal coding speed, and it gives researchers a workflow from raw data to the achievement of statistical analyses, allowing for a multilevel approach: from individual position and role within the network, to the identification of interaction patterns, and the analysis of the overall network properties.

bioinformatics↗