Simulation / Modeling / Design Boost Protein Expression and Predict Variant Effects with CodonFM 5B RNA sequences with different leucine codons pass through model layers to protein structure illustrations. Dec 02, 2026 By TJ Chen, Laksshman Sundaram, Gary Burnett, Chelsea Gomatam and Fan Cao Discuss (0)

AI-Generated Summary

  • CodonFM expands with two new 5-billion-parameter models, CodonFM-5B and CodonFM-5B-CDWT, to support variant effect prediction and codon optimization for therapeutic RNA design.
  • The models tokenize individual codons rather than amino acids, preserving synonymous sequence variation that amino-acid-based protein models cannot distinguish.
  • CodonFM-guided designs increased protein expression relative to wild-type sequences by nearly 4x for GFP and 2x for luciferase in A549 human epithelial cells.
  • On the ClinVar dataset, the 5B models outperform smaller CodonFM models and other evaluated methods at distinguishing pathogenic synonymous variants from matched benign variants.
  • After controlling for GC content, trinucleotide context, and gene identity, the 5B models outperform other evaluated algorithms on 1,471 curated cancer-observed synonymous variants from COSMIC and gnomAD.
  • EnCodon 5B outperforms other evaluated models, including two state-of-the-art approaches, on reported mRNA design tasks using sequence embeddings for translation efficiency and protein expression prediction.

Next Steps

Powered by NVIDIA Nemotron. AI-generated content may summarize information incompletely. Verify important information. Learn more

Different RNA sequences can encode the same protein but produce different amounts, making sequence selection a major challenge for therapeutic RNA design. The CodonFM family of open RNA foundation models is expanding with two new 5-billion-parameter models to help researchers tackle this challenge and analyze genetic variants.

CodonFM learns context-dependent codon usage patterns in protein-coding sequences. By tokenizing individual codons rather than amino acids, it preserves synonymous sequence variation that amino-acid-based protein models cannot distinguish.

The new models, CodonFM-5B and CodonFM-5B-CDWT, support variant effect prediction and codon optimization for researchers working in genomics, protein expression, and therapeutic RNA design. Both are available under the same open license as the existing CodonFM checkpoints.

This post examines how the CodonFM-5B and CodonFM-5B-CDWT models support RNA sequence design and variant interpretation, then shows how to use them in Python to score synonymous variants and extract sequence embeddings.

Optimize protein expression with CodonFM

A major challenge in RNA-based therapeutic design is achieving sufficient protein expression at tolerable doses. Even well-designed proteins may not achieve the intended therapeutic effect if they are not produced in the target cell types. Codon optimization modifies a nucleotide sequence to increase protein expression without changing the encoded amino acid sequence. CodonFM scores candidate sequences for laboratory testing in therapeutic and vaccine RNA design.

RNA design involves a vast search space. Laboratory experiments often test dozens of sequences at a time, making evaluation of millions of designs for a single protein prohibitively expensive.

Arc Institute, Ansa Bio, and NVIDIA used CodonFM to optimize sequences encoding green fluorescent protein (GFP) and luciferase in A549, a human epithelial cell line. This approach could guide sequence design for RNA-based therapies that require higher or more durable protein expression. CodonFM-guided designs increased protein expression relative to wild-type sequences by nearly 4x for GFP and 2x for luciferase, showing increased expression for two different proteins.

Bar chart comparing relative protein expression in A549 cells for CodonFM-optimized sequences, wild-type, and two other RNA language models. CodonFM designs reach approximately 4x wild-type expression for GFP and 2x for luciferase, the highest values shown.
Figure 1. Relative protein expression in A549 cells for CodonFM-optimized sequences, wild-type sequences, and sequences from two comparison RNA language models

Larger models learn codon usage patterns

CodonFM 5B is available with two pretraining methods: random codon masking and codon-weighted masking. The latter is designed to capture species-related codon selection. As model size increases, validation loss decreases, indicating better predictions on held-out sequences (Figure 2).

Line chart of validation loss during training for EnCodon models of different sizes. Larger models converge to lower validation loss, with the 5B model showing the lowest loss.
Figure 2. Larger EnCodon models achieve lower validation loss as training progresses

The larger models further reduce codon confusion—the frequency with which the model predicts one synonymous codon in place of another—compared with smaller models. This suggests that larger models better capture codon usage patterns and translation-relevant sequence context.

