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ch
|
| 4 |
pipeline_tag: feature-extraction
|
| 5 |
tags:
|
| 6 |
+
- protein
|
| 7 |
+
- structural-biology
|
| 8 |
+
- representation-learning
|
| 9 |
+
- 3d-cnn
|
| 10 |
+
- foldvision
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# FoldVision Encoder
|
| 14 |
+
|
| 15 |
+
## Model Summary
|
| 16 |
+
|
| 17 |
+
FoldVision is a protein 3D-CNN encoder that maps a voxelized protein structure to a fixed-size embedding (`1024` dimensions).
|
| 18 |
+
|
| 19 |
+
Primary task:
|
| 20 |
+
- **Protein feature extraction** from 3D structure.
|
| 21 |
+
|
| 22 |
+
Typical downstream tasks (with finetuning heads):
|
| 23 |
+
- Protein-only regression/classification.
|
| 24 |
+
- PSI (**protein-small molecule interactions**) prediction when combined with a SMILES encoder.
|
| 25 |
+
|
| 26 |
+
GitHub code: [foldvision_github](https://github.com/<YOUR_ORG_OR_USER>/foldvision_github)
|
| 27 |
+
|
| 28 |
+
## Model Details
|
| 29 |
+
|
| 30 |
+
- Model name: `AlexanderKroll/foldvision-encoder`
|
| 31 |
+
- Architecture: 3D CNN encoder with GroupNorm blocks and global pooling.
|
| 32 |
+
- Framework: PyTorch
|
| 33 |
+
- Input channels: 5 atom-type channels (`C`, `N`, `S`, `O`, `P`)
|
| 34 |
+
- Output: `(B, 1024)` embedding
|
| 35 |
+
|
| 36 |
+
## Intended Use
|
| 37 |
+
|
| 38 |
+
Use this model to compute protein structure embeddings for:
|
| 39 |
+
- similarity and retrieval workflows,
|
| 40 |
+
- downstream supervised tasks (classification/regression),
|
| 41 |
+
- multimodal PSI pipelines with a molecule language model.
|
| 42 |
+
|
| 43 |
+
## Out-of-Scope Use
|
| 44 |
+
|
| 45 |
+
- Clinical decision making.
|
| 46 |
+
- Any safety-critical use without task-specific validation.
|
| 47 |
+
- Interpretation as direct biochemical or medical truth without experimental verification.
|
| 48 |
+
|
| 49 |
+
## Input and Preprocessing
|
| 50 |
+
|
| 51 |
+
This model expects FoldVision voxel tensors generated from PDB structures.
|
| 52 |
+
|
| 53 |
+
Recommended preprocessing pipeline:
|
| 54 |
+
1. Convert `.pdb` files to sparse point lists (`numpy_3D_point_lists/*.npz`).
|
| 55 |
+
2. Use `bounding_boxes.npy` + dataloader to construct dense tensors at runtime.
|
| 56 |
+
|
| 57 |
+
Repository scripts:
|
| 58 |
+
- `scripts/preprocess_pdb_dir.py`
|
| 59 |
+
- `scripts/embed_proteins.py`
|
| 60 |
+
- `scripts/train.py`
|
| 61 |
+
- `scripts/train_PSI.py`
|
| 62 |
+
- `scripts/evaluate.py`
|
| 63 |
+
- `scripts/evaluate_PSI.py`
|
| 64 |
+
|
| 65 |
+
## Usage
|
| 66 |
+
|
| 67 |
+
```python
|
| 68 |
+
from foldvision import FoldVisionEncoder
|
| 69 |
+
|
| 70 |
+
model = FoldVisionEncoder.from_pretrained("AlexanderKroll/foldvision-encoder")
|
| 71 |
+
model.eval()
|
| 72 |
+
# x: (B, 5, Z, Y, X)
|
| 73 |
+
# z = model(x) # (B, 1024)
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
## Multi-Run Embeddings and Predictions
|
| 77 |
+
|
| 78 |
+
FoldVision pipelines support repeated runs with random 3D rotations (test-time augmentation).
|
| 79 |
+
|
| 80 |
+
- Embeddings:
|
| 81 |
+
- per-run: keep each run-specific embedding,
|
| 82 |
+
- aggregated: use mean embedding for a stable representation.
|
| 83 |
+
- Predictions:
|
| 84 |
+
- per-run predictions can be used to inspect spread/uncertainty,
|
| 85 |
+
- averaged predictions are recommended for reporting.
|
| 86 |
+
|
| 87 |
+
## Training and Evaluation Data
|
| 88 |
+
|
| 89 |
+
Please document here the exact datasets used for pretraining and downstream evaluation.
|
| 90 |
+
|
| 91 |
+
Example datasets referenced in this repository:
|
| 92 |
+
- PTEN activity
|
| 93 |
+
- SPOT
|
| 94 |
+
- Davis
|
| 95 |
+
- small dummy data files for smoke tests (not representative for benchmarking)
|
| 96 |
+
|
| 97 |
+
## Metrics
|
| 98 |
+
|
| 99 |
+
Report the official metrics from your manuscript for your release version.
|
| 100 |
+
|
| 101 |
+
Suggested metrics by task:
|
| 102 |
+
- Regression: Spearman, Pearson, MAE, RMSE, R2
|
| 103 |
+
- Binary: Accuracy, MCC, ROC-AUC
|
| 104 |
+
|
| 105 |
+
## Limitations
|
| 106 |
+
|
| 107 |
+
- Performance depends strongly on preprocessing consistency.
|
| 108 |
+
- Rotational augmentation can change single-run outputs; use multi-run means for stability.
|
| 109 |
+
- Generalization to new protein families/domains must be validated per task.
|
| 110 |
+
|
| 111 |
+
## Risks and Biases
|
| 112 |
+
|
| 113 |
+
- Dataset composition can bias performance across protein classes.
|
| 114 |
+
- Downstream labels and splits can introduce benchmark-specific bias.
|
| 115 |
+
|
| 116 |
+
## Citation
|
| 117 |
+
|
| 118 |
+
If you use this model, cite:
|
| 119 |
+
|
| 120 |
+
1. **FoldVision bioRxiv manuscript**:
|
| 121 |
+
|
| 122 |
+
```bibtex
|
| 123 |
+
@article{foldvision_biorxiv,
|
| 124 |
+
title = {FoldVision: A compute-efficient atom-level 3D protein encoder},
|
| 125 |
+
author = {Kroll, Alexander and Yadav, Shantanu and Lercher, Martin J.},
|
| 126 |
+
journal = {bioRxiv},
|
| 127 |
+
year = {2026},
|
| 128 |
+
doi = {10.64898/2026.01.23.701326},
|
| 129 |
+
url = {https://doi.org/10.64898/2026.01.23.701326}
|
| 130 |
+
}
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
2. The GitHub repository:
|
| 134 |
+
|
| 135 |
+
```bibtex
|
| 136 |
+
@misc{foldvision_github,
|
| 137 |
+
title = {FoldVision code repository},
|
| 138 |
+
author = {Kroll, Alexander},
|
| 139 |
+
year = {2026},
|
| 140 |
+
howpublished = {\url{https://github.com/AlexanderKroll/foldvision}}
|
| 141 |
+
}
|
| 142 |
+
```
|
| 143 |
+
|
| 144 |
+
## Model Card Contact
|
| 145 |
+
|
| 146 |
+
For issues or questions, use the GitHub issue tracker in the FoldVision repository.
|