Skip to content

v0.5.31 — Order-dependent features benchmark (Loop 13) - #141

Merged
cschanhniem merged 1 commit into
mainfrom
agent/oamp-loop13-20260705
Jul 5, 2026
Merged

cschanhniem merged 1 commit into
mainfrom
agent/oamp-loop13-20260705

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Class

Benchmark honesty / scientific credibility (Priority 1)

Why it matters

The pipeline's strict triage AUROC (0.572) showed it's predominantly composition-based. We didn't know WHICH features depend on sequence order, or whether order-dependent features could improve discrimination. This benchmark answers both questions.

Key findings

  1. dipeptide_order_score is the feat: enforce config filters, add run manifest, bench leakage CLI, 37 tests #1 order-dependent feature (AUROC 0.7861 on AMP-vs-scrambled), beating hydrophobic moment (0.7483)
  2. Only 7/31 features survive scrambling — all are amphipathicity/helix-wheel properties + new dipeptide score
  3. All composition features are EXACTLY position-independent (AUROC = 0.5000, identical means)
  4. Some features are anti-order-dependent (aggregation 0.4325, hydrophilic face mean h 0.3506 — scrambling creates patterns not found in native AMPs)

Changes

  • src/openamp_foundry/features/dipeptide.py — new module: dipeptide frequencies + order score with pre-computed log-odds reference
  • src/openamp_foundry/features/dipeptide_log_odds.json — 400-entry reference for AMP-vs-scrambled discrimination
  • src/openamp_foundry/features/physchem.py — dipeptide_order_score added to compute_features() (31st scalar feature)
  • src/openamp_foundry/features/__init__.py — exports for new module
  • scripts/benchmark_order_dependent.py — analyzes which features survive scrambling
  • Makefile — make bench-order-dependent target
  • .github/workflows/ci.yml — informational CI step
  • docs/50_LOOP_PLAN.md — Loop 13 ✅
  • docs/METRICS_CURRENT.md — Order-Dependent Features Benchmark section
  • docs/ROADMAP.md — v0.5.31 entry

Verification

  • ✅ 1723 tests pass
  • ✅ Lint clean on all new/modified files
  • ✅ dipeptide_order_score accessible via openamp_foundry.features API

Risk / uncertainty

  • The log-odds reference is pre-computed from the 500-AMP benchmark; it will need periodic recalibration as the AMP corpus grows
  • Not yet integrated into the ensemble scoring — integration requires re-baselining the benchmark gate
  • Some signal may come from position-specific residue patterns (e.g., N-terminal K) rather than true dipeptide preferences

Next loop

Loop 14 — Cross-dataset generalization (train on APD6, test on DRAMP or vice versa)

Added dipeptide-order features for sequence-order awareness.
dipeptide_order_score achieves AUROC 0.7861 on AMP-vs-scrambled
discrimination — the strongest order-dependent feature, beating
hydrophobic moment (0.7483). Only 7/31 features survive scrambling;
all composition features are exactly position-independent (0.5000).

Changes:
  src/openamp_foundry/features/dipeptide.py        — new: dipeptide module
  src/openamp_foundry/features/dipeptide_log_odds.json — pre-computed ref
  src/openamp_foundry/features/physchem.py          — add dipeptide_order_score
  src/openamp_foundry/features/__init__.py          — export new functions
  scripts/benchmark_order_dependent.py              — new: scrambling analysis
  Makefile                                           — bench-order-dependent
  .github/workflows/ci.yml                          — informational CI step
  docs/50_LOOP_PLAN.md                               — Loop 13 marked complete
  docs/METRICS_CURRENT.md                            — order-dependence section
  docs/ROADMAP.md                                    — v0.5.31 entry
@cschanhniem
cschanhniem merged commit b28f4ad into main Jul 5, 2026
1 check passed
@cschanhniem
cschanhniem deleted the agent/oamp-loop13-20260705 branch July 5, 2026 04:20
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