interseek-35m / README.md
RPalmr's picture
release interseek 35m weights and evaluation
b5a885c verified
|
Raw History Blame Contribute Delete
7.6 kB
---
license: mit
library_name: pytorch
base_model: facebook/esm2_t12_35M_UR50D
base_model_relation: finetune
tags:
- biology
- protein-protein-interaction
- esm2
- safetensors
- interseek
model-index:
- name: InterSeek 35M
results:
- task:
type: protein-protein-interaction
name: Protein interaction prediction
dataset:
type: bernett-hippie-intra2
name: Bernett HIPPIE gold-standard Intra2
metrics:
- type: auroc
name: AUROC
value: 0.6800451796003482
- type: average_precision
name: Average precision
value: 0.6700039053603177
- type: mcc
name: MCC
value: 0.24872275791032228
- task:
type: protein-protein-interaction
name: Protein interaction prediction
dataset:
type: dscript-yeast-test
name: D-SCRIPT S. cerevisiae test
metrics:
- type: auroc
name: AUROC
value: 0.7206750399999999
- type: average_precision
name: Average precision
value: 0.2269385699741977
- type: mcc
name: MCC
value: 0.17923603481741227
---
# InterSeek 35M
InterSeek predicts whether two proteins interact from their amino-acid sequences.
This release contains the complete pair predictor and the fine-tuned ESM-2
backbone from a completed, single-seed experiment.
The model starts from [Meta ESM-2 35M](https://huggingface.co/facebook/esm2_t12_35M_UR50D).
All 12 encoder layers and a CLS interaction head were fine-tuned. This is the
validation-selected checkpoint at update **18,000**, from a three-epoch run
that completed **30,600 updates**. It is separate from the ongoing 650M run.
## Use the pair predictor
Requires Python 3.10 or later. Download this repository and install the included
InterSeek wheel. Use a CUDA-enabled PyTorch build for NVIDIA GPUs.
```bash
pip install huggingface_hub
hf download appliedCL/interseek-35m --local-dir interseek-35m
cd interseek-35m
pip install -r requirements-inference.txt ./interseek-0.3.0-py3-none-any.whl
python predict.py --data example_pairs.csv --predictions predictions.csv --device cpu
```
Use `--device cuda:0` for a GPU or `--device mps` for Apple Silicon.
Input CSV columns are `sequence_a` and `sequence_b`; `pair_id` is optional.
The example contains illustrative sequences, with no claimed interaction label.
Output contains `pair_id`, `label` (empty for unlabelled inputs) and `score`.
Scores lie between zero and one. The threshold **0.48556941747665405** was
selected using human validation MCC and fixed before both final tests.
Scores are not established as calibrated probabilities of physical binding.
The root weights require the included pair-model implementation; they are not
a standard Transformers sequence-classification model. The `esm2/` subfolder
contains a standard Transformers masked-language-model backbone:
```python
from transformers import EsmForMaskedLM
backbone = EsmForMaskedLM.from_pretrained(
"appliedCL/interseek-35m", subfolder="esm2"
)
```
The backbone alone does not produce interaction scores. `interaction_head.safetensors`
contains the separate head; the complete predictor is in `model.safetensors`.
No additional pretrained-weight download is needed for `predict.py` after the
repository has been downloaded.
## Training and architecture
Protein pairs are tokenised jointly as `[CLS] A [EOS] B [EOS]`, with at most
1,024 tokens and two sequence-window views per pair. View logits are pooled
using log-mean-exp. Inference averages the two protein-order logits before
applying sigmoid.
Training combines binary cross-entropy with masked language modelling,
weighted by 0.1, and masks 15% of eligible residues. The encoder learning rate
was 2e-5; the head learning rate was 1e-4. AdamW used weight decay 0.01,
100 warm-up updates and an effective batch of 16 pairs. The run used seed 17,
BF16 and an RTX 4090. Torch was 2.8.0+cu128 and Transformers was 5.12.1.
The checkpoint was selected by validation AUROC.
## Data and evaluation
The human data preserve the published [Bernett et al. gold-standard split](https://doi.org/10.1093/bib/bbae076),
using the authors' [corrected Figshare version 4](https://doi.org/10.6084/m9.figshare.21591618.v4):
| Role | Published partition | Pairs | Positive prevalence |
| --- | --- | ---: | ---: |
| Training | HIPPIE-derived Intra1 | 163,192 | 50% |
| Validation | HIPPIE-derived Intra0 | 59,260 | 50% |
| Human final test | HIPPIE-derived Intra2 | 52,048 | 50% |
| Independent yeast final test | D-SCRIPT S. cerevisiae | 55,000 | 9.09% |
The yeast data come from [D-SCRIPT](https://doi.org/10.1016/j.cels.2021.08.010),
independently derived from STRING experimental annotations. Its source repository
was pinned to commit `23cbb0fbbb454d09ee41ff749c1454d8b3c8a4b8`.
Both final tests used the same fixed checkpoint and human-validation threshold.
| Final test | AUROC | Average precision | MCC | Precision | Recall |
| --- | ---: | ---: | ---: | ---: | ---: |
| Human | 0.6800 | 0.6700 | 0.2487 | 0.6091 | 0.6882 |
| Yeast | 0.7207 | 0.2269 | 0.1792 | 0.1441 | 0.7674 |
Full metrics, including the alternative fixed threshold of 0.5, appear in
`evaluation.json`. Validation history, split fingerprints, data audit and
training provenance are included. The data themselves and optimiser checkpoints
are not included in this inference release.
## Intended use and limitations
Use this model for protein-interaction research, candidate ranking and follow-up
experiments. A prediction does not establish physical binding or causation.
These single-seed results do not establish superiority over other methods.
The published human split controls protein and homology leakage; local checks
found no shared identifiers or exact sequences across the four data roles.
No new all-against-all homology audit or ESM pretraining-exposure audit was run.
Dataset curation, hub-protein biases and sampled negative pairs limit conclusions.
The yeast source preserves 32 repeated unordered-pair rows, four label-conflicting
pairs and five self-pairs, as recorded in the audit.
Two bounded views may omit relevant regions of long proteins. Transfer across
species is imperfect: at the fixed threshold, yeast precision is 14.4%.
Additional seeds, matched baselines and experimental validation remain needed.
## Files and provenance
- `model.safetensors`: complete backbone and interaction head, with original tensors unchanged.
- `config.json`: model settings, threshold, original training provenance and release inference identity.
- `esm2/`: fine-tuned ESM-2 backbone in Transformers format.
- `interaction_head.safetensors`: separate classification head.
- `predict.py` and the InterSeek wheel: matching inference implementation.
- `evaluation.json`, `validation-history.json`, `study.json`, `data-audit.json` and
`training-provenance.json`: records from the completed experiment.
- `SHA256SUMS`: file-integrity checks for this release.
The original trained tensor hash is
`26531c43768486b217a0995bd721b08eb90d1a368986babdf265bc9f76ef074d`.
Original experiment metadata retain their historical internal format identifiers.
The public inference package was renamed to InterSeek, with prediction equivalence
checked against the original package; no weights were retrained or converted.
Source: [appliedCL/interseek](https://github.com/appliedCL/interseek).
This release uses the MIT licence; the upstream ESM-2 model also uses MIT.