Repository navigation
feat: negative-set robustness — Phase 2 benchmark honesty - #7
Closed
cschanhniem wants to merge 1 commit into
Closed
cschanhniem wants to merge 1 commit into
cschanhniem wants to merge 1 commit into
Conversation
…ves, 53 tests Phase 2: Negative-set robustness — pipeline must enrich AMP-like sequences above negatives regardless of negative type, not just against easy all-repeat controls. - Add examples/negative/poly_cationic.csv: 5 poly-K/R sequences with high charge density but no hydrophobic face (a harder negative set than degenerate repeats) - Add examples/negative/poly_hydrophobic.csv: 5 poly-L/I/V sequences with high hydrophobic fraction but zero charge (another harder negative class) - Add examples/benchmark/robustness_positives.csv: 3 canonical AMP-like positives used across all robustness tests - Add test_negative_robustness.py: 16 tests verifying: - Poly-cationic sequences have correct physicochemical properties (high charge, zero hydro) - Poly-hydrophobic sequences have correct properties (high hydro, zero charge) - Safety scorer penalizes both classes (excess charge / excess hydrophobicity) - EF > 1.0 vs degenerate, poly-cationic, AND poly-hydrophobic negatives - recall@3 = 1.0 (all 3 positives in top-3) vs both hard negative sets - Mean positive ensemble score > mean negative ensemble across all negative types - Add recall_at_k, random_recall_at_k, enrichment_factor, benchmark_summary to evaluate.py - Fix ruff F401 unused imports in pipeline.py, test_cli.py, test_pipeline_filters.py - 53 tests passing, ruff clean
Collaborator
Author
|
Superseded by PR #11 (feat/integrate-all-phases), which merges all Phase 2 + Phase 3 work into a single consolidation PR with 251 tests passing. |
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
Implements Phase 2: Negative-set robustness from AGENTS.md:
A pipeline that only outperforms trivial negatives (all-A, all-G) cannot be trusted. This PR verifies the pipeline still enriches AMP-like sequences against harder, more realistic negative classes.
New negative datasets
poly_cationic.csvpoly_hydrophobic.csvThese represent one-dimensional negatives — sequences that have one AMP-like property but lack the balance that makes real AMPs work.
What the tests prove
Test plan
make test— 53 tests passruff check src tests— clean