Smoothing Inside Operons, Not Across Them: Boundary-Aware Message Passing on Gene Neighborhood Graphs

Bacterial genes that work together tend to sit next to each other on the chromosome. They are often read out as a single unit, called an operon, and this side-by-side placement is frequently preserved across distantly related species. Biologists exploit this to guess the function of uncharacterized genes from the company they keep. Graph neural networks (models that update each node by averaging information from its neighbors) look like a natural tool for spreading such guesses across many genomes. They come with a well-known failure, though. Stack enough averaging layers and every node's representation drifts toward the same vector. This is over-smoothing, and it erases exactly the differences a classifier needs. Gene neighborhoods make the failure unusually concrete. Averaging is what we want among the genes of one operon, which share a pathway. It is what we must not do across an operon boundary, where function changes abruptly.

We propose a message-passing model on a multi-genome gene graph with two kinds of edges. One kind links adjacent genes on a contig and carries strand and intergenic distance. The other links homologous genes in different genomes. The model learns a gate on each adjacency edge that decides whether to smooth across it. It also uses a normalization that preserves distances between inferred transcription units while allowing contraction within them, rather than preserving all pairwise distances. The central claim has two halves, one for each community. For genomics, deep propagation along alternating neighbor and homolog hops can annotate genes beyond the 15–30 gene windows of current genomic language models. For graph learning, operon annotations give a rare real-world graph where the correct amount of smoothing on each edge is known. That lets us test whether over-smoothing diagnostics separate harmless smoothing from harmful collapse.

What exists and what is missing

Gene-context methods fall into two families. Sequence models treat a contig as a one-dimensional string of protein tokens. gLM does this with masked language modeling over 7 million MGnify contigs and raises enzyme-function linear-probe accuracy from 47.0% (context-free ESM2) to 51.6%. It reaches 24.4% from context alone when the target protein is masked, and 0.77 mean average precision for operon identification from its attention patterns. gLM2 and the OMG corpus add intergenic nucleotides. Gaia indexes gLM2 embeddings for fast homolog search, but its graph is only a search index, not a model that passes messages. All three see one contig at a time. None can follow a path from an orphan gene to its neighbor, then to that neighbor's homolog in another genome, then to that gene's neighbors. That path is how a human curator reasons.

The other family is combinatorial. Spacedust finds conserved clusters with structural alignment and co-occurrence and ordering p-values. It places 35% of unannotated genes into clusters across 1,308 genomes and recovers 95% of PADLOC defense systems. Its authors report only moderate precision when clusters are partially conserved. Large-scale neighborhood mining in global metagenomics shows how much functional "dark matter" these methods leave. We reuse the cross-genome view of these pipelines but replace hard cluster membership with learned, soft propagation.

On the graph side, our methods come from FB-GNN and PairNorm. FB-GNN splits each layer into a low-pass averaging channel and a high-pass "difference from neighbors" channel, and gains roughly 10% on heterophilic graphs, where linked nodes tend to differ. PairNorm rescales embeddings to keep total pairwise distance constant and survives 60 layers of simple graph convolution on Cora. Both methods treat the graph uniformly. FB-GNN mixes its channels with global scalars, and PairNorm pushes all pairs apart, including pairs that should merge. Selective aggregation gates messages using neighborhood statistics, which is close in spirit to our gate. Its gate is not tied to any external ground truth, however, so one cannot check whether it gates the right edges.

Two papers constrain the design. Dovonon et al. show that smoothing is not always harmful: a smoothing-forced 48-layer Transformer beat a sharpening one on CIFAR100. That warns us against simply maximizing feature diversity. Zhang et al. question whether distance-based over-smoothing metrics measure the right thing. We take their critique as a testable question, not settle it by assumption.

One framing in the research file needs correcting. Orphan genes are not "missing features" in PairNorm's sense, because they still have ESM2 embeddings. Their features are present but uninformative about function. Depth is therefore justified only if multi-hop context adds signal beyond the node's own embedding. We test that directly instead of assuming it.

Core Claim

The claim has three parts. First, on a gene graph that links adjacent genes and cross-genome homologs, accuracy keeps improving with depth up to roughly 8–16 layers, but only when smoothing is confined to transcription units. Second, a gate trained only on cheap operon cues (same strand, short intergenic gap) plus the downstream function loss recovers operon boundaries at least as well as gLM's attention probe. Third, a block-wise collapse ratio predicts held-out accuracy across depths better than Dirichlet energy or total pairwise distance. The ratio is written as

$$R_\ell = \frac{\bar d_{\text{within}}(\mathbf{X}^{(\ell)})}{\bar d_{\text{between}}(\mathbf{X}^{(\ell)})},$$

where $\mathbf{X}^{(\ell)}$ is the matrix of node embeddings after layer $\ell$, $\bar d_{\text{within}}$ is the mean squared distance between genes in the same annotated transcription unit, and $\bar d_{\text{between}}$ is the mean squared distance between genes in adjacent but different units.

