Hebbian Message Passing for Overlapping Gene Modules at Any Graph Size

Many genes do several jobs at once. A single gene can sit in a signaling pathway, a metabolic pathway and a cell-cycle program simultaneously. Methods that split a gene network into non-overlapping groups throw this information away. The methods that respect it, called overlapping community detection (they give each node a share of membership in several groups), are mostly fitted from scratch to one graph at a time. The best of them, AICoG, stores a membership vector per node and cannot say anything about a node or graph it was not trained on. This proposal builds a learned community detector that runs on graphs of any size. It is trained on small gene subnetworks, a few hundred genes each, and applied without retraining to cancer-specific gene networks with thousands of genes, where each gene's multi-omic measurements serve as its features.

The mechanism borrows from synaptic plasticity, the way biological connections strengthen when the neurons at both ends are active together. We treat community detection as repeated refinement of each node's membership. At every refinement step the edge weights are temporarily adjusted by a Hebbian trace, meaning an edge gets stronger when its two endpoints currently agree on membership and weaker when they disagree. The rule is local and has no size-specific parameters, so it can simply be run for more steps on a larger graph. The central bet is that this test-time rewiring lets a small-graph-trained model keep separating overlapping modules on large graphs, where fixed-depth graph neural networks blur them. The experiments are designed so that this bet can clearly fail.

Core Claim

The claim has three parts. A message-passing model whose outputs live on the probability simplex (vectors of non-negative membership shares summing to one) can be trained only on small graphs and then recover overlapping modules on graphs 10 to 50 times larger. It needs no retraining; it only runs more refinement steps. The Hebbian edge reweighting is what makes the extra steps help rather than hurt: without it, extra message passing drives memberships toward a uniform average, which is the over-smoothing problem. And on real multi-omics gene networks, the model should approach the quality of per-graph transductive fitting at a fraction of the cost, while also handling genes and graphs never seen in training.

Where This Sits

Three lines of prior work supply the pieces.

The first supplies the membership representation. Aitchison Embeddings for Learning Compositional Graph Representations represents each node as a point on the simplex. It optimizes the node in unconstrained isometric log-ratio (ILR) coordinates, a change of variables that turns simplex points into ordinary vectors while preserving the natural distance between compositions. It reports link-prediction AUC of 0.976 on AstroPh. We reuse its geometry, including the property that dropping a community does not distort the ratios among the rest. We replace its per-node lookup table with a shared update rule, which is exactly the inductive capability it lacks. Earlier transductive approaches play the same role as AICoG: they are the per-graph fits we must match. These are link partitioning by nonnegative matrix factorization (Baquero et al.) and hierarchical Bayesian mixed membership (Zhang et al.). The tabular fuzzy-clustering mixture of experts FC-MoE-GR shows soft memberships help calibration. However, it has no graph structure and does not beat global models uniformly on discrimination, which cautions us against expecting soft memberships to be a free accuracy gain.

The second line supplies the recipe for generalizing across sizes. S2V-DQN shows that local neighborhood aggregation with no dependence on node indices transfers from 50–100-node to 1,200-node graphs. IREM shows that framing inference as iterative energy minimization lets a model trained on graphs of up to 10 nodes handle 30-node graphs by raising refinement steps from 5 to about 30, while recurrent baselines blow up. Both produce discrete choices or unconstrained vectors, not memberships. IREM also notes that backpropagating through many steps is expensive, which is one reason we train only on small graphs.

The third line supplies the rewiring rule. Differentiable plasticity writes an effective weight as a fixed part plus a learned coefficient times a Hebbian trace, and trains both by backpropagation. Its coefficients are learned separately for each connection. That design cannot transfer to a graph with different edges, so we instead compute the coefficient from local edge features. MorphSNN rewires graph edges per input with Hebbian updates in spiking vision networks. It reports that this is about 2x slower to train than a static version. We accept that cost because training happens only on small graphs.

On the multi-omics side, DeepMoIC and MOGONET both use static graphs and hard class labels. DeepMoIC needs a depth tuned per cohort (8 versus 20 layers). That is the same over-smoothing problem we attack, appearing here as a hyperparameter. Tri-Scale Neural ODEs models dynamics across omic layers but treats molecules as monolithic states with no module structure. We do not address its temporal problem.

Research Program

Each node $i$ carries a membership $z_i^{(t)} \in \Delta^{K-1}$ at refinement step $t$. It is stored in ILR coordinates and initialized from the node's features by a shared encoder. Each edge has a base weight $w_{ij}$, taken from co-expression or interaction evidence, and a Hebbian trace $H_{ij}$ that starts at zero and is updated by

$$H_{ij}^{(t+1)} = (1-\eta)\,H_{ij}^{(t)} + \eta\,\big(\langle z_i^{(t)}, z_j^{(t)}\rangle - \bar{s}_i^{(t)}\big), \qquad a_{ij}^{(t)} = \mathrm{softplus}\big(w_{ij} + \alpha(e_{ij})\,H_{ij}^{(t)}\big).$$

Here $\eta$ is a learned trace rate and $\bar{s}_i^{(t)}$ is node $i$'s mean agreement with its neighbors, which keeps the trace from simply growing with degree. The coefficient $\alpha(e_{ij})$ is a small network applied to edge features $e_{ij}$, so no parameter depends on graph size or identity. Memberships are then updated by attention-weighted message passing over the reweighted edges $a^{(t)}$, followed by mapping back through the inverse ILR transform. Because message weights are relative, the update is coordinate-free in the sense used by Li et al..

Training uses small graphs with a fixed step count $T_{\text{train}}$. The loss combines a membership-matching loss against ground-truth overlapping modules, which is invariant to relabeling the communities via Hungarian matching on Aitchison distance, with a mild penalty on the change in $z$ over the last step, which encourages the updates to settle. At test time the number of steps scales with graph diameter. We will also report the stopping behavior when refinement simply runs until $z$ stops changing.

