Advancing codon language modeling with synonymous codon constrained masking
Codon language models offer a promising framework for modeling protein-coding DNA sequences, yet current approaches often conflate codon usage with amino acid semantics, limiting their ability to capture DNA-level biology. We introduce SynCodonLM, a codon language model that enforces a biologically grounded constraint: masked codons are only predicted from synonymous options, guided by the known protein sequence. This design disentangles codon-level from protein-level semantics, enabling the model to learn nucleotide-specific patterns. The constraint is implemented by masking non-synonymous codons from the prediction space prior to softmax. Unlike existing models, which cluster codons by amino acid identity, SynCodonLM clusters by nucleotide properties, revealing structure aligned with DNA-level biology. Furthermore, SynCodonLM outperforms existing models on six of seven benchmarks sensitive to DNA-level features, including messenger RNA and protein expression. Our approach advances domain-specific representation learning and opens avenues for sequence design in synthetic biology, as well as deeper insights into diverse bioprocesses.
Authors
- Andrew E. Nixon (ORCID: https://orcid.org/0000-0002-6090-0583)
- Noah Pefaur (ORCID: https://orcid.org/0009-0004-0093-5305)
- Laura J. Kingsley (ORCID: https://orcid.org/0000-0002-5566-3974)
- James Heuschkel
- Steven Cramer
Institutions
- Rensselaer Polytechnic Institute (US)
- Boehringer Ingelheim (Spain) (ES)
Publication Details
- Journal
- Nucleic Acids Research
- Published
- 2026-02-14
- DOI
- https://doi.org/10.1093/nar/gkag166
- Primary Topic
- RNA and protein synthesis mechanisms
- Type
- article
- Field-Weighted Citation Impact
- 0.00