Leak CURBER enzyme classification β homology kNN
Predicts one EC number per protein sequence by transferring labels from the most similar training enzymes.
Method
- Prefilter: TF-IDF-weighted 5-mer presence vectors; cosine similarity against all 186k unique training sequences, top 1,000 candidates per query (sparse matrix product).
- Re-rank: Smith-Waterman local alignment (BLOSUM62, gap open 11, extend 1) of the query against each candidate with SIMD Opal (
pyopal). - Vote: ECs of all hits scoring within 10% of the best hit, weighted by alignment score (multi-EC hits split their weight).
Falls back to the k-mer nearest neighbour if the 480 s time budget is reached, and to the most frequent EC if a query has no candidates.
Local validation
Validation sequences have no exact matches in train and very low k-mer overlap (median top-1 cosine 0.05), so a random split is misleading (median 0.65). The local hold-out is 4,915 training sequences drawn from the low-similarity pool, scored against the remaining 181k and importance-weighted to match the validation similarity distribution (effective sample size ~2,300).
| Metric | Weighted hold-out |
|---|---|
| L1 | 0.943 |
| L2 | 0.912 |
| L3 | 0.899 |
| L4 | 0.746 |
Runtime
11,367 validation inputs: 233 s, 4.0 GB peak RAM on 2 vCPU.
Files
predict.pyβ inference entry pointkmer.pyβ sparse k-mer indextrain.pyβ buildsweights/db.parquetfromtrain.parquetinputs.py,task.json,ec_vocabulary.jsonβ from the starterweights/db.parquetβ unique training sequences with their ECs
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support