BioIntelligence Lab/Model 01 • October 2026

AminoGrapes

Structure-Weighted Evolutionary Scoring for Viral Protein Fitness Prediction

The Afrium Team•Afrium, Islamabad, Pakistan
Primary Benchmark Result
ProteinGym v1.3 · 31 Viral Assays
Afrium25 / 31 assays higher

AminoGrapes

Structure-weighted evolutionary scoring (Burial × Conservation).

Mean Spearman (r_s)0.430
+0.162 gain95% CI: [0.078, 0.245]
Meta AI6 / 31 assays higher

ESM2-650M

Single-sequence masked-marginal language model baseline.

Mean Spearman (r_s)0.269
Baseline Reference650M Parameters
Statistical Significance:p = 0.0008(Wilcoxon signed-rank test across 31 assays)
10,000 bootstrap resamples (fixed seed)
01 : Overview

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.

Model Benchmark • Summary

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.

Aminograpes Full
0.4304Mean Spearman (alignment x burial)
Alignment Only
0.3926Log-odds conservation baseline
ESM2-650M Baseline
0.2693Our rerun (official: 0.2687)
Head-to-Head vs ESM2
+0.161795% CI [0.0775, 0.2450], 25/31 wins

Viral Benchmark Comparison (Mean Spearman, 31 Assays)

Evaluated on ProteinGym v1.3 viral substitution assays.

Structures used: 29 of 31 assays
ESM2-650M (our run)0.2693
Alignment only0.3926
Aminograpes (alignment x burial)0.4304
Honest RSALOR Comparison

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.

Context Ensemble Note

The 5-model public ensemble (0.5732) is not Aminograpes. It stacks other groups' public models for reference only.

Interactive Model Evaluation

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.

Launch Model Preview
02 : Method & Formulation

Scoring Architecture & Specification

SCORING ARCHITECTURE

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.

Branch A · Sequence

Evolutionary Conservation

Viral multiple sequence alignments (MSAs) reflect millions of replication cycles. To remove outbreak lineage bias, sequences are clustered and weighted:

1. Clustering Threshold:θ = 0.2 (80% Identity)
2. Sequence Weight:w_k = 1 / |{l: id ≥ 0.8}|
3. Pseudocount Smoothing:ε = 0.01
Output Log-Odds:log f_i(mut) − log f_i(wt)

Captures what the viral protein family naturally tolerates across homologous strains.

Branch B · Geometry

Structural Residue Burial

Relative solvent accessibility (RSA) is calculated from the target AlphaFold2 3D coordinates using the Shrake-Rupley atomic probe algorithm:

1. Algorithm:Shrake-Rupley SASA
2. Normalization:Max theoretical ASA (Tien 2013)
3. Relative RSA_i:min(1, SASA_i / MaxASA)
Output Multiplier:1 − RSA_i

Buried residues (RSA ≈ 0) receive full weight (1.0); solvent-exposed residues (RSA ≈ 1) shrink toward 0.

INTERACTIVE SCORING DEMONSTRATION
Substituted SiteVal34 -> Glu (Hydrophobic Core)
Evolutionary Log-Odds-4.35
Burial Multiplier (1 − RSA)× 0.92
AminoGrapes Score-4.00
Biological Consequence:High Fitness Penalty (Disrupts core packing & fold stability)
FORMAL SPECIFICATION

Mathematical Formulation

The exact closed-form scoring equations and constants specified in the AminoGrapes paper. The model has zero fitted parameters on viral data.

EQUATION (4) · AMINOGRAPES SCORING FORMULARSALOR Form
s_AminoGrapes(m)=∑_(i ∈ m)(1 − RSA_i)[log f_i(a_i^mut)−log f_i(a_i^wt)]

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).

Equation (1) · Sequence Weighting
w_k = |{ l : id(x_k, x_l) ≥ 1 − θ }|^(−1),   θ = 0.2

Standard clustering scheme with identity threshold θ = 0.2. Gaps treated as a 21st state. The sum of weights is the effective sequence count Neff.

Equation (2) · Smoothed Site Frequencies
f_i(a) = (1 − ε) · [C_i(a) / ∑ C_i(b)] + ε/20,   ε = 0.01

Weighted amino acid counts are normalised per site and smoothed with pseudocount ε = 0.01 so no amino acid has zero probability.

Equation (3) · Structural Burial (RSA)
RSA_i = min(1, SASA_i / MaxASA(a_i))

Solvent accessibility (SASA) computed from AlphaFold2 structures via Shrake-Rupley, divided by theoretical maximum ASA (Tien et al. 2013).

Equation (6) · Optional ESM2 Blend
s_blend = λ · z(s_ESM2) + (1 − λ) · z(s_AminoGrapes),   λ = 0.7

Scores are z-scored per assay before linear combination. The blend weight λ = 0.7 was tuned strictly on 30 non-viral assays and frozen.

Table 1 · Fixed Implementation Constants
ConstantFixed ValueRole / Specification
θ (clustering)0.2Sequences more than 80% identical share weight
ε (pseudocount)0.01Smooths site frequencies so no amino acid has zero probability
Gap filter50%Drops sequences with more than half gaps
Structure mapping≥ 30% mapped, ≥ 80% identicalCondition for using an AlphaFold2 predicted structure
No-structure fallbackconstant 0.5Reduces score to plain conservation (ranking unchanged)
MaxASA tableTien et al. theoretical, 20 valuesNormalises SASA to Relative Solvent Accessibility (RSA)
ESM2 window1,022 residuesMaximum input length for language model windowing
Blend weight λ0.7Chosen on 30 non-viral assays, then frozen before viral evaluation
03 : Benchmark Evaluation

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.

Meta ESM2 Language Models (Single Sequence)
Afrium AminoGrapes (MSA + AF2 Structure)
0.50
0.40
0.30
0.20
0.10
0.00
0.090
ESM2-8M
8 Million
0.118
ESM2-35M
35 Million
0.156
ESM2-150M
150 Million
0.269
ESM2-650M
650 Million
0.299
ESM2-3B
3 Billion
0.336
ESM2-15B
15 Billion
0.430
AminoGrapes
0 Params (CPU)

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.

5-Model Ensemble
Multi-Model Ensemble
0.573
S3F_MSA
Sequence + Structure
0.504
ESCOTT
Evolutionary + Contact
0.501
PoET
Generative Sequence Model
0.491
RSALOR
Solvent Accessibility Log-Odds
0.480
GEMME
Global Epistatic Model
0.466
TranceptEVE_L
Autoregressive + Prior
0.463
SiteRM
Residue Mapping
0.460
AminoGrapes
Evolutionary + Burial (AF2)
0.430
Site-Independent
Alignment Substitution
0.369
Meta ESM2-650M
Protein Language Model
0.269

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.

04 : Component Progression

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.

Stage 010.0000

ESM2-650M (Baseline)

Single-sequence masked language modeling captures general biochemical constraints but struggles on fast-evolving viral fitness landscapes.

Mean Spearman0.269
Stage 02+0.1239

Evolutionary Conservation Only

Homologous sequence alignment frequencies capture viral strain variability directly from natural evolution.

Mean Spearman0.393
Stage 03+0.1617

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.

Mean Spearman0.430
[0.0775, 0.2450]

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.

Hepatitis C Virus (HCV)+0.545 delta

NS5A Replication Complex Domain I

POLG_HCVJF_Qi_2014
Meta ESM2-650M0.116
Afrium AminoGrapes0.661
SARS-CoV-2+0.536 delta

Main Protease (Mpro / 3CLpro)

R1AB_SARS2_Flynn_2022
Meta ESM2-650M0.105
Afrium AminoGrapes0.641
HIV-1 (Strain BF520)+0.481 delta

Envelope Glycoprotein gp160

Q2N0S5_9HIV1_Haddox_2018
Meta ESM2-650M0.044
Afrium AminoGrapes0.525
Dengue Virus (DEN-2)+0.435 delta

Envelope Glycoprotein & Protease

POLG_DEN26_Suphatrakul_2023
Meta ESM2-650M0.153
Afrium AminoGrapes0.588
05 : Assay-Level Evaluation

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.

25 / 31 AminoGrapes higher
6 / 31 ESM2-650M higher
Meta ESM2-650M
Afrium AminoGrapes
Hover or tap any row for exact values
POLG_HCVJF_Qi_2014
+0.545
R1AB_SARS2_Flynn_2022
+0.536
Q2N0S5_9HIV1_Haddox_2018
+0.481
POLG_DEN26_Suphatrakul_2023
+0.435
A0A192B1T2_9HIV1_Haddox_2018
+0.420
NRAM_I33A0_Jiang_2016
+0.408
TAT_HV1BR_Fernandes_2016
+0.403
PA_I34A1_Wu_2015
+0.362
SPIKE_SARS2_Starr_2020_binding
+0.351
SPIKE_SARS2_Starr_2020_expression
+0.346
ENV_HV1B9_DuenasDecamp_2016
+0.297
CAPSD_AAV2S_Sinai_2021
+0.264
NCAP_I34A1_Doud_2015
+0.253
ENV_HV1BR_Haddox_2016
+0.239
I6TAH8_I68A0_Doud_2015
+0.216
A0A140D2T1_ZIKV_Sourisseau_2019
+0.186
A4D664_9INFA_Soh_2019
+0.138
POLG_PESV_Tsuboyama_2023_2MXD
+0.103
REV_HV1H2_Fernandes_2016
+0.081
C6KNH7_9INFA_Lee_2018
+0.045
RPC1_BP434_Tsuboyama_2023_1R69
+0.040
A0A2Z5U3Z0_9INFA_Doud_2016
+0.038
POLG_CXB3N_Mattenberger_2021
+0.011
RDRP_I33A0_Li_2023
+0.004
A0A2Z5U3Z0_9INFA_Wu_2014
+0.001
HCP_LAMBD_Tsuboyama_2023_2L6Q
-0.084
VG08_BPP22_Tsuboyama_2023_2GP8
-0.167
RCRO_LAMBD_Tsuboyama_2023_1ORC
-0.170
RPC1_LAMBD_Li_2019_high-expression
-0.185
RPC1_LAMBD_Li_2019_low-expression
-0.208
VRPI_BPT7_Tsuboyama_2023_2WNM
-0.374

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).

06 : Scope & Limitations

Evaluation Notes & Assumptions

Evaluation Note

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.

As described in Section 4.2 of the paper: sequence weight corrections and BLOSUM62 coordinate mapping were debugged while reviewing alignment wildtype match rates. To prevent parameter overfitting, the ESM2 blend weight (λ = 0.7) was chosen strictly on 30 non-viral assays and frozen prior to viral evaluation.

Model Limitations & Scope

Directly from Section 6 of the paper, outlining the bounds, structural caveats, and assumptions of the AminoGrapes scoring framework.

Limitation 01

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.

Limitation 02

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.

Limitation 03

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.

Limitation 04

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.

Limitation 05

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.

Limitation 06

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.

07 : Reproducibility & Reference

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.

Terminal Execution Command
python afrium.py --ref DMS_substitutions.csv --data DMS_ProteinGym_substitutions --msa DMS_msa_files --weights DMS_msa_weights --struct ProteinGym_AF2_structures --taxon Virus --out afrium_out --esm2
Colab Reproduction Protocol (Appendix C)
1

Upload Afrium_reproduce_in_Colab.ipynb to Google Colab.

2

Select T4 GPU hardware acceleration (Runtime > Change runtime type > T4 GPU).

3

Run cells from top to bottom (downloads ProteinGym v1.3 viral files & AlphaFold structures).

4

Execute Step 5 scoring pipeline (computes AminoGrapes and ESM2 on all 31 viral assays, ~30-60 min).

5

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.

Use AminoGrapes (View Code)Download Notebook (.ipynb)
ProteinGym v1.3 Viral Assays · Zero-Shot Pipeline
BibTeX Citation
@techreport{afrium2026aminograpes,
  title={AminoGrapes: Structure-Weighted Evolutionary Scoring for Viral Protein Fitness Prediction},
  author={{The Afrium Team}},
  institution={Afrium},
  address={Islamabad, Pakistan},
  year={2026},
  month={October}
}
The Afrium TeamAfrium, Islamabad, Pakistan