Evolution.
Amortized.
Natural selection is just the beginning.
HyphAeon amortizes episodic diversifying selection in milliseconds—and then goes further. From the learned geometry of deep time emerge 3D epistatic contact networks, digital mutational scans, and directional phenotype attribution.
When Classical CTMCs
Can't Keep Up.
For three decades, continuous-time Markov models (CTMCs) served as the gold standard of evolutionary biology. But as comparative genomics expanded from dozens of sequences to hundreds of chromosome-level species and millions of pathogen genomes, numerical likelihood optimization hit an inescapable computational and dimensional bottleneck.
Where $L$ is sequence length, $M$ is species lineages, $K = 61$ sense codons ($K^3 = 226,981$ transition matrix operations per site-step), and $d = 384$ partitioned latent dimensions.
Numerical Likelihood
-
×
The Scaling Barrier: Evaluating $\mathcal{O}(L \cdot M \cdot K^3)$ transition matrices across hundreds of species requires tens of thousands of CPU core-hours for a single mammalian proteome scan.
-
×
The Site-Independence Assumption: Codon sites are forced to evolve independently, leaving classical models blind to 3D macromolecular contacts and epistatic interactions.
-
×
Alignment Noise Sensitivity: A single alignment frameshift or sequencing error in one taxon triggers spurious false-positive selection bursts across whole genes.
-
×
Limited to Static Historical Rates: Infers time-averaged rates rather than tracking active temporal sweep velocities or attributing continuous organismal traits.
HyphAeon Geometric Foundation Model
-
✓
Amortized Inference: Replaces numerical matrix tuning with a single forward pass (<1 ms per site, >1,000× speedup per locus, >10,000× proteome-wide).
-
✓
Emergent Epistatic Contacts: Cross-site axial attention correlations ($\mathbf{K}^{\text{APC}}$) recover physical 3D contacts and multi-residue functional sectors (CESI).
-
✓
Surgical Counterfactual Masking: Pinpoints single-taxon sequencing errors via $\Delta\text{LRT}$ attribution, masking corrupted codons without discarding valuable biological sites.
-
✓
Multi-Dimensional Latent Space: Directly projects continuous and discrete traits ($\bar{\Psi}$) into lineage space and tracks real-time temporal sweep velocities.
The Architecture of
Deep Time.
A compact 1.91-million-parameter backbone that internalizes the dual geometry of comparative genomics: multiple sequence alignments paired with continuous phylogenetic metric spaces.
Patristic tree distances $D_{ij}$ are projected into 4D Classical Metric MDS space $\mathbf{Z}$, while cross-species attention is modulated by an analytical Markov substitution kernel $e^{-\lambda D_{ij}}$, guaranteeing topological invariance to phylogenetic noise.
BlockLinear projections, completely insulating positive selection from neutral rate variation.
Dual-Geometry Tensor
Codon sequence columns across $M$ lineages paired with a continuous metric tree $(\mathcal{S}, d_{\mathcal{T}})$ or tree-free empirical pairwise distance matrix $\mathbf{D} \in \mathbb{R}^{M \times M}$.
4D Metric MDS Space
Projects continuous patristic tree distances into 4-dimensional Classical Multidimensional Scaling coordinates $\mathbf{Z} \in \mathbb{R}^{M \times 4}$, providing natural robustness against phylogenetic noise and incomplete lineage sorting (ILS).
Partitioned dN / dS Tracks
Synonymous ($dS$) and non-synonymous ($dN$) signals are isolated into dual 192-dimensional tracks via BlockLinear projections, completely insulating positive selection from neutral synonymous rate variation.
You Don't Have to Be Big
To Succeed.
Modern machine learning often assumes that bigger is always better. HyphAeon takes the opposite path: by embedding the exact geometry of evolutionary divergence into transformer attention, it achieves state-of-the-art inference in just 1.91 million parameters—and was trained from scratch for <$200 in Google Cloud credits.
1.91M Parameters. That's not a typo.
General protein language models rely on massive parameter counts to learn statistical associations across unaligned sequences. But molecular evolution has rigorous mathematical structure that shouldn't have to be learned by brute force.
HyphAeon embeds tree metric geometry (4D Classical MDS), continuous-time Markov substitution kernels ($e^{-\lambda D_{ij}}$), and strict synonymous/non-synonymous block-diagonal linear projections directly into its attention layers.
The result? A complete foundation model that fits in a 7.6 MB checkpoint and required <$200 in Google Cloud compute credits to train from scratch on commodity hardware. True democratized foundation modeling without the supercomputing budget.
Run Live in Your Browser at primaeon.org
Because HyphAeon is on a strict architectural diet, you don't need a compute cluster, a cloud subscription, or a complex Python environment to use it.
At primaeon.org, the entire neural inference engine executes client-side inside your browser tab. Paste your multi-sequence alignment and phylogenetic tree, and get selection scans and epistatic sectors in seconds.
Complexity,
Distilled.
What once required a compute cluster allocation, Slurm array scripts, and days of queue waiting now runs natively with a single interactive CLI command.
[2/3] Projecting blue-shifted phenotype vector $\hat{\mathbf{y}}$ into 4D metric attention space... Done (0.07s)
[3/3] Evaluating directional attribution ($\rho_s$) across 330 codons at FDR $q \le 0.05$...
• Site 292 (A→S): $\rho = +0.537$, $q = 0.006$ [Yokoyama $\Delta\lambda = -10\,\text{nm}$, Sector 2]
• Site 83 (D→N): $\rho = +0.612$, $q = 0.001$ [Yokoyama $\Delta\lambda = -6\,\text{nm}$, Sector 3]
• Site 277 (T→C): $\rho = +0.846$, $q < 10^{-5}$ [Deep-sea parallel tuning, Sector 2]
✔ Recovered 7 of 9 variable in vitro switches in 0.51 seconds (5.5× PPV lift; PAML found 0).
Where Classical $dN/dS$ Failed:
Three Grounded Realities.
Theory is cheap. Likelihood surfaces are expensive. Here is what happened when we took HyphAeon out of the textbook and tested it against real evolutionary puzzles that broke classical continuous-time Markov chains.
The Spectral Tuning Switches
PAML Couldn't See.
A foundational debate in molecular evolution centers on whether statistical $dN/dS$ tests can reliably guide experimental functional biology. In a landmark study, Yokoyama et al. (2008) resurrected 11 ancestral vertebrate rhodopsins (RH1) in vitro, proving that dim-light spectral adaptation ($\lambda_{\max} \in [480, 526]\,\text{nm}$) across deep-sea fish and nocturnal vertebrates is driven by 15 specific amino acid switches across 12 sites.
HyphAeon evaluated directional phenotype attribution ($\bar{\Psi}$) in 0.51 seconds on a laptop CPU. Of the 12 experimentally assayed sites, 9 vary across these lineages: HyphAeon recovers 7 of these 9 at FDR $q \le 0.05$ (77.8% sensitivity on variable drivers), achieving a 5.5× PPV enrichment lift over locus baseline (rising to 7.3× lift among the top 15 candidates).
Unsupervised attention covariance ($\mathbf{K}^{\text{APC}}$) clustered these positions into 4 physical epistatic sectors: Sector 2 (Schiff base tuning pocket, $C=0.582$), Sector 1 (extracellular cap/roof, $C=0.630$), Sector 3 (TM-II trigger, $C=0.481$), and Sector 4 (hydrophobic pressure clamp, $C=0.655$).
| Site | In Vitro $\Delta\lambda$ | PAML Result | HyphAeon ($\rho_s$) | Status |
|---|---|---|---|---|
| A292S | $-10\,\text{nm}$ Blue | Missed ($p=0.48$) | $\rho = +0.537$ ($q=0.006$) | Recovered |
| D83N | $-6\,\text{nm}$ Blue | Missed ($p=0.31$) | $\rho = +0.612$ ($q=0.001$) | Recovered |
| E122Q | $-15\,\text{nm}$ Blue | Missed ($p=0.72$) | $\rho = +0.584$ ($q=0.003$) | Recovered |
| T277C | $-8\,\text{nm}$ Blue | Missed ($p=0.29$) | $\rho = +0.846$ ($q < 10^{-5}$) | Recovered |
| H278N | $-4\,\text{nm}$ Blue | Missed ($p=0.64$) | $\rho = +0.732$ ($q < 10^{-5}$) | Recovered |
| F261Y | $+10\,\text{nm}$ Red | Missed ($p=0.55$) | $\rho = +0.491$ ($q=0.018$) | Recovered |
15,868 Mammalian Families in 109.86 Minutes on a Laptop.
Without Ingesting Alignment Noise.
Comparative genomic scans across 190 mammalian species ($10,270,293$ codons in OrthoMaM v12) have traditionally required over 50,000 CPU core-hours under numerical continuous-time Markov chains. But the deeper hazard is sequencing and annotation noise: draft assemblies (e.g. platypus, koala, monito del monte with contig N50 $\sim 11.5\text{ kb}$) harbor automated gene-prediction frameshift slips that dump dense runs of spurious non-synonymous mutations into alignments.
HyphAeon completed whole-database inference across all 15,868 mammalian gene families ($10.27\text{M}$ codons across mean depth $171.8$ species) in 109.86 minutes on a single Apple M5 Max laptop GPU ($1,558\text{ codons/s}$). Furthermore, evaluating each family across 5 major mammalian subtrees (Primates, Chiroptera, Cetartiodactyla, Carnivora, Rodentia) completed in minutes without tree re-optimization.
Its automated single-taxon counterfactual error filter identified and surgically masked 72,832 localized artifact tracts (mean span 33.5 codons, matching automated single-exon frameshifts). It masked only the corrupted codons in that single draft taxon, keeping the other 189 mammals intact. Spurious sitewise likelihood spikes collapsed from an artificial $\text{LRT} = 14.8$ back to baseline $0.12$, with zero columns dropped.
The Selection Distribution Landscape Across 15,868 Mammalian Gene Families
Decomposing continuous selection density, subcellular compartmentalization, physical micro-clustering, and burst decoupling across $10,270,293$ codons.
Measuring the Gas Pedal,
Not the Odometer.
During the COVID-19 pandemic, public health genomic surveillance analyzed >9.34 million viral sequences across 78 months ($1,863$ unique haplotypes). Standard surveillance relied on two metrics: mutant allele frequency curves, or static multi-year $dN/dS$ scans. Both methods fail in opposite ways.
HyphAeon calculates instantaneous positive selection velocity:
Detects accelerating adaptive lineage expansion weeks before circulating frequency peaks, and drops to zero ($v_s \to 0$) upon fixation to confirm post-sweep neutral stasis.
Across SARS-CoV-2 Spike ($1,274$ codons), sweep velocity detected the emergence of Delta, Omicron BA.1, and JN.1 6–10 weeks before frequency plateaus. In large clinical cohorts, duplicate haplotype pruning collapses 32,768 field isolates into $\approx 150$ unique trees in memory, evaluating the full Spike glycoprotein in <6 seconds on a laptop CPU.
| Variant Site | Epidemic Wave | Peak Velocity ($v_s$) | Lead-Time vs Frequency | Post-Fixation |
|---|---|---|---|---|
| D614G | Initial Expansion (2020) | $+4.82\,\text{yr}^{-1}$ | 8 Weeks Ahead | Neutral Stasis ($v_s \to 0$) |
| N501Y | Alpha & Omicron (2020/21) | $+6.12 \parallel +7.45$ | Bimodal Pre-Peak | Recurrent Sweep |
| F486P | XBB.1.5 Sweep (2023) | $+5.34\,\text{yr}^{-1}$ | 6 Weeks Ahead | Immune Evasion |
| L455S | JN.1 Emergence (2024) | $+6.88\,\text{yr}^{-1}$ | At <2% Frequency | Early Detection |
Longitudinal Selective Velocity vs. Allele Frequency Lag in SARS-CoV-2
Decomposing continuous sweep velocity $v_s(t) = \partial\,\operatorname{logit}(\widehat{\text{LRT}})/\partial t$ across 78 months, $>9.34\text{M}$ genomes, and 129 confirmed sweeps.
Standard surveillance curves (blue) only confirm an adaptation after it reaches high population prevalence ($>80\%$). In contrast, HyphAeon selective velocity $v_s(t)$ (red) peaks 2.5 to 4.4 months ahead of frequency plateaus, detecting exponential lineage drive when the variant is still at $<2\%$ circulating frequency. Once a sweep fixes, selective velocity collapses back to zero ($v_s \to 0$), accurately distinguishing active positive selection from passive neutral stasis.
Engineered for
Empirical Rigor.
Trained to inherit the statistical foundations of classical maximum likelihood, validated against continuous-time null simulations, and stress-tested across empirical genomes and experimental mutagenesis.
Passing the Torch: Trained to Be a Faster HyPhy
For over two decades, Sergei Kosakovsky Pond and Spencer Muse’s HyPhy (Hypothesis Testing using Phylogenies) has anchored statistical molecular evolution, formalizing continuous-time Markov models (CTMC), codon substitution matrices, and landmark selection tests like MEME and BUSTED. But numerical likelihood optimization over hundreds of species is computationally intensive, requiring tens of thousands of CPU hours.
HyphAeon was created not to replace HyPhy's statistical theory, but to inherit its torch and accelerate it. We trained HyphAeon’s neural geometric tensor to directly predict HyPhy-derived site-level Likelihood Ratio Tests (LRT) with continuous numerical fidelity.
By learning the geometric manifold of codon transitions across trees, HyphAeon yields the exact same hypothesis testing power in milliseconds on a single GPU—scaling twenty years of empirical evolutionary rigor to whole-proteome comparative genomics.