BioBlobs EC-L3 model with RVQ-K8 (M-CSA results, NeurIPS 2026)
Browse files- README.md +73 -0
- classes.json +244 -0
- config.yaml +43 -0
- model.safetensors +3 -0
- training_log.jsonl +0 -0
README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- biology
|
| 5 |
+
- protein
|
| 6 |
+
- enzyme
|
| 7 |
+
- ec-number
|
| 8 |
+
- interpretability
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# BioBlobs
|
| 12 |
+
|
| 13 |
+
The BioBlobs model behind the M-CSA results of **Unsupervised discovery of Functional
|
| 14 |
+
Substructures** (Xin Wang, Kaiwen Shi and Carlos Oliver, NeurIPS 2026).
|
| 15 |
+
[Paper](https://arxiv.org/abs/2510.01632) · [Code](https://github.com/OliverLaboratory/BioBlobs)
|
| 16 |
+
|
| 17 |
+
The model predicts third-level Enzyme Commission (EC) classes, 242 in total, from frozen ESM2-T30
|
| 18 |
+
residue embeddings and the protein structure. It splits each protein into 8 spatially local blobs
|
| 19 |
+
and quantizes their embeddings with residual vector quantization. The blobs it relies on most
|
| 20 |
+
point to candidate catalytic sites, although training uses only protein-level EC labels.
|
| 21 |
+
|
| 22 |
+
## Files
|
| 23 |
+
|
| 24 |
+
| File | Contents |
|
| 25 |
+
| --- | --- |
|
| 26 |
+
| `model.safetensors` | model weights (59 MB) |
|
| 27 |
+
| `config.yaml` | model configuration |
|
| 28 |
+
| `classes.json` | EC class names and their indices |
|
| 29 |
+
| `training_log.jsonl` | training log |
|
| 30 |
+
|
| 31 |
+
## Use
|
| 32 |
+
|
| 33 |
+
```bash
|
| 34 |
+
git clone https://github.com/OliverLaboratory/BioBlobs.git
|
| 35 |
+
cd BioBlobs
|
| 36 |
+
uv sync && source .venv/bin/activate
|
| 37 |
+
huggingface-cli download xwang112358/BioBlobs --local-dir bioblobs-mcsa-rvq-k8
|
| 38 |
+
python inference.py --model bioblobs-mcsa-rvq-k8 --pdb-dir my_pdbs --out results
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
For each protein, the output lists the top EC classes, the blobs ranked by importance score with
|
| 42 |
+
their residue numbers, and per-residue scores. The repository's `INFERENCE.md` describes the
|
| 43 |
+
options and outputs, and `docs/REPRODUCE.md` shows how to retrain the model and evaluate it on
|
| 44 |
+
M-CSA.
|
| 45 |
+
|
| 46 |
+
## Training data
|
| 47 |
+
|
| 48 |
+
Swiss-Prot enzymes from the [EC-Bench](https://github.com/dsaeedeh/EC-Bench) training set, with
|
| 49 |
+
AlphaFold DB v6 structures. Training keeps proteins of up to 1,000 residues with a complete
|
| 50 |
+
third-level EC number, split into training and validation sets at 30% sequence identity with
|
| 51 |
+
MMseqs2. The GitHub repository ships the training and validation ids.
|
| 52 |
+
|
| 53 |
+
## Limitations
|
| 54 |
+
|
| 55 |
+
- The model only knows the 242 EC classes in its training data.
|
| 56 |
+
- Class probabilities are softmax scores, not calibrated confidence.
|
| 57 |
+
- A blob that overlaps annotated catalytic residues is evidence for, not proof of, its role in
|
| 58 |
+
catalysis.
|
| 59 |
+
|
| 60 |
+
## Citation
|
| 61 |
+
|
| 62 |
+
```bibtex
|
| 63 |
+
@inproceedings{wang2026bioblobs,
|
| 64 |
+
title = {Unsupervised discovery of Functional Substructures},
|
| 65 |
+
author = {Wang, Xin and Shi, Kaiwen and Oliver, Carlos},
|
| 66 |
+
booktitle = {Advances in Neural Information Processing Systems},
|
| 67 |
+
year = {2026}
|
| 68 |
+
}
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## License
|
| 72 |
+
|
| 73 |
+
MIT
|
classes.json
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 15 |
+
"1.11.2": 13,
|
| 16 |
+
"1.12.1": 14,
|
| 17 |
+
"1.12.2": 15,
|
| 18 |
+
"1.12.5": 16,
|
| 19 |
+
"1.12.7": 17,
|
| 20 |
+
"1.12.98": 18,
|
| 21 |
+
"1.12.99": 19,
|
| 22 |
+
"1.13.11": 20,
|
| 23 |
+
"1.13.12": 21,
|
| 24 |
+
"1.13.99": 22,
|
| 25 |
+
"1.14.11": 23,
|
| 26 |
+
"1.14.12": 24,
|
| 27 |
+
"1.14.13": 25,
|
| 28 |
+
"1.14.14": 26,
|
| 29 |
+
"1.14.15": 27,
|
| 30 |
+
"1.14.16": 28,
|
| 31 |
+
"1.14.17": 29,
|
| 32 |
+
"1.14.18": 30,
|
| 33 |
+
"1.14.19": 31,
|
| 34 |
+
"1.14.20": 32,
|
| 35 |
+
"1.14.21": 33,
|
| 36 |
+
"1.14.99": 34,
|
| 37 |
+
"1.15.1": 35,
|
| 38 |
+
"1.16.1": 36,
|
| 39 |
+
"1.16.3": 37,
|
| 40 |
+
"1.16.5": 38,
|
| 41 |
+
"1.17.1": 39,
|
| 42 |
+
"1.17.2": 40,
|
| 43 |
+
"1.17.4": 41,
|
| 44 |
+
"1.17.5": 42,
|
| 45 |
+
"1.17.7": 43,
|
| 46 |
+
"1.17.8": 44,
|
| 47 |
+
"1.17.98": 45,
|
| 48 |
+
"1.17.99": 46,
|
| 49 |
+
"1.18.1": 47,
|
| 50 |
+
"1.18.6": 48,
|
| 51 |
+
"1.2.1": 49,
|
| 52 |
+
"1.2.3": 50,
|
| 53 |
+
"1.2.4": 51,
|
| 54 |
+
"1.2.5": 52,
|
| 55 |
+
"1.2.7": 53,
|
| 56 |
+
"1.2.98": 54,
|
| 57 |
+
"1.2.99": 55,
|
| 58 |
+
"1.20.1": 56,
|
| 59 |
+
"1.20.4": 57,
|
| 60 |
+
"1.20.9": 58,
|
| 61 |
+
"1.21.1": 59,
|
| 62 |
+
"1.21.3": 60,
|
| 63 |
+
"1.21.4": 61,
|
| 64 |
+
"1.21.98": 62,
|
| 65 |
+
"1.21.99": 63,
|
| 66 |
+
"1.23.1": 64,
|
| 67 |
+
"1.23.5": 65,
|
| 68 |
+
"1.3.1": 66,
|
| 69 |
+
"1.3.2": 67,
|
| 70 |
+
"1.3.3": 68,
|
| 71 |
+
"1.3.4": 69,
|
| 72 |
+
"1.3.5": 70,
|
| 73 |
+
"1.3.7": 71,
|
| 74 |
+
"1.3.8": 72,
|
| 75 |
+
"1.3.98": 73,
|
| 76 |
+
"1.3.99": 74,
|
| 77 |
+
"1.4.1": 75,
|
| 78 |
+
"1.4.3": 76,
|
| 79 |
+
"1.4.4": 77,
|
| 80 |
+
"1.4.5": 78,
|
| 81 |
+
"1.4.7": 79,
|
| 82 |
+
"1.4.9": 80,
|
| 83 |
+
"1.4.99": 81,
|
| 84 |
+
"1.5.1": 82,
|
| 85 |
+
"1.5.3": 83,
|
| 86 |
+
"1.5.4": 84,
|
| 87 |
+
"1.5.5": 85,
|
| 88 |
+
"1.5.8": 86,
|
| 89 |
+
"1.5.98": 87,
|
| 90 |
+
"1.5.99": 88,
|
| 91 |
+
"1.6.1": 89,
|
| 92 |
+
"1.6.2": 90,
|
| 93 |
+
"1.6.3": 91,
|
| 94 |
+
"1.6.5": 92,
|
| 95 |
+
"1.6.99": 93,
|
| 96 |
+
"1.7.1": 94,
|
| 97 |
+
"1.7.2": 95,
|
| 98 |
+
"1.7.3": 96,
|
| 99 |
+
"1.7.6": 97,
|
| 100 |
+
"1.7.7": 98,
|
| 101 |
+
"1.7.99": 99,
|
| 102 |
+
"1.8.1": 100,
|
| 103 |
+
"1.8.2": 101,
|
| 104 |
+
"1.8.3": 102,
|
| 105 |
+
"1.8.4": 103,
|
| 106 |
+
"1.8.5": 104,
|
| 107 |
+
"1.8.7": 105,
|
| 108 |
+
"1.8.98": 106,
|
| 109 |
+
"1.8.99": 107,
|
| 110 |
+
"1.9.3": 108,
|
| 111 |
+
"1.9.6": 109,
|
| 112 |
+
"1.97.1": 110,
|
| 113 |
+
"2.1.1": 111,
|
| 114 |
+
"2.1.2": 112,
|
| 115 |
+
"2.1.3": 113,
|
| 116 |
+
"2.1.4": 114,
|
| 117 |
+
"2.10.1": 115,
|
| 118 |
+
"2.2.1": 116,
|
| 119 |
+
"2.3.1": 117,
|
| 120 |
+
"2.3.2": 118,
|
| 121 |
+
"2.3.3": 119,
|
| 122 |
+
"2.4.1": 120,
|
| 123 |
+
"2.4.2": 121,
|
| 124 |
+
"2.4.99": 122,
|
| 125 |
+
"2.5.1": 123,
|
| 126 |
+
"2.6.1": 124,
|
| 127 |
+
"2.6.99": 125,
|
| 128 |
+
"2.7.1": 126,
|
| 129 |
+
"2.7.10": 127,
|
| 130 |
+
"2.7.11": 128,
|
| 131 |
+
"2.7.12": 129,
|
| 132 |
+
"2.7.13": 130,
|
| 133 |
+
"2.7.14": 131,
|
| 134 |
+
"2.7.2": 132,
|
| 135 |
+
"2.7.3": 133,
|
| 136 |
+
"2.7.4": 134,
|
| 137 |
+
"2.7.6": 135,
|
| 138 |
+
"2.7.7": 136,
|
| 139 |
+
"2.7.8": 137,
|
| 140 |
+
"2.7.9": 138,
|
| 141 |
+
"2.7.99": 139,
|
| 142 |
+
"2.8.1": 140,
|
| 143 |
+
"2.8.2": 141,
|
| 144 |
+
"2.8.3": 142,
|
| 145 |
+
"2.8.4": 143,
|
| 146 |
+
"2.9.1": 144,
|
| 147 |
+
"3.1.1": 145,
|
| 148 |
+
"3.1.11": 146,
|
| 149 |
+
"3.1.12": 147,
|
| 150 |
+
"3.1.13": 148,
|
| 151 |
+
"3.1.2": 149,
|
| 152 |
+
"3.1.21": 150,
|
| 153 |
+
"3.1.22": 151,
|
| 154 |
+
"3.1.25": 152,
|
| 155 |
+
"3.1.26": 153,
|
| 156 |
+
"3.1.27": 154,
|
| 157 |
+
"3.1.3": 155,
|
| 158 |
+
"3.1.30": 156,
|
| 159 |
+
"3.1.31": 157,
|
| 160 |
+
"3.1.4": 158,
|
| 161 |
+
"3.1.5": 159,
|
| 162 |
+
"3.1.6": 160,
|
| 163 |
+
"3.1.7": 161,
|
| 164 |
+
"3.1.8": 162,
|
| 165 |
+
"3.10.1": 163,
|
| 166 |
+
"3.11.1": 164,
|
| 167 |
+
"3.13.1": 165,
|
| 168 |
+
"3.2.1": 166,
|
| 169 |
+
"3.2.2": 167,
|
| 170 |
+
"3.3.1": 168,
|
| 171 |
+
"3.3.2": 169,
|
| 172 |
+
"3.4.11": 170,
|
| 173 |
+
"3.4.13": 171,
|
| 174 |
+
"3.4.14": 172,
|
| 175 |
+
"3.4.15": 173,
|
| 176 |
+
"3.4.16": 174,
|
| 177 |
+
"3.4.17": 175,
|
| 178 |
+
"3.4.18": 176,
|
| 179 |
+
"3.4.19": 177,
|
| 180 |
+
"3.4.21": 178,
|
| 181 |
+
"3.4.22": 179,
|
| 182 |
+
"3.4.23": 180,
|
| 183 |
+
"3.4.24": 181,
|
| 184 |
+
"3.4.25": 182,
|
| 185 |
+
"3.5.1": 183,
|
| 186 |
+
"3.5.2": 184,
|
| 187 |
+
"3.5.3": 185,
|
| 188 |
+
"3.5.4": 186,
|
| 189 |
+
"3.5.5": 187,
|
| 190 |
+
"3.5.99": 188,
|
| 191 |
+
"3.6.1": 189,
|
| 192 |
+
"3.6.2": 190,
|
| 193 |
+
"3.6.3": 191,
|
| 194 |
+
"3.6.4": 192,
|
| 195 |
+
"3.6.5": 193,
|
| 196 |
+
"3.7.1": 194,
|
| 197 |
+
"3.8.1": 195,
|
| 198 |
+
"3.9.1": 196,
|
| 199 |
+
"4.1.1": 197,
|
| 200 |
+
"4.1.2": 198,
|
| 201 |
+
"4.1.3": 199,
|
| 202 |
+
"4.1.99": 200,
|
| 203 |
+
"4.2.1": 201,
|
| 204 |
+
"4.2.2": 202,
|
| 205 |
+
"4.2.3": 203,
|
| 206 |
+
"4.2.99": 204,
|
| 207 |
+
"4.3.1": 205,
|
| 208 |
+
"4.3.2": 206,
|
| 209 |
+
"4.3.3": 207,
|
| 210 |
+
"4.3.99": 208,
|
| 211 |
+
"4.4.1": 209,
|
| 212 |
+
"4.5.1": 210,
|
| 213 |
+
"4.6.1": 211,
|
| 214 |
+
"4.7.1": 212,
|
| 215 |
+
"4.99.1": 213,
|
| 216 |
+
"5.1.1": 214,
|
| 217 |
+
"5.1.2": 215,
|
| 218 |
+
"5.1.3": 216,
|
| 219 |
+
"5.1.99": 217,
|
| 220 |
+
"5.2.1": 218,
|
| 221 |
+
"5.3.1": 219,
|
| 222 |
+
"5.3.2": 220,
|
| 223 |
+
"5.3.3": 221,
|
| 224 |
+
"5.3.4": 222,
|
| 225 |
+
"5.3.99": 223,
|
| 226 |
+
"5.4.1": 224,
|
| 227 |
+
"5.4.2": 225,
|
| 228 |
+
"5.4.3": 226,
|
| 229 |
+
"5.4.4": 227,
|
| 230 |
+
"5.4.99": 228,
|
| 231 |
+
"5.5.1": 229,
|
| 232 |
+
"5.99.1": 230,
|
| 233 |
+
"6.1.1": 231,
|
| 234 |
+
"6.1.2": 232,
|
| 235 |
+
"6.2.1": 233,
|
| 236 |
+
"6.3.1": 234,
|
| 237 |
+
"6.3.2": 235,
|
| 238 |
+
"6.3.3": 236,
|
| 239 |
+
"6.3.4": 237,
|
| 240 |
+
"6.3.5": 238,
|
| 241 |
+
"6.4.1": 239,
|
| 242 |
+
"6.5.1": 240,
|
| 243 |
+
"6.6.1": 241
|
| 244 |
+
}
|
config.yaml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
encoders:
|
| 2 |
+
name: esm2_static
|
| 3 |
+
model_name: facebook/esm2_t30_150M_UR50D
|
| 4 |
+
output_dim: 640
|
| 5 |
+
partitioners:
|
| 6 |
+
name: bioblobs
|
| 7 |
+
num_blobs: 8
|
| 8 |
+
seed_radius: 12.0
|
| 9 |
+
proximity_bias: 0.25
|
| 10 |
+
seed_hidden_dim: 128
|
| 11 |
+
attn_dim: 128
|
| 12 |
+
seed_tau:
|
| 13 |
+
- 1.0
|
| 14 |
+
- 0.25
|
| 15 |
+
- 0.95
|
| 16 |
+
membership_tau:
|
| 17 |
+
- 1.0
|
| 18 |
+
- 0.25
|
| 19 |
+
- 0.95
|
| 20 |
+
decoders:
|
| 21 |
+
name: mil
|
| 22 |
+
mil_dim: 512
|
| 23 |
+
dropout: 0.1
|
| 24 |
+
hidden_multipliers:
|
| 25 |
+
- 4
|
| 26 |
+
- 2
|
| 27 |
+
use_blob_interaction: false
|
| 28 |
+
codebooks:
|
| 29 |
+
enabled: true
|
| 30 |
+
num_codes: 1024
|
| 31 |
+
num_quantizers: 8
|
| 32 |
+
code_dim: null
|
| 33 |
+
beta: 0.25
|
| 34 |
+
ema_decay: 0.99
|
| 35 |
+
ema_eps: 1.0e-05
|
| 36 |
+
normalize_input: true
|
| 37 |
+
dead_code_revival: true
|
| 38 |
+
revive_every_steps: 250
|
| 39 |
+
revive_threshold: 1.0
|
| 40 |
+
revive_frac: 0.0
|
| 41 |
+
warmup_epochs: 2
|
| 42 |
+
data_init: true
|
| 43 |
+
num_classes: 242
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f975d161df68960a51b10452dc3c557eb7a3fa76341f258ce0556c300f2a192e
|
| 3 |
+
size 58925913
|
training_log.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|