Research Program

The graph is built from the Spacedust set of 1,308 representative genomes (4.2 million genes) and, at a second scale, from a subset of the gLM MGnify contigs. Node features are frozen ESM2 embeddings; gLM2 embeddings serve as a variant. Adjacency edges join consecutive genes and carry same-strand and intergenic-distance features. Homology edges join each gene to its top-$k$ cross-genome neighbors from MMseqs2 or Gaia-style embedding search, filtered by an identity threshold described below.

Each layer has three components. The first is an FB-GNN-style pair of low-pass and high-pass channels, mixed per edge instead of globally. The second is the boundary gate $g_{ij}\in[0,1]$ on adjacency edges, computed from edge features and the two endpoint embeddings. The gate receives a weak auxiliary loss toward same-strand, short-gap labels and the main enzyme-function loss. Homology edges get their own channel so that messages between genes and messages between gene families do not mix. The third component is block normalization, a modification of PairNorm. It centers and rescales embeddings so that total between-unit squared distance stays constant while within-unit distance is free to shrink. Units are defined softly by the gate.

The analysis half of the program sweeps depth from 2 to 32 layers for every model. At each depth it records $R_\ell$, Dirichlet energy, and total pairwise distance, and correlates each with held-out accuracy. This follows the measurement question Zhang et al. raise, but on a graph where within-unit membership is known from E. coli K-12 operon annotations.

Baselines

The do-nothing reference is a linear probe on frozen ESM2 embeddings of each gene alone, which reports 47.0% on MGYP-EC in gLM. We rerun it on our splits.

The strongest existing method is the gLM linear probe, reported at 51.6% for enzyme function and 0.77 operon mAP. We retrain the probe on our exact homology-controlled splits, since the reported numbers come from different splits. Beating it means a statistically separated gain on the same split with the same probe head. For context-only prediction, the bar is the reported 24.4% with the target masked; our equivalent replaces the target node's features with zeros.

The classical guilt-by-association baseline assigns each test gene the majority label of annotated members of its Spacedust cluster. Spacedust reports a higher biosynthetic-cluster F1 than ClusterFinder, DeepBGC and GECCO, but no numeric F1 is given; there is no reported Lacuna result for Spacedust F1 on this benchmark, so we compute it ourselves.

The graph baselines all use the same graph, the same features, and a matched hyperparameter budget of 50 trials each. They are a two-layer GAT with residual connections, a deep GCN with residuals, a deep GCN with standard PairNorm, and FB-GNN with global channel weights. Label propagation without learned layers is included as a parameter-free floor.

Three ablations isolate the proposal's ingredients. The first removes the biological auxiliary loss from the gate. The second replaces block normalization with global PairNorm. The third deletes homology edges, so the model sees only single contigs and is directly comparable to gLM's view.

Why not just…?

Why not just give gLM2 a longer window? This is a real threat for within-contig context. A longer window still cannot see a homolog's neighbors in another genome. The no-homology-edges ablation measures what single-contig context buys. If the full graph model does not beat that ablation and the retrained gLM probe, cross-genome propagation adds nothing and we will report that.

Why not just vote over Spacedust clusters or run label propagation? These embody guilt-by-association directly, and Spacedust's 95% defense-system recovery shows the signal is strong. Hard clusters lose precision under partial conservation, and their coverage stops at the 58% of genes that fall into clusters. We report accuracy separately on clustered and unclustered genes. If voting matches the model on clustered genes, the model's value lies only in the remainder.

Why not just use a shallow two-layer GNN? If shallow models match deep ones, the over-smoothing machinery is unnecessary. In that case we would reframe the work as a diagnostic study rather than a method. The depth sweep settles this directly. Two hops reach only a gene's immediate neighbor's homolog, so we expect gains from depth mainly for genes whose nearest annotated relative is three or more hops away. We stratify results by that hop distance.

Why not just add residual connections or off-the-shelf PairNorm? Both appear as baselines. Global PairNorm is the specific design we argue against, because it keeps apart the operon members that should merge. The block-norm versus global-PairNorm ablation, together with $R_\ell$ trajectories, shows whether that argument holds.

Decisive Checks

Leakage is the main risk. Homology edges could simply copy labels from near-identical training proteins. We therefore split proteins by 50% identity clusters, as in OMG_prot50, so no test protein shares a cluster with a labeled training protein. We report accuracy binned by maximum identity to any labeled node.

The proposal succeeds only if three results hold. The full model must beat the retrained gLM probe in the 30% and lower identity bins. Its gate, read as an operon predictor, must reach at least the reported 0.77 mAP on E. coli K-12. And $R_\ell$ must track accuracy across depths when Dirichlet energy and total pairwise distance do not. If depth helps only through homology edges and not through gating, the over-smoothing contribution reduces to "use FB-GNN". We would state that plainly.