Heatmap comparing synonymous codon confusion across EnCodon model sizes. Darker green cells indicate lower confusion between synonymous codons, with larger models generally showing darker cells.
Figure 3. Synonymous codon confusion across EnCodon model sizes, with darker green indicating lower confusion scores

Prioritize potentially disease-causing synonymous variants

Synonymous DNA variants do not alter the encoded amino acid sequence, but can contribute to disease by altering processes such as translation or splicing. Models that use only amino acid sequences cannot distinguish these variants.

On the evaluated ClinVar dataset, the two 5B EnCodon models outperform smaller CodonFM models and the other evaluated methods at distinguishing pathogenic synonymous variants from matched benign variants (Figure 4). These scores can help researchers prioritize variants for further investigation.

Horizontal box-and-whisker plots comparing AUROC for distinguishing pathogenic from matched benign synonymous variants in ClinVar. EnCodon 5B-CDWT scores highest, followed by EnCodon 5B, ahead of the smaller models and comparison method.
Figure 4. Area under the receiver operating characteristic curve (AUROC) for distinguishing pathogenic from matched benign synonymous variants in ClinVar across the evaluated models

Prioritize cancer-associated synonymous variants for evaluation

The team evaluated CodonFM on 1,471 curated cancer-observed synonymous variants to test whether its scores could help identify variants in tumor suppressor genes and oncogenes, including prioritization for functional evaluation. After controlling for GC content, trinucleotide context, and gene identity, the 5B models outperformed the other evaluated algorithms and models on this selected variant set.

Two panels of horizontal box-and-whisker plots comparing models on 1,471 cancer-observed synonymous variants matched between COSMIC and gnomAD. The left panel shows −log10(p) from a Mann–Whitney U test; the right shows AUROC. The 5B models have the highest scores in both panels.
Figure 5. Performance of EnCodon models, the phyloP conservation score, and a comparison model on 1,471 curated cancer-observed synonymous variants matched between COSMIC and gnomAD, measured by −log₁₀(p) from a Mann–Whitney U test (left) and AUROC (right)

Use CodonFM 5B embeddings for mRNA design

mRNA sequence design is central to next-generation therapies and vaccines, but optimization remains challenging because of the vast combinatorial sequence space. Models that capture patterns associated with mRNA expression and translation efficiency could help navigate this space and support agent-driven RNA design.

Although the available benchmark datasets remain modest in size, EnCodon 5B outperforms the other evaluated models, including two state-of-the-art approaches, on the reported tasks. These results support further evaluation of CodonFM for mRNA design.

Two horizontal bar charts comparing random forest predictions using pretrained model embeddings. The left chart shows Spearman correlation with RiboNN translation efficiency values; the right shows Spearman correlation with observed mRFP protein expression. The 5B EnCodon models lead on both tasks.
Figure 6. Random forest predictions using pretrained model embeddings, measured by Spearman correlation with RiboNN translation efficiency values (left) and observed mRFP protein expression levels (right)

Getting started with CodonFM 5B

The following Python example uses the pretrained EnCodon model to score a synonymous variant and extract sequence embeddings.

In this example, the reference sequence ATGGAATTTTAA contains GAA, a codon for glutamate. GAG also encodes glutamate, so substituting GAG for GAA leaves the amino acid sequence unchanged. This example scores the synonymous substitution with CodonFM. First, set up the inputs:

import torch
import numpy as np
from src.inference.encodon import EncodonInference
from src.data.preprocess.mutation_pred import mlm_process_item
from src.data.preprocess.codon_sequence import process_item

# Inputs
# Keep config.json in the same directory as the checkpoint file
# Note: These instructions are specific to HuggingFace. The model is also available on NGC with a slightly different file path.
checkpoint_path = "/path/to/encodon_5b/CodonFM-Encodon-5B-v1.safetensors"
ref_seq = "ATGGAATTTTAA"
codon_position = 1  # Zero-based codon index
ref_codon = "GAA"
alt_codon = "GAG"  # Synonymous: both encode glutamate
sequences = [ref_seq, "ATGGAGTTTTAA"]

