Codon optimization model designing host-specific coding DNA for a target protein, conditioned on any of 164 organisms across all domains of life.
No providers recorded yet. Browse all providers
A 300-amino-acid protein can be written in roughly 10^150 different DNA sequences, and the classical way to pick one is to take the host's most frequent codon at every position. That recipe backfires: uniformly frequent codons drain the matching tRNA pools, and the burst of fast translation removes the pauses that let a nascent chain fold. Natural genes interleave slow, rare codons at particular positions instead, and the pattern is local — it depends on where in a sequence a codon sits, not just on the organism.
CodonTransformer learns those positional patterns from evolved sequences. It is a bidirectional transformer trained on just over a million DNA-protein pairs from 164 organisms across bacteria, archaea and eukaryotes, writing a coding sequence for a supplied protein in a host the user names at inference. The representational trick, which the authors call STREAM (Shared Token Representation and Encoding with Aligned Multi-masking), gives every token both an amino acid and a codon — A_GCT is an alanine encoded by GCT — and adds a second family, A_UNK, that fixes the amino acid while leaving the codon open. Masking swaps a token for its own amino-acid-specific mask rather than a generic one, so the protein constraint survives the training objective, and inference is the model filling in the codon half of a specified protein.
It is a collaboration between the Vector Institute and University of Toronto Scarborough on the machine learning side and Sorbonne University, the CNRS and Inserm in Paris on the synthetic biology side, published in Nature Communications in 2025 after a 2024 preprint. Later codon language models, among them TransCodon and codonGPT, cite it as their reference point.
token_type_id, which normally marks question versus answer spans in text, is repurposed so every species has its own token type. One checkpoint holds 164 codon-usage profiles, and switching hosts is an argument rather than a new model.The architecture is BigBird, a BERT variant whose block-sparse attention (block size 64) makes a 2,048-token context affordable: 12 layers, 12 heads, 768-dimensional hidden states, a 3,072-dimensional feedforward block, 89.6 million parameters. Its 90-token vocabulary is 64 known-codon tokens, 21 unknown-codon tokens and five special symbols, so a mask can reveal the required residue while hiding only the codon choice. Training data is 1,001,197 NCBI coding sequences — 56.1% bacteria, 41.4% eukarya, 2.5% archaea. Pretraining masks 15% of tokens over five epochs on 6 and 16 V100 GPUs; fine-tuning runs 15 epochs on four.
The comparison set is 50 natural genes per organism in five model organisms, plus 52 recombinant proteins of biotechnological interest designed for those hosts by CodonTransformer and by the commercial optimizers from Twist Bioscience, Genewiz and IDT plus the neural tool ICOR. On normalized dynamic time warping distance between the %MinMax rare-codon profiles of generated and natural genes, the fine-tuned model reaches 0.08 ± 0.05, alongside Twist at 0.07 ± 0.05 and ahead of IDT at 0.11 ± 0.05 and Genewiz at 0.15 ± 0.07. On the benchmark proteins, Genewiz averages 1.1 negative cis-elements per sequence in E. coli where CodonTransformer stays below 0.4. On 62 synonymous mutations in the E. coli ccdA antitoxin gene, the mutant-to-wild-type log-likelihood ratio correlates zero-shot with measured relative fitness for both checkpoints, and with ribosome stalling for the fine-tuned model only.
The immediate use is heterologous expression: designing a gene for a recombinant protein, therapeutic enzyme or reporter so it expresses in a host that did not evolve it. Because host choice is a token, one workflow covers E. coli production strains, yeast, plant and chloroplast systems, and mammalian cell lines. The Python package bundles data preparation, prediction, fine-tuning and evaluation metrics, and a Google Colab notebook runs the model with no local install, putting it within reach of groups with no GPU. Zero-shot scoring of synonymous mutations extends it to silent-variant interpretation.
CodonTransformer established the organism-conditioned, codon-level masked language model as the default shape for this problem, and later tools benchmark against it rather than the frequency-table heuristics that preceded it. An unusually complete release helps: permissively licensed code, weights, training corpus and a hosted notebook. Its evaluation, though, is in silico throughout — every metric measures resemblance to natural sequences, not protein yield — and the one comparison against experimental data reuses measurements from an earlier study of a single E. coli gene.
Much of this page is generated or calculated automatically. Flag anything that looks off and we will re-run it.