Repository navigation
feat(bench): per-feature selective_vs_hemolytic decomposition benchmark - #129
Merged
Merged
Conversation
…chmark The strict triage benchmark (v0.5.14) proved no composite scorer passes selective_vs_hemolytic discrimination (AUROC 0.43-0.54). But it did not explain WHY — only that the aggregate fails. This benchmark tests all 30 scalar physicochemical features individually for selective_vs_hemolytic AUROC with bootstrap CIs, direction, significance, and selectivity-proxy usage flags. Key finding: hydrophobic_fraction is the strongest single discriminative feature (AUROC 0.6745, CI 0.58-0.77) but is NOT used by the selectivity proxy. 8/30 features have significant signal; 6 of those 8 are unused by the current selectivity model. This converts the aggregate failure into actionable diagnostic information for the next loop. - benchmark/feature_decomp.py: run_feature_decomposition_benchmark() - benchmark/metrics_snapshot.py: feature_decomposition section - CLI: bench feature-decomp, Makefile: bench-feature-decomp - tests/test_feature_decomp.py: 20 tests - tests/test_docs_consistent.py: 3 docs drift guards - METRICS_CURRENT.md, ROADMAP.md, ARCHITECTURE.md updated
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.
Chosen bottleneck
Benchmark honesty — the strict triage benchmark (v0.5.14, PR #128) proved no composite scorer passes selective_vs_hemolytic discrimination (AUROC 0.43-0.54). But it did not explain why. The aggregate failure was opaque: which individual features have signal that the composite scorers are cancelling out? No per-feature diagnostic existed.
Why it matters
This is the single deepest scientific credibility gap in the pipeline. The ensemble actively ranks hemolytic AMPs above selective AMPs (AUROC 0.4661 — worse than random). Without knowing why, every future scoring improvement is guessing in the dark.
Changes made
benchmark/feature_decomp.py:run_feature_decomposition_benchmark()— tests all 30 scalar physicochemical features fromcompute_features()individually for selective_vs_hemolytic AUROC with bootstrap CIs, direction (risk vs protective), significance flags, and selectivity-proxy usage flagsfeature_decompositionsection added tobuild_metrics_snapshot()bench feature-decompcommandbench-feature-decomptargettests/test_feature_decomp.pycovering structure, findings, determinism, and snapshot integrationtests/test_docs_consistent.pyoutputs/metrics_snapshot.jsonKey finding
The selectivity proxy ignores the strongest discriminative features.
8/30 features have statistically significant signal (CI excludes 0.5). 6 of those 8 are NOT used by the current selectivity model. The best single feature (
hydrophobic_fraction) outperforms the selectivity proxy itself (0.6745 vs 0.6095).This converts the v0.5.14 aggregate failure into actionable diagnostic information: the next loop knows exactly which feature axes to combine into a richer selectivity scorer.
Verification run
uv run pytest -q: 1539 passed, 7 skipped (was 1516 + 20 new + 3 docs guards)uv run ruff checkon all changed files: cleanmake bench-feature-decomp: runs end-to-endmake metrics-snapshot: snapshots include feature_decomposition sectiongit diff --check: cleanRisks / uncertainties
Recommended next loop
Build a richer selectivity scorer that combines the top unused significant features (
hydrophobic_fraction,helix_propensity,net_charge_proxy,interior_trypsin_sites) and benchmark it against the current proxy on the same selective_vs_hemolytic task. If it clears 0.65 AUROC with significant CIs, integrate it into the expert composite and re-run the full triage benchmark.Future loop benefit
The next agent/human can now:
make bench-feature-decompto re-check after any scoring changemake metrics-snapshot