Skip to content

Add sequence-only regional biophysical + IMGT germline Z-score baseline (clss_reg8_imgt_z) - #15

Open
mizopl wants to merge 1 commit into
Graylab:mainfrom
mizopl:feat/clss-reg8-imgt-z-baseline
Open

mizopl wants to merge 1 commit into
Graylab:mainfrom
mizopl:feat/clss-reg8-imgt-z-baseline

Conversation

@mizopl

@mizopl mizopl commented Nov 18, 2026

Copy link
Copy Markdown

Scope & Limitations First

  • Intrinsic Biophysical Baseline Only (Zero Antigen-Binding Signal): This pull request contributes a lightweight, deterministic, sequence-only zero-shot baseline (models/reg8_imgt_score.py and models/scoring_reg8_imgt.py, method clss_reg8_imgt_z) requiring only numpy, pandas, and scipy (zero model weights, zero GPU, zero external API calls; uses models/biopython_score.py and models/ld_score.py when present in the conda environment, with a built-in pure-Python ProtParam fallback when Biopython or abnumber is absent). Because it evaluates intrinsic antibody FWR/CDR sequence biophysics and human IMGT V+J germline identity without target-antigen coordinates, it has near-zero correlation on antigen-specific binding (mean Spearman rho = -0.0060 across the 16 score/binding datasets vs pyrosetta +0.1379 and iglm (+ppl) +0.1742, and -0.0987 across 80 data/binding CSVs [97,778 variants]), trails released baselines on score/aggregation (+0.0997 vs esmif (-ppl) +0.1445 and progen/oas (+ppl) +0.1701), score/expression (+0.1205 vs progen/medium (-ppl) +0.3159), and score/immunogenicity (-0.0172 vs progen/medium (-ppl) +0.3302), and trails single-descriptor -bp_isoelectric_point on the expanded 25-CSV data/polyreactivity set (+0.1407 vs +0.2447).
  • Where It Helps (Thermostability & score/polyreactivity Sign Consistency and Confound Control): Across intrinsic developability benchmarks on upstream main (2026-08-17), the frozen equal-weight (1/8 each) composite standardized strictly against the external 24 VH x 18 VL = 432 human IMGT germline reference repertoire achieves:
    • Thermostability: 14 / 15 (93.3%) positive datasets on the 15-dataset score/tm benchmark (mean rho = +0.4636 vs +0.2908 for bp_flexibility, +0.3027 for sequence_length, and +0.2169 for progen/xlarge (-ppl)), 16 / 20 (80.0%, mean rho = +0.3270) on standard Fv data/thermostability CSVs (19 / 25 = 76.0%, mean rho = +0.2834 on the 25-dataset union), and matched-stratum correlation rho_matched = +0.4308 (34 exact (L_H, L_L, V_H, V_L) multi-variant strata across 15 datasets).
    • Polyreactivity (score/polyreactivity): 6 / 6 (100.0%) positive datasets (mean rho = +0.4467 vs +0.4354 for -bp_isoelectric_point, +0.1906 for mpnn (-ppl), and +0.1936 for progen/xlarge (+ppl); 17 / 25 = 68.0%, mean rho = +0.1407 across all 25 data/polyreactivity CSVs), and matched-stratum correlation rho_matched = +0.5262 (51 multi-variant (L_H, L_L, V_H, V_L) strata [45 non-constant] across 6 datasets).

Method Summary (clss_reg8_imgt_z)

  1. Deterministic Anchor Split (FWR vs CDR): Conserved cysteine/tryptophan motifs partition heavy and light chains into concatenated framework (FWR1..4) and complementarity-determining (CDR1..3) segments without external numbering dependencies.
  2. Eight Unweighted Sequence Descriptors (1/8 Each, Standardized on External Human IMGT Germlines Only):
    • Framework folding terms: +bp_average_flexibility(FWR), -bp_gravy(FWR), -bp_instability_index(FWR) (matching models/biopython_score.py).
    • CDR colloidal/electrostatic terms: -bp_aromaticity(CDR), -bp_isoelectric_point(CDR), -bp_charge_at_7_4(CDR).
    • Global & repertoire terms: +bp_molecular_weight, plus anchor-aligned human IMGT V+J germline sequence identity.
    • Mean and standard deviation for each term are fixed once from the 432 human IMGT VH x VL reference pairs (zero FLAb fitness values read).

CLI Usage & Repository Integration

Matching the script-only convention of models/scoring_bp_*.py in models/ (leaving score/ and README.md untouched), run from the FLAb/ root:

python models/scoring_reg8_imgt.py data/thermostability/<dataset>.csv clss_reg8_imgt_z

Writes deterministic (mtime = 0) score/clss_reg8_imgt_z/<category>_<dataset>.gz with columns folder, csv, clss_reg8_imgt_z, clss_reg8_imgt_z_pval, clss_reg8_imgt_z_ld, clss_reg8_imgt_z_ld_pval (when abnumber/anarci is not installed in the active environment, *_ld and *_ld_pval default to NaN while clss_reg8_imgt_z and clss_reg8_imgt_z_pval are computed identically; higher clss_reg8_imgt_z indicates higher intrinsic developability, yielding +0.3270 mean raw Spearman across the 20 standard data/thermostability CSVs).

Full row-level evaluation (109,236 scored rows, B = 1,000 permutation controls, and germline/length confound ablations; certificate sha256: b6be3abe5d0dcff18fcf18d8e7a16f64164d434290274613f79b76f80f598eb6): https://github.com/mizopl/we-star/tree/main/solutions/flab-antibody-developability-zero-shot

— engineered & verified by we* (PROOFER powered by Gemini + @mizopl)

…ne (clss_reg8_imgt_z)

— we* (PROOFER powered by Gemini + @mizopl)
mizopl pushed a commit to mizopl/we-star that referenced this pull request Nov 18, 2026
mizopl pushed a commit to mizopl/mizopl that referenced this pull request Nov 18, 2026
— we* (PROOFER powered by Gemini + @mizopl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant