When a newly sequenced bacterium or fungus is annotated, a gene finder proposes protein-coding genes, and each protein is assigned functions from the Gene Ontology (GO). GO is a curated hierarchy in which general terms such as "catalytic activity" sit above increasingly specific terms such as a particular hydrolase reaction. For proteins with close relatives in curated databases, alignment tools transfer these labels well. For the many proteins that share less than 20–30% sequence identity with anything characterized, which biologists call the "midnight zone," both alignment and learned predictors degrade. The harmful failure here is often not silence but false specificity: the model confidently assigns a deep, wrong term when a shallow, correct one was all the evidence supported. Those confident errors then spread into downstream genome reports.
We propose to place proteins and GO terms in a single hyperbolic space. Hyperbolic space is a negatively curved geometry whose volume grows exponentially with radius, so it fits tree-like hierarchies in few dimensions. In this space each GO term is a region rather than a point. The geometry is arranged so that a protein's distance from the origin directly controls how deep in the ontology it is allowed to be annotated. A protein embedded near the center can fall only inside the large regions of general terms. Only proteins pushed toward the boundary can enter the small, nested regions of specific terms. The claim to test is that, trained only on ordinary annotations, this model learns to pull unfamiliar proteins inward. Its predictions on distant homologs would then become shallower but still correct, rather than deep and wrong. If that holds, the model gives an annotation pipeline a built-in "back off to what you can support" behavior that flat classifiers lack.
Core Claim
The obvious combination at this intersection is to replace Euclidean GO embeddings in a protein-language-model predictor with Poincaré ones. Its main selling point, fewer hierarchy violations, is weak, because any flat classifier can be made fully consistent by copying each predicted term up to its ancestors after the fact. We therefore do not argue for hyperbolic geometry on consistency grounds. Our claim is narrower and testable: when GO terms are nested regions in hyperbolic space, the radial coordinate of a protein becomes a learned, label-structured specificity signal.
This signal should reduce over-specification on proteins far from the training set, at matched recall, compared with three alternatives:
- Euclidean region models with the same parameter budget.
- Flat classifiers with post-hoc depth thresholds.
- Nearest-neighbor transfer that backs off to terms shared by the neighbors.
A second claim concerns scale. Keeping only implication constraints makes this region-based inference linear in the number of ontology edges. It can then run over full GO-sized label sets without pruning rare leaf terms.
Where This Sits
Two hyperbolic works supply the method and define the constraints.
Hyperbolic Embedding Inference for Structured Multi-Label Prediction (HMI) represents labels as Poincaré hyperplanes whose half-spaces correspond to Euclidean enclosing balls. It enforces "A implies B" as ball containment and mutual exclusion as disjointness, and it matches box models with far fewer dimensions. We reuse its containment construction. HMI, however, was shown only on small tabular gene-expression sets, its pairwise exclusion terms do not scale, and it never studied what the radial position of an input means for prediction depth.
Hyperbolic Genome Embeddings is the motivating observation. Its Lorentz convolutional networks generalize under homology splits, where whole evolutionary branches are held out. Under in-silico mutagenesis of conserved sites, its embeddings collapse toward the center of the space, which the authors read as low confidence. That paper classifies DNA sequences and never touches GO. We ask whether the same inward collapse, tied to nested label regions, becomes a usable annotation-depth signal.
The same paper also constrains our design. Its authors found no gain for promoter detection and attribute this to combinatorial motif logic that tree-shaped geometry does not capture. We therefore keep the sequence encoder Euclidean, using a pretrained protein language model (a transformer trained to fill in masked amino acids). Hyperbolic geometry is confined to the shared protein–label space, where the hierarchy actually lives.
On the annotation side, all current GO-aware predictors work in flat space:
- Partial order relation-based gene ontology embedding improves protein function prediction (PO2GO) learns Euclidean GO term embeddings from shortest reachable path lengths with contrastive learning and matches them against ESM-1b protein embeddings.
- OntoProtein adds a Euclidean translational knowledge-graph loss to protein pretraining.
- ProtGO runs Euclidean graph networks over the GO graph on CAFA5 and must prune rare terms to stay tractable.
- GoBERT models annotation profiles alone, without sequence.
None of these ties a protein's representation to a geometric notion of how specific its annotation may be. Embeddings from deep learning transfer GO annotations beyond homology supplies the evidence that the problem is real. Its nearest-neighbor transfer in language-model embedding space loses several points of maximum F-measure once identity to the reference set drops below 20%. That paper also gives our most transparent reference baseline.
Research Program
Encoder and embedding. Each protein is first encoded by a frozen ESM-1b model, the same encoder PO2GO uses, so that encoder strength is held constant. A small Euclidean network then maps this encoding onto the Lorentz hyperboloid, a model of hyperbolic space that is numerically stable for training. For the label head only, points are converted to the Poincaré ball in float64.
Term regions. Each GO term $t$ is a Poincaré hyperplane with an associated enclosing ball of Euclidean center $m_t$ and radius $r_t$, following HMI. A protein embedding $x$ is scored for term $t$ by its signed distance to the hyperplane.
Containment loss. For every is_a and part_of edge from child $c$ to parent $p$, we apply a hinge loss that pushes the child's region inside the parent's:
$$\mathcal{L}_{\text{contain}} = \sum_{(c,p)} \max\big(0,\ \|m_c - m_p\| + r_c - r_p\big)$$
The sum runs over ontology edges only. We deliberately drop HMI's pairwise exclusion terms, because explicit disjointness is rare in GO and is what made HMI quadratic. The cost per epoch is therefore linear in the edge count, which is what allows training on all 31,466 CAFA5 terms without pruning.
Training. The protein side is trained with a standard multi-label loss over annotated terms plus their ancestors, together with the containment loss. Nothing in training tells the model about sequence identity or novelty. If the norm of $x$ ends up tracking distance from the training set, that behavior is emergent, and emergence is the thing we want to test.
Root anchoring. We pin the root of each sub-ontology to a region containing the origin. This ensures that a protein with an uninformative encoding defaults to root-level terms, the geometric analogue of "function unknown beyond this level."
Application regime. The intended use is in gene-prediction pipelines. As a secondary, qualitative study, we will run the trained head over proteins predicted by the pipeline in mettannotator on public prokaryotic assemblies. We will report how many proteins labeled only "hypothetical" receive confident shallow terms and how those terms are distributed by depth. This study has no ground truth, and we will present it only as an illustration of use.
Baselines
Naive reference: flat probe. A two-layer classifier on the same frozen ESM-1b features. Its outputs are made consistent by propagating each predicted term to its ancestors, and its depth is controlled by a single global confidence threshold. This baseline is the realistic default that most groups would ship, and it already has zero hierarchy violations by construction. Beating it therefore has to mean better depth-stratified precision, not better consistency.
Transparent existing method: SeqVec nearest-neighbor transfer. The method of Embeddings from deep learning transfer GO annotations beyond homology. It reports CAFA3 maximum F-measure of 37 ± 2% for BPO, 50 ± 3% for MFO and 57 ± 2% for CCO. Restricted to proteins with under 20% identity, it reports 33 ± 2%, 43 ± 3% and 53 ± 2%. We will re-run it on ESM-1b features under our own splits, so the comparison isolates the head rather than the encoder.
Strongest learned competitor: PO2GO. It shares our encoder and is the closest Euclidean hierarchy-aware design. Its authors report state-of-the-art maximum F-measure, minimum semantic distance and precision–recall area on CAFA3 over Diamond, DeepGOPlus and ESM-1b-based methods. The specific CAFA3 values sit in that paper's supplement and are not in our file, so there is no reported number on Lacuna for PO2GO on CAFA3. We will retrain it from the released recipe on identical splits.
Large-ontology reference: ProtGO-style pruned graph network. ProtGO reports only relative gains of 8–27% in maximum F-measure over vanilla protein language models. We therefore reimplement a pruned Euclidean graph-network head as the CAFA5 reference.
Key ablation: Euclidean regions. The decisive ablation keeps everything identical except geometry. Labels become Euclidean balls with the same containment loss, the same origin-anchored root and the same parameter count, swept over 32 to 1,024 dimensions.
Second ablation: hyperbolic points. Hyperbolic label points with no containment and no root anchoring. This separates the effect of curvature from the effect of nested regions.
Fair comparison. All methods get the same frozen features, the same training data, and the same budget of hyperparameter trials. We count a win only if our model reduces over-specification at matched recall in the low-identity bin, with confidence intervals from bootstrap resampling over proteins that exclude zero. Gains confined to high-identity proteins will not count.
Why not just…?
Why not just threshold a flat classifier by depth-specific confidence? This is the most serious threat. A flat probe with per-depth calibrated thresholds might already back off on unfamiliar proteins, if its logits for deep terms fall naturally when inputs are out of distribution. We will tune per-depth thresholds for the flat probe on validation data and compare depth–precision curves in each identity bin. If the flat probe matches the hyperbolic model there, the geometric story adds nothing beyond calibration, and we will report the result as negative.
Why not just back off nearest-neighbor transfer to the terms its neighbors share? Taking only the terms common to most of the k nearest training proteins also becomes shallower when neighbors disagree. It is an honest, simpler competitor, and we include it with a tuned k and agreement threshold. The geometric model can win only if a learned embedding places distant proteins better than raw neighbor agreement does. The weak correlation between embedding similarity and sequence similarity reported in the SeqVec study, about 0.29, suggests raw neighbor geometry is noisy, but our experiments, not that number, will decide.
Why not just use high-dimensional Euclidean region or partial-order embeddings like PO2GO? HMI found that Euclidean box models needed 1,000 or more dimensions to match hyperbolic regions in 32–256. That result was on small tabular data, however, and may not transfer to language-model features. The Euclidean-region dimension sweep tests this directly. If Euclidean balls at 1,024 dimensions match hyperbolic regions at 64 dimensions on over-specification, the honest conclusion is that hyperbolic geometry buys compactness, not behavior.
Proposed Experiments
Data and splits. We train and test on CAFA3 under its standard split and on CAFA5 with all 31,466 terms kept. On top of these we build two additional test conditions:
- Identity bins. Test proteins are clustered against the training set into maximum-identity bins of under 20%, 20–40%, and over 40%.
- Clade holdout. Following the homology-splitting protocol of Hyperbolic Genome Embeddings, entire taxonomic families are withheld, which mimics annotating a newly sequenced lineage.
Metrics. We report:
- Maximum F-measure, minimum semantic distance and precision–recall area. Minimum semantic distance directly penalizes over-specific errors.
- Precision as a function of GO depth.
- An over-specification rate: the fraction of predicted terms that are deeper than any true term on their branch.
- Spearman correlation between embedding norm and maximum identity to the training set.
- For CAFA5, maximum F-measure on terms with fewer than ten training annotations, the terms that pruning discards.
Decisive checks. There are three:
- Emergence. On the clade holdout, embedding norm must correlate positively with identity to the training set even though identity was never a training signal. A near-zero correlation falsifies the mechanism.
- Matched-recall comparison. In the under-20% bin, at matched recall, the hyperbolic region model must show a lower over-specification rate and a lower minimum semantic distance than all three alternatives: the Euclidean-region ablation, the per-depth-thresholded flat probe, and neighbor back-off transfer.
- Scale. On full CAFA5, the unpruned hyperbolic head should train in time comparable to the pruned graph-network reference while improving rare-term maximum F-measure.
Outcomes. If the first two checks pass, hyperbolic label regions give annotation pipelines a principled way to say less when they know less. If only the third passes, the contribution shrinks to an efficient, unpruned consistent label head, and we would present it as exactly that.
References
- Hyperbolic Embedding Inference for Structured Multi-Label Prediction
- Hyperbolic Genome Embeddings
- Partial order relation-based gene ontology embedding improves protein function prediction
- OntoProtein: Protein Pretraining With Gene Ontology Embedding
- ProtGO: universal protein function prediction utilizing multi-modal gene ontology knowledge
- GoBERT: Gene Ontology Graph Informed BERT for Universal Gene Function Prediction
- Embeddings from deep learning transfer GO annotations beyond homology
- mettannotator: a comprehensive and scalable Nextflow annotation pipeline for prokaryotic assemblies