Tutorials › Multi-Omics Data Integration › Evaluating Network Recovery

Simulation Studies for Method Comparison · Tutorial 559 of 597

Evaluating Network Recovery

You will learn to evaluate edge selection and ranking against known simulated networks, with metrics and summaries that reflect block structure and network sparsity.

Advanced 12 min read

What You'll Learn

  • Define the eligible edge universe and separate within-block from cross-block recovery.
  • Compute precision, recall, specificity, and F1 from a thresholded network estimate.
  • Evaluate ranked edge scores with ROC AUC and average precision.
  • Explain why sparsity changes the interpretation of network-recovery scores.
  • Summarize performance across simulation replicates and sparsity scenarios.

What Network Recovery Measures

In a simulation study, the generating network is known, so an estimated network can be compared directly with its truth. The question is not simply whether an algorithm returns a graph. It is whether the returned edges, or the scores used to rank candidate edges, agree with the simulated edge structure. That comparison must account for which pairs were eligible to be edges and how sparse the true network was.

For a multi-omics network, node blocks may correspond to modalities or other prespecified feature groups. An edge is within-block if both endpoints belong to the same block, and cross-block if its endpoints belong to different blocks. These categories can have different scientific roles and different numbers of candidate pairs, so reporting only one overall score can hide important failures.

Definition: For a fixed simulation replicate, let \(\mathcal{U}\) be the eligible set of candidate edges and let \(E^\ast\subseteq\mathcal{U}\) be the true edge set used to generate the data. A method returns either a selected edge set \(\widehat{E}\subseteq\mathcal{U}\), or an edge score \(s_e\) for each \(e\in\mathcal{U}\), where larger scores indicate stronger evidence for an edge. The within-block and cross-block subsets of \(\mathcal{U}\) and \(E^\ast\) are evaluated separately when those structures matter.

This definition assumes the truth and estimate use the same nodes, edge convention, and eligibility rules. For an undirected network with no self-edges, the number of possible within-block pairs for blocks of sizes \(p_1,\ldots,p_B\) is \(\sum_b {p_b\choose 2}\); the number of possible cross-block pairs is \(\sum_{b<c}p_bp_c\), if every such pair is eligible. Directed networks require a different pair universe and should not be scored as undirected graphs. If a pair cannot be estimated because a modality is unavailable, state whether it is excluded from the eligible universe; do not silently count it as a missed edge.

Threshold-Aware Edge Selection

A threshold-aware metric evaluates a selected graph at a specified decision rule. For example, an algorithm might return edges whose absolute association score exceeds a fixed cutoff, or it might select a prespecified number of edges. Within any one stratum, compare selected edges with truth as follows: true positives (TP) are true edges selected; false positives (FP) are non-edges selected; false negatives (FN) are true edges not selected; and true negatives (TN) are non-edges not selected.

$$ \text{Precision}=\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FP}},\qquad \text{Recall}=\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FN}},\qquad \text{Specificity}=\frac{\mathrm{TN}}{\mathrm{TN}+\mathrm{FP}}. $$

Precision is the fraction of selected edges that are true, and recall (also called sensitivity) is the fraction of true edges recovered. Specificity is the fraction of true non-edges correctly left unselected. The F1 score is the harmonic mean of precision and recall:

$$ F_1=\frac{2\,\text{Precision}\,\text{Recall}} {\text{Precision}+\text{Recall}} =\frac{2\mathrm{TP}}{2\mathrm{TP}+\mathrm{FP}+\mathrm{FN}}. $$

The second expression follows by substituting the definitions and simplifying. F1 gives equal emphasis to precision and recall, but it ignores TN; it is therefore not a general summary of all aspects of classification. When no edges are selected, precision has a zero denominator, and when the truth contains no edges, recall has a zero denominator. Specify a convention for such cases rather than allowing software defaults to determine the report invisibly.

Worked Example: Scoring Within-Block and Cross-Block Selections

Suppose a hypothetical simulated network has 10 eligible within-block pairs, of which 3 are true edges. At the chosen threshold, a method selects 4 within-block pairs: 2 are true and 2 are not. It has therefore left 1 true edge unselected and correctly left 5 non-edges unselected. For cross-block pairs, suppose there are 10 eligible pairs, 2 true edges, and 3 selected pairs, of which 1 is true.

For within-block recovery, \(\mathrm{TP}=2\), \(\mathrm{FP}=2\), \(\mathrm{FN}=1\), and \(\mathrm{TN}=5\). Thus:

$$ \text{Precision}=\frac{2}{2+2}=0.500,\quad \text{Recall}=\frac{2}{2+1}=0.667,\quad \text{Specificity}=\frac{5}{5+2}=0.714, \quad F_1=\frac{2(2)}{2(2)+2+1}=\frac{4}{7}=0.571. $$

