Biomedical knowledge graphs are stitched together from many databases that describe the same molecules, genes and reactions under different identifiers. When the reaction databases BRENDA, KEGG and MetaCyc were merged, only 16% of reactions (2,890 of 18,172) turned out to be shared by all three (BKM-react). Some of the rest are genuinely different reactions. Some are the same reaction that the matching rules failed to recognize. A model trained on such a graph therefore sees a mixture of merged entities, unmerged duplicates and half-linked aliases. Whether a given fact is recorded once or three times depends on how well a curator's matching heuristics worked, not on biology. This proposal asks a question that finite model theory makes precise: should a model's prediction change when two records of the same entity are merged into one node? If it does, which parts of the model are responsible?
The core idea is short. Logicians who study order-invariance ask that an answer not depend on an arbitrary bookkeeping choice, such as the linear order a machine uses to scan an unordered graph. In integrated biological data, the bookkeeping choices are identifiers and merge decisions. Graph neural networks that add up messages from neighbours inherit the power of counting logic (Geerts), and for the same reason they count a fact twice when two databases each report it under different names. We propose to measure how much of current biomedical link-prediction accuracy comes from this double-counting. We then build an aggregation rule that counts neighbours up to a soft alias relation. With exact aliases it computes the same function as a counting network on the fully merged graph, and with uncertain aliases it degrades gracefully.
Core Claim
Order-independence comes in nested strengths, and fragmented biomedical data separates them sharply. The weakest requirement is invariance to renaming identifiers. Per-entity embedding models such as RotatE violate it by construction, because every prediction runs through a vector attached to a specific ID. That is why they cannot score unseen drugs in a drug-blind split. Message-passing networks with sum aggregation satisfy it. Their distinguishing power is bounded by the Weisfeiler–Leman test, an iterative colour-refinement procedure for telling graphs apart, and by counting logic $C_k$ (Geerts).
A stronger requirement is merge-invariance: the prediction should be the same whether or not redundant copies of an entity have been collapsed. Counting logic fails this test. If a reaction appears as two nodes with identical metabolites, a sum aggregator sees two. Aggregators without counting, which correspond to modal logic and are invariant under bisimulation (a notion of behavioural equivalence that ignores multiplicity), pass the test but give up counting altogether.
Our claim has three parts. First, counting over unresolved duplicates acts in practice as a hidden coverage signal: well-studied entities appear in more sources and collect more duplicate edges. Second, this signal inflates scores under random splits and hurts under drug-blind or disease-blind splits. Third, counting modulo an alias relation keeps the expressive power of counting logic, evaluated on the merged graph, while removing the dependence on how well the merge was done.
Formally, let $G$ be the unmerged multi-source graph and $\equiv$ an alias relation on its nodes, with $G/{\equiv}$ the graph obtained by merging each alias class. A model $f$ is merge-invariant for $\equiv$ if
$$f(G)(u,v) = f(G/{\equiv})([u],[v]) \quad \text{for all nodes } u,v,$$
where $[u]$ denotes the class of $u$. Our aggregator meets this condition exactly when $\equiv$ is given. When $\equiv$ is only known through confidences $p(u \equiv w)$, it weights each neighbour $w$ by the inverse of its expected class size among $u$'s neighbours. Its departure from invariance is then bounded by the alias uncertainty.
Relation to Prior Work
Three works supply the method and motivation on the logic side. Geerts proved that order-invariant tensor networks are exactly as discriminating as $k$-WL and $C_k$ (Geerts). His analysis covers simple graphs and isomorphism only. We take his counting characterization as the thing to protect and ask how it behaves under quotienting, a question his work does not address.
Barceló and Libkin showed that the collapse of order-invariant logic to plain logic is fragile: adding a single unary predicate can change expressive power (Barceló and Libkin). We read this as a warning that source-provenance tags, which are unary predicates marking "came from KEGG", can reintroduce dependence on bookkeeping. We will test provenance-tagged models explicitly.
Grohe's work on definable canonization (Grohe) frames the practical baseline. A canonical form computed from intrinsic structure is exactly what BKM-react approximates when it strips charge and proton layers from InChI strings, the standard textual identifiers for molecules. Canonization works for molecules. It is not available for reactions, complexes or pathways, which is why soft aliasing is needed above the molecule level.
The biomedical side supplies the regime and the constraints. BKM-react (Lang et al.) and Know2BIO (Xiao et al.) build integrated graphs by hand-crafted matching. Know2BIO treats every edge as equally reliable, so duplicate multiplicity is the only implicit confidence signal, and it is confounded with coverage. BioGraphFusion (Lin et al.) is the strongest structural link predictor in the file. It combines tensor decomposition with query-guided subgraph propagation, but it never asks whether its outputs change under re-merging.
Çelebi, Erten and Dumontier (Çelebi et al.) and the IMPROVE expansion (Large-scale AI-Ready Data) constrain our evaluation. Both show that random splits leak and that entity-disjoint splits are the honest test, so every claim here is evaluated on disjoint splits. Neither paper relates the leakage to duplicated records, which is the mechanism we propose to isolate.
Research Program
The work has three parts.
The first part is an invariance audit, and it stands on its own even if the method fails. For a fixed trained model we apply transformations that should not matter biologically. We rename identifiers. We merge sources in different orders. We split a merged entity back into its per-source records, joined by cross-reference edges. We merge entities that the integration pipeline left apart but that share an exact canonical InChI. We then measure how much predictions move. Each transformation is checked against the invariance class the model belongs to, so a violation is attributable rather than anecdotal.
The second part is the aggregator and its analysis. We will prove the exact-alias invariance statement above. We will show that with exact aliases the aggregator's distinguishing power equals colour refinement on $G/{\equiv}$, which follows by simulating it round-by-round on the quotient in the style of Geerts' layer-to-WL argument. We will also bound the invariance gap in terms of alias uncertainty.
Alias confidences come from declared cross-references (Bio2RDF and Know2BIO bridge nodes), canonical InChI agreement for molecules, and a learned head. We supervise this head on the alignments that BKM-react resolved and hold out a portion of them.
The third part is the disjoint-split evaluation. It tests whether removing double-counting helps where generalization matters, and whether it costs accuracy where memorization was being rewarded.
Baselines
The naive reference point is a coverage scorer: rank a candidate link by the number of sources that mention both endpoints. If a model's gains under random splits are matched by this scorer, those gains are coverage, not biology. It is run on the same graphs and splits as every model and needs no tuning.
The per-identifier embedding baseline is RotatE. It is strong on curated ontologies: Chang et al. report a relation-prediction MRR (mean reciprocal rank, the average of one over the rank of the true answer) of 0.849 on SNOMED-CT. It is the right foil for the first invariance level, since it fails identifier renaming by design. We train it with the hyperparameter grid used by Chang et al. and give it the same GPU budget as our model. On disjoint splits it is reported with the usual caveat that unseen entities receive no embedding.
The strongest structural competitors are RED-GNN and BioGraphFusion. On DisGeNET, BioGraphFusion reports MRR 0.429 against 0.389 for RED-GNN. We rerun both with their released settings, and we also rerun them on our re-fragmented versions of the same graphs, so their numbers and ours come from identical data. Beating them means matching or exceeding 0.429 MRR on the original DisGeNET while showing a much smaller invariance gap and a better disjoint-split score on the re-fragmented graphs.
For drug indication we include the tabular gradient-boosting model of Çelebi et al.. It reaches 82.77% drug-wise disjoint AUC on the Bio2RDF gold standard, against 67.82% for the network-based SLAMS method. That makes it the hardest competitor in the file on an entity-disjoint task, and we use its features and splits unchanged.
The ablation that isolates our key ingredient holds the architecture, depth, hidden size and tuning budget fixed. It varies only the neighbour aggregation: sum, max, sum over exact alias classes, and sum over soft alias classes. A further variant adds provenance tags to test the fragility predicted by Barceló and Libkin.
Why not just…?
Why not just deduplicate first and then train any graph network? This is the real threat. With a perfect alias relation it is mathematically identical to our exact-alias aggregator, and we say so. The difference arises because real alignment is partial and its errors cannot be undone once merged. The 84% of BKM-react reactions not shared by all three sources mixes true differences with missed matches, and a hard merge must commit to one reading. We settle this with synthetic re-fragmentation, where the true aliases are known. We compare an oracle merge, a BKM-style rule merge with injected false merges and missed merges, and our soft aggregator. If rule-merge followed by a standard network matches the soft aggregator at realistic error rates, the contribution reduces to the audit, and we will report that.
Why not just augment training with random duplications and renamings? Augmentation teaches approximate invariance only over the transformations sampled. It also wastes capacity relearning a symmetry that can be built in. We include an augmented sum-aggregation network trained with the same budget. The audit will show whether its invariance gap holds on transformation types it did not see, such as real cross-database splits rather than synthetic copies.
Why not just drop counting and use max aggregation? Max aggregation is invariant under bisimulation, so it is immune to duplicates. However, Geerts' characterization places much of these networks' distinguishing power in counting, and biology depends on counts such as stoichiometry and the number of targets a drug hits. The ablation measures directly whether max aggregation loses accuracy on count-dependent queries, for instance distinguishing reactions that differ only in stoichiometry in BKM-react. If it loses nothing, counting was not needed on these tasks, and that is a reportable negative result.
Why not just use flat fingerprints with gradient boosting, which already wins on disjoint splits? It may win on drug indication, and we keep it as a baseline. But it discards relational structure entirely, so it cannot answer link-prediction queries over reactions or gene–disease paths. It also gives no account of why graph models underperform it. Our hypothesis is that duplicate counting is part of the reason, which is testable by checking whether the gap to gradient boosting closes when double-counting is removed.
Proposed Experiments
The controlled experiment uses BKM-react's three sources, where the integration decisions are known. We build three versions of the graph: fully merged, per-source with cross-reference edges, and per-source with a fraction of the cross-references deleted. We train every model on each version and measure three things. The first is the invariance gap, the mean absolute change in link scores and the fraction of top-10 rank changes for the same query across versions. The second is the coverage correlation, the rank correlation between predicted score and the number of sources containing the endpoints. The third is held-out reaction-completion MRR under a reaction-disjoint split. The decisive check is whether sum-aggregation models show a large gap and a high coverage correlation while the soft-alias aggregator shows neither, at no loss in disjoint MRR.
The transfer experiments use DisGeNET, where the BioGraphFusion number of 0.429 MRR is the bar on the original graph, and Know2BIO across its 30 sources. For Know2BIO no reported result was found on Lacuna, so all models are rerun. Each graph is re-fragmented by splitting bridge entities back into source-specific copies. The Bio2RDF drug-indication benchmark is run under drug-wise and disease-wise disjoint splits against the 82.77% AUC of gradient boosting.
A final stress test adds source-provenance labels to the soft-alias model. If the invariance gap reappears, the fragility result of Barceló and Libkin has a practical counterpart, and provenance features should be withheld or explicitly regularized in integrated biomedical graphs.
The proposal fails cleanly in one of two ways. Duplicate counting may explain none of the disjoint-split degradation, in which case the coverage correlation stays low for sum models too. Or rule-based deduplication may match the soft aggregator at realistic alignment error rates. Either outcome is informative, and the audit tooling remains useful to anyone integrating biomedical sources.
References
- BKM-react, an integrated biochemical reaction database
- The expressive power of kth-order invariant graph networks
- Order-Invariant Types and Their Applications
- Fixed-Point Definability and Polynomial Time on Chordal Graphs and Line Graphs
- Know2BIO: A Comprehensive Dual-View Benchmark for Evolving Biomedical Knowledge Graphs
- BioGraphFusion: Graph Knowledge Embedding for Biological Completion and Reasoning
- Machine Learning Based Drug Indication Prediction Using Linked Open Data
- Large-scale AI-Ready Data for Anti-Cancer Drug Response Modeling
- Benchmark and Best Practices for Biomedical Knowledge Graph Embeddings