Abstract
Important tasks in biomedical discovery such as predicting gene functions, gene–disease associations, and drug repurposing opportunities are often framed as network edge prediction. The number of edges connecting to a node, termed degree, can vary greatly across nodes in real biomedical networks, and the distribution of degrees varies between networks. If degree strongly influences edge prediction, then imbalance or bias in the distribution of degrees could lead to nonspecific or misleading predictions. We introduce a network permutation framework to quantify the effects of node degree on edge prediction. Our framework decomposes performance into the proportions attributable to degree and the network’s specific connections using network permutation to generate features that depend only on degree. We discover that performance attributable to factors other than degree is often only a small portion of overall performance. Researchers seeking to predict new or missing edges in biological networks should use our permutation approach to obtain a baseline for performance that may be nonspecific because of degree. We released our methods as an open-source Python package (https://github.com/hetio/xswap/).
Keywords: networks, heterogeneous, knowledge graphs, node degree, edge prediction, edge prior, permutation, XSwap, bioinformatics, Python
Introduction
Networks contain information about relationships between entities (referred to here as “edges” between “nodes”). A node’s degree is the number of edges it has in the network. Networks contain many nodes, whose degrees can be aggregated to form the network’s degree distribution. Because different nodes can have very different degrees, real networks have a variety of degree distributions (Fig. 1), and they commonly exhibit degree imbalance [1–4]. This is especially true for networks encoding biomedical knowledge or assays, where natural forces such as preferential attachment inherent to the problem domain combine with observation-based influences such as study methodology to create nonuniform degree distributions (Fig. 1).
Degree is an important metric for differentiating between nodes, and it appears in many common edge prediction features [6]. However, reliance on degree can pose problems for edge prediction. First, bias in networks can distort node degree so that a difference in degree between 2 nodes in a given network may not reflect a true difference in number of relationships. Second, edge prediction methods that rely heavily on degree may be nonspecific—predicting trivial rather than insightful new relationships.
Most biomedical networks are imperfect representations of the true set of relationships. Real networks often mistakenly include edges that do not exist and exclude edges that do exist. How well a network represents the true relationships it attempts to represent depends on a number of factors, especially the methods used to generate the data in the network [7–9]. We define “degree bias” as the type of misrepresentation that occurs when the fraction of incorrectly existent/nonexistent relationships depends on a node’s degree. Depending on the type of data being represented, degree biases can arise due to experimental methods, inspection bias, or other factors [7].
Inspection bias indicates that entities are not uniformly studied [10], and it is likely to cause degree bias when networks are constructed using hypothesis-driven findings extracted from the literature, as newly discovered relationships are not randomly sampled from the set of all true relationships. Though there is a high correlation between the number of publications mentioning a gene and its degree in low-throughput interaction networks, the number of publications mentioning a gene has little correlation with its degree in a systematically derived protein interaction network [11]. This suggests that many poorly connected genes in nonsystematic protein interaction networks are due to inspection bias (i.e., a lack of study) rather than a lack of biological function. For networks with a large inspection bias, reliance on degree can lead to predictions that have good metrics when assessed by cross-validation but little ability to generalize.
Another reason why a reliance on degree can be unfavorable is that degree imbalance can lead to prediction nonspecificity. Nonspecific predictions are not made on the basis of the specific connectivity information contained in a network. For example, Gillis and Pavlidis [12] examined the concept of prediction specificity in the context of gene function prediction and found that many predictions appear to rely primarily on multifunctionality and could be “potentially misleading with respect to causality.” Degree imbalance leads high-degree nodes to dominate in the predictions made by degree-associated methods [13], which are effective predictors of connections in some biological networks [14]. Consequently, degree-based predictions are more likely nonspecific, meaning the same set of predictions performs well for different tasks.
Depending on the prediction task, edge predictions involving very high-degree nodes may be undesired, uninsightful, or nonspecific. While predictions based primarily on degree may be acceptable for some tasks, generating less obvious insights from networks requires drawing inferences from the specific connections and network structure between nodes. Model evaluation is challenging in this context: nonspecific or trivial predictions can dominate performance evaluations and may actually be correct, even if they are not the desired outputs of the predictive model. For example, predicting that the highest degree node in a network shares edges with the remaining nodes to which it is not connected will often lead to many correct predictions, despite this prediction being generic to all other nodes in the network.
Degree is important in edge prediction, but it can cause undesired effects. Degree-based features should often be included in the interpretation of predictions to disentangle desired from undesired effects and to effectively evaluate and compare predictive models. We sought to directly measure the effect of node degree on edge prediction methods. To do so, we developed a network permutation approach that allows any edge prediction method to be compared to an empirical baseline distribution. This method allows edge predictions to be evaluated in the context of degree and its effects on the prediction task. Our results demonstrate that degree-associated methods are very effective for reconstructing a network using a subsampled holdout. However, these methods are ineffective for predicting edges between networks measuring the same biological processes in targeted and systematic ways because such networks have distinct degree distributions. Using multiple different networks, we provide evidence that degree has a strong effect on the probability of edge existence and that our permutation-based edge prior best quantifies this probability.
Methods
Network permutation
Network permutation is a way to produce new networks by randomizing the connections of an existing network. Specialized permutation strategies can be devised that randomize some aspects of networks while retaining other features. Comparing between permuted and unpermuted networks gives insight to the effects of the retained network features. For example, an edge prediction method that has superior reconstruction performance on a network compared to its permutations likely relies on information that is eliminated by permutation. Conversely, identical predictive performance on true and permuted networks indicates that a method relies on information that is preserved during permutation.
Network permutation is a flexible framework for analyzing other methods, because it generates complete networks that can be analyzed independently. We use network permutation to isolate degree and determine its effects in different contexts. Degree-preserving network permutation obscures true connections and higher-order connectivity information (e.g., community structure), while retaining node degree and, thereby, the network’s degree sequence. Thanks to the flexibility of permutation, our framework can quantify the effect of degree on any network edge prediction method.
Several degree-preserving network permutation strategies have been developed, including XSwap [15], FANMOD (Fast Network Motif Detection) [16], CoMoFinder (Co-regulatory Motif Finder) [17], DIA-MCIS (Diaconis Monte Carlo Importance Sampling) [18], and WaRSwap (Weighted and Reverse Swap Sampling) [19]. IndeCut proposed a method to characterize these strategies by their ability to uniformly sample from the solution space of all possible degree-preserving permutations [20].
XSwap algorithm
Hanhijärvi et al. [15] presented XSwap, an algorithm for the randomization (“permutation”) of unweighted networks (Fig. 2A). The algorithm picks 2 existing edges at random ({ab, cd}) and—if the edges constitute a valid swap—exchanges the targets between the edges ({ad, cb}; Supplementary Table S1). This process is repeated a user-specified number of times. In general, the number of exchanges should be chosen to be sufficiently large that the fraction of original edges retained in the permuted network is near its asymptotic value as the number of exchanges increases to infinity. The asymptotic fraction of original edges retained in permutation depends on network density, and higher-density networks require more swap attempts per edge to reach their asymptotic fraction (Supplementary Figure S1).
We modified the original XSwap algorithm by adding 2 parameters, allow_loops (a-a) and allow_antiparallel (a-b and b-a), that allow a greater variety of network types to be permuted (Fig. 2B and Supplementary Table S1). The motivation for these generalizations is to make the permutation method applicable to both directed and undirected graphs, as well as to networks with different types of nodes, variously called multipartite, heterogeneous, or multimodal networks. Specifically, in the modified algorithm, 2 chosen edges constitute a valid swap if they preserve degree for all 4 involved nodes and do not violate the user-specified parameters.
When permuting bipartite networks, our method ensures that each node’s class membership and within-class degree is preserved. Similarly, heterogeneous networks should be permuted by considering each edge type as a separate network [21, 22]. This way, each node retains its within-edge-type degree for all edge types. We provide documentation for parameter choices depending on the type of network being permuted in the GitHub repository (https://github.com/hetio/xswap). The original algorithm and our proposed modification are given in Figs. 2 and 3.
Edge prior
We introduce the edge prior to quantify the probability that 2 nodes are connected based only on their degree. The edge prior can be estimated using the fraction of permuted networks in which a given edge exists. In short, for a given node pair (a, b), given N permutations of the network, and given that m of these permutations contain (a, b), the prior for (a, b) is , which is also the maximum likelihood estimate for the binomial distribution success probability. Based only on permuted networks, the edge prior does not contain any information about the true edges in the (unpermuted) network. The edge prior is a numerical value that can be computed for every pair of nodes that could potentially share an edge; we compared its ability to predict edges in 3 tasks, discussed in prediction tasks.
Analytical approximation of the edge prior
Because network permutation can be computationally intensive, we also considered whether the probability of an edge existing across permuted networks has a simple closed-form expression. We were unable to find a closed-form solution giving the edge prior without assuming that the probability of any given edge existing is independent of all other potential edges, which, in general, is not valid. Nonetheless, we discovered a good analytical approximation to the edge prior, offering much improvement over a past attempt [23]. The new approximation is particularly good for networks with many nodes and fewer edges (Fig. 4). Further discussion of this approximate edge prior and its derivation is available in the supplement.
Let m be the total number of edges in the network and , be the source and target degrees of a node pair, respectively. Our approximation of the edge prior is
Prediction tasks
We performed 3 prediction tasks to assess the performance of the edge prior. We compared the permutation-based prior with 2 additional predictors: our analytical approximation of the edge prior and the product of source and target degree, scaled to the range [0, 1] so that we could assess its calibration as well as its discrimination. We used 20 biomedical networks from the Hetionet heterogeneous network [5] that had at least 2,000 edges for the first 2 tasks (Supplementary Table S1).
In the first task, we computed the degree-based predictors (edge prior, scaled degree product, and analytical prior approximation) and predicted the original edges in the network by rank-ordering node pair edge predictions by the node pairs’ predictor values. We used node pairs that lacked an edge in the original network as negative examples and those with an edge as positive examples. To assess the methods’ predictive performances, we computed the area under the receiver operating characteristic (AUROC) curve for all 3 predictors.
In the second task, we sampled 70% of edges from each of the networks, computed predictors on the sampled network, and then predicted held-out edges. For this task, negative examples were node pairs in which an edge did not exist in either original or sampled network, while positive samples were those node pairs without an edge in the sampled network but with an edge in the original network.
The third task evaluated the ability of the edge prior to generalize to new degree distributions. We used 2 domains where networks were available, which shared nodes but had different degree distributions. Protein–protein interactions (PPIs) and transcription factor–target gene (TF-TG) relationships had networks created both by literature curation of low-throughput, hypothesis-driven research and by high-throughput, systematic, hypothesis-free experimentation. For the PPI networks, we used the STRING network, which incorporates literature-mining to find relationships [24] and a combination of the high-throughput, proteome-scale interaction networks from Rual et al. [10] and Rolland et al. [11]. We used a TF-TG literature-derived network from Han et al. [25] and a high-throughput network from Lachmann et al. [26]. The pairs of networks for PPI and TF-TG data sources are ideal because in one, we expect inspection bias, and in the other, we do not.
As a further basis of comparison, we added a time-resolved coauthorship network, which we partitioned by time to create 2 separate networks. We created the coauthorship network of bioRxiv bioinformatics preprints using the Rxivist [27, 28] database, which was generated by crawling the bioRxiv server. Unlike the other 2 networks, coauthorship does not have degree bias, as the network faithfully represents all true coauthor relationships. We include this network to offer a comparative prediction task in which the degree distributions between training (posted before 2018) and testing (posted during or after 2018) are not dramatically different (Fig. 5A). The goal of the third prediction task is to determine predictor generalizability for network reconstruction between different degree distributions, especially predicting a network without degree bias using predictors from a degree-biased network. Further information about the networks used can be found in the supplement.
Degree grouping
Our method for degree-preserving permutation produces randomized networks that share few of their edges with the original network. As permutation preserves only node degree, node pairs with equal degree are equivalent in permutations. For a given node pair, degree grouping treats other node pairs with the same degrees as additional permutations [29]. We used this strategy to augment the number of predictor values for each node pair in permuted networks, allowing node pairs to have more permuted predictor values than permuted networks. Degree grouping greatly increased the effective number of permutations for nodes with frequently observed degrees. We used degree grouping throughout our analyses.
Implementation and source code
We implemented our modified version of the XSwap algorithm as an open-source Python package. The package contains modules for permuting networks, computing the edge prior, and converting networks between adjacency matrix and edge list formats. Additionally, we include the analytical approximation of the edge prior and functionality to assign unique identifiers to nodes. The Python package is available on the Python Packaging Index under the name “xswap.” The full source code is freely available under the BSD 2-Clause License (https://github.com/hetio/xswap).
The edge swap mechanism—implemented in C++ for greater speed—uses a bitset to avoid producing edges that violate the conditions for a valid swap. While the full bitset implementation is faster for smaller networks, our package uses a compressed bitset [30] when a network would occupy memory above a user-adjustable threshold. In addition to the validity conditions already described, our package allows specific edges to be excluded from permutation, and every network permutation returns both a permuted network and summary information about the numbers of swaps attempted, performed, and the reasons why invalid swaps were rejected.
In addition to the Python package, all code to generate the analyses and figures is available at https://github.com/greenelab/xswap-analysis. This repository has been deposited to Zenodo along with large data files ignored by Git [31]. The article was written using the Manubot software [32], which allows anyone to provide feedback or modifications via the public repository at https://github.com/greenelab/xswap-manuscript. An archival copy of project repositories is available in GigaDB [33].
Findings
Node degree bias is prevalent
We found examples of node degree bias in the PPI and TF-TG networks we investigated. Figure 5 shows node degree in separate networks for the same type of data. For the PPI networks, the literature-derived network has a larger mean degree and a longer tail than the systematic network, while in the TF-TG networks, this relationship is reversed. Because the TF-TG network contained far more transcription factors than target genes (144 and 1,406, respectively), the distributions of target degrees were far more compact than those of source degrees. Unlike the PPI and TF-TG networks, the coauthorship networks were split by date of first coauthorship and did not exhibit a great difference in their degree distributions. All 3 types of networks (PPI, TF-TG, and coauthorship) exhibit degree imbalance to varying extents. These results indicate that, depending on the methods by which the represented data were generated, networks of the same type of data may have overall degree distributions that differ greatly (Fig. 5A), and they may even assign very different degree to the same nodes (Fig. 5B).
The edge prior encapsulates degree
We evaluated degree as an edge prediction feature using the edge prior. In the first prediction task, we computed 3 predictors—the XSwap edge prior, an analytical approximation to the edge prior, and the (scaled) product of source and target node degree—on networks from Hetionet. We then evaluated the extent to which these predictors—treated as predictions themselves—could reconstruct the 20 networks (Supplementary Table S1). The XSwap-derived edge prior reconstructed many of the networks with a high level of performance, as measured by the AUROC. Of the 20 individual networks we extracted from Hetionet, 17 had an edge prior self-reconstruction AUROC ≥0.95, with the highest reconstruction AUROC at 0.9971 (network was the Compound–downregulates–Gene edge type). Meanwhile, the lowest self-reconstruction performance (AUROC = 0.7697) occurred in the network having the fewest node pairs (network was the Disease–localizes–Anatomy edge type).
The 3 predictors that we compared were highly correlated (Spearman rank correlation over 0.984 for all 20 networks). The 3 predictors also had very similar AUROC reconstruction performance values for the first, second, and third prediction tasks (max difference <0.027) because AUROC is rank based. The edge prior was slightly better than the approximations in 12 of 20 networks. However, while the AUROC results were similar, the predictors were very different in their levels of calibration—the ability of the model to correctly estimate edge existence probabilities. The edge prior was very well calibrated for all networks in the first and second tasks, and it provided the best calibration of the 3 predictors for each of the prediction tasks (Fig. 6A). As the edge prior was not based on the networks’ true edges, these results indicated that degree sequence alone was highly informative and that permutation was the only approach in our comparison that provided a well-calibrated model.
The second prediction task mirrored the first task, but it involved reconstructing networks based on subsampled networks with only 70% of the original edges. Because edges were sampled uniformly without replacement, the subsampled networks share similar degree distributions to the original networks (see Fig. 5B). Unlike in the first task, edges that were present in the sampled network were not tested and therefore are not included in the performance metrics. The results of the second prediction task further demonstrate a high level of performance for degree sequence–based node pair predictors (Fig. 7). The edge prior was able to reconstruct the unsampled network with an AUROC of greater than 0.9 in 14 of 20 networks. As was observed in the first task, node pair predictors computed in the second task were highly rank-correlated, meaning the AUROC values for different predictors were similar. While performance was slightly lower in the second task than the first, many networks were still well reconstructed. The edge prior was the best calibrated predictor for both tasks.
In the third prediction task, we computed the 3 edge predictors for paired networks representing data from PPI, TF-TG, and bioRxiv bioinformatics preprint coauthorship. The goal of the task was to compare predictive performance across different degree distributions for the same type of data. We find that the task of predicting systematically derived edges using a network with degree bias is significantly more challenging than network reconstruction, and we find consistently lower performance compared to the other tasks (Fig. 7). The edge prior was not able to predict the separate PPI network better than by random guessing (AUROC of roughly 0.5). Only slightly better was its performance in predicting the separate TF-TG network, at an AUROC of 0.59. We find superior performance in predicting the coauthorship relationships (AUROC 0.75), which was expected as the network being predicted shared roughly the same degree distribution as the network on which the edge prior was computed. The results of the third prediction task show that a difference in degree distribution between the network on which predictors are computed and the network to be predicted can make prediction significantly more challenging.
The edge prior can be considered a baseline edge predictor that accurately captures degree’s contribution to the probability of an edge existing. The edge prior’s low performance in the third task indicates that degree is less helpful for edge prediction tasks in which training and testing networks do not share their degree distributions. Many biomedical prediction tasks can be framed as edge prediction tasks between different degree distributions. In drug repurposing, for example, existing compound–disease treatment relationships are unlikely to be randomly sampled from all true treatment relationships. However, all treatment relationships between existing compounds and diseases are desirable outputs in prediction. Edge predictions can be based on both underlying biological properties and network degree distributions. However, predictions based on biological properties may be more consistent and generalizable than those based on degree. Degree’s influence on edge prediction accuracy measures can reveal the relative contributions of these 2 factors.
Degree can underlie a large fraction of performance
We evaluated the extent to which edge prediction performance is due to degree. To begin, we chose the STRING PPI network for the comparison and computed 5 edge prediction features (Supplementary Table S2). The goal of the task was to reconstruct the network on which the features were computed. All 5 features were correlated with degree (Fig. 8), which we quantified for a node pair using the product of source and target degrees. We expected features based on degree to show strong performance for a network reconstruction task without holdout, as found in the first prediction task.
We used 2 permutation-derived null values to evaluate reconstruction and contextualize performance. First, the performance of the edge prior was compared to determine the performance attributable to the degree sequence of the PPI network. The first comparison gave insight into the ability of the PPI network to be reconstructed by degree. Second, the 5 edge prediction features were computed on 100 permuted networks and used to reconstruct the unpermuted network. Each permuted network corresponded to AUROC values quantifying the performances of features computed on it. The second comparison gave insight into the performance of each feature if the feature was only capturing degree.
The edge prior encapsulates nonspecific predictions due to degree, and it reconstructed the PPI network with an AUROC of 0.797 (dotted red line in Fig. 9). In the second comparison, edge prediction features computed on permuted networks had performance equal to or lower than their performances on the unpermuted networks. This indicated that 4 out of 5 edge prediction features discern more than node degree for the prediction task. The preferential attachment index is the product of source and target degree, and its performance did not differ from the edge prior or the feature’s performance when computed on permuted networks.
This comparison quantified the performance of degree toward the prediction task and assessed degree’s effect on 5 edge prediction features. The edge prior provided the baseline level of performance attributable to degree alone. Comparing the performances on permuted networks to the performance of the edge prior reveals the extent to which a feature measures degree. Features whose performances on permuted networks were below that of the edge prior only imperfectly measured degree (e.g., Jaccard index), whereas features whose performances equaled the edge prior completely captured degree (e.g., preferential attachment index). Features can also capture information beyond degree, and our method can quantify this performance. For example, the superior performance on unpermuted networks relative to permuted networks indicated that RWR, resource allocation, Jaccard, and Adamic/Adar indices captured more than degree in this prediction task. These results aligned with the definitions of each feature and validated that our permutation framework accurately assessed reliance on degree.
Discussion
We focus on edge prediction in biomedical networks. Our overall goal is to predict new edges with specificity, so that predictions reflect particular connectivity rather than generic node characteristics. Our permutation framework measures the predictive performance attributable to degree to provide a baseline expectation for edge pairs. We expect that nonspecificity due to degree is not a unique property of biomedical networks. For example, if node A connects to nearly all other nodes in a network, predicting that all remaining nodes share an edge with node A will likely result in many correct—though nonspecific—predictions, regardless of the type of data contained in the network. Node degree should be accounted for to make correct predictions while being able to distinguish specific from nonspecific predictions. Prediction without reliance on node degree is challenging because many effective methods for edge prediction are correlated with degree (Fig. 8).
The effects of node degree are obvious when edge prediction features are functions of degree. For example, the resource allocation index is the sum of the inverse degree of common neighbors between source and target nodes (in the symmetric case), while preferential attachment is the product of source and target degree [34, 35]. However, because many other edge prediction methods are not explicitly degree based, it is important to have a general method for comparing the effects of node degree on edge prediction methods.
We developed a permutation framework to quantify the edge probability due to degree. We term this probability the “edge prior,” and we have identified 2 applications. First, a probability associated with every node pair can be treated as a classification score. Ordering these scores provides an assessment of performance based solely on degree, which can be used as a baseline for other classifiers. Second, node pair probabilities can be used to adjust edge prediction features depending on the task. If degree is a desired feature, then the edge prior can be treated like a Bayesian prior probability. Alternatively, if degree is not a desired feature, then the edge prior can be used to calibrate features and thus potentially enhance predictive specificity.
Fig. 9 illustrates the utility of the edge prior and permutation framework for 2 purposes. First, it contextualizes feature performances relative to the baseline of nonspecific, degree-based predictions, quantified by the edge prior. Degree has varying utility for different edge prediction tasks. The edge prior’s performance on a task quantifies the utility of degree toward the task. This comparison is useful because specific predictions (based on more than degree alone) are more valuable for some applications than nonspecific ones and because degree can be an expression of bias in many real-world networks.
Second, Fig. 9 compares 5 edge prediction features computed on and unpermuted networks. This comparison identified the fraction of each feature’s performance attributable to degree. Some features, such as the preferential attachment index, perfectly and exclusively measure degree. The Adamic/Adar index also almost completely captures degree because its performances from permuted networks are nearly at the performance of the edge prior. However, the Adamic/Adar index had much higher performance when computed on the unpermuted network, indicating that it also extracts higher-order information. This analysis, enabled by network permutation, measured the extent to which features rely on degree for a specific prediction task by assessing performance beyond the degree-based, nonspecific baseline.
Conclusion
We developed a network permutation framework and open-source software implementation that quantifies the probability of edge existence due to degree and can assess the fraction of feature performance attributable to degree. We demonstrated the superiority of the edge prior over other degree-based features for quantifying the effect of degree on the probability of edge existence. The XSwap methods and software provide a context for evaluating edge prediction methods and specific predictions for reliance on degree and, therefore, nonspecificity. Network edge prediction is a common task in biological and biomedical research, and it can be greatly influenced by degree. Degree should be considered directly in prediction approaches to avoid making nonspecific or trivial predictions due to degree imbalance or bias. A careful accounting of degree’s effects enables contextualized model evaluation and can help to quantify nonspecificity in biomedical network edge prediction.
Availability of Supporting Source Code and Requirements
Project name: XSwap
Project homepage: https://github.com/greenelab/xswap-manuscript
Operating system(s): MacOS, Linux, Windows
Programming language: Python, C, C++
Other requirements: None
License: BSD 2-Clause
biotools ID: xswap
Supplementary Material
Acknowledgement
The authors thank Blair Sullivan for her feedback on a draft of the manuscript.
Contributor Information
Michael Zietz, Department of Systems Pharmacology and Translational Therapeutics, University of Pennsylvania, Philadelphia, PA 19104, USA; Department of Physics & Astronomy, University of Pennsylvania, Philadelphia, PA 19104, USA; Department of Biomedical Informatics, Columbia University, New York, NY 10032, USA.
Daniel S Himmelstein, Department of Systems Pharmacology and Translational Therapeutics, University of Pennsylvania, Philadelphia, PA 19104, USA; Related Sciences, Denver, CO 80202, USA.
Kyle Kloster, Carbon, Inc., Redwood City, CA 94063, USA; Department of Computer Science, North Carolina State University, Raleigh, NC 27606, USA.
Christopher Williams, Department of Systems Pharmacology and Translational Therapeutics, University of Pennsylvania, Philadelphia, PA 19104, USA.
Michael W Nagle, Internal Medicine Research Unit, Pfizer Worldwide Research, Development, and Medical, Cambridge, MA 02139, USA; Integrative Biology, Internal Medicine Research Unit, Worldwide Research, Development, and Medicine, Pfizer Inc., Cambridge, MA 02139, USA; Human Biology Integration Foundation, Deep Human Biology Learning, Eisai Inc., Cambridge, MA 02140, USA.
Casey S Greene, Department of Systems Pharmacology and Translational Therapeutics, University of Pennsylvania, Philadelphia, PA 19104, USA; Department of Biochemistry and Molecular Genetics, University of Colorado School of Medicine, Aurora, CO 80045, USA; Center for Health AI, University of Colorado School of Medicine, Aurora, CO 80045, USA.
Additional Files
Supplementary Fig. S1. Higher density networks have lower asymptotic fractions of edges swapped and take more attempts to reach these values. The Barabási–Albert model produces scale-free random graphs, while Erdős–Rényi generates random graphs where all edges are equally likely.
Supplementary Table S1. Applications of the modified XSwap algorithm to various network types with appropriate parameter choices. For simple networks, each node’s degree is preserved. For bipartite networks, each node’s number of connections to the other part is preserved, and the partite sets (node class memberships) are preserved. For directed networks, each nodes’ in- and out-degrees are preserved, though parameter choices depend on the network being permuted. Some directed networks can include antiparallel edges or loops while others do not.
Supplementary Table S2. Edge prediction features.
Data Availability
An archival copy of project repositories is available in the GigaScience database, GigaDB [33].
Abbreviations
AUROC: area under the receiver operating characteristic curve; PPI: protein–protein interaction; RWR: random walk with restart; TF-TG: transcription factor–target gene.
Competing Interests
This work was supported, in part, by Pfizer Worldwide Research, Development, and Medical.
Funding
M.Z. was funded by the Roy and Diana Vagelos Scholars Program in the Molecular Life Sciences. M.Z., D.S.H., and C.S.G. were funded by the Gordon and Betty Moore Foundation (GBMF4552). D.S.H. and C.S.G. were funded by Pfizer Worldwide Research, Development, and Medical. K.A.K. was funded by the Gordon and Betty Moore Foundation (GBMF4560). C.S.G. was funded by the National Institutes of Health (R01 HG010067). The funders had no role in the study design, data analysis and interpretation, or writing of the manuscript.
Authors’ Contributions
Author contributions are noted here according to CRediT (Contributor Roles Taxonomy). Conceptualization by M.Z., D.S.H., K.A.K., and C.S.G. Data curation by M.Z. and D.S.H. Formal analysis by M.Z. and D.S.H. Investigation by M.Z., D.S.H., M.W.N., and C.S.G. Methodology by M.Z., D.S.H., K.A.K., C.W., and C.S.G. Project administration by M.Z., D.S.H., and C.S.G. Software by M.Z., D.S.H., and C.W. Visualization by M.Z. and D.S.H. Writing—original draft by M.Z. Writing—review & editing by M.Z., D.S.H., and C.S.G. Resources by D.S.H., M.W.N., and C.S.G. Supervision by D.S.H. and C.S.G. Funding acquisition by C.S.G.
References
- 1. Williams RJ. Biology, methodology or chance? The degree distributions of bipartite ecological networks. PLoS One. 2011;6:e17645. 10.1371/journal.pone.0017645. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2. Kelly WP, Ingram PJ, Stumpf MPH. The degree distribution of networks: statistical model selection. Bacterial Mol Netw. 2011;804:245–62. 10.1007/978-1-61779-361-5_13. [DOI] [PubMed] [Google Scholar]
- 3. Broido AD, Clauset A. Scale-free networks are rare. Nat Commun. 2019;10:1017. 10.1038/s41467-019-08746-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4. Barabási A-L, Albert R. Emergence of scaling in random networks. Science. 1999;286:509–12. 10.1126/science.286.5439.509. [DOI] [PubMed] [Google Scholar]
- 5. Himmelstein DS, Lizee A, Hessler C, et al. . Systematic integration of biomedical knowledge prioritizes drugs for repurposing. eLife. 2017;6:e26726. 10.7554/elife.26726. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6. Gao F, Musial K, Cooper C, et al. . Link prediction methods and their accuracy for different social networks and network metrics. Sci Program. 2015;2015:1–13. 10.1155/2015/172879. [DOI] [Google Scholar]
- 7. Gillis J, Ballouz S, Pavlidis P. Bias tradeoffs in the creation and analysis of protein–protein interaction networks. J Proteomics. 2014;100:44–54. 10.1016/j.jprot.2014.01.020. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8. Schaefer MH, Serrano L, Andrade-Navarro MA. Correcting for the study bias associated with protein–protein interaction measurements reveals differences between protein degree distributions from different cancer types. Front Genet. 2015;6:260. 10.3389/fgene.2015.00260. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9. Han J-DJ, Dupuy D, Bertin N, et al. . Effect of sampling on topology predictions of protein-protein interaction networks. Nat Biotechnol. 2005;23:839–44. 10.1038/nbt1116. [DOI] [PubMed] [Google Scholar]
- 10. Rual J-F, Venkatesan K, Hao T, et al. . Towards a proteome-scale map of the human protein–protein interaction network. Nature. 2005;437:1173–8. 10.1038/nature04209. [DOI] [PubMed] [Google Scholar]
- 11. Rolland T, Taşan M, Charloteaux B, et al. . A proteome-scale map of the human interactome network. Cell. 2014;159:1212–26. 10.1016/j.cell.2014.10.050. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12. Gillis J, Pavlidis P. The impact of multifunctional genes on “guilt by association” analysis. PLoS One. 2011;6:e17258. 10.1371/journal.pone.0017258. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13. Petri T, Altmann S, Geistlinger L, et al. . Addressing false discoveries in network inference. Bioinformatics. 2015;31:2836–43. 10.1093/bioinformatics/btv215. [DOI] [PubMed] [Google Scholar]
- 14. Ivanic J, Wallqvist A, Reifman J. Evidence of probabilistic behaviour in protein interaction networks. BMC Syst Biol. 2008;2:11. 10.1186/1752-0509-2-11. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15. Hanhijärvi S, Garriga GC, Puolamäki K. Randomization techniques for graphs. In: Proceedings of the 2009 SIAM International Conference on Data Mining. Philadelphia: Society for Industrial and Applied Mathematics, 2009, 780–91. 10.1137/1.9781611972795.67. [DOI] [Google Scholar]
- 16. Wernicke S, Rasche F. FANMOD: a tool for fast network motif detection. Bioinformatics. 2006;22:1152–3. 10.1093/bioinformatics/btl038. [DOI] [PubMed] [Google Scholar]
- 17. Liang C, Li Y, Luo J, et al. . A novel motif-discovery algorithm to identify co-regulatory motifs in large transcription factor and microRNA co-regulatory networks in human. Bioinformatics. 2015;31:2348–55. 10.1093/bioinformatics/btv159. [DOI] [PubMed] [Google Scholar]
- 18. Fusco D, Bassetti B, Jona P, et al. . DIA-MCIS: an importance sampling network randomizer for network motif discovery and other topological observables in transcription networks. Bioinformatics. 2007;23:3388–90. 10.1093/bioinformatics/btm454. [DOI] [PubMed] [Google Scholar]
- 19. Megraw M, Mukherjee S, Ohler U. Sustained-input switches for transcription factors and microRNAs are central building blocks of eukaryotic gene circuits. Genome Biol. 2013;14:R85. 10.1186/gb-2013-14-8-r85. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20. Ansariola M, Megraw M, Koslicki D. IndeCut evaluates performance of network motif discovery algorithms. Bioinformatics. 2017;34:1514–21. 10.1093/bioinformatics/btx798. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21. Himmelstein DS, Baranzini SE. Heterogeneous network edge prediction: a data integration approach to prioritize disease-associated genes. PLoS Comput Biol. 2015;11:e1004259. 10.1371/journal.pcbi.1004259. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22. Himmelstein D. Permuting hetnets and implementing randomized edge swaps in cypher. ThinkLab. 2015. 10.15363/thinklab.d136. [DOI] [Google Scholar]
- 23. Lizee A, Himmelstein D. Network edge prediction: estimating the prior. ThinkLab. 2016. 10.15363/thinklab.d201. [DOI] [Google Scholar]
- 24. Szklarczyk D, Gable AL, Lyon D, et al. . STRING v11: protein–protein association networks with increased coverage, supporting functional discovery in genome-wide experimental datasets. Nucleic Acids Res. 2018;47:D607–13. 10.1093/nar/gky1131. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25. Han H, Cho J-W, Lee S, et al. . TRRUST v2: an expanded reference database of human and mouse transcriptional regulatory interactions. Nucleic Acids Res. 2017;46:D380–6. 10.1093/nar/gkx1013. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26. Lachmann A, Xu H, Krishnan J, et al. . ChEA: transcription factor regulation inferred from integrating genome-wide ChIP-X experiments. Bioinformatics. 2010;26:2438–44. 10.1093/bioinformatics/btq466. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27. Abdill RJ, Blekhman R. Tracking the popularity and outcomes of all bioRxiv preprints. eLife. 2019;8:e45133. 10.7554/elife.45133. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28. Abdill RJ, Blekhman R. Complete Rxivist dataset of scraped bioRxiv data. Zenodo. 2019. 10.5281/zenodo.2566421. [DOI]
- 29. Himmelstein DS, Zietz M, Rubinetti V, et al. . Hetnet connectivity search provides rapid insights into how biomedical entities are related. Gigascience. 2022;12, giad047. 10.1093/gigascience/giad047. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30. Lemire D, Kaser O, Kurz N, et al. . Roaring Bitmaps: implementation of an optimized software library. arXiv. 2022. 10.1002/spe.2560. [DOI] [Google Scholar]
- 31. Zietz M. XSwap Analysis v1.0. Zenodo. 2023. 10.5281/zenodo.7623565. [DOI]
- 32. Himmelstein DS, Rubinetti V, Slochower DR, et al. . Open collaborative writing with Manubot. PLoS Comput Biol. 2019;15:e1007128. 10.1371/journal.pcbi.1007128. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33. Michael Z, Daniel HS, Kyle K, et al. . Supporting data for “The Probability of Edge Existence Due to Node Degree: A Baseline for Network-Based Predictions.”. GigaScience Database. 2023. 10.5524/102479. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34. Zhou T, Lü L, Zhang Y-C. Predicting missing links via local information. Eur Phys J B. 2009;71:623–30. 10.1140/epjb/e2009-00335-8. [DOI] [Google Scholar]
- 35. Huang Z, Li X, Chen H. Link prediction approach to collaborative filtering. In: Proceedings of the 5th ACM/IEEE-CS Joint Conference on Digital Libraries—JCDL '05. New York: Institute of Electrical and Electronics Engineers, 2005. 10.1145/1065385.1065415. [DOI] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
An archival copy of project repositories is available in the GigaScience database, GigaDB [33].