FlashPPI
Linear-time prediction of proteome-scale microbial protein interactions
Install / Use
/learn @TattaBio/FlashPPIREADME
FlashPPI: Linear-time prediction of proteome-scale microbial protein interactions
<p align="center"> <a href="https://www.biorxiv.org/content/10.64898/2026.03.01.708874v1"><img src="https://img.shields.io/badge/Paper-bioRxiv-red" style="max-width: 100%;"></a> <a href="https://huggingface.co/tattabio/flashppi"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-blue?label=Model" style="max-width: 100%;"></a> </p> <p align="center"> <img src="docs/images/figure1.png" alt="FlashPPI model overview" width="600"/> </p>Model Description
FlashPPI is a contrastively trained model for protein-protein interaction (PPI) prediction, grounded in residue-level interactions, that enables full-proteome interaction prediction in minutes.
By reframing PPI prediction as a dense retrieval task, FlashPPI circumvents the $\mathcal{O}(N^2)$ computational bottleneck of traditional all-vs-all structural screening.
- Scalable: Reduces proteome-wide screening from days/months to minutes.
- Interpretable: Predicts fine-grained, residue-level 2D contact maps for retrieved interaction candidates.
- Genomic Priors: Leverages gLM2 initialization to capture cross-protein, multi-gene co-evolutionary signals.
Web Server
FlashPPI is integrated into seqhub.org. You can upload a FASTA and interactively explore whole-proteome networks and contact maps. Explore an example network here.
Installation
pip install -r requirements.txt
Optionally, install Flash Attention for faster inference on GPU:
pip install flash-attn --no-build-isolation
Usage
Fast Proteome-wide PPI Screening (All-vs-All)
Run the prediction script by passing your proteome FASTA file. It will output a predictions file with predicted pairs of interacting proteins and confidence scores. Note: Requires a machine with at least 1 GPU.
python predict_proteome.py --fasta my_proteome.fasta --output predictions.csv
Cross-Proteome PPI Screening (Host–Viral)
Predict interactions between two proteomes, for example a viral genome and its host genome.
python predict_cross_proteome.py \
--host_fasta host.fasta \
--viral_fasta virus.fasta \
--output predictions.csv
Visualizing contact predictions
import torch
import matplotlib.pyplot as plt
from transformers import AutoModel, AutoTokenizer
seq1 = "MKTAYIAKQRQISFVKSHFSRQL"
seq2 = "MSTAGKVIKCKAAVLW"
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained("tattabio/flashppi", trust_remote_code=True)
model = AutoModel.from_pretrained("tattabio/flashppi", trust_remote_code=True).to(device).eval()
inputs1 = tokenizer(seq1, return_tensors="pt").to(device)
inputs2 = tokenizer(seq2, return_tensors="pt").to(device)
with torch.no_grad():
outputs = model(
input_ids1=inputs1["input_ids"],
attention_mask1=inputs1["attention_mask"],
input_ids2=inputs2["input_ids"],
attention_mask2=inputs2["attention_mask"],
return_dict=True
)
# Extract map and trim padding
contact_map = outputs.contact_map[0].cpu().numpy()
len1, len2 = inputs1["attention_mask"].sum().item(), inputs2["attention_mask"].sum().item()
contact_map = contact_map[:len1, :len2]
plt.imshow(contact_map, cmap="Blues", vmin=0, vmax=1)
plt.savefig("contact_map.png")
License
The model code and inference scripts in this repository are licensed under the Apache License 2.0.
The FlashPPI model weights are hosted on Hugging Face and released under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license. The weights are freely available for academic and research purposes.
Citing
If you use FlashPPI or our datasets in your research, please cite:
@article {Cornman2026FlashPPI,
author = {Cornman, Andre and Tranzillo, Matt and Zulaybar, Nicolo G and Bouzit, Imane and Hwang, Yunha},
title = {Linear-time prediction of proteome-scale microbial protein interactions},
year = {2026},
doi = {10.64898/2026.03.01.708874},
publisher = {Cold Spring Harbor Laboratory},
URL = {https://www.biorxiv.org/content/early/2026/03/02/2026.03.01.708874},
journal = {bioRxiv}
}
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
