A synonymous variant changes a DNA letter in a gene without changing the protein it encodes. Such variants are routinely filtered out of clinical genome analysis, yet they cause real disease. Most current predictors ask one question each: does the variant break splicing, does it change RNA folding, or does it look odd to a language model trained on coding sequences. We propose a different question. Among all the DNA sequences that would encode exactly the same protein, how unusual is the patient's sequence, and which biological constraint makes it unusual? To answer this, we define a probability distribution over every synonymous rewrite of a gene region. Each factor of the distribution encodes one mechanism: codon preference, directional codon-to-codon context, splice-motif strength, or base pairing with partners observed in living cells. We then compute the distribution's normalizing constant exactly, so the score of a variant is a calibrated log-ratio that splits additively into one contribution per mechanism.
The theoretical side of the project concerns that normalizing constant. Summing over all synonymous rewrites is a weighted counting problem with constraints, of the kind studied in counting complexity. Its constraints are asymmetric: they depend on which codon sits where and in which direction the ribosome reads. The search space is also not Boolean, since each site allows between one and six codons. Long-range base pairs can cross one another. We will classify which of these factor families allow exact counting, and use exactness where it holds. Our claim is narrow. Exact normalization over the synonymous ensemble should give better-calibrated and mechanism-attributable pathogenicity scores than single-mechanism predictors or unnormalized feature stacks. A small, well-defined complexity classification then says when that exactness can be kept.
Why this matters, and what prior work leaves open
The medical case is settled. Chen et al. found that synonymous and missense coding variants have similar likelihood and effect size of disease association. SpliceTransformer attributes about 60% of intronic and synonymous pathogenic ClinVar variants to splicing changes. That leaves a large remainder acting through other routes. Two examples are the structure-disrupting PNPO epilepsy variant found by PrismNet and the cryptic-splice ABCA3 variant behind lethal neonatal respiratory failure.
Each of these papers supplies one mechanism. None of them separates the mechanisms when they act at the same time. The research file names this multi-mechanism confounding as the main open problem. Codon language models such as CaLM, an 86M-parameter encoder over a 64-codon vocabulary, and cdsFM, models of up to 1B parameters trained on 60M coding sequences, do capture synonymous context. cdsFM even flags pathogenic synonymous variants in AGPAT2 and RAC2. But their likelihoods do not tell us which constraint was violated, and they are not explicitly normalized over the protein-preserving alternatives at a site.
Two features of a site should matter for its score. One is how many synonymous options it has: Met has one codon, Leu has six. The other is how tightly the surrounding constraints restrict those options. A substitution at a site where nearly every synonymous alternative also breaks a splice enhancer says something different from a substitution at a site where it alone does. Only a normalized ensemble makes that distinction quantitative.
The counting-complexity literature supplies the method and the limits. Holant problems are counting problems in which local constraint functions, called signatures, sit on the vertices of a graph and variables sit on its edges. Lin et al. gave a complete dichotomy for asymmetric Holant problems over the Boolean domain with non-negative weights. Our weights are non-negative too, but our domain is a per-site restricted codon alphabet rather than {0,1}.
Holographic reductions are coordinated changes of basis on the edges of such a graph. They leave the total count unchanged while turning dense signatures into sparse ones. Cai, Lu and Xia showed that such reductions onto matchgates, gadgets whose counts reduce to planar perfect matchings computable by a Pfaffian, capture exactly the planar counting problems that are tractable. Cai and Lu extended parts of this picture to unsymmetric signatures but left general cases open.
These results constrain us as much as they help. A pairing graph drawn with arcs above and below the sequence backbone is planar even when the pairs cross. However, the pairing factor is not a perfect-matching constraint, so planarity alone does not promise tractability. Zeros of Holant problems further warns that standard approximation guarantees weaken once asymmetry removes the collapse to Hamming weight. We therefore treat holographic tractability as a hypothesis to test on one specific signature, not as an assumption.
Core Claim
Fix a gene window and the protein it encodes, and let $\mathrm{Syn}$ be the set of all codon sequences $s = (c_1,\dots,c_n)$ that encode that protein. Here $c_i$ is the codon at site $i$, and $s_i$ denotes a nucleotide in a pairing factor. We define
$$P(s) = \frac{1}{Z}\prod_{i} u(c_i)\prod_{i} b(c_i, c_{i+1}) \prod_{(i,j)\in E} p(s_i, s_j)\prod_{k} m_k(s_{W_k}).$$
The factors are as follows. $u$ is codon preference. $b$ is a directional codon-junction factor; it is asymmetric because $b(x,y) \neq b(y,x)$, which reflects the 5'→3' reading direction. $E$ is the set of base pairs supported by in vivo icSHAPE reactivity, and $p$ rewards Watson–Crick and wobble compatibility across each pair. $m_k$ are splice-motif factors on windows $W_k$. $Z$ is the sum of the product over all of $\mathrm{Syn}$.
The variant score is $S(v) = \log P(s_{\text{alt}}) - \log P(s_{\text{ref}})$. Because $Z$ cancels in this difference, the score itself splits exactly into one term per factor family.
Exact $Z$ is still essential for two things. The first is fitting the factor weights by maximum likelihood on population coding sequences. The second is a per-site constraint strength, the marginal probability of the reference codon, which places each site's score on a common scale. We predict that ensemble-normalized scores outperform the same features used without normalization. We also predict that the per-factor split recovers the known mechanism of variants whose mechanism is independently labeled.
Research Program
The first component is the scorer. The codon and junction factors form a chain, which can be summed exactly with transfer matrices. Nested pairing arcs can be summed exactly with interval dynamic programming over the restricted alphabet. Crossing arcs raise the treewidth of the factor graph, a measure of how far it is from a tree; inference is exact but exponential in that quantity. We will measure, for every ClinVar synonymous window, how often treewidth stays small enough for exact inference. This tells us empirically how much the theory matters. Weights are fit only on non-clinical data: human coding sequences, the GTEx splicing data behind SpliceTransformer for the motif factors, and icSHAPE pairs from seven cell types for the pairing factor.
The second component is a bounded classification question. For the family "chain factors plus a fixed planar crossing-pair set with signature $p$," we ask which choices of $u$, $b$ and $p$ give polynomial-time exact counting. The approach encodes each codon choice in Boolean variables and searches for a basis change under which the pairing and site signatures become matchgate-realizable, following the realizability analysis of Cai and Lu. We will also try to carry the non-negative asymmetric hardness gadgets of Lin et al. over to per-site list domains of size up to six. Either outcome is useful. A tractable class gives exact scores in pseudoknot-rich regions. A hardness result justifies switching to sampling there, and we would report the approximation error of that sampling against exact values on small windows.
Baselines
The naive reference has two parts. The first is the clinical default: every synonymous variant is scored as benign, which sets the AUROC floor at 0.5. The second is the reference codon's frequency minus the alternate codon's frequency, a pure codon-usage difference. Any method that cannot clearly beat the codon-usage difference is not adding information.
The strongest learned competitor is a cdsFM masked-codon log-likelihood ratio. We mask the variant codon, renormalize the model's prediction over that site's synonymous codons only, and compare the alternate codon with the reference. This is the closest thing to our ensemble score that a large model can offer. We use the released EnCodon weights without clinical fine-tuning, matching our rule of training on no clinical data. We search no more than a small grid of context lengths, the same budget we give our window size. No reported result found on Lacuna for cdsFM AUROC on ClinVar synonymous variants; the paper reports only that its benchmark includes 48,000+ ClinVar variants. We will therefore recompute this baseline ourselves. CaLM frozen embeddings with a logistic head are a second language-model baseline. Its only reported figure, Pearson R = 0.75 on FLIP melting point, measures a different task and is not a target here.
The strongest mechanism-specific competitor is the SpliceTransformer variant delta. It reports about 91% PR-AUC and 85% top-k accuracy on tissue splice-site prediction, but no number specific to synonymous pathogenicity. We also build a stacked baseline. It feeds the SpliceTransformer delta, a nested-folding free-energy change, the codon-usage difference and the cdsFM ratio into a gradient-boosted classifier tuned by nested cross-validation on the same splits.
Two ablations isolate the key ingredient. The first uses our own factor values as raw deltas, without the synonymous normalization or the constraint-strength rescaling. The second drops the crossing-pair factors. Beating the proposal requires two things. On gene-held-out ClinVar synonymous variants, our AUPRC must exceed the cdsFM ratio, and its confidence interval must not overlap that of the raw-delta ablation. Our method must also be at least competitive with the stacked baseline while using no clinical labels for training.
Why not just…?
Why not just use the cdsFM likelihood restricted to synonyms? This is the real threat. A masked language model renormalized over synonyms already gives a context-aware conditional probability for each codon. If it matches our discrimination, our contribution shrinks to attribution, and we will say so. The experiment that settles it is mechanism recovery. On variants with independent labels, we test whether the per-factor split names the right mechanism and whether model attention or gradients can do the same. The labels come from ClinVar splicing-validated cases, PrismNet-style riboSNitches, which are variants that switch an RNA region between paired and unpaired states, and expression-effect variants from the membrane-protein set. The language model cannot do this by construction without a post-hoc attribution step, and we will compare against the best such step.
Why not just stack existing single-mechanism predictors? A gradient-boosted combination of SpliceTransformer, a folding free-energy change and codon scores is cheap and strong. What it lacks is a common scale across sites with different degeneracy and different local constraint. The raw-delta ablation, which uses the same features without normalization, is the direct test. If normalization adds nothing over stacking, the ensemble idea fails.
Why not just use dynamic programming or junction trees and skip holographic theory? For most windows this will probably suffice. We expect nested pairing to dominate, and McCaskill-style interval dynamic programming is exact there. We therefore present the classification as secondary and report the measured fraction of windows whose treewidth exceeds exact-inference limits. If that fraction is negligible, the theory remains a contribution to complexity theory on its own terms. It would not be a requirement of the biology, and we would make that clear.
Proposed Experiments
The primary test uses ClinVar synonymous variants, split by gene so that no gene contributes to both weight fitting and evaluation. The metrics are AUROC and AUPRC, with bootstrap confidence intervals. A secondary test uses the 1,054 synonymous variants of SLC22A1, GPR68 and KCNJ2 with measured expression from the cdsFM paper. Here we report the Spearman correlation between the score and expression, and check whether the codon and junction terms, rather than the splice term, carry the signal. A third test uses synonymous entries from the MaveDB deep mutational scanning studies.
The decisive check is mechanism attribution. On the labeled subsets described above, the dominant factor should match the label well above the rate expected from per-mechanism base rates. The ABCA3, BVES and PNPO cases serve as qualitative sanity checks. A cell-type test asks whether swapping the icSHAPE structure of one cell line for another changes pairing-term scores mainly in the 3–5% of regions that PrismNet reports as structurally variable.
The project fails if two things both happen: the ensemble score does not beat the raw-delta ablation, and the attribution is no better than the base rate. Either result would show that the normalization step, the one new ingredient, adds nothing.
References
- Non-Synonymous and Synonymous Coding SNPs Show Similar Likelihood and Effect Size of Human Disease Association
- SpliceTransformer predicts tissue-specific splicing linked to human diseases
- Predicting dynamic cellular protein–RNA interactions by deep learning using in vivo RNA structures
- A novel synonymous ABCA3 variant identified in a Chinese family with lethal neonatal respiratory failure
- Codon language embeddings provide strong signals for use in protein engineering
- A Suite of Foundation Models Captures the Contextual Interplay Between Codons
- The Complexity of Holant Problems over Boolean Domain with Non-Negative Weights
- Holographic Algorithms with Matchgates Capture Precisely Tractable Planar_#CSP
- Holographic algorithms with unsymmetric signatures
- Zeros of Holant problems: locations and algorithms