Views
No views yet

[CLS] Seq_A [SEP] Seq_B [EOS], enabling full bidirectional cross-attention between the two sequences at every transformer layer. The [CLS] token representation from the final layer captures joint inter-protein features and is passed through a dropout + linear classification head to produce binary interaction predictions with softmax probabilities.| Parameter | Value |
|---|---|
| Foundation | ESM-1b-inspired transformer (Rives et al., 2021) -- substantially modified, trained from scratch |
| Strategy | Cross-encoding (sentence-pair) |
| Layers | 12 (configurable) |
| Classification | [CLS] -> Dropout(0.1) -> Linear -> 2 |
| Max sequence length | 1,024 tokens |
| Optimizer | AdamW (lr = 2 x 10^-5) |
| Loss | Cross-Entropy |
1# Clone the repository
2git clone https://github.com/kouroshSA/ppiDCE.git
3cd ppiDCE
4
5# Create a conda environment
6conda create -n esm python=3.10
7conda activate esm
8pip install -r requirements.txtppiDCE/
|-- train_ppiDCE.py # Training script
|-- inference_ppiDCE.py # Batch inference script
|-- roc_analysis_color_threshold_F1e.py # ROC curve analysis with F1 optimization
|-- assets/
| +-- ppiDCE.png # ASCII workflow diagram
|-- requirements.txt
|-- LICENSE
+-- README.mdprotein1_seq, protein2_seq, labelprotein1_seq, protein2_seq: Amino acid sequenceslabel: 0 (non-interacting) or 1 (interacting)1# Train from scratch with 12 layers
2python train_ppiDCE.py \
3 --train_file train.csv \
4 --val_file val.csv \
5 --model_config facebook/esm1b_t33_650M_UR50S \
6 --from_scratch \
7 --num_layers 12 \
8 --epochs 10 \
9 --batch_size 2 \
10 --learning_rate 2e-5 \
11 --max_length 1024 \
12 --output_dir ./out \
13 --device cuda--from_scratch: Initialize the ESM backbone with random weights instead of
loading pretrained ESM-1b. Useful when you suspect single-sequence
pretraining priors are inappropriate for your task.--num_layers N: Set total transformer layers when training from scratch--freeze_layers N: Freeze bottom N layers during fine-tuning--add_layers N: Append extra transformer layers on top--checkpoint path.pth: Resume from a saved checkpoint--suppress_warnings: Suppress tokenizer truncation warningscheckpoints/ppiDCE_epoch8.pth, 12-layer)
lives on this Hugging Face repo. Pull it without cloning the GitHub mirror:1from huggingface_hub import hf_hub_download
2
3ckpt_path = hf_hub_download(
4 repo_id="kouroshSA/ppiDCE",
5 filename="checkpoints/ppiDCE_epoch8.pth",
6)
7print(ckpt_path) # pass this string to --model_pathinference_ppiDCE.py takes the checkpoint path as a direct --model_path
argument, so no rename or specific directory layout is required — point
it straight at the file you just downloaded.seq1,seq2
MKLR...QSH,MSEDF...VKN
MQAG...PIA,MTRRL...EEPMED4-PPIs-low-confidence_ppiTEPM_prompts.csv.
The labeled PRS/RRS reference sets (MED4_PRS_100.csv, MED4_RRS_100.csv)
include a third label column, which the inference script ignores — only
the first two columns are read.1python inference_ppiDCE.py \
2 --model_path checkpoints/ppiDCE_epoch8.pth \
3 --model_config facebook/esm1b_t33_650M_UR50S \
4 --input_file MED4-PPIs-low-confidence_ppiTEPM_prompts.csv \
5 --output_file predictions.csv \
6 --batch_size 4 \
7 --max_length 1024 \
8 --device cudaseq1, seq2, pred_label, prob_0, prob_11python roc_analysis_color_threshold_F1e.py \
2 --input_csv probabilities.csv \
3 --output_file roc_curve.pngassets/ppiDCE.png) covers:Note: the diagram shows Softmax in the classification head for clarity, but the implementation returns raw logits — softmax is applied implicitly by CrossEntropyLoss during training and explicitly during inference.
Daakour, S. et al. (2026).