Skip to content

feat(predict): the self-exclusion rule reaches the search, so the query can go by accession - #1292

Merged
frapercan merged 2 commits into
integration/three-familiesfrom
feat/self-exclusion-rule-reaches-the-search
Nov 22, 2026
Merged

frapercan merged 2 commits into
integration/three-familiesfrom
feat/self-exclusion-rule-reaches-the-search

Conversation

@frapercan

Copy link
Copy Markdown
Owner

What

self_exclusion is a field of the predict payloads since protea-contracts #54. With the value "accession", a run excludes the query from its own neighbourhood and nothing else: its twins (other proteins with the identical sequence) stay as donors. The flag alone keeps meaning "sequence", and it behaves and records exactly as before.

Why

The thesis closure frame excludes the protein itself and nothing else: "es esa proteina o no". An identical sequence carried by another protein is a legitimate donor, and retrieval should be the one to bring it. Until now PROTEA could only exclude by sequence, so every PLM arm of the 211->227 window lost those donors. The rule already existed in protea-method (#67) for the world model's dataset (ADR-D56); PROTEA had no way to ask for it.

How it was checked

  • TestByAccessionTheTwinsStay covers both pre-search paths:
    • the search asks one deeper because the query is in the bank once;
    • the query goes and its twin stays;
    • no sequence map is read.
  • A by-sequence payload without its map is refused.
  • The source-level checks now require self_exclusion_margin and drop_self in both pre-searches.
  • The receipt records the rule only when named, and records the exclusion whatever field asked for it.
  • The seal refuses a comparison across the rule unless the rule is the declared axis. Every key the receipt writes is classified.
  • The arm identity separates a by-accession arm against Postgres. The window summary returns the rule.
  • The panel tests cover the label and the pairing.
  • The whole Python suite with Postgres, against the new contract: 7,836 passed, 78 skipped, 11 xfailed, 2 xpassed.
  • Lint gates pass (ruff format, ruff check, smell budget, sets gate, OpenAPI references). mypy finds no issues in the changed modules. Web: vitest (panel), eslint on the changed files.

…ry can go by accession

Since protea-contracts #54 a predict payload can name how the query leaves
its own neighbourhood: by sequence (the query and its twins, other proteins
with the identical sequence) or by accession (the query alone, its twins
kept as donors). protea-method applies either rule since its #67, but
PROTEA only knew the flag, which means by sequence. The thesis closure
frame excludes the protein itself and nothing else: an identical sequence
carried by another protein is a legitimate donor, and retrieval should be
the one to bring it.

Both pre-searches, per aspect and unified, take their margin and their drop
from protea-method's self_exclusion_margin and drop_self, through one view
of the payload (predict_go_terms._self_exclusion), so they cannot disagree
with the method's own search. The whole bank's sequence map is read only
under the by-sequence rule, and a by-sequence payload without it is refused
rather than silently dropping nothing. The coordinator forwards the rule to
every batch and the method's configuration carries it.

The receipt records whether the query was excluded, whichever field asked
for it, and the rule when the payload named it. The rule is method identity
in the seal, the arm identity names "self-excluded-by-accession", and the
window summary and the panel tell an accession arm from a sequence arm of
the same model. The flag alone behaves and records exactly as before.
…lf_exclusion

protea-contracts f7008c90 (#54) names the rule. Every sibling that pins
the contract moves with it, because Poetry cannot resolve two revisions of
one git dependency: protea-method 69ea8af4 (#70), protea-sources f28af5b0
(#44), protea-runners c70335a7 (#32), protea-backends 1d0e5bc4 (#52) and
protea-reranker-lab b296a3a7 (#125). Each moved only by its contract pin
and one CI change, except protea-method, whose optional backends pin also
moved to the revision PROTEA already pins (backends #47).
@frapercan
frapercan marked this pull request as ready for review November 22, 2026 15:29
@frapercan
frapercan merged commit 7edfb68 into integration/three-families Nov 22, 2026
21 of 22 checks passed
@frapercan
frapercan deleted the feat/self-exclusion-rule-reaches-the-search branch November 22, 2026 15:29
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