For research use only · We delete your sequences and results from our servers within 1 hour of your job finishing · Details
Embeddings: Your Protein's Numerical Fingerprint
5 min read
Every protein you analyze on NeuroAutomata gets converted into a list of numbers before anything useful happens. That list of numbers — called an embedding — is what the platform actually works with when it finds similar proteins, builds visualizations, or scores the effect of a mutation. This article explains what embeddings are, how NeuroAutomata generates them, and why they are the foundation for every other feature on the platform.
What Is an Embedding?
An embedding (a numerical representation of a biological sequence, learned by a machine learning model) is the output you get when you run a protein sequence through ESM-2. The model has been trained on ~250 million protein sequences and has learned to compress everything it knows about a sequence — its evolutionary history, its structural preferences, the biochemical constraints on each position — into a fixed-length vector of numbers.
Think of it this way: embeddings are GPS coordinates for protein space. Just as two locations that are geographically close have similar coordinates, two proteins with similar embeddings are biochemically similar — similar function, similar fold, similar evolutionary origin. And just as you can calculate the distance between two points on a map, you can calculate the distance between two embeddings to measure how different two proteins really are.
In plain terms: You give NeuroAutomata an amino acid sequence. NeuroAutomata runs it through ESM-2 on a GPU. Out comes a list of numbers that represents that protein in a mathematical space where similarity means something biologically real.
The Dimensions: What Does Embedding Dimension Mean?
When you submit a sequence and select the default ESM-2 650M model, each protein is represented as a vector with 1,280 numbers. Each number corresponds to one dimension in the model's internal representation space. You do not interpret any individual number directly — the meaning lives in the pattern across all values together.
To put it in perspective: a single amino acid like leucine at position 47 of a protein contributes to all dimensions simultaneously. The model encodes not just "this is a leucine" but "this is a leucine in this structural context, preceded by these residues, at this evolutionary pressure point, in a hydrophobic core."
The dimension count varies by model, because different architectures and sizes encode information differently:
| Model | Parameters | Embedding Dimensions |
|---|---|---|
| ESM-2 650M (legacy) | 650M | 1,280 |
| ESMC 600M | 600M | 1,152 |
| ESM-2 150M | 150M | 640 |
| ESM-2 35M | 35M | 480 |
Why this matters: Choosing a smaller model reduces the richness of the representation. For most similarity and clustering tasks, the 650M or ESMC 600M models are recommended. The 150M and 35M models run faster and use less GPU memory, which matters if you are submitting many sequences at once.
Two Types of Embeddings
NeuroAutomata generates two distinct embedding types, and they serve different purposes.
Mean-pooled embeddings
A mean-pooled embedding (one vector representing the entire protein, computed by averaging the per-residue vectors) summarizes the whole protein in a single 1,280-dimensional vector. This is done by taking the per-residue representations at every amino acid position and computing the average across all positions.
For a 200-residue protein, this collapses 200 individual position vectors down to one — a fixed-length summary regardless of sequence length.
Mean-pooled embeddings are what NeuroAutomata uses for:
- Similarity visualization — plotting your proteins in 2D using UMAP or PCA, where proteins that are close together have similar embeddings
- Clustering — grouping proteins by functional or structural family
- Comparing sequences across runs — a single number describes the whole protein, making protein-to-protein distance calculations straightforward
Limitation: Because mean pooling averages across all residues equally, it can dilute information about specific functionally important positions — such as a catalytic triad buried in an enzyme active site. If you care about position-specific behavior, per-residue embeddings are more appropriate.
Per-residue embeddings
A per-residue embedding (one vector per amino acid position in the sequence, capturing the context at that specific location) preserves positional detail. A 200-residue protein produces a matrix of 200 vectors, each 1,280-dimensional — one for every amino acid.
These are not useful for whole-protein comparison, but they are essential for tasks that require position-specific reasoning.
Per-residue embeddings are what NeuroAutomata uses internally for:
- Mutation effect scoring — when the model evaluates a mutation at position 47, it draws on the per-residue context at that exact location to compute a log-likelihood score (see Article 07 — Mutation Effect Prediction for details)
- Structure-informed analysis — connecting sequence positions to structural features in the 3D viewer
In plain terms: Mean-pooled = one summary for the whole protein. Per-residue = one detailed description for each amino acid. Use mean-pooled when comparing proteins to each other. Per-residue runs under the hood when scoring individual mutations.
A Concrete Example: GB1
The protein GB1 (the B1 domain of Protein G, a 56-residue bacterial protein commonly used as a stability benchmark) illustrates how embeddings capture biologically meaningful information.
When you submit the wild-type GB1 sequence and a set of single-amino-acid variants, each sequence gets its own 1,280-dimensional mean-pooled embedding. Variants that retain function cluster near the wild-type embedding. Variants that are destabilizing drift away. The distance in embedding space correlates with the difference in fitness — not perfectly, but reliably enough to be useful for prioritizing which variants to test in the lab.
This relationship between embedding distance and functional outcome is not hand-coded. It emerges from the model's training on evolutionary data: sequences that co-exist in nature tend to be functionally compatible, and ESM-2 has learned to group them together.
How NeuroAutomata Generates Embeddings
When you submit sequences for embedding, NeuroAutomata creates a job — a discrete unit of GPU work that is queued, processed, and returned with a result. Here is what happens under the hood:
- Your sequences are validated (accepted amino acids:
ACDEFGHIKLMNPQRSTVWY, length 5–1,024 residues). - The sequences are grouped into batches of up to 8 and sent to the GPU worker.
- Each batch is tokenized (converted from letters to integer token IDs) and fed through the ESM-2 model in a single forward pass.
- The final hidden layer output is extracted — this is the per-residue representation.
- For mean-pooled jobs, the vectors are averaged across all residue positions, excluding the special CLS and EOS tokens that bookend every sequence.
- The result is stored and returned to you: a list of 1,280-dimensional vectors, one per sequence.
The whole process runs on an NVIDIA RTX A6000 GPU (48GB VRAM). A batch of 8 typical-length sequences completes in seconds.
In plain terms: You submit sequences. NeuroAutomata sends them to a GPU, runs them through ESM-2, and hands you back a list of numbers. From that point on, every visualization and every mutation score is built on top of those numbers.
What You Can Do With Embeddings
Embeddings are not an end in themselves — they are inputs to downstream analysis. On NeuroAutomata, embeddings power:
Similarity search and comparison. Two proteins with similar functions but low sequence identity (common in convergent evolution) will often have similar embeddings. You can detect functional relatives that traditional sequence alignment tools like BLAST would miss.
Clustering. Submit a set of homologs or variants, generate embeddings, and let the visualization group them automatically. Natural clusters often correspond to subfamilies with distinct functional properties.
Dimensionality reduction and visualization. Because you cannot visualize 1,280 dimensions directly, NeuroAutomata uses UMAP and PCA to project the embeddings into 2D scatter plots. The geometry of those plots reflects the geometry of the embedding space — see Article 06 — Similarity Maps for how to read them.
Mutation scoring. Per-residue embeddings feed into the masked marginal scoring method used for mutation effect prediction. The model's per-position probability distribution — encoded in those per-residue vectors — is what allows it to assess whether a given amino acid substitution is consistent with what evolution has tolerated at that position.
Downstream machine learning. If you export embeddings from NeuroAutomata, you can use them as input features for classifiers, regressors, or clustering algorithms in your own analysis environment. Fixed-length 1,280-dimensional vectors are directly compatible with standard scikit-learn workflows.
Limitation: Embeddings encode what ESM-2 learned during training on evolutionary sequences. They do not encode experimental measurements from your specific assay, protein family, or organism. For tasks that require fine-grained functional discrimination within a narrow protein family, supervised models trained on your own data will generally outperform zero-shot embedding similarity.
Why Embeddings Are the Foundation
Every other feature on NeuroAutomata depends on embeddings. The similarity maps are embeddings projected into 2D. The mutation scores are derived from the model's per-position probability distributions, which are closely related to the per-residue embeddings. The structure viewer can overlay mutation tolerance scores — those scores come from per-residue inference, the same process that produces per-residue embeddings.
Understanding embeddings means understanding what the platform is actually doing when it processes your protein. It is not performing sequence alignment or looking for known mutations in a database. It is asking: given everything ESM-2 learned from 250 million protein sequences, where does this protein sit in the space of all possible proteins — and what does that location tell us about its function, stability, and evolvability?