Three data regimes are used. The first is synthetic: overlapping stochastic blockmodels with planted mixed memberships, from 50 to 10,000 nodes. These provide clean scale curves with known ground truth. The second, and main, regime is gene networks built per cancer type from CMOB. Edges come from STRING restricted to its experimental and co-expression evidence, plus co-expression computed on TCGA samples. Node features summarize each gene's mRNA, methylation and copy-number distributions across that cancer's patients. KEGG pathway memberships, also linked in CMOB, serve as overlapping ground truth. We exclude STRING's curated-database channel because it partly encodes pathway membership and would leak the answer. KEGG pathways are split into disjoint train and test sets, so the model must find modules it has never seen. The third regime is an inductive insertion test. We hold out 20% of genes, run the model on the reduced graph, then add the held-out genes and check whether their memberships are correct and whether existing memberships stay stable, without any refit.

Baselines

The naive reference is a hard partition from spectral clustering on the same weighted graph, with each gene given a one-hot membership. It is run with the same number of communities $K$ as every other method. It shows how much overlap modeling matters at all, given that most KEGG genes belong to few pathways. Beating it is necessary but not interesting.

The strongest existing competitor is transductive fitting on each test graph. We will refit AICoG with its official code, alongside link-community NMF in the style of Baquero et al.. This is the strongest comparison because these methods see the full target graph and optimize it directly, with no transfer gap. For fairness they get the same edge weights, and AICoG gets node features appended where its code allows. Hyperparameters are tuned on the training pathways with a matched budget of trials, and wall-clock time and GPU memory are reported alongside quality. The only reported AICoG number in the file is link-prediction AUC of 0.976 on AstroPh (AICoG), not module recovery. We found no reported result on Lacuna for overlapping module recovery on KEGG-annotated gene networks, so we will establish these numbers ourselves. Beating this baseline means one of two things on graphs at least 10x larger than training. The first is matching its overlapping NMI and omega index (a pairwise overlap-agreement score) within two points at under one tenth of its runtime. The second is exceeding it outright on held-out pathways, which is plausible because it cannot use a learned prior over what gene modules look like.

The strongest inductive competitor is a fixed-depth graph neural network with a simplex output head, trained on the same small graphs. It uses DeepMoIC-style initial residual connections and identity mapping to resist over-smoothing (DeepMoIC), with depth tuned over the same range DeepMoIC searched. The ablation that isolates our key ingredient reuses the same weight-shared refinement loop and the same scaled test-time step count, but sets $\alpha \equiv 0$. That gives an IREM-style iterative refiner on a frozen graph. A second ablation keeps plasticity but fixes the step count at $T_{\text{train}}$. Together they tell us whether the gain comes from rewiring, from extra steps, or from their interaction.

Why not just…?

Why not just refit AICoG or NMF on each new graph? This is the real threat. On a single static gene network of a few thousand nodes, refitting is affordable, and it could match or beat our model. Our case rests on three things the experiments measure directly. The first is time and memory, as graphs grow to whole interactomes. The second is the held-out-pathway setting, where a learned prior about what modules look like may help. The third is the insertion test, where transductive methods must refit and can relabel every community. If refitting matches us in quality everywhere, the honest conclusion is that our contribution is fast amortized inference, and we will present it that way.

Why not just use a deeper residual graph network with a softmax head? DeepMoIC shows residual connections postpone over-smoothing. It also shows that the right depth changes by cohort, from 8 layers on pan-cancer to 20 on BRCA. A depth chosen on 200-node training graphs has no reason to fit a 5,000-node graph with a larger diameter. The scale-curve experiment shows whether this baseline's error grows with test size while ours does not. If it does not, plasticity is unnecessary.

Why not just run a recurrent or energy-based refiner for more steps, without plasticity? IREM's result suggests extra steps alone may carry most of the benefit, and this is the $\alpha \equiv 0$ ablation. Our mechanistic prediction is specific and falsifiable. On a frozen graph, the entropy of memberships at boundary genes should rise with the number of steps; this is the smoothing. With Hebbian reweighting, edges between disagreeing nodes should weaken and keep that entropy near its planted value. If the ablation matches the full model on the large-graph gene networks, we drop plasticity from the method.

Why not just take hard subtypes or hard modules, as DeepMoIC and MOGONET do? For pathways the ground truth itself overlaps, so a hard partition is wrong by construction. The spectral baseline measures how costly that is. FC-MoE-GR warns that soft memberships improve calibration more reliably than discrimination. We therefore report per-gene membership error for multi-pathway genes separately from aggregate scores.

Decisive Checks

The primary result is a curve of overlapping NMI and omega index against test graph size. It is measured on synthetic graphs from 50 to 10,000 nodes and on the CMOB cancer-type gene networks, with training capped at 200 nodes, and it compares the full model, the $\alpha \equiv 0$ refiner, the fixed-depth residual network, and transductive AICoG. The proposal succeeds if three conditions hold at 10x and 50x the training size: the full model stays within two points of AICoG, the fixed-depth network degrades by more than that, and the $\alpha \equiv 0$ refiner falls measurably between them. The mechanistic check is boundary-gene membership entropy against step count, with and without plasticity. The practical check is the insertion test, which reports held-out gene accuracy and how much existing memberships move, since stable assignments matter to anyone annotating genes incrementally. A secondary sanity check feeds per-patient summaries of module activity into a simple classifier on the TCGA pan-cancer task. It is not meant to beat DeepMoIC's reported 84.28% accuracy, only to show whether the recovered modules carry subtype signal comparable to raw features.