Train calibrators on AlphaPeptDeep and MS2PIP/DeepLC features: the general model is fitted on Prosit's

Open
#263 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
huggingface, python

Research direction

Read the general model training work in #58 and the shared choices tracked in #262, then check the listed dependencies (#256–#262) before starting. Fit calibrators for the requested model pairs and checkpoints using the same corpus with learn_from_missing enabled. Report held-out reliability curves and ECE against Prosit, check FDR against a database search or entrapment, and publish the calibrators on Hugging Face with checkpoint and Koina model details in each model card and config.json.

Written by the indexing model from the issue text.

Description

enhancement

Why

A calibrator's fragment-match and iRT features (ion_matches, ion_match_intensity, irt_error) are computed from one Koina model's predictions. The published InstaDeepAI/winnow-general-model was fitted on Prosit's (Prosit_2025_intensity_22PTM, Prosit_2025_irt_22PTM). Another model predicts differently, so the same PSM gets different feature values, and the network's probabilities are no longer calibrated.

With the fixes on the open PRs below, Winnow can rescore with other Koina models. INFlow and Seqora already offer them. They matter because they represent far more of InstaNovo v1.3.0's 133 residues than Prosit does. Each Koina model was probed one residue at a time, with peptides spelled by Winnow's own tokens_to_proforma:

model residues accepted
fragments Prosit_2025_intensity_22PTM (fitted) 53
ms2pip_HCD2021 131
AlphaPeptDeep_ms2_generic 130
retention time Prosit_2025_irt_22PTM (fitted) 53
Deeplc_hela_hf 126
AlphaPeptDeep_rt_generic 130

What using one with the Prosit-fitted calibrator does, from INFlow's checkpoint comparison (v1.3.0, three samples, AlphaPeptDeep for both features):

  • PSMs excluded from rescoring fall from 22–36% to almost none, and 2–10% more PSMs pass 5% FDR.
  • The quality floor drops. A quantified feature on kwando rests on a PSM scored at 0.019 confidence.
  • Scaffolds fully in the reference fall on all three samples.

More passes with lower quality is what miscalibration looks like. Winnow now warns when the Koina model is overridden, but a calibrator fitted on the model is what removes the problem.

Asked for

One calibrator per supported pair of fragment and retention-time models, for each InstaNovo checkpoint:

features instanovo-v1.2.0 v1.3.0 (133 residues)
Prosit / Prosit the general model #262
AlphaPeptDeep / AlphaPeptDeep new new
MS2PIP / DeepLC new new

As in #262:

  • the same training corpus as the general model (#58), so calibrators differ only in what they were fitted on;
  • learn_from_missing on, so PSMs a model can't score are imputed rather than dropped;
  • each published with its checkpoint and Koina models in the model card and config.json, so a mismatch can be detected.

Depends on

  • #256 / #258: AlphaPeptDeep's outputs vary in width per batch and don't merge without it
  • #261: MS2PIP takes no collision energy and fails formatting without it
  • #257 / #259: a loaded calibrator otherwise ignores the configured Koina model, which is needed to use these calibrators
  • #262: the v1.3.0 column, and the shared choices

Done when

  • Each calibrator's reliability curve and ECE on held-out labelled data are reported beside the Prosit one.
  • The FDR is checked against a database search or entrapment (instadeepai/INFlow#41).
  • They are published on Hugging Face.

INFlow chooses among them in instadeepai/INFlow#185.

Dominant language
Python
Stars
12
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from instadeepai/winnow

All issues in instadeepai/winnow

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.