/ module 16 · Bio-AI
Bio-AI with LLMs
Life is written in text. DNA is a string over four letters, proteins are strings over twenty, and molecules can be written as SMILES. Once something is text, everything you learned about tokens, embeddings and attention applies, which is why language models now help read genomes, design proteins and screen drugs.
- Tokenize DNA into k-mers and codons
- Explain masked prediction in protein language models
- Read a SMILES string and name its token types
Try this first: Keep k = 3 and read the amino acid letters under each codon.
concept
Same machinery, new alphabets
The big question is again tokenization. English has natural word boundaries; DNA does not. Genomic models chop sequences into k-mers (DNABERT), learn BPE merges over bases, or read one base at a time with very long context (HyenaDNA, Evo). Protein models such as ESM and ProtBERT usually use one token per amino acid.
With k = 3 and no overlap each token is a codon, and the blue letter under it is the amino acid it encodes. Reading frame matters: delete the first base and every codon changes.
Click a residue to mask it, the same way ESM is trained: hide a token, predict it from both sides.
The top guesses share chemistry with the hidden residue. Real protein LMs learn this from evolution alone, and a low score for a mutation often flags it as harmful.
Toy model: scores come from a hand-made rule (same chemical class, neighbours' class), not from a trained network.
Note how "Cl" and "Br" must be one token: a character-level split would read them as carbon + l. Chemistry LMs (ChemBERTa, MolGPT) use this kind of regex tokenizer before training.
landscape
Where LLM ideas show up in biology
- Protein language models (ESM-2, ProtBERT, ProGen) learn from hundreds of millions of sequences. Their embeddings predict function, stability and the effect of mutations; ESMFold predicts 3D structure from them.
- Structure models such as AlphaFold combine attention over sequences with geometry. They are not chat LLMs, but they use the same attention building block.
- Genomic models (DNABERT, Nucleotide Transformer, HyenaDNA, Evo) read DNA to find promoters, splice sites and variant effects; long context matters because genes span thousands of bases.
- Chemistry models generate or rank SMILES for drug discovery and predict properties such as solubility or toxicity.
- Research agents combine a chat LLM with RAG over papers and tools such as PubMed, ChEMBL or UniProt, the same pattern as the orchestration module.
Caution: model predictions in biology are hypotheses. They need wet-lab or clinical validation before anyone relies on them.
Check yourself
Tick each one you could explain to a friend. If you can't yet, scroll back up and replay the lab.