AminoGrapes
Structure-Weighted Evolutionary Scoring for Viral Protein Fitness Prediction
AminoGrapes
Structure-weighted evolutionary scoring (Burial × Conservation).
ESM2-650M
Single-sequence masked-marginal language model baseline.
Research Summary
Zero-shot prediction of mutation effects on viral proteins is evaluated here using the viral subset of ProteinGym v1.3. Viral proteins represent a challenging evaluation setting because viral families evolve rapidly and are sparsely sampled in general sequence repositories.
AminoGrapes implements a closed-form scoring method that scales a sequence-weighted log-odds conservation score from a multiple sequence alignment (MSA) by residue solvent burial computed from an AlphaFold2 predicted 3D structure. The scoring formulation contains zero fitted parameters on viral data.
Aminograpes Viral Fitness Scoring
A training-free zero-shot model for viral proteins that scales sequence-weighted alignment conservation by AlphaFold2 residue solvent burial. Evaluated across the 31 viral targets of ProteinGym v1.3.
Viral Benchmark Comparison (Mean Spearman, 31 Assays)
Evaluated on ProteinGym v1.3 viral substitution assays.
Official RSALOR scores 0.4797 and is higher overall on the viral benchmark. Aminograpes is about -0.049 lower and wins on 7 of 31 assays.
The 5-model public ensemble (0.5732) is not Aminograpes. It stacks other groups' public models for reference only.
Evaluate the Aminograpes Model in Browser
Inspect all 31 viral targets, examine residue conservation and structural burial, evaluate mutations, and view experimental correlations. Runs client-side on CPU.
Scoring Architecture & Specification
How AminoGrapes Works: Conservation × Burial
AminoGrapes computes a closed-form zero-shot score by scaling sequence-weighted evolutionary log-odds from a homolog alignment by residue solvent burial from an AlphaFold2 predicted 3D structure.
Evolutionary Conservation
Viral multiple sequence alignments (MSAs) reflect millions of replication cycles. To remove outbreak lineage bias, sequences are clustered and weighted:
Captures what the viral protein family naturally tolerates across homologous strains.
Structural Residue Burial
Relative solvent accessibility (RSA) is calculated from the target AlphaFold2 3D coordinates using the Shrake-Rupley atomic probe algorithm:
Buried residues (RSA ≈ 0) receive full weight (1.0); solvent-exposed residues (RSA ≈ 1) shrink toward 0.
Mathematical Formulation
The exact closed-form scoring equations and constants specified in the AminoGrapes paper. The model has zero fitted parameters on viral data.
For a mutation m consisting of one or more substitutions, the score is the sum over substituted sites of the structural burial weight (1 − RSA_i) times the log-odds of the mutant against wild-type residue. Multi-mutants are scored additively (epistasis is not modeled).
Standard clustering scheme with identity threshold θ = 0.2. Gaps treated as a 21st state. The sum of weights is the effective sequence count Neff.
Weighted amino acid counts are normalised per site and smoothed with pseudocount ε = 0.01 so no amino acid has zero probability.
Solvent accessibility (SASA) computed from AlphaFold2 structures via Shrake-Rupley, divided by theoretical maximum ASA (Tien et al. 2013).
Scores are z-scored per assay before linear combination. The blend weight λ = 0.7 was tuned strictly on 30 non-viral assays and frozen.
Language Model Scaling & Published Methods
Reported mean Spearman across ESM2 model sizes and AminoGrapes
Evaluation on the 31 viral ProteinGym v1.3 assays across language model parameter scales (8M to 15B) alongside the structure-weighted evolutionary score.
Evaluation Context: ESM2 evaluates the single unaligned sequence, whereas AminoGrapes uses evolutionary information from homolog alignments and structural information from AlphaFold2 coordinates. The comparison reflects both model architecture and differences in input information sources.
Reported methods on the viral benchmark
Reported plain mean Spearman correlation values on the 31 viral assays of ProteinGym v1.3 from official score files alongside AminoGrapes.
Benchmark Note: Values reported in the AminoGrapes paper; this is an evaluation on a public benchmark subset, not an official ProteinGym leaderboard entry. AminoGrapes does not match the original RSALOR scores (0.480) or the strongest published methods on these assays.
Ensemble Analysis: An ensemble constructed from five top public models (VenusREM, ProSST-4096, S3F_MSA, ProSST-1024, RSALOR) scores 0.5732 on these 31 viral assays. The analysis reported in the paper found that adding AminoGrapes to the selected five-model public ensemble resulted in a chosen AminoGrapes weight of zero. Its distinct value is as a fast, closed-form, interpretable model that improves upon ESM2 on viral proteins without fitted parameters.
Attribution & Selected Targets
From sequence model to evolutionary + structural scoring
Step-wise decomposition of mean Spearman correlation on the 31 viral ProteinGym assays from Meta's ESM2-650M baseline to AminoGrapes.
ESM2-650M (Baseline)
Single-sequence masked language modeling captures general biochemical constraints but struggles on fast-evolving viral fitness landscapes.
Evolutionary Conservation Only
Homologous sequence alignment frequencies capture viral strain variability directly from natural evolution.
AminoGrapes (Conservation x Burial)
Weighting evolutionary substitution penalties by structural burial depth yields a +0.1617 mean Spearman gain over ESM2-650M across 25 of 31 viral assays.
Attribution note: As stated in Section 5.3 of the paper, this split is a rough attribution that depends on the order in which components are added. Evolutionary conservation contributes the primary signal (+0.124); structural burial provides the additional refinement (+0.038) by dampening mutational penalties at solvent-exposed positions.
Selected assay results from the viral evaluation
Four representative deep mutational scanning targets where structure-weighted evolutionary scoring showed substantial gains over the language model baseline.
NS5A Replication Complex Domain I
Main Protease (Mpro / 3CLpro)
Envelope Glycoprotein gp160
Envelope Glycoprotein & Protease
Complete Viral Benchmark Distribution
Per-assay Spearman correlation across all 31 viral assays
Paired comparison between Meta's ESM2-650M and Afrium's AminoGrapes on each assay in the ProteinGym v1.3 viral benchmark, sorted by difference.
Bacteriophage observation: All six assays where ESM2-650M is higher (HCP_LAMBD, RCRO_LAMBD, both RPC1_LAMBD assays, VG08_BPP22, and VRPI_BPT7) are bacteriophage proteins (lambda, P22, and T7). Not every phage assay favours ESM2 (RPC1_BP434 favours AminoGrapes).
Evaluation Notes & Assumptions
These viral assays were visible during development. Although no numeric parameter was fitted directly to the viral scores, the pipeline was built and debugged on these assays. Accordingly, the reported viral results should be treated as development-set results until replicated on new data.
Model Limitations & Scope
Directly from Section 6 of the paper, outlining the bounds, structural caveats, and assumptions of the AminoGrapes scoring framework.
Site Independence & Epistasis
AminoGrapes treats substituted sites independently and multi-mutants are scored additively. It does not model higher-order epistatic interactions between co-evolving positions.
Homolog MSA Depth & Weighting
For viral families with sparsely sampled sequence databases, site frequencies are dominated by the pseudocount (ε = 0.01). Clustering on long sequences uses half-precision approximations above 2,048 identity counts.
Monomer Structure vs. Complexes
Solvent accessibility is calculated on AlphaFold2 monomer structures. Residues buried within oligomeric interfaces or viral complexes may be classified as solvent-exposed. Two assays lacked usable structural mapping.
Model vs. Information Source
The comparison mixes model architecture and information inputs: ESM2 evaluates only the unaligned wildtype sequence, whereas AminoGrapes accesses evolutionary homolog alignments and 3D coordinate geometry.
Shared Targets in Benchmark
The 31-assay benchmark is small, and multiple assays share targets (e.g., two influenza assays, two lambda repressor assays, two SARS-CoV-2 spike assays). Confidence intervals are therefore somewhat optimistic.
Viral-Specific Scope
AminoGrapes is a viral-protein result. On non-viral proteins with deep language model pretraining representation, ESM2 alone is stronger (0.540 vs 0.449), so AminoGrapes is not a universal replacement for ESM2.
Code, Protocol & Technical Report
Reproducibility
All benchmark inputs are public ProteinGym v1.3 files and Meta ESM2 weights. The scoring pipeline is provided as a single Python script (afrium.py). A clean rerun is expected to reproduce the reported results to approximately three decimal places.
Upload Afrium_reproduce_in_Colab.ipynb to Google Colab.
Select T4 GPU hardware acceleration (Runtime > Change runtime type > T4 GPU).
Run cells from top to bottom (downloads ProteinGym v1.3 viral files & AlphaFold structures).
Execute Step 5 scoring pipeline (computes AminoGrapes and ESM2 on all 31 viral assays, ~30-60 min).
Compare printed means and win counts with Table 2 in the paper.
Model Code & Notebook
Complete Python implementation with step-by-step reproduction instructions and Google Colab protocol.