Next, load the CodonFM EnCodon model and compute a log-likelihood ratio (LLR) comparing the reference and alternate codons. Under the sign convention used in this example, positive scores favor the reference codon and negative scores favor the alternate codon. This score is a model preference, not direct evidence of pathogenicity or tolerance.

# Load the Encodon model
model = EncodonInference(checkpoint_path, "mutation_prediction")
model.configure_model()
model = model.to("cuda").eval()
context_length = 2048

# Tokenize and batch the input
item = mlm_process_item(
    ref_seq=ref_seq,
    codon_position=codon_position,
    ref_codon=ref_codon,
    alt_codon=alt_codon,
    context_length=context_length,
    tokenizer=model.tokenizer,
    mask_mutation=True,
)
batch = {
    key: torch.as_tensor(value, device="cuda").unsqueeze(0)
    for key, value in item.items()
}
# Run inference
with torch.inference_mode():
    score = model.predict_mutation(batch).likelihood_ratios.item()

print(f"Variant score: {score:.6f}")  # Positive values favor the reference

You can also extract sequence embeddings from the model for downstream clustering or classification tasks.

# Tokenize and batch the input
items = [
    process_item(seq, context_length=context_length, tokenizer=model.tokenizer)
    for seq in sequences
]
batch = {
    key: torch.as_tensor(
        np.stack([item[key] for item in items]), device="cuda"
    )
    for key in items[0]
}

# Extract sequence embeddings
with torch.inference_mode():
    embeddings = model.extract_embeddings(batch).embeddings

print(embeddings.shape)  # (2, 4096) for the 5B model

Explore CodonFM resources

Discuss (0)

Tags

Agentic AI / Generative AI | Data Science | Simulation / Modeling / Design | Healthcare & Life Sciences | BioNeMo | NGC | Parabricks | Intermediate Technical | Drug Discovery | GTC DC

About the Authors

Avatar photo About TJ Chen
T.J. leads product management for genomics and biology foundation model research at NVIDIA, including NVIDIA Parabricks, for accelerated genomics analysis on GPU. She is responsible for leveraging NVIDIA expertise in AI, HPC, and data analytics stacks to address genomics workflows with accelerated high-accuracy solutions. Before NVIDIA, T.J. led a team at Chan-Zuckerberg Initiative with contributions to the single-cell, imaging, rare disease, and infectious disease communities. Her interests and experience focus on cloud platforms, machine learning, data analysis and interpretation, supporting R&D through to Clinical applications. She received a Ph.D. from Stanford University in Biomedical Informatics and a B.S. in Computer Science/Biology from Duke University. View all posts by TJ Chen Avatar photo About Laksshman Sundaram
Laksshman Sundaram is the director of Applied Research at NVIDIA, where he leads the development of foundation models for biological systems. Prior to NVIDIA, he led AI and genomics research teams, contributing to projects such as PrimateAI, TCGA, and large-scale variant interpretation efforts. He earned his Ph.D. in Computer Science from Stanford University. His work bridges deep learning, genomics, and computational biology to accelerate discovery in human health and precision medicine. View all posts by Laksshman Sundaram Avatar photo About Gary Burnett
Gary is a Solution Architect at NVIDIA on the Professional Visualizations team working in Media and Entertainment. He joined NVIDIA in 2017 after graduating from MIT with degrees in computer science and neuroscience. Gary’s role involves working directly with customers in order to create applications that leverage deep learning for visual effects including image processing, character locomotion, and pose estimation. View all posts by Gary Burnett Avatar photo About Chelsea Gomatam
Chelsea Gomatam is the product marketing manager for genomics at NVIDIA, where she leads product positioning for NVIDIA accelerated computing and genomics analysis software, including NVIDIA Parabricks. Her product marketing background spans across a range of industries, including e-commerce and FinTech. Prior to NVIDIA, she was the associate director of product marketing at Bolt, where she led go-to-marketing strategy for the e-commerce checkout company. She has also worked at Feedzai, an AI fraud prevention company, and as an account manager at Oracle. Chelsea has a bachelor’s degree from UC Berkeley. View all posts by Chelsea Gomatam Fan Cao About Fan Cao
Fan Cao is a research scientist at NVIDIA, focusing on the development of biological foundation models. Before joining NVIDIA, he worked at Illumina, developing DNA sequence-to-function models. He earned his Ph.D. in computational biology from the National University of Singapore. View all posts by Fan Cao

Comments