Skip to content

Stop our own depletion edges from deleting curator assembly edges - #83

Merged
adamjohnwright merged 1 commit into
mainfrom
fix/root-detection-only
Sep 17, 2026
Merged

adamjohnwright merged 1 commit into
mainfrom
fix/root-detection-only

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

The defect, live on main

root_uuids = sources - targets is computed after depletion edges are
appended, and counts them.

A root is "produced by no reaction in this pathway" — the code's own comment —
and that is what marks a boundary complex worth decomposing into its subunits,
so a knockout of a subunit can reach it. A depletion edge is not production:
it is our own modelling inference, catalyst → consumed input, emitted earlier
in the same function. Counting it makes a boundary complex look produced, so it
silently loses its subunit decomposition and subunit knockouts stop reaching it.

This happens on main today wherever a cytosolic depletion edge lands on a
boundary complex. The fix restores 46 assembly edges, among them
p-MAPK1 → MAPK1 dimer and the MAPK3/MAPK7 equivalents — curator-derived
complex composition, deleted by an edge we invented.

Measured

split net
all pathways pooled −54
tuning ten (the paper's) −55
held-out (70 pathways) +2

The entire regression is the tuning set, and almost all of it is TP53, where the
restored edges flip the direction of 239 decidable predictions. TP53 is dense
enough that direction is unstable to small structural changes — and it is a
pathway we tune on, so that instability should not veto a fix that is neutral
on every pathway outside the tuning set
.

Rejecting this on the pooled −54 would have been exactly the overfitting the
paper's tune-on-ten / report-on-the-rest protocol exists to prevent. See
reactome/deltasignal#35 for the split tooling and the full numbers.

Verified

Deterministic (PYTHONHASHSEED pinned), on R-HSA-450294:

main                   assembly 48, depletion  3
compartment fix only   assembly 45, depletion 18   <- 3 curator edges lost
this fix + that        assembly 48, depletion 18   <- restored

The compartment fix is deliberately not included here — see #81 for why the
two are worse together than either alone.

🤖 Generated with Claude Code

Isolated from the compartment change so the two can be measured apart.
They differ in kind: this restores CURATOR-derived complex composition
that our own inference was deleting, while the compartment change extends
that inference into more compartments.

Root detection ran over the edge list after depletion edges were appended
and counted them. A root is "produced by no reaction in this pathway" --
the code's own words -- and a depletion edge is not production, it is
catalyst -> consumed input, invented by us. Counting it makes a boundary
complex look produced, so it silently loses its subunit decomposition and
knockouts of its subunits stop reaching it.

Live on main today wherever a cytosolic depletion edge lands on a
boundary complex.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 1e65098 into main Sep 17, 2026
4 checks passed
@adamjohnwright
adamjohnwright deleted the fix/root-detection-only branch September 17, 2026 03:44
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