Repository navigation
feat(bench): expand hemolysis reference 42 to 238 peptides using DBAASP, correct small-sample inflation - #115
Merged
Merged
Conversation
…SP, correct small-sample inflation in hemolysis risk scorer The within-AMP selectivity benchmark (PR #113/#114) ran on only 42 peptides (14 hemolytic vs 21 selective, n=35 binary). The dedicated hemolysis risk scorer detection AUROC=0.9218 (CI 0.82-0.99) was based on this tiny set. DBAASP v3 hemolytic activity data (already in data/novelty_db/) contains 887 unique peptides with human erythrocyte 50 percent hemolysis measurements. This PR extracts 196 new peptides with HC50 values, converts uM to ug/ml using peptide molecular weight, and merges with the existing reference. Expanded benchmark (n=179 binary: 54 hemolytic vs 125 selective): hemolysis_risk detection AUROC: 0.9218 to 0.5650 (CI 0.47-0.66) NOT significant safety detection AUROC: 0.3844 to 0.5116 (CI 0.43-0.60) still not significant selectivity_proxy detection AUROC: 0.5744 (CI 0.50-0.66) borderline serum_stability: 0.5873 (CI 0.51-0.66) significant risk detector The original 0.92 AUROC was small-sample inflation. This is exactly the kind of self-deception the project adversarial benchmark philosophy is designed to catch. No scorer should be described as a statistically significant hemolysis detector based on the expanded set. Changes: - scripts/expand_hemolysis_benchmark.py: extraction and unit conversion - examples/validation/hemolysis_reference.csv: 42 to 238 peptides - tests: test renamed from significant detector to direction correct - docs: METRICS_CURRENT.md, ROADMAP.md, BENCHMARK_CARD.md updated - src: hemolysis.py and expert.py docstrings corrected All 1471 tests pass. No regressions. Constraint: DBAASP hemolysis data already in repo (data/novelty_db/); no new downloads needed Rejected: Using raw uM thresholds | Existing benchmark uses ug/ml; converting preserves comparability Rejected: Filtering to only uM data | Would lose 107 peptides with only ug/ml measurements Directive: Do not describe hemolysis_risk as statistically significant without re-validating on expanded set Confidence: high Scope-risk: narrow Tested: 1471 tests pass, 7 skipped; benchmark run on expanded set; all doc references updated Co-authored-by: OmX <noreply@omx.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The within-AMP selectivity benchmark (PR #113/#114) ran on only 42 peptides (14 hemolytic vs 21 selective, n=35 binary). The dedicated hemolysis risk scorer's detection AUROC=0.9218 (CI 0.82-0.99) was based on this tiny set.
DBAASP v3 hemolytic activity data (already in
data/novelty_db/) contains 887 unique peptides with human erythrocyte 50% hemolysis measurements. This PR extracts 196 new peptides with HC50 values, converts µM to µg/ml using peptide molecular weight, and merges with the existing reference.Expanded benchmark results (n=179 binary: 54 hemolytic vs 125 selective)
Key finding
The original 0.92 AUROC was small-sample inflation. This is exactly the kind of self-deception the project's adversarial benchmark philosophy is designed to catch. No scorer should be described as a "statistically significant hemolysis detector" based on the expanded set.
Changes
scripts/expand_hemolysis_benchmark.py: extraction + unit conversion scriptexamples/validation/hemolysis_reference.csv: 42 → 238 peptidestests/test_selectivity_benchmark.py: test renamed fromtest_hemolysis_risk_is_significant_detectortotest_hemolysis_risk_direction_correcttests/test_hemolysis_risk.py: docstring updated with correction notedocs/METRICS_CURRENT.md,docs/ROADMAP.md,docs/BENCHMARK_CARD.md: corrected metrics and honest interpretationsrc/openamp_foundry/scoring/hemolysis.py,src/openamp_foundry/scoring/expert.py: docstrings/comments correctedVerification
All 1471 tests pass (7 skipped). No regressions. Pre-push hook ran full test suite.
Constraint: DBAASP hemolysis data already in repo (data/novelty_db/); no new downloads needed
Rejected: Using raw µM thresholds | Existing benchmark uses µg/ml; converting preserves comparability
Rejected: Filtering to only µM data | Would lose 107 peptides with only µg/ml measurements
Directive: Do not describe hemolysis_risk as statistically significant without re-validating on expanded set
Confidence: high
Scope-risk: narrow
Tested: 1471 tests pass, 7 skipped; benchmark run on expanded set; all doc references updated
Co-authored-by: OmX noreply@omx.ai