Repository navigation
feat: integrate expert composite into pipeline ranking - #118
Merged
Merged
Conversation
…de expert The expert composite scorer (scoring/expert.py) was benchmarked but never connected to the actual pipeline. The triage benchmark (v0.5.12) showed the ensemble has an anti-selective bias (sel_vs_hem AUROC=0.466, below random). This integration makes the expert composite available as an optional ranking mode that partially corrects this bias. Changes: - score_candidates() now computes expert_composite and hemolysis_risk for every candidate, stored alongside ensemble in the scores dict - rank_candidates() accepts ranking_mode='expert' to sort by expert composite (default remains 'ensemble') - run_ranking_pipeline() accepts ranking_mode, recorded in batch report JSON - CLI: openamp-foundry rank --ranking-mode expert flag added - selection/pareto.py: select_top() also accepts ranking_mode Verification: - Expert-ranked top-5 have lower mean hemolysis_risk than ensemble-ranked top-5 on mixed benchmark (test_expert_top_5_have_lower_hemolysis_risk) - Expert ranking produces different order than ensemble (not identical) - Default ranking unchanged (backward compatible) - Batch report records ranking_mode field - 1502 tests pass, 1 skipped (pre-existing) - Ruff clean on all modified files Honest limitation: The expert composite's hemolysis components are not statistically significant on the expanded n=179 benchmark (AUROC=0.565, CI 0.47-0.66). Expert ranking is a safety-aware alternative, not a validated safety guarantee. Wet-lab hemolysis assay remains mandatory.
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.
The expert composite scorer was benchmarked but never connected to the pipeline. The triage benchmark showed the ensemble has an anti-selective bias (sel_vs_hem AUROC=0.466). This PR integrates the expert composite as an optional ranking mode.
Changes:
Verification:
Honest limitation: hemolysis components are not statistically significant on expanded n=179 benchmark (AUROC=0.565, CI 0.47-0.66). Wet-lab hemolysis assay remains mandatory.