SaProt is a 650M-parameter, structure-aware protein language model that augments ESM-2-style transformers with Foldseek 3Di tokens derived from PDB input (experimental or AlphaFold-style) to produce joint sequence–structure embeddings and masked-marginal mutation scores. The API supports residue-level encoding and variant scoring for proteins up to 1024 residues (single chain, batch size up to 8), enabling structure-aware variant effect and stability analysis (e.g., ProteinGym Spearman ≈0.46, ClinVar AUC ≈0.91) in protein engineering and functional genomics workflows.
Predict¶
Run the predict action for SaProt.
- POST /api/v3/saprot/predict/¶
Predict endpoint for SaProt.
- Request Headers:
Content-Type – application/json
Authorization – Token YOUR_API_KEY
Request
params (object, optional) — Configuration parameters:
include (array of strings, default: [“mean”]) — Embedding types to include in the response; allowed values: “mean”, “per_token”
items (array of objects, min: 1, max: 8, required) — Input protein structures:
sequence (string, min length: 1, max length: 1024, required) — Amino acid sequence string after unambiguous validation
pdb (string, min length: 1, required) — PDB file content as a single string after PDB validation
chain_id (string, min length: 1, max length: 2, default: “A”) — Chain ID to extract from the PDB structure
plddt_threshold (float, range: 0.0-100.0, default: 70.0) — pLDDT threshold below which structure tokens are masked with “#”
Example request:
- Status Codes:
200 OK – Successful response
400 Bad Request – Invalid input
500 Internal Server Error – Internal server error
Response
results (array of objects) — One result per input item, in the order requested:
sequence_index (int) — Zero-based index of the input item within the request batch
embeddings (array of objects, optional) — Mean pooled sequence-level embeddings for requested layers
layer (int) — Layer index that produced the embedding vector
embedding (array of floats) — Mean embedding vector for this layer; length equals the SaProt hidden dimension (model-dependent, fixed per model instance)
per_token_embeddings (array of objects, optional) — Per-token embeddings for requested layers
layer (int) — Layer index that produced the per-token embedding matrix
embeddings (array of arrays of floats) — Per-token embedding matrix for this layer; outer array length = number of tokens after SaProt structure-aware tokenization (≤ 1024), inner array length = SaProt hidden dimension (model-dependent, fixed per model instance)
results (array of objects) — One result per input item, in the order requested:
fitness_score (float) — Log-likelihood-based fitness score for the scored sequence; unbounded real value
mutation (string, optional) — Mutation specification that was scored, in the format “X{pos}Y” or multiple mutations separated by ‘:’ (e.g. “V3A” or “V3A:Q4M”); omitted when scoring the wildtype sequence
Example response:
Encode¶
Run the encode action for SaProt.
- POST /api/v3/saprot/encode/¶
Encode endpoint for SaProt.
- Request Headers:
Content-Type – application/json
Authorization – Token YOUR_API_KEY
Request
params (object, optional) — Configuration parameters:
include (array of strings, default: [“mean”]) — Output embeddings to return; allowed values: “mean”, “per_token”
items (array of objects, min: 1, max: 8, required) — Input sequences and structures:
sequence (string, min length: 1, max length: 1024, required) — Amino acid sequence using unambiguous residue codes
pdb (string, min length: 1, required) — PDB file content as a single text string
chain_id (string, min length: 1, max length: 2, default: “A”) — Chain identifier to select from the PDB structure
plddt_threshold (float, range: 0.0-100.0, default: 70.0) — pLDDT score threshold below which structure tokens are masked with “#”
Example request:
- Status Codes:
200 OK – Successful response
400 Bad Request – Invalid input
500 Internal Server Error – Internal server error
Response
results (array of objects) — One result per input item, in the order requested:
sequence_index (int) — Zero-based index of the input sequence within the request batch
embeddings (array of objects, optional) — Mean-pooled sequence embeddings per SaProt encoder layer
layer (int) — Encoder layer index
embedding (array of floats) — Mean embedding vector for this layer, shape: [d_model], where d_model is the SaProt hidden size (implementation-dependent, constant across layers)
per_token_embeddings (array of objects, optional) — Per-residue embeddings per SaProt encoder layer
layer (int) — Encoder layer index
embeddings (array of arrays of floats) — Token-wise embedding matrix for this layer, shape: [L, d_model], where L is the sequence length after any structure-based masking or trimming, and d_model is the SaProt hidden size (implementation-dependent, constant across layers)
Example response:
Performance¶
Predictive accuracy (variant effects and stability) - ProteinGym DMS benchmarks (vs. ESM-2 650M sequence LM): SaProt achieves average Spearman ρ ≈ 0.46 vs. ≈ 0.41, giving ~10–15% higher rank-correlation when a reasonable single-chain structure is available - ClinVar missense pathogenicity: SaProt AUC ≈ 0.91 vs. ≈ 0.86 for ESM-2 650M, making it better suited for structure-aware clinical triage when you can supply a matching PDB and chain - On thermostability and related stability assays, SaProt reaches Spearman ρ up to ≈ 0.72 (thermostability) and ≈ 0.59 (stability assays), consistently outperforming sequence-only scoring (e.g., ESM-2 ≈ 0.68 on comparable thermostability data)
Comparison to other BioLM fitness / stability models - Versus GEMME (MSA-based): GEMME can outperform language models when deep MSAs are available but requires non-trivial MSA generation; SaProt is MSA-free and offers competitive or better performance than other MSA-free methods when good structures are available - Versus ESM-1v / ESM-2 scoring: sequence-only methods underperform SaProt at structure-sensitive positions (buried cores, catalytic residues, cofactor-binding sites); SaProt’s advantage diminishes in low-confidence or highly disordered regions where structure tokens are masked - Versus ESM2StabP (stability-focused regression): ESM2StabP can yield lower RMSE on specific curated stability datasets it was trained on; SaProt is more general-purpose, providing a single zero-shot interface for mixed functional and stability assays
Relation to structure prediction and complexes - SaProt is a structure-aware scoring/encoding model and does not generate 3D structures; typical usage is: obtain a structure (AlphaFold2, Boltz-2, ESMFold, or experimental PDB) once for the wildtype, then run SaProt for mutation scoring or embeddings - Compared to using pLDDT or ΔpLDDT from structure predictors as a proxy for fitness, SaProt’s learned fitness prior usually correlates better with DMS measurements for mutational scans - SaProt operates on single chains and ignores inter-chain geometry; for interface or multimer affinity design, dedicated complex models (e.g., DSM 650M PPI, HyperMPNN, RFdiffusion3, AlphaFold2 multimer) are preferred, with SaProt used for per-chain mutation effects
Robustness and practical workflow characteristics - Model behavior is deterministic for fixed inputs; repeated calls with the same sequence, PDB, chain, and mutation produce identical scores/embeddings - Performance depends primarily on structure quality and correct chain/sequence alignment; low pLDDT regions are automatically masked (default threshold 70.0), which protects against noisy coordinates but reduces structural signal and brings performance closer to sequence-only models - For large-scale fitness landscapes, SaProt’s structure-preserving masked marginal scoring allows scanning all 19 single-residue substitutions per position without rerunning structure prediction, enabling higher throughput and more consistent fitness estimates than workflows that recompute structures per mutant
Applications¶
Structure-aware variant impact scoring on protein–ligand complexes using SaProt’s masked marginal fitness scores, enabling teams to flag destabilizing or function-impairing pocket mutations (e.g., resistance hotspots in kinases, liability sites in receptor ectodomains) before expensive screening; its structure-aware tokenization (sequence + 3Di states from PDB, with low-pLDDT positions masked) helps distinguish mutations that mainly alter local geometry from those that disrupt key interaction patterns, but this should complement, not replace, full FEP or physics-based binding free-energy calculations
Pocket similarity analysis for target re-positioning and off-target risk assessment by embedding binding sites with SaProt and computing cosine similarity between mean pocket embeddings, allowing medicinal chemistry and safety teams to find unrelated proteins with similar pockets that might bind the same chemotype (e.g., nuclear receptor pockets mimicking a GPCR allosteric site); this is most informative when good-quality 3D structures are available for the chain/region of interest and less reliable for highly flexible or poorly resolved pockets where many residues fall below the pLDDT masking threshold
Ligand binding affinity or activity model bootstrapping by using SaProt’s mean or per-residue embeddings as fixed protein features and training lightweight regression or classification heads on in-house Kd/IC50 or hit/decoy data for a target class (e.g., kinases, nuclear receptors, proteases), reducing data requirements and training time compared with training 3D GNNs from scratch while still capturing interaction-relevant pocket context learned from structure-aware pretraining; performance remains constrained by the size, quality, and chemical diversity of the organization’s own SAR data
Fragment hotspot and druggability-style pocket characterization by combining SaProt pocket embeddings with simple KNN or shallow models trained on existing druggability and pocket-property labels (e.g., Fpocket scores, solvent exposure), helping chemistry and platform teams assess whether a newly observed pocket is likely suitable for small-molecule modulation and which subpockets (residue-level windows) appear most promising for fragment growing; because SaProt is trained on protein structures rather than explicit ligand chemotypes, predictions may be less accurate for highly atypical ligands (e.g., covalent warheads, metal-chelating scaffolds) and should be validated experimentally where possible
Early-stage generative design filtering and triage by embedding protein targets and candidate ligands (using an external ligand encoder) into a joint space and using simple learned or zero-shot interaction scores (e.g., cosine similarity between pocket and ligand embeddings or a small trained interaction head) as a fast pre-filter ahead of docking or physics-based rescoring, allowing design teams to down-select large enumerated or generative libraries to sets enriched for compatible pocket–ligand interaction patterns; these scores are most appropriate as relative prioritization signals and should not be interpreted as calibrated affinity values on their own
Limitations¶
Maximum Sequence Length and Batch Size: Each
sequencemust be between 1 and1024amino acids long; longer proteins must be truncated or split before calling the API. Each request can include between 1 and8items (itemslist length inSaProtEncodeRequestandSaProtScoreRequest); larger batches must be sharded client-side.Strict Input Validation for Sequences and Structures:
sequenceaccepts only unambiguous standard amino acids (no ambiguous or non-canonical residues).pdbmust be valid PDB text containing the specifiedchain_id(1–2 characters). Any length or content mismatch between thesequenceand residues in the selected chain will cause failures in 3Di token generation and will be rejected; multi-chain complexes must be split and scored per chain.Dependence on 3D Structure Quality (pLDDT and Disordered Regions): SaProt relies on local structure tokens derived from the PDB. Residues with low confidence (per-residue pLDDT, read from the B-factor column) below the configured
plddt_threshold(default70.0) are structurally masked (their structural state is replaced with'#'). In intrinsically disordered, poorly predicted, or flexible regions, predictions effectively degrade to sequence-only behavior; for heavily disordered proteins or short peptides, structure-aware advantages are minimal and sequence-only models may be more appropriate.Scoring Semantics and Fitness Interpretation:
SaProtScoreRequestItem.mutationsupports single or multiple point mutations in the formatX{pos}Y(e.g."V3A"or"V3A:Q4M"). The returnedfitness_scoreis the sum over all specified sites oflog P(mutant_AA) - log P(wildtype_AA)under the model’s structure-aware masked language distribution. This is a relative compatibility score, not an experimentally calibrated value (e.g. not directly ΔΔG or activity); strongly negative values are typically deleterious, but thresholds are protein- and task-dependent and should be interpreted or re-scaled using appropriate controls or labeled data.Performance and Use-Case Boundaries: The
predictorendpoint performs one forward pass per mutated position using masked-marginal scoring, so runtime scales linearly with the number of mutation sites; exhaustive scanning of every position with all 19 alternatives on long proteins can be computationally expensive. SaProt is optimized for single-chain, well-folded proteins (e.g. enzymes); it does not model inter-chain interactions or quaternary complexes, and is not specialized for antibody paratope/epitope modeling, peptide-only tasks, or explicit pocket–ligand design. For ultra–high-throughput sequence generation or screening, faster sequence-only or diffusion-based models may be preferable in early pipeline stages, with SaProt reserved for structure-aware re-ranking of smaller candidate sets.Embedding Outputs and Downstream Use:
SaProtEncodeRequestParams.includecontrols which embeddings are returned:"mean"yields per-item mean-pooled embeddings (embeddingsinSaProtEncodeResponseResult), while"per_token"yields residue-level embeddings (per_token_embeddings). These vectors capture local structure-aware context but are not guaranteed to be comparable across arbitrarily different proteins without downstream task-specific modeling; for clustering, similarity search, or supervised prediction, you should benchmark SaProt embeddings against simpler sequence-only baselines to confirm that structure-aware features provide a measurable benefit for your specific application.
How We Use It¶
BioLM uses SaProt as a structure-aware scoring and encoding component in protein design and optimization workflows where 3D context is needed to compare sequence variants against an available or predicted structure. In enzyme and antibody campaigns, SaProt fitness scores and embeddings are combined with generative sequence models, AlphaFold-class predictors, and developability/property models to prioritize mutations that remain compatible with the structural scaffold and are worth synthesis. Standardized, scalable APIs let data science and ML teams plug SaProt into automated design–score–filter loops, while wet-lab groups receive variant shortlists whose predicted impacts reflect both sequence conservation and local geometry, reducing low-value constructs entering assays.
In multi-round optimization, SaProt scores contribute to multi-objective ranking that balances fitness-like scores with stability and manufacturability, supporting systematic exploration of sequence–structure space rather than ad hoc mutagenesis.
For portfolio-level variant triage (e.g., enzyme panels, antibody liabilities, or other prioritized positions), SaProt’s structure-aware scores and embeddings are accessed via the same APIs as other BioLM models, enabling consistent thresholds and reports across targets and programs.
References¶
Su, J., Huang, S., Zhao, W., Wang, C., Wei, F., & Liu, Q. (2024). SaProt: Protein Language Modeling with Structure-aware Vocabulary. Proceedings of the International Conference on Learning Representations (ICLR 2024).