For cross-block recovery, \(\mathrm{TP}=1\), \(\mathrm{FP}=2\), \(\mathrm{FN}=1\), and \(\mathrm{TN}=6\). The corresponding values are precision \(1/3=0.333\), recall \(1/2=0.500\), specificity \(6/8=0.750\), and \(F_1=2/(2+2+1)=0.400\). The method has higher cross-block specificity but lower cross-block precision and recall. Reporting only its overall selected-edge count would not convey this distinction.

Threshold choice is part of the evaluation. Use a rule defined without access to the replicate’s true edges, such as a prespecified significance or score cutoff, or a selection budget fixed in advance. Choosing the cutoff that maximizes F1 against the known simulated truth is an oracle evaluation: it uses information unavailable when analyzing real data and will generally make performance look better. If a method naturally returns a ranking rather than a single graph, evaluate its ranking separately instead of selecting a favorable cutoff after seeing the answer.

Threshold-Free Ranking Metrics

When an algorithm assigns scores to candidate edges, threshold-free metrics assess how well the scores rank true edges above non-edges across possible cutoffs. ROC AUC is the area under the receiver operating characteristic curve, which plots recall against the false-positive rate \(1-\text{specificity}\). Equivalently, with appropriate handling of tied scores, it is the probability that a randomly chosen true edge receives a higher score than a randomly chosen non-edge, with ties contributing one-half. A value of 0.5 corresponds to chance ordering in this pairwise sense; a value of 1 indicates perfect ranking.

The precision-recall curve plots precision against recall as the score cutoff varies. Average precision (AP) summarizes this curve by averaging precision at the ranks where true edges occur. If the ranked list has \(M\) candidate edges and \(y_{(k)}=1\) indicates that the edge at rank \(k\) is true, one common non-interpolated definition is:

$$ \mathrm{AP}=\frac{1}{|E^\ast|} \sum_{k=1}^{M}\mathrm{Precision}(k)y_{(k)}, \qquad \mathrm{Precision}(k)=\frac{\sum_{j=1}^{k}y_{(j)}}{k}. $$

AP is defined when the evaluated stratum contains at least one true edge. Software packages use some different interpolation conventions, so report which definition or implementation was used. ROC AUC and AP require scores whose direction is consistent: higher values must mean stronger evidence for an edge. A signed estimate may need a prespecified transformation, such as its absolute value, if the evaluation concerns edge presence regardless of sign. If the sign is part of the target, score sign recovery separately rather than discarding it.

Worked Example: Calculating Average Precision From a Ranking

In a hypothetical cross-block stratum, eight candidate pairs contain two true edges. A method ranks them from highest to lowest score, with the true edges at ranks 1 and 4. The precision at rank 1 is \(1/1=1\). At rank 4, two of the first four pairs are true, so precision is \(2/4=0.500\). Therefore:

$$ \mathrm{AP}=\frac{1+0.500}{2}=0.750. $$

This value summarizes how early the true edges appear in the ranking; it does not mean that 75% of all candidate pairs are true. For comparison, the ROC AUC is the fraction of positive-negative pair orderings that are correct. The rank-1 positive beats all 6 negatives, and the rank-4 positive beats the 4 negatives below it. Hence \(10\) of the \(2\times6=12\) positive-negative comparisons are correctly ordered, giving ROC AUC \(10/12=0.833\). Both scores indicate useful ranking, but they answer different summaries of it.

Sparsity Changes What a Score Means

Network edge sets are often sparse: most eligible pairs are non-edges. This makes specificity and ROC AUC potentially reassuring even when selected edges are not very trustworthy. For example, a method that labels nearly every pair as a non-edge can achieve high specificity simply because non-edges are abundant, while recovering few true edges. Precision and AP are more directly affected by prevalence, the fraction of eligible pairs that are true edges. A random ranking has expected precision near this prevalence at a given cutoff, and its precision-recall baseline is commonly shown as the prevalence; finite-sample AP can differ slightly from that value.

Consequently, scores should be reported with the generating sparsity level and the number of eligible and true edges. Results at different sparsity levels are not automatically comparable as if they described the same task. A high AP in a denser network may partly reflect a higher positive-edge prevalence; a low precision in a very sparse network may coexist with useful ranking if the method substantially exceeds the sparse baseline.

Worked Example: Putting AP in Context Across Sparsity Levels

Consider two hypothetical simulation scenarios with the same 1,000 eligible pairs. In the sparse scenario, 10 pairs are true, so prevalence is \(10/1000=0.010\). In the less sparse scenario, 100 pairs are true, so prevalence is \(100/1000=0.100\). Suppose the method’s AP is 0.080 in the sparse scenario and 0.250 in the less sparse scenario. Relative to the prevalence baselines, these are \(0.080/0.010=8.0\) and \(0.250/0.100=2.5\) times baseline, respectively.

The absolute AP is higher in the less sparse scenario, but the relative comparison tells a different part of the story: the method’s ranking is much farther above the random-ranking baseline in the sparse scenario. Neither comparison alone is sufficient. Report AP, prevalence, and the underlying edge counts, and interpret the scenarios as distinct operating conditions rather than declaring a universal winner from one number.

Summarizing Replicates and Diagnosing Failure

For each replicate, calculate metrics within the relevant edge strata using that replicate’s own truth and eligible universe. Then summarize the replicate-level values for each method and scenario, for example with the mean and standard deviation or the median and interquartile range. This keeps the unit of replication visible. Pooling all edge decisions across replicates instead gives more influence to replicates with larger edge universes or more positive edges, and can answer a different question. State explicitly if pooled counts are also reported.

A clear report should identify, for each scenario, the block definitions, the eligible edge counts, the true within-block and cross-block edge counts, the selection rule or ranking metric, and how replicates were summarized. Include a range of realistic sparsity levels, not just a single convenient edge density. If positive-edge counts vary substantially among replicates, report that variation; a metric may be undefined in replicates with no positives, and excluding those replicates without disclosure changes the summary.

1
Check the edge universe.
Confirm node alignment, block membership, symmetry convention, diagonal handling, and any exclusions due to unavailable modalities.
2
Check score direction and cutoff.
Verify that larger scores mean stronger edge evidence and that any threshold was fixed without using the simulated truth.
3
Inspect strata and prevalence.
Compare within-block and cross-block edge counts and prevalence; an overall score can conceal poor recovery in a smaller stratum.
4
Check degenerate cases and variability.
Identify replicates with no true or selected edges, tied scores, or unstable metrics, and state how they were handled.

The main alternatives complement rather than replace one another. Threshold-aware precision, recall, and F1 answer how a method performs at a particular operating point; threshold-free ROC AUC and AP assess ranking over cutoffs. ROC AUC is less sensitive to prevalence than precision-based measures, but can look strong when the number of negatives overwhelms the positives. AP focuses attention on positive-edge retrieval, but changes with prevalence and is not a prevalence-free score. No single metric establishes that a network is scientifically correct, and edge recovery evaluates agreement with the simulated truth, not causal validity or biological usefulness.

Common Pitfall

A frequent mistake is to report high specificity or ROC AUC as proof that a method recovers a sparse network well. The wrong reasoning is that correctly classifying most candidate pairs must mean that the true edges were found. The correction is to inspect the true-positive count and recall, report precision or AP alongside specificity or ROC AUC, and show the true-edge prevalence. In a sparse setting, a method can classify nearly all non-edges correctly while missing most of the edges that define the network.

Key takeaway: Evaluate network recovery against a clearly defined edge universe, separate within-block and cross-block results when they represent distinct targets, and report both operating-point and ranking performance in the context of edge prevalence and sparsity.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. A stratum has 20 true edges and 80 non-edges. A method selects 10 pairs, of which 6 are true. Find precision, recall, and specificity.
  2. Why can specificity be high for a method that recovers few true edges in a sparse network?
  3. A cross-block ranking has 12 eligible pairs and 3 true edges. The true edges occur at ranks 2, 5, and 9. Calculate AP using the definition in this tutorial.
  4. Why should a threshold chosen to maximize F1 against the known truth be identified as an oracle choice?
  5. What additional information is needed to interpret an AP of 0.12 across two simulation scenarios with different sparsity?

Solutions. (1) There are 6 TP, 4 FP, 14 FN, and 76 TN. Precision is \(6/10=0.600\), recall is \(6/20=0.300\), and specificity is \(76/(76+4)=0.950\). (2) Non-edges are abundant, so correctly leaving most non-edges unselected can produce high specificity even if many true edges are missed. (3) Precision at the three positive ranks is \(1/2=0.500\), \(2/5=0.400\), and \(3/9=0.333\). Thus \(\mathrm{AP}=(0.500+0.400+0.333)/3=0.411\) to three significant figures. (4) The cutoff is selected using the answer key, information that would not be available when analyzing an unknown network; it can overstate practical performance. (5) Report at least the eligible-pair and true-edge counts, hence prevalence, and the AP definition and replicate summary. The same AP can represent different performance relative to the random-ranking baseline at different prevalences.

Clinical Biostats