Skip to content

feat: selectivity benchmark — safety_score AUROC=0.54 (FAILED) reveals critical gap - #117

Closed
cschanhniem wants to merge 1 commit into
mainfrom
feat/selectivity-benchmark
Closed

cschanhniem wants to merge 1 commit into
mainfrom
feat/selectivity-benchmark

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Summary

Adds the first selectivity benchmark to the OpenAMP Foundry pipeline, directly addressing:

  • v1.1 roadmap: benchmark candidate triage against a reference panel with selective + hemolytic AMPs
  • Phase 2.5 DoD: membrane proxy benchmark distinguishing bacterial-selective vs hemolytic peptides
  • Priority 1: benchmark honesty / preventing self-deception

What was built

  • examples/validation/selectivity_panel.csv: 10 selective + 8 hemolytic AMPs with literature hemolysis classifications
  • src/openamp_foundry/benchmark/selectivity.py: SelectivityResult dataclass + run_selectivity_benchmark() computing AUROC for safety_score, selectivity_proxy, hydrophobic_fraction, hydrophobic_moment, charge_density, GRAVY
  • tests/test_selectivity_benchmark.py: 21 tests covering panel integrity, AUROC computation, blind spot detection, CLI integration
  • CLI: validate-selectivity command + make validate-selectivity target
  • Docs updated: METRICS_CURRENT, BENCHMARK_CARD, ROADMAP, ARCHITECTURE

Key finding (honest, not flattering)

Feature AUROC Verdict
safety_score 0.54 FAILED — near random
selectivity_proxy 0.61 Weak
hydrophobic_fraction 0.81 Best discriminator
GRAVY 0.76 Strong naive baseline
hydrophobic_moment 0.61 Weak
charge_density 0.54 Near random

safety_score does NOT discriminate selective from hemolytic AMPs. 5 of 8 hemolytic AMPs receive safety_score=1.0, including melittin (HC50 ~ 5 ug/mL). The naive hydrophobic_fraction baseline (AUROC=0.81) significantly outperforms the designed safety_score.

Why this matters

This is a documented failure, not a hidden one. The melittin blind spot was previously noted qualitatively but never measured. Now it is quantified. The next improvement loop should target safety_score redesign.

Verification

  • 1417 tests pass, 1 skipped (pre-existing)
  • Ruff clean on all new/modified files

…rophobic_fraction AUROC=0.81

Add the first selectivity benchmark to the OpenAMP Foundry pipeline. This directly
addresses the v1.1 roadmap requirement: 'benchmark candidate triage against a reference
panel that includes selective AMPs, hemolytic positives, inactive peptides, and random
controls' and Phase 2.5 DoD: 'Membrane proxy benchmark — Distinguishes bacterial-selective
vs clearly hemolytic reference peptides better than naive heuristics.'

What was built:
- examples/validation/selectivity_panel.csv: 10 selective + 8 hemolytic AMPs with
  literature hemolysis classifications (Zasloff, Habermann, Skerlavaj, etc.)
- src/openamp_foundry/benchmark/selectivity.py: SelectivityResult dataclass +
  run_selectivity_benchmark() computing AUROC for safety_score, selectivity_proxy,
  hydrophobic_fraction, hydrophobic_moment, charge_density, and GRAVY
- tests/test_selectivity_benchmark.py: 21 tests covering panel integrity, AUROC
  computation, blind spot detection, CLI integration
- CLI: 'validate-selectivity' command + 'make validate-selectivity' target
- Docs updated: METRICS_CURRENT, BENCHMARK_CARD, ROADMAP, ARCHITECTURE

Key finding (honest, not flattering):
  safety_score AUROC = 0.54 (near random) — the safety filter does NOT discriminate
  selective from hemolytic AMPs. 5/8 hemolytic AMPs score safety=1.0, including
  melittin (HC50 ~ 5 ug/mL). The naive hydrophobic_fraction baseline (AUROC=0.81)
  significantly outperforms the designed safety_score.

  This is a documented failure, not a hidden one. The benchmark reveals the gap
  that the melittin blind spot hint in BENCHMARK_CARD.md previously only described
  qualitatively. The next loop should target safety_score improvement: lowering the
  hydrophobic_fraction threshold from 0.65 to ~0.50, and adding multi-residue
  hydrophobic face coverage analysis.

1417 tests pass, 1 skipped (pre-existing). Ruff clean on all new/modified files.
@cschanhniem

Copy link
Copy Markdown
Collaborator Author

Closing: upstream main already merged selectivity benchmark (PR #113), hemolysis scorer (PR #114), expanded hemolysis reference (PR #115), and triage benchmark (PR #116) while this was in progress. Will rebase and find the next bottleneck.

@cschanhniem cschanhniem closed this Jul 1, 2026
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