Skip to content

ADEP-1764: Use the alphadia-search-rs FDR classifier by default - #970

Draft
GeorgWa wants to merge 4 commits into
mainfrom
rust-fdr-classifier
Draft

GeorgWa wants to merge 4 commits into
mainfrom
rust-fdr-classifier

Conversation

@GeorgWa

@GeorgWa GeorgWa commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

RustMLPClassifier trains the FDR network and its quantile feature transform in alphadia-search-rs. It uses the same layers, loss, optimizer and batching as the torch classifier, without batch norm and dropout.

  • The new setting fdr.classifier_backend selects the classifier: rust (default) or torch.
  • fdr.lr_schedule and fdr.weight_averaging also apply to the Rust classifier.
  • Options input_batch_norm and mid_rank_ties. Both are part of the state dict, because they define the parameter layout and the input that the network was trained on.
  • Mid-ranked ties are on by default. The input batch norm is off by default.

Results

Offline, on final-round features (2 seeds each), IDs at 1 % FDR compared with the torch classifier with the same smoothing:

Dataset Mid-ranked ties Clamped transform
HeLa 2.25 min +1.5 % -4.2 %
HeLa 3.9 min +0.3 % -5.2 %
Astral 15 min +1.6 % -0.8 %

On average, the input batch norm gives no improvement on top of mid-ranked ties, and it adds approximately 30 % to the fit time. Thus it stays off.

Plan to split

This PR stays open as the full reference. It will be split into these stacked PRs, together with MannLabs/alphadia-search-rs#197, and then closed. Each alphadia PR needs the alphadia-search-rs release of the same slice.

# Slice This repository alphadia-search-rs
1 Quantile transform The quantile transform of the torch classifier calls Rust instead of sklearn fdr_quantile_fit and fdr_quantile_transform
2 Rust MLP RustMLPClassifier and fdr.classifier_backend. The default stays torch. fdr_mlp_fit, fdr_mlp_predict and fdr_mlp_backends with the portable kernels
3 SIMD kernels None Speed only, no review necessary
4 Training options fdr.lr_schedule, fdr.weight_averaging, input_batch_norm and mid_rank_ties go to the Rust classifier The same options in Rust
5 Switch the default rust backend and mid-ranked ties by default, with the results above None

Notes

🤖 Generated with Claude Code

https://claude.ai/code/session_01VqZ5AFp4mT3xvu38DAe66Q

GeorgWa and others added 4 commits November 26, 2026 15:06
RustMLPClassifier trains the FDR network and its quantile feature transform
in alphadia-search-rs: the same layers, loss, optimizer and batching as the
torch classifier, without batch norm and dropout. The new fdr.classifier_backend
setting selects it ("rust", default) or the torch classifier ("torch").

Requires alphadia-search-rs 1.10.0 (fdr_quantile_fit/transform, fdr_mlp_fit/predict).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
RustMLPClassifier gets configure_training (lr_schedule, weight_averaging) like the torch
classifier, so fdr.lr_schedule and fdr.weight_averaging now reach the default
(rust) classifier instead of being ignored. Needs alphadia-search-rs cfc4886.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
RustMLPClassifier gets input_batch_norm (a BatchNorm1d on the input, as the torch classifier)
and mid_rank_ties (quantile transform that maps ties at the outer quantiles to the middle of
their group instead of sklearn's clamp to about -5.2 / +5.2). Both are part of the state
dict, as they define the parameter layout and the input the network was trained on.
Off by default for now. Needs alphadia-search-rs d509cd2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Offline on final-round features (2 seeds each, IDs at 1 % FDR vs the torch classifier with
the same smoothing): HeLa 2.25 min +1.5 %, HeLa 3.9 min +0.3 %, Astral 15 min +1.6 %; the
clamped transform was -4.2 / -5.2 / -0.8 %. The input batch norm adds nothing on average on
top of it and costs ~30 % fit time, so it stays off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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