Views
No views yet
mila-intel/ProtST-SubcellularLocalization (DeepLoc-based 10-class)| Variant | Method | Accuracy | Macro-F1 |
|---|---|---|---|
| A | Heuristic features + Logistic Regression | 48.0% | 0.315 |
| A2 | Heuristic features + Random Forest | 53.7% | 0.361 |
| B | ESM-2-8M embeddings + Logistic Regression | 60.5% | 0.469 |
| B2 | ESM-2-8M embeddings + Random Forest | 57.7% | 0.394 |
| C | Evidence-Filtered Ensemble (Best) | 62.0% | 0.470 |
facebook/esm2_t6_8M_UR50D (8M parameters, 29MB)1from transformers import EsmTokenizer, EsmModel
2import pickle, numpy as np
3import torch
4
5# Load model components
6tokenizer = EsmTokenizer.from_pretrained("facebook/esm2_t6_8M_UR50D")
7esm = EsmModel.from_pretrained("facebook/esm2_t6_8M_UR50D")
8with open("esm_lr.pkl", "rb") as f:
9 classifier = pickle.load(f)
10
11# Predict
12seq = "MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSHGSAQVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKLRVDPVNFKLLSHCLLVTLAAHLPAEFTPAVHASLDKFLASVSTVLTSKYR"
13inputs = tokenizer(seq, return_tensors="pt", max_length=128, truncation=True)
14with torch.no_grad():
15 emb = esm(**inputs).last_hidden_state.mean(dim=1).numpy()
16proba = classifier.predict_proba(emb)
17pred = proba.argmax()
18labels = ["Cytoplasm","Nucleus","Extracellular","Cell membrane","Mitochondrion","Plastid","Endoplasmic reticulum","Lysosome/Vacuole","Golgi apparatus","Peroxisome"]
19print(f"Predicted: {labels[pred]}, Confidence: {proba.max():.3f}")binary_esm_lr.pkl) to prioritize proteins for expression:inference.py for the OmniBiMol backend integration wrapper.