Models over biological sequences
DNA, RNA and protein — alignment, variant calling, embeddings and what a protein language model is actually trained on.
A biological sequence is a string over a four-letter or twenty-letter alphabet, which makes it look like the easiest possible input for a model. It is not, and the reason is that the interesting structure is almost never local. Two proteins can share eight percent of their residues and fold into the same shape; two stretches of DNA a hundred kilobases apart can control each other; a single base substitution can matter enormously or not at all depending on where in a codon it lands. The methods in this cluster are all, in one way or another, attempts to make that long-range structure computable.
These pages work the mechanism rather than the vocabulary. Where an algorithm has a recursion, the recursion is written out and run on a short example; where a score has a definition, the definition is given with the quantities it depends on named. Several of these methods sit close to clinical and therapeutic work, and every one of those pages says where the computation stops and where laboratory validation, expert interpretation or regulatory approval begins.
DNA Sequence Classification With Machine Learning
How k-mer frequency turns a variable-length DNA string into a fixed-length feature vector, worked on a short sequence, and what that representation throws away.
9 min read
Protein Language Models Explained
What a masked-residue model is trained on, what its per-residue embeddings encode, and why that is a different thing from predicting a structure.
10 min read
RNA Secondary Structure Prediction Explained
How base-pair energy minimisation folds an RNA sequence, worked as a recursion on a short hairpin, and why the minimum-energy structure is only one answer.
10 min read
Sequence Alignment Algorithms: How BLAST Actually Searches
The dynamic-programming alignment BLAST avoids running, the seed-and-extend heuristic it runs instead, and what an E-value is a function of.
11 min read
Embedding Biological Sequences for Similarity Search
The arithmetic that separates an exhaustive alignment scan from a vector index at a stated database size, and what the index cannot give you back.
10 min read
Variant Calling Explained: Finding a Mutation in Sequencing Data
How aligned reads become a genotype call, worked on a single position with thirty reads, and why counting bases is not enough.
11 min read
Single-Cell RNA Sequencing Analysis With AI
The reduce-then-cluster pipeline that turns a sparse cell-by-gene count matrix into labelled cell types, and the two steps in it that decide the answer.
11 min read
Classifying Microbial Species From Metagenomic Sequencing
How exact k-mer matching against a taxonomy assigns a species to a single 150-base read, worked through the k-mer arithmetic and the confidence threshold.
10 min read
Antibody Sequence Design With AI
The generate-then-score loop used to propose antibody variants, worked through the filters and proxy scores that shrink a library before anything is expressed.
10 min read
Predicting Gene Expression From DNA Sequence
What a sequence-to-expression model conditions on, worked through a promoter window and a motif scan, and the receptive-field decision that defines the architecture.
11 min read
Building a Phylogenetic Tree From Sequence Data
The distance-matrix-to-tree path worked end to end on four sequences, including the correction that makes distances additive and the criterion neighbour joining minimises.
10 min read
Protein Structure Similarity Search Explained
Retrieving known structures similar to a query structure: what TM-score measures, and the trick that turns three-dimensional search back into string search.
10 min read
Designing a CRISPR Guide RNA With AI
How candidate guides are enumerated, scored for on-target activity and ranked by off-target risk, worked through a mismatch-penalty calculation.
11 min read
What It Costs to Embed a Genome for Search
The arithmetic from genome length through chunk count and token count to a bill, with every input labelled as an assumption you should substitute.
10 min read
Transfer Learning From Protein Language Models
Fitting a predictor on a few hundred labelled sequences using pretrained embeddings, worked through pooling, the head, and the data split that decides whether the result is real.
11 min read
Detecting Contamination in Sequencing Data
Unexpected species in a classification report have four different causes with four different fixes; the read-fraction and coverage-breadth checks tell them apart.
11 min read
Other topics
- LLM fundamentals & architecture
- Tokens, tokenization & context windows
- Prompt engineering
- Reasoning models & test-time compute
- Multimodal AI: vision, audio, video
- RAG & retrieval
- Embeddings & vector search
- AI agents & tool use
- Structured output & function calling
- Fine-tuning & post-training
- Local inference errors, string by string
- Running local models day to day
- Testing code that calls an LLM
- Snapshot and property testing for model output
- Regression suites for prompts
- Eval gates in CI
- Flaky tests against a model
- Determinism and the cost of testing
- Contract and streaming tests
- Testing tool calls and retrieval
- Inference, serving & latency
- Rolling out a prompt change
- Testing AI systems in practice
- Forecasting a time series
- Machine learning on tabular data
- Geospatial data and models
- Understanding audio that is not speech
- Understanding video
- Core computer vision tasks
- Machine learning on graphs
- Point clouds and 3D
- Evaluation, benchmarks & LLM-as-judge
- Sensor and IoT data
- Logs and event streams
- Machine learning on molecules
- Embedding and searching code
- Extracting invoices and purchase orders
- Receipts, statements and tax forms
- Insurance policies and contracts
- Deeds, court filings and patents
- Extracting from medical records
- Observability & LLMOps
- CVs, certificates and identity documents
- Shipping, customs and technical documents
- Meetings, email, chat and filled-in forms
- Building an extraction pipeline
- Business, property and inspection documents
- Contract clauses and insurance claims
- Regulated and compliance documents
- Consumer, travel and closing documents
- Mapping one chat API onto another
- SDK and framework migrations
- Hallucination & failure modes
- Re-embedding and model deprecation
- Cutting over between providers
- Parity gaps, shims and legacy endpoints
- Moving between model versions
- Migrating vector stores and caches
- Mapping capabilities and parameters
- Migrating pipelines and agents
- Contracts, runbooks and rollback
- Auditing a codebase before a cutover
- Compliance and fine-tune migration
- LLM cost engineering
- Routing, cost tracking and multi-tenancy
- What a migration does to your prompts
- AI security & prompt injection
- Privacy, compliance & data residency
- AI governance, policy & society
- Building reliable AI applications
- AI hardware, GPUs & compute
- Open-weight models & local inference
- AI for developers & coding agents
- AI in industry: vertical playbooks
- AGI, superintelligence, alignment & the long future
- Machine learning foundations
- NLP fundamentals & classical tasks
- Data engineering for AI
- Synthetic data & dataset curation
- AI product design & UX
- Search, ranking & recommendation
- Enterprise adoption & change management
- AI careers, skills & teams
- Reading AI research
- AI in science & discovery
- Robotics & embodied AI
- AI economics, markets & business models
- AI myths, hype & media literacy
- Context engineering
- Shipping AI features: patterns & anti-patterns
- Build it: end-to-end AI tutorials
- Python for AI: hands-on recipes
- TypeScript, React and the web
- Frameworks and SDKs
- Errors and troubleshooting
- AI facts, numbers and statistics
- The history of AI
- The maths behind AI
- Architectures beyond the transformer
- Reinforcement learning
- Diffusion and generative media
- Speech, audio and voice engineering
- Benchmarks, one at a time
- AI search visibility
- Infrastructure and operations
- Databases and storage for AI
- Knowledge graphs and structured knowledge
- Classical ML in production
- Regulation, jurisdiction by jurisdiction
- Prompt recipes and pattern library
- AI for people who do not write code
- Writing, media and creative work
- Edge and on-device AI
- Interpretability and model internals
- Field notes
- OpenAI model behaviour
- Claude model behaviour
- Gemini model behaviour
- Llama model behaviour
- Mistral model behaviour
- Qwen model behaviour
- DeepSeek model behaviour
- Cohere model behaviour
- Grok model behaviour
- Small model behaviour
- Hybrid model architectures
- Token cost by language and script
- Transliteration, romanization and script handling
- Locale-correct output
- Multilingual generation quality
- Multilingual pipelines
- The EU AI Act, article by article
- AI under the GDPR and EU data law
- US AI regulation, state and sector
- International AI governance and standards
- AI litigation and enforcement
- Running AI workloads on AWS
- Running AI workloads on Google Cloud
- Running AI workloads on Azure
- AI at the edge: Workers, Vercel and Netlify
- Serving models on Kubernetes
- Operating AI infrastructure
- Quantization formats and what they cost
- llama.cpp, flag by flag
- Ollama and the desktop local-model runtimes
- Local models on Apple Silicon
- Hardware for local inference
- Running speech and embedding models locally
- Model files, adapters and conversion
- VRAM arithmetic for local models