Spectral Codon Design: Frequency-Domain Editing of mRNA Structure Graphs

Every protein can be spelled in astronomically many synonymous ways — roughly $10^{632}$ different messenger RNA sequences encode the same SARS-CoV-2 spike protein — and which spelling you choose changes the protein yield by orders of magnitude, because synonymous codons differ in the transfer RNAs they demand and in the local base-pairing structures they create along the transcript. The best current design tool, LinearDesign, treats the transcript as a one-dimensional string parsed by a grammar and optimizes two scalar scores: codon frequency matching and overall folding stability, which together took an mRNA vaccine from a 3.9-hour chemical half-life to 20 hours and produced up to a 128-fold higher antibody response in mice Algorithm for optimized mRNA design improves stability and immunogenicity. We propose a different representation: treat the folded transcript as a graph — nodes are codons, edges are the backbone plus predicted base-pairing contacts — and redesign the synonymous sequence by editing that graph in its frequency domain. The governing principle comes from spectral graph augmentation: a graph's low Laplacian frequencies encode its global architecture, and its high frequencies encode local detail that is largely noise Through the Dual-Prism: A Spectral Perspective on Graph Data Augmentation for Graph Classifications, Revisiting Graph Contrastive Learning from the Perspective of Graph Spectrum.

This split maps with unusual precision onto codon design. Global stem-loop architecture — the low frequencies of the contact graph — is what governs chemical stability and immune performance, the quantity LinearDesign's minimum-free-energy score captures only as a single scalar. Local base-pairing barriers near slow codons — high-frequency structure — are what stall ribosomes, and elongation models show that context up to 80 codons away measurably affects ribosome speed SWAMamba: A Sliding Window Attention Mamba Framework for Predicting Translation Elongation Rates. And, uniquely in this domain, semantic invariance is guaranteed for free: any synonymous substitution leaves the protein unchanged, so the "semantic drift" problem that plagues graph augmentation on molecules — where a perturbed graph may no longer mean the same thing — is eliminated by construction. The in vitro–in vivo translation gap supplies the evaluation regime that makes this more than a re-encoding: under physiological stress, cells globally cut protein synthesis by roughly 40%, a shutdown that standard ribosome-profiling measurements cannot even see because of how they normalize read counts Time-resolved proteomics vs. ribosome profiling reveals translation dynamics under stress. Designs that look identical on steady-state in vitro metrics can therefore diverge sharply in vivo, and a design method that removes local ribosome barriers should be more robust to a stressed, tRNA-depleted cell than one that merely maximizes average codon frequency.

Core Claim

Codon optimization should be formulated as a constrained spectral graph-editing problem: choose the synonymous variant whose contact graph preserves the original's low-frequency spectrum — keeping global folding architecture, and with it the stability gains LinearDesign demonstrated — while selectively destroying high-frequency local structure at positions where a learned model predicts ribosome stalling. Formally, for protein $p$ with synonymous variant set $\mathcal{S}(p)$, contact-graph Laplacian $L(v)$ for variant $v$, the $k$-th smallest eigenvalue $\lambda_k$, a window indicator vector $x_i$ around codon $i$, and a predicted stall propensity $s_i$:

$$\min_{v' \in \mathcal{S}(p)} \; \sum_i s_i \, x_i^\top L(v')\, x_i \quad \text{subject to} \quad \max_{k \le K} \, |\lambda_k(v') - \lambda_k(v)| \le \epsilon$$

The quantity $x_i^\top L\, x_i$ counts, approximately, the base-pair edges crossing the window around codon $i$ — the structural barrier a ribosome must melt there — so the objective minimizes barrier energy weighted by where stalls are predicted, while the constraint pins the global architecture. Candidate codon swaps change only local edges, so the eigenvalue drift is checked with first-order perturbation updates $\delta\lambda_k \approx u_k^\top (\delta L)\, u_k$ (with $u_k$ the $k$-th eigenvector), the same matrix-perturbation machinery that lets SPAN guide edge flips without recomputing spectra and brings the cost down from cubic to the Lanczos regime Spectral Augmentation for Self-Supervised Learning on Graphs.

Research Program

Three components. First, the representation: fold each synonymous variant with the same secondary-structure predictor that underlies lattice-based design Algorithm for optimized mRNA design improves stability and immunogenicity and build the codon-level contact graph. A validation task precedes any model training: establish empirically that low-frequency eigenvalue drift actually tracks global stability proxies (folding energy, predicted half-life) on real transcripts. This is not guaranteed — standard spectral theory assumes connected nodes are similar, whereas base-pairing edges connect complementary, dissimilar nucleotides, so the homophily assumption underlying most spectral augmentation is untested on RNA graphs. We treat this as an explicit analysis deliverable, not an assumption, and it is the main scientific risk.

Second, the encoder: a graph neural network over the contact graph that predicts per-codon elongation rates and overall expression, trained with spectral contrastive augmentation in the style of Dual-Prism and SPAN — one view perturbs high frequencies only — so the encoder learns invariance to local pairing noise and sensitivity to global architecture. Third, the stress-shift evaluation harness: because standard Ribo-seq labels inherit the normalization blindspot documented by the proteomics study Time-resolved proteomics vs. ribosome profiling reveals translation dynamics under stress, we evaluate whether design rankings survive a simulated global capacity downshift of the measured magnitude (~40%), and whether spectral augmentation during training — which creates views of the same graph under perturbed conditions — confers ranking stability the way adaptive readout modules did for clinical transfer in DeepSADR, where removing the adaptation dropped clinical AUC from 0.856 to 0.662 DeepSADR: Deep Transfer Learning with Subsequence Interaction and Adaptive Readout for Cancer Drug Response Prediction.

Baselines

The naive reference point is wild-type codon usage and high-CAI frequency matching, the decades-old heuristic of picking each amino acid's most common codon; its ceiling is documented: naive frequency matching recovers only 20.9% of natural codons, against 24.8% for CodonMPNN CodonMPNN for Organism Specific and Codon Optimal Inverse Folding, and CAI-only designs gave LinearDesign's unstable 3.9-hour half-life benchmark Algorithm for optimized mRNA design improves stability and immunogenicity. The strongest existing design method is LinearDesign itself, which jointly optimizes folding stability and codon frequency; it reports a 20-hour half-life, up to 3-fold higher cell-culture expression, and up to a 128-fold antibody titer increase in mice, and any spectral method that cannot match its stability at equal CAI has failed. We will run LinearDesign on identical targets, give both methods the same folding predictor, the same compute budget, and the same search time (LinearDesign's 11-minute spike-protein runtime sets the efficiency bar), and count our method as succeeding only if it matches LinearDesign's MFE and CAI while producing measurably smoother predicted elongation profiles and better stress-shifted rankings. The strongest predictive baseline is SWAMamba, which reports Pearson correlations with measured elongation of 0.641 in humans, 0.630 in yeast, 0.640 in E. coli, and 0.596 in C. elegans, against 0.607 for RiboMIMO in humans SWAMamba: A Sliding Window Attention Mamba Framework for Predicting Translation Elongation Rates; we retrain our encoder and a matched-capacity SWAMamba on identical Ribo-seq splits with the same tuning budget. The key ablation replaces spectral augmentation with DropEdge on the identical graph encoder: Dual-Prism showed random edge dropping distorts connectivity and diameter while high-frequency-only perturbation preserved them and lifted IMDB-M accuracy from 48.80% to 61.67% Through the Dual-Prism, and on RNA graphs the severed edges would be exactly the stem structures that carry stability, so we expect this ablation to collapse both prediction quality and design validity.

Why not just…?

Why not just use LinearDesign? This is the real threat, and we do not argue around it: LinearDesign is fast, validated in mice, and already solves the stability half of our objective with its minimum-free-energy term. Our claim is that its two scalars conflate two things that the spectrum separates — global architecture worth preserving and local barriers worth destroying — and that a design matching LinearDesign on both MFE and CAI but differing in high-frequency profile near predicted stall sites should elongate more smoothly and degrade more gracefully under the ~40% stress-induced capacity loss that Ribo-seq-trained tooling cannot even detect Time-resolved proteomics vs. ribosome profiling. Experiment 1 below is built precisely to settle this on matched designs; if MFE-and-CAI-matched spectral variants show no elongation or robustness difference, the proposal's central claim is wrong and we will say so.

Why not just use a one-dimensional sequence model? SWAMamba already predicts elongation well from the linear sequence, and Equi-mRNA showed that adding geometric inductive bias to codon tokens — synonymous codons as rotations in a rotation group — bought up to 10% downstream accuracy with only 15 million parameters, beating transformers several times larger Equi-mRNA: Protein Translation Equivariant Encoding for mRNA Language Models. That result is evidence for inductive bias, not against our graph bias, but the honest possibility remains that a windowed sequence model implicitly learns the contact structure. The matched-capacity comparison on identical Ribo-seq splits answers this directly; the graph encoder must beat SWAMamba's reported correlations to justify its existence, and the non-local base-pair edges — including pairings a 1D window cannot express — are the mechanism we claim matters.

Why not just perturb the graph spatially, with random edge drops? Because on RNA contact graphs the failure mode is worse than in small molecules: stems and pseudoknot junctions are the graph's bridges, and severing them destroys the very stability that produced LinearDesign's in vivo gains. The evidence is direct — DropEdge significantly distorts connectivity and diameter where high-frequency-only spectral perturbation does not Through the Dual-Prism, and spectrally guided flips outperformed spatial contrastive methods across 17 datasets Spectral Augmentation for Self-Supervised Learning on Graphs; for SPAN's per-dataset accuracies, no reported number found on Lacuna for its individual benchmark tables, so we rely on its relative claims. Our DropEdge ablation makes the comparison concrete rather than rhetorical.

Proposed Experiments

Experiment 1, the decisive one, constructs matched design pairs: for a panel of therapeutically relevant targets including the SARS-CoV-2 spike and VZV gE sequences used by LinearDesign, generate variants matched on MFE and CAI but with high-frequency structure near stall sites either removed or left intact, then test whether the elongation encoder and the yeast synonymous-fitness data separate them. The yeast benchmark is concrete: CodonMPNN correctly assigned higher likelihood to the higher-fitness synonymous variant in 72.4% of cases CodonMPNN; our graph-spectral encoder must beat that on the same Shen et al. mutant set, structure-free — a setting CodonMPNN cannot enter since it requires a solved 3D protein backbone.

Experiment 2 evaluates the encoder on the four-species Ribo-seq elongation benchmarks, where the numbers to beat are Pearson correlations of 0.641 (human), 0.630 (yeast), 0.640 (E. coli), and 0.596 (C. elegans) from SWAMamba SWAMamba, with identical splits, and includes the DropEdge ablation and a low-label regime at 1% supervision, echoing the setting where spectral augmentation shows its largest gains — Dual-Prism's robustness at 1% labels Through the Dual-Prism and FracAug's improvements of up to 5.72% AUROC and 7.23% AUPRC under 1% supervision on molecular graphs FracAug: Fractional Augmentation boost Graph-level Anomaly Detection under Limited Supervision.

Experiment 3 runs the stress-shift harness: rescale elongation labels by a global capacity factor calibrated to the measured ~40% shutdown Time-resolved proteomics vs. ribosome profiling and measure the rank correlation of design rankings between steady-state and stressed conditions for spectrally augmented versus non-augmented training, taking DeepSADR's ablation collapse (0.856 to 0.662 AUC when adaptation was removed) as the precedent that adaptation mechanisms, not raw capacity, carry transfer DeepSADR.

Experiment 4 benchmarks on the six mRNA property tasks used by Equi-mRNA — flu vaccine expression (MLOS), mRFP synthetic expression, E. coli expression, riboswitch activity, iCodon human stability, and SARS-CoV-2 vaccine degradation Equi-mRNA; Equi-mRNA reports only aggregate gains of up to 10%, and no reported per-task number found on Lacuna for its individual benchmark correlations, so we will reproduce its aggregate claim on our compute and compare per-task. The closing decisive check ties everything together: a spectral design that matches LinearDesign on stability metrics, beats frequency matching and CodonMPNN on yeast synonymous fitness, and retains its predicted expression ranking under the stress downshift would establish that the frequency domain is the right coordinate system for codon design; failure on Experiment 1's matched-pair test would falsify the core claim regardless of the other outcomes.