CLIPepPI: Domain-peptide specificity prediction using contrastive learning
See the code
ClipPepPI is a deep learning model for domain-peptide interaction prediction using contrastive learning (CLIP). The model leverages fine-tuned protein language models (ESMC) to generate embeddings for both protein domains and peptide sequences, encoding them into a shared latent space.
Read the preprint: https://www.biorxiv.org/content/early/2026/03/20/2026.03.18.712595
ClipPepPI is available at https://bio3d.cs.huji.ac.il/webserver/clipeppi/
cd clipPepPI
python3 -m venv venv
source venv/bin/activate # windows: venv\Scripts\activate
pip install -r requirements.txt
Generate embeddings or score protein-peptide pairs using the trained model.
python clip_inference.py \
--mode <mode> \
--csv <input_csv> \
--save <output_path>
--mode (required): Inference mode: embed_domains, embed_peptides, or score--csv (required): Input CSV file path (format depends on mode)--save (required): Output path for embeddings or scores (.npz format)--batch_size (optional): Batch size for inference (default: 64)Generate embeddings for protein domains:
python clip_inference.py \
--mode embed_domains \
--csv domains.csv \
--save domain_embeddings.npz
Input CSV format:
sequence_A: Domain protein sequencesinterface_indexes (optional): Interface residue indices in format "i,j,k" (0-based)Generate embeddings for peptide sequences:
python clip_inference.py \
--mode embed_peptides \
--csv peptides.csv \
--save peptide_embeddings.npz
Input CSV format:
sequence_B: Peptide sequencesScore domain-peptide interaction pairs:
python clip_inference.py \
--mode score \
--csv pairs.csv \
--save scores.npz
Input CSV format:
sequence_A: Domain protein sequencessequence_B: Peptide sequencesinterface_indexes (optional): Interface residue indicesExample input files are provided in the examples/ directory:
Embed domains:
python clip_inference.py \
--mode embed_domains \
--csv examples/domains_only.csv \
--save examples/domain_embeddings.npz
Embed peptides:
python clip_inference.py \
--mode embed_peptides \
--csv examples/peptides_only.csv \
--save examples/peptide_embeddings.npz
Score domain-peptide pairs:
python clip_inference.py \
--mode score \
--csv examples/peptide_domain_pairs.csv \
--save examples/scores.npz
Train clipPepPI models using k-fold cross-validation on protein-peptide interaction data.
python clip_ppi.py \
--fold <fold_index> \
--save_path <output_directory> \
--flush_path <log_file_path>
--fold (required): Fold index for cross-validation (0-6 for 7-fold CV)--save_path (required): Output directory for trained models and results--flush_path (required): Path to training log fileNote: The clip_ppi.py file contains boolean variables to define the type of training data (e.g., whether to include domain-fragment interactions derived from protein-protein interactions)
python clip_ppi.py \
--fold 0 \
--save_path ./trained_models/fold_0 \
--flush_path ./logs/fold_0/train.log
All datasets and model weights are deposited on Hugging Face Hub: https://huggingface.co/datasets/dorstein0909/ClipPepPI/tree/main
To download them locally:
Download Weights:
cd weights/
python download_hf_weights.py
Download Datasets:
cd data/
python download_hf_dataset.py
Requires: pip install huggingface-hub
After downloading, datasets are available in ./data/ppi/ and ./data/domain_families/:
Training Data:
fold_{0-6}.csv, fold_{0-6}_with_negatives.csv: negative examples are provided for validation, but only positive examples are used for trainingppi_all_pinder.csv{domain_name}_voro.csv, {domain_name}_voro_TEST.csvTest Data:
nes_test.csv)propPdTest.csv)ppi_test.csv, ppi_test_with_negatives.csv)Training/validation CSV files should contain:
sequence_A: Protein domain sequencesequence_B: Peptide sequencelabel: Binary interaction label (0/1)pdb: PDB identifierinterface_indexes: Receptor interface indexes (0-based)If you use ClipPepPI, please cite:
@article {Hochner-Vilk2026.03.18.712595,
author = {Hochner-Vilk, Tanya and Stein, Dor and Schueler-Furman, Ora and Raveh, Barak and Chook, Yuh Min and Schneidman-Duhovny, Dina},
title = {CliPepPI: Scalable prediction of domain-peptide specificity using contrastive learning},
elocation-id = {2026.03.18.712595},
year = {2026},
doi = {10.64898/2026.03.18.712595},
publisher = {Cold Spring Harbor Laboratory},
abstract = {Domain-peptide interactions mediate a significant fraction of cellular protein networks, yet accurately predicting their specificity remains challenging. Peptide motifs typically have short, fuzzy sequence profiles, and their interactions are often weak and transient, limiting the size, coverage, and quality of experimentally validated domain-peptide datasets. Since true non-binders are rarely known, constructing negative examples often introduces bias. While structure-based prediction methods can achieve high accuracy, they are computationally demanding and difficult to scale to the proteome level. We introduce CLIPepPI, a dual-encoder model that leverages contrastive learning to embed domains and peptides into a shared space directly from sequence. Both encoders are initialized from a protein language model (ESM-C) and fine-tuned using lightweight LoRA adapters, enabling parameter-efficient training on positive pairs alone. To overcome data scarcity, we augment \~{}3K protein-peptide complexes from PPI3D with \~{}150K domain-peptide pairs derived from protein-protein interfaces. CLIPepPI further injects structural information by marking interface residues in the domain sequence, thus guiding the encoders toward binding regions and linking sequence-level learning with structural context. Competitive performance is achieved across three independent benchmarks: domain-peptide complexes from PPI3D, large-scale phage-library data from ProP-PD, and a curated dataset of nuclear export signal (NES) sequences. We demonstrate scalability and generalization through two applications: (i) proteome-wide NES scanning, and (ii) variant-effect prediction, where score changes in domain-peptide interactions between wild-type and mutant sequences discriminate pathogenic from benign variants. Together, CLIPepPI offers a scalable, structure-informed model for predicting domain-peptide specificity and generating meaningful embeddings suited for large-scale proteomic analyses. CLIPepPI is available at: https://bio3d.cs.huji.ac.il/webserver/clipeppi/.Competing Interest StatementThe authors have declared no competing interest.},
URL = {https://www.biorxiv.org/content/early/2026/03/20/2026.03.18.712595},
eprint = {https://www.biorxiv.org/content/early/2026/03/20/2026.03.18.712595.full.pdf},
journal = {bioRxiv}
}
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
For any bugs, reports or contributions please open a github issue. Alternatively contact us via: [email protected], [email protected]
CLIPepPI: Domain-peptide specificity prediction using contrastive learning
See the code
ClipPepPI is a deep learning model for domain-peptide interaction prediction using contrastive learning (CLIP). The model leverages fine-tuned protein language models (ESMC) to generate embeddings for both protein domains and peptide sequences, encoding them into a shared latent space.
Read the preprint: https://www.biorxiv.org/content/early/2026/03/20/2026.03.18.712595
ClipPepPI is available at https://bio3d.cs.huji.ac.il/webserver/clipeppi/
cd clipPepPI
python3 -m venv venv
source venv/bin/activate # windows: venv\Scripts\activate
pip install -r requirements.txt
Generate embeddings or score protein-peptide pairs using the trained model.
python clip_inference.py \
--mode <mode> \
--csv <input_csv> \
--save <output_path>
--mode (required): Inference mode: embed_domains, embed_peptides, or score--csv (required): Input CSV file path (format depends on mode)--save (required): Output path for embeddings or scores (.npz format)--batch_size (optional): Batch size for inference (default: 64)Generate embeddings for protein domains:
python clip_inference.py \
--mode embed_domains \
--csv domains.csv \
--save domain_embeddings.npz
Input CSV format:
sequence_A: Domain protein sequencesinterface_indexes (optional): Interface residue indices in format "i,j,k" (0-based)Generate embeddings for peptide sequences:
python clip_inference.py \
--mode embed_peptides \
--csv peptides.csv \
--save peptide_embeddings.npz
Input CSV format:
sequence_B: Peptide sequencesScore domain-peptide interaction pairs:
python clip_inference.py \
--mode score \
--csv pairs.csv \
--save scores.npz
Input CSV format:
sequence_A: Domain protein sequencessequence_B: Peptide sequencesinterface_indexes (optional): Interface residue indicesExample input files are provided in the examples/ directory:
Embed domains:
python clip_inference.py \
--mode embed_domains \
--csv examples/domains_only.csv \
--save examples/domain_embeddings.npz
Embed peptides:
python clip_inference.py \
--mode embed_peptides \
--csv examples/peptides_only.csv \
--save examples/peptide_embeddings.npz
Score domain-peptide pairs:
python clip_inference.py \
--mode score \
--csv examples/peptide_domain_pairs.csv \
--save examples/scores.npz
Train clipPepPI models using k-fold cross-validation on protein-peptide interaction data.
python clip_ppi.py \
--fold <fold_index> \
--save_path <output_directory> \
--flush_path <log_file_path>
--fold (required): Fold index for cross-validation (0-6 for 7-fold CV)--save_path (required): Output directory for trained models and results--flush_path (required): Path to training log fileNote: The clip_ppi.py file contains boolean variables to define the type of training data (e.g., whether to include domain-fragment interactions derived from protein-protein interactions)
python clip_ppi.py \
--fold 0 \
--save_path ./trained_models/fold_0 \
--flush_path ./logs/fold_0/train.log
All datasets and model weights are deposited on Hugging Face Hub: https://huggingface.co/datasets/dorstein0909/ClipPepPI/tree/main
To download them locally:
Download Weights:
cd weights/
python download_hf_weights.py
Download Datasets:
cd data/
python download_hf_dataset.py
Requires: pip install huggingface-hub
After downloading, datasets are available in ./data/ppi/ and ./data/domain_families/:
Training Data:
fold_{0-6}.csv, fold_{0-6}_with_negatives.csv: negative examples are provided for validation, but only positive examples are used for trainingppi_all_pinder.csv{domain_name}_voro.csv, {domain_name}_voro_TEST.csvTest Data:
nes_test.csv)propPdTest.csv)ppi_test.csv, ppi_test_with_negatives.csv)Training/validation CSV files should contain:
sequence_A: Protein domain sequencesequence_B: Peptide sequencelabel: Binary interaction label (0/1)pdb: PDB identifierinterface_indexes: Receptor interface indexes (0-based)If you use ClipPepPI, please cite:
@article {Hochner-Vilk2026.03.18.712595,
author = {Hochner-Vilk, Tanya and Stein, Dor and Schueler-Furman, Ora and Raveh, Barak and Chook, Yuh Min and Schneidman-Duhovny, Dina},
title = {CliPepPI: Scalable prediction of domain-peptide specificity using contrastive learning},
elocation-id = {2026.03.18.712595},
year = {2026},
doi = {10.64898/2026.03.18.712595},
publisher = {Cold Spring Harbor Laboratory},
abstract = {Domain-peptide interactions mediate a significant fraction of cellular protein networks, yet accurately predicting their specificity remains challenging. Peptide motifs typically have short, fuzzy sequence profiles, and their interactions are often weak and transient, limiting the size, coverage, and quality of experimentally validated domain-peptide datasets. Since true non-binders are rarely known, constructing negative examples often introduces bias. While structure-based prediction methods can achieve high accuracy, they are computationally demanding and difficult to scale to the proteome level. We introduce CLIPepPI, a dual-encoder model that leverages contrastive learning to embed domains and peptides into a shared space directly from sequence. Both encoders are initialized from a protein language model (ESM-C) and fine-tuned using lightweight LoRA adapters, enabling parameter-efficient training on positive pairs alone. To overcome data scarcity, we augment \~{}3K protein-peptide complexes from PPI3D with \~{}150K domain-peptide pairs derived from protein-protein interfaces. CLIPepPI further injects structural information by marking interface residues in the domain sequence, thus guiding the encoders toward binding regions and linking sequence-level learning with structural context. Competitive performance is achieved across three independent benchmarks: domain-peptide complexes from PPI3D, large-scale phage-library data from ProP-PD, and a curated dataset of nuclear export signal (NES) sequences. We demonstrate scalability and generalization through two applications: (i) proteome-wide NES scanning, and (ii) variant-effect prediction, where score changes in domain-peptide interactions between wild-type and mutant sequences discriminate pathogenic from benign variants. Together, CLIPepPI offers a scalable, structure-informed model for predicting domain-peptide specificity and generating meaningful embeddings suited for large-scale proteomic analyses. CLIPepPI is available at: https://bio3d.cs.huji.ac.il/webserver/clipeppi/.Competing Interest StatementThe authors have declared no competing interest.},
URL = {https://www.biorxiv.org/content/early/2026/03/20/2026.03.18.712595},
eprint = {https://www.biorxiv.org/content/early/2026/03/20/2026.03.18.712595.full.pdf},
journal = {bioRxiv}
}
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
For any bugs, reports or contributions please open a github issue. Alternatively contact us via: [email protected], [email protected]