Update README.md
Browse files
README.md
CHANGED
|
@@ -12,264 +12,78 @@ tags:
|
|
| 12 |
- biology
|
| 13 |
- bioinformatics
|
| 14 |
- unsupervised-learning
|
| 15 |
-
|
| 16 |
datasets:
|
| 17 |
- MEROPS
|
| 18 |
- UniProt
|
| 19 |
- AlphaFold
|
| 20 |
-
|
| 21 |
model_name: Structural_module-protease_inhibitor
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
Structural_module-protease_inhibitoris an unsupervised, one-class deep learning model for filtering protein
|
| 25 |
-
structures that are structurally inconsistent with curated protease inhibitor (PI) like features learned from (RCSBembeddingmodel, github.com/rcsb/rcsb-embedding-model) from protease inhibitor databases. The model learns the structural embedding manifold of known protease
|
| 26 |
-
inhibitors and assigns higher reconstruction error to structurally dissimilar inputs.
|
| 27 |
-
user_interface: |
|
| 28 |
-
Easy-to-use inference interface:
|
| 29 |
-
"[](https://colab.research.google.com/drive/1JLhLpvXG4plzPtIliG_CJnYui6P8Pu1J?usp=sharing)"
|
| 30 |
-
training_data_description: |
|
| 31 |
-
The model was trained on 17,889 curated protease inhibitor structures from the MEROPS
|
| 32 |
-
database. MEROPS sequences were mapped via similarity search against taxonomy-
|
| 33 |
-
restricted UniProt datasets (fungi, plants, bacteria), and corresponding structures
|
| 34 |
-
were obtained from the AlphaFold Protein Structure Database and used for traning the model.
|
| 35 |
-
|
| 36 |
-
input_format: |
|
| 37 |
-
Fixed-length continuous protein structure embeddings derived from three-dimensional
|
| 38 |
-
structural features (RCSBembedding model, github.com/rcsb/rcsb-embedding-model). Embeddings must be standardized using the provided scaler.pkl
|
| 39 |
-
before inference.
|
| 40 |
-
|
| 41 |
-
model_architecture: |
|
| 42 |
-
Fully connected autoencoder implemented in PyTorch via the PyOD library, featuring
|
| 43 |
-
a geometrically decreasing encoder, latent bottleneck, symmetric decoder, batch
|
| 44 |
-
normalization, dropout regularization, and mean squared reconstruction loss.
|
| 45 |
-
|
| 46 |
-
training_procedure: |
|
| 47 |
-
The model was trained using the Adam optimizer with weight decay and mini-batch
|
| 48 |
-
stochastic gradient descent. Hyperparameters were optimized using Bayesian
|
| 49 |
-
optimization (Optuna, TPE sampler) on an independent 10% validation split
|
| 50 |
-
(~1,789 structures). The tuning objective was to minimize reconstruction error on
|
| 51 |
-
unseen but structurally valid protease inhibitor examples. The final model was
|
| 52 |
-
retrained on the full dataset using the optimal hyperparameters with fixed random
|
| 53 |
-
seeds.
|
| 54 |
-
|
| 55 |
-
outputs: |
|
| 56 |
-
The model outputs a reconstruction-based anomaly score, an outlier probability,
|
| 57 |
-
and a confidence estimate. Low reconstruction-based anomaly scores indicate structural consistency with known
|
| 58 |
-
protease inhibitor folds, while high scores indicate structural dissimilarity.
|
| 59 |
-
|
| 60 |
-
intended_use: |
|
| 61 |
-
Structural filtering and pre-selection of protease inhibitor–like protein structures
|
| 62 |
-
in large-scale datasets.
|
| 63 |
-
|
| 64 |
-
limitations: |
|
| 65 |
-
Novel PI folds absent from the training data may be incorrectly rejected.
|
| 66 |
-
|
| 67 |
-
not_intended_use: |
|
| 68 |
-
Functional annotation, clinical
|
| 69 |
-
decision-making.
|
| 70 |
-
|
| 71 |
-
reproducibility: |
|
| 72 |
-
All preprocessing parameters, training configurations are provided
|
| 73 |
-
to enable exact reproduction of results.
|
| 74 |
-
|
| 75 |
-
citation: |
|
| 76 |
-
Please cite the associated publication and acknowledge the PyOD library, the MEROPS
|
| 77 |
-
protease inhibitor database, and the AlphaFold Protein Structure Database.
|
| 78 |
-
|
| 79 |
-
|
| 80 |
---
|
| 81 |
|
| 82 |
-
#
|
| 83 |
-
|
| 84 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
| 85 |
-
|
| 86 |
-
This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
|
| 87 |
-
|
| 88 |
-
## Model Details
|
| 89 |
-
|
| 90 |
-
### Model Description
|
| 91 |
-
|
| 92 |
-
<!-- Provide a longer summary of what this model is. -->
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
- **Developed by:** [More Information Needed]
|
| 97 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 98 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 99 |
-
- **Model type:** [More Information Needed]
|
| 100 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 101 |
-
- **License:** [More Information Needed]
|
| 102 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 103 |
-
|
| 104 |
-
### Model Sources [optional]
|
| 105 |
|
| 106 |
-
|
| 107 |
|
| 108 |
-
|
| 109 |
-
- **Paper [optional]:** [More Information Needed]
|
| 110 |
-
- **Demo [optional]:** [More Information Needed]
|
| 111 |
|
| 112 |
-
##
|
|
|
|
| 113 |
|
| 114 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 115 |
|
| 116 |
-
|
|
|
|
|
|
|
| 117 |
|
| 118 |
-
|
| 119 |
|
| 120 |
-
|
|
|
|
|
|
|
| 121 |
|
| 122 |
-
###
|
|
|
|
|
|
|
| 123 |
|
| 124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
-
|
| 127 |
|
| 128 |
-
###
|
|
|
|
|
|
|
| 129 |
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 137 |
-
|
| 138 |
-
[More Information Needed]
|
| 139 |
-
|
| 140 |
-
### Recommendations
|
| 141 |
-
|
| 142 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 143 |
-
|
| 144 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 145 |
-
|
| 146 |
-
## How to Get Started with the Model
|
| 147 |
-
|
| 148 |
-
Use the code below to get started with the model.
|
| 149 |
-
|
| 150 |
-
[More Information Needed]
|
| 151 |
-
|
| 152 |
-
## Training Details
|
| 153 |
-
|
| 154 |
-
### Training Data
|
| 155 |
-
|
| 156 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 157 |
-
|
| 158 |
-
[More Information Needed]
|
| 159 |
|
| 160 |
### Training Procedure
|
|
|
|
|
|
|
|
|
|
| 161 |
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
#### Preprocessing [optional]
|
| 165 |
-
|
| 166 |
-
[More Information Needed]
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
#### Training Hyperparameters
|
| 170 |
-
|
| 171 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 172 |
-
|
| 173 |
-
#### Speeds, Sizes, Times [optional]
|
| 174 |
-
|
| 175 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
## Evaluation
|
| 180 |
-
|
| 181 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 182 |
-
|
| 183 |
-
### Testing Data, Factors & Metrics
|
| 184 |
-
|
| 185 |
-
#### Testing Data
|
| 186 |
-
|
| 187 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 188 |
-
|
| 189 |
-
[More Information Needed]
|
| 190 |
-
|
| 191 |
-
#### Factors
|
| 192 |
-
|
| 193 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 194 |
-
|
| 195 |
-
[More Information Needed]
|
| 196 |
-
|
| 197 |
-
#### Metrics
|
| 198 |
-
|
| 199 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 200 |
-
|
| 201 |
-
[More Information Needed]
|
| 202 |
-
|
| 203 |
-
### Results
|
| 204 |
-
|
| 205 |
-
[More Information Needed]
|
| 206 |
-
|
| 207 |
-
#### Summary
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
## Model Examination [optional]
|
| 212 |
-
|
| 213 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 214 |
-
|
| 215 |
-
[More Information Needed]
|
| 216 |
-
|
| 217 |
-
## Environmental Impact
|
| 218 |
-
|
| 219 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 220 |
-
|
| 221 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 222 |
-
|
| 223 |
-
- **Hardware Type:** [More Information Needed]
|
| 224 |
-
- **Hours used:** [More Information Needed]
|
| 225 |
-
- **Cloud Provider:** [More Information Needed]
|
| 226 |
-
- **Compute Region:** [More Information Needed]
|
| 227 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 228 |
-
|
| 229 |
-
## Technical Specifications [optional]
|
| 230 |
-
|
| 231 |
-
### Model Architecture and Objective
|
| 232 |
-
|
| 233 |
-
[More Information Needed]
|
| 234 |
-
|
| 235 |
-
### Compute Infrastructure
|
| 236 |
-
|
| 237 |
-
[More Information Needed]
|
| 238 |
-
|
| 239 |
-
#### Hardware
|
| 240 |
-
|
| 241 |
-
[More Information Needed]
|
| 242 |
-
|
| 243 |
-
#### Software
|
| 244 |
-
|
| 245 |
-
[More Information Needed]
|
| 246 |
-
|
| 247 |
-
## Citation [optional]
|
| 248 |
-
|
| 249 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 250 |
-
|
| 251 |
-
**BibTeX:**
|
| 252 |
-
|
| 253 |
-
[More Information Needed]
|
| 254 |
-
|
| 255 |
-
**APA:**
|
| 256 |
-
|
| 257 |
-
[More Information Needed]
|
| 258 |
-
|
| 259 |
-
## Glossary [optional]
|
| 260 |
-
|
| 261 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 262 |
-
|
| 263 |
-
[More Information Needed]
|
| 264 |
-
|
| 265 |
-
## More Information [optional]
|
| 266 |
-
|
| 267 |
-
[More Information Needed]
|
| 268 |
|
| 269 |
-
|
|
|
|
|
|
|
|
|
|
| 270 |
|
| 271 |
-
|
|
|
|
|
|
|
| 272 |
|
| 273 |
-
#
|
|
|
|
| 274 |
|
| 275 |
-
|
|
|
|
|
|
|
|
|
| 12 |
- biology
|
| 13 |
- bioinformatics
|
| 14 |
- unsupervised-learning
|
|
|
|
| 15 |
datasets:
|
| 16 |
- MEROPS
|
| 17 |
- UniProt
|
| 18 |
- AlphaFold
|
|
|
|
| 19 |
model_name: Structural_module-protease_inhibitor
|
| 20 |
+
metrics:
|
| 21 |
+
- reconstruction_error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
---
|
| 23 |
|
| 24 |
+
# Structural_module-protease_inhibitor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
This model is an unsupervised, one-class deep learning autoencoder designed to filter protein structures. It identifies candidates that are structurally inconsistent with curated protease inhibitor (PI) features learned from known PI databases.
|
| 27 |
|
| 28 |
+
[](https://colab.research.google.com/drive/1JLhLpvXG4plzPtIliG_CJnYui6P8Pu1J?usp=sharing)
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
## Model Description
|
| 31 |
+
The model learns the structural embedding manifold of known protease inhibitors and assigns a **reconstruction error** to inputs. High reconstruction errors indicate structural dissimilarity from the training distribution, allowing for the filtering of non-PI-like structures.
|
| 32 |
|
|
|
|
| 33 |
|
| 34 |
+
* **Model type:** Fully connected Autoencoder (via PyOD)
|
| 35 |
+
* **License:** [Specify License, e.g., MIT, Apache 2.0]
|
| 36 |
+
* **embeddings calculated using:** [RCSB embedding model](https://github.com/rcsb/rcsb-embedding-model)
|
| 37 |
|
| 38 |
+
## Intended Uses & Limitations
|
| 39 |
|
| 40 |
+
### Intended Use
|
| 41 |
+
* Structural filtering and pre-selection of protease inhibitor–like protein structures in large-scale datasets.
|
| 42 |
+
* Quality control for generated or predicted protein structures in the context of PIs.
|
| 43 |
|
| 44 |
+
### Limitations
|
| 45 |
+
* **Novel Folds:** Novel PI folds absent from the MEROPS training data may be incorrectly rejected (false positives for anomalies).
|
| 46 |
+
* **Not for Clinical Use:** This model is not intended for functional annotation or clinical decision-making.
|
| 47 |
|
| 48 |
+
## Training Data
|
| 49 |
+
The model was trained on **17,889 curated protease inhibitor structures**:
|
| 50 |
+
1. **Source:** MEROPS database.
|
| 51 |
+
2. **Mapping:** Sequences were mapped via similarity search against taxonomy-restricted UniProt datasets (fungi, plants, bacteria).
|
| 52 |
+
3. **Structures:** Corresponding 3D structures were obtained from the **AlphaFold Protein Structure Database using uniprot Ids**.
|
| 53 |
|
| 54 |
+
## Technical Specifications
|
| 55 |
|
| 56 |
+
### Input Format
|
| 57 |
+
The model accepts **fixed-length continuous protein structure embeddings** derived from the RCSB embedding model.
|
| 58 |
+
> **Important:** Embeddings must be standardized using the provided `scaler.pkl` before inference.
|
| 59 |
|
| 60 |
+
### Architecture
|
| 61 |
+
Implemented in PyTorch via the PyOD library:
|
| 62 |
+
* **Encoder:** Geometrically decreasing layers.
|
| 63 |
+
* **Bottleneck:** Latent representation layer.
|
| 64 |
+
* **Decoder:** Symmetric reconstruction layers.
|
| 65 |
+
* **Regularization:** Batch normalization and dropout.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
### Training Procedure
|
| 68 |
+
* **Optimizer:** Adam with weight decay.
|
| 69 |
+
* **Hyperparameter Tuning:** Optimized via Bayesian optimization (Optuna, TPE sampler) on a 10% validation split (~1,789 structures).
|
| 70 |
+
* **Objective:** Minimize Mean Squared Error (MSE) reconstruction loss on validation set.
|
| 71 |
|
| 72 |
+
## How to Get Started
|
| 73 |
+
To use this model, ensure you have `pyod` and `torch` installed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
+
```python
|
| 76 |
+
import job_lib
|
| 77 |
+
import torch
|
| 78 |
+
from pyod.models.auto_encoder_torch import AutoEncoder
|
| 79 |
|
| 80 |
+
# 1. Load the scaler and standardize your RCSB embeddings
|
| 81 |
+
scaler = joblib.load('scaler.pkl')
|
| 82 |
+
scaled_embeddings = scaler.transform(raw_embeddings)
|
| 83 |
|
| 84 |
+
# 2. Load the model (ensure PyOD environment is set up)
|
| 85 |
+
# model = joblib.load('model.pkl')
|
| 86 |
|
| 87 |
+
# 3. Predict
|
| 88 |
+
anomaly_scores = model.decision_function(scaled_embeddings)
|
| 89 |
+
labels = model.predict(scaled_embeddings) # 0 for inliers (PI-like), 1 for outliers
|