Tutorials · updated 2026-11-21

Use ESM2 online: protein embeddings and variant scoring

ESM2 is a protein language model trained on millions of natural sequences. Here is how to use it on this platform through an AI assistant for two things: a vector for each protein, and a score for each single amino-acid change. The examples are real runs, with the controls that show what the numbers are worth. You can read all of it without signing up.

What you will do

  1. Ask an AI assistant for the ESM2 embedding of a few proteins and the similarity between every pair.
  2. Ask it to score single amino-acid changes of one protein.
  3. Read both next to the controls, so you know what a number is worth.

Step 1: connect an assistant

These tools are offered through an AI assistant, not as a form: connect it once, then ask in plain language. Both are free and run on our server, in seconds (3.42 and 3.58 seconds for the examples below). The model is ESM2 650M (esm2_t33_650M_UR50D), trained on UniRef50 (2021_04).

Example 1: embeddings of four globins

“Using rnafold, embed UniProt P69905, P68871, P02144 and P01942 and give me the cosine similarity between every pair.” Each protein becomes one vector of 1280 numbers: the mean of the model’s last-layer vector over the residues. The tool returns the similarity between every pair, in the order you gave.

Cosinehuman hemoglobin alphahuman hemoglobin betahuman myoglobinmouse hemoglobin alpha
human hemoglobin alpha1.00000.95150.92820.9960
human hemoglobin beta0.95151.00000.95040.9618
human myoglobin0.92820.95041.00000.9321
mouse hemoglobin alpha0.99600.96180.93211.0000

cosine = (a . b) / (|a| |b|) between the two mean embeddings (each the mean over residue positions of the last-layer hidden state), float64, rounded to 4 decimals. It runs from -1 to 1; 1 means the same direction. It is a property of the model's vectors, not a measure of sequence identity, homology, shared fold or shared function.

What the controls say about embeddings

Related proteins score high, but so does a lot else. We measured the same tool on real proteins and on shuffled copies of them (same letters, random order):

  • The lowest real family pair was 0.928.
  • A hemoglobin against an unrelated protein reached 0.909, and two unrelated proteins reached 0.870.
  • Shuffled sequences reached 0.895 against a different hemoglobin, and some shuffles stayed as close as 0.991 to their own original.

So a cosine from this model is a property of its vectors, not a homology call: a shuffled copy of a protein can sit as close to its original as a true relative does. Use it as one input, and check it against a control like these before reading anything into it.

Example 2: scoring single amino-acid changes

“Using rnafold, score every substitution at positions E53 and D70 of UniProt P00698.” Hen egg-white lysozyme’s catalytic residues are Glu35 and Asp52 in the usual numbering of the mature protein. The UniProt entry used here is 147 residues long, 18 more than the mature protein, because it starts with a signal peptide, so they are positions 53 and 70 here. Positions are counted on the sequence the tool fetched, and it refuses a request whose wild-type letter does not match, which is how a numbering mistake shows up.

PositionTo AlaTo the similar residueRange over the 19 changesScored below zero
E53-6.04D: -8.46-12.63 to -5.7319 of 19
D70-8.03E: -6.88-14.03 to -6.0519 of 19

log_likelihood_ratio = log p(mutant) - log p(wild type) at that position, with the position masked and the rest of the sequence as supplied. Positive means the model assigns the mutant letter a higher probability than the wild-type letter; negative means lower; zero means equal. It is a language-model likelihood, not a stability, activity, fitness or pathogenicity.

How good is the score? What we measured

We scored 30 published deep-mutational-scanning experiments (107,077 variants) with this tool and compared the ranking with the measurements.

  • The ranking agrees with the measurements only moderately: mean Spearman correlation 0.41 (95% interval 0.33 to 0.48), median 0.43.
  • It varies a great deal between proteins: from -0.12 to 0.72, and 2 of the 30 experiments came out negative.
  • A plain substitution matrix (BLOSUM62) scored 0.20 on the same experiments, so the model adds about 0.21 on average (interval 0.13 to 0.28). Shuffled labels gave about zero, as they should.

What this example does not show

  • A score is the model’s likelihood for a letter at a position. It is not a measured or predicted stability, activity, fitness or pathogenicity.
  • Lysozyme’s catalytic residues are exactly the kind of position a language model has seen conserved in many relatives. It says nothing about a position in a protein with few relatives.
  • The model sees the sequence alone: no structure, no partner, no ligand. Nothing is combined: each change is scored on its own.
  • Results are returned in the order you gave them, never ranked or labelled. Do not read a ranking into the table above.

Run it on your own proteins

Sequences you give are processed on our server in the EU. Signing up is needed to run; reading results is not.

Sequence embeddings are described on the embedding page. The method, paper and licence for ESM2 are on those pages.