Inspiration
Antimicrobial resistance (AMR) threatens to render cornerstone antibiotics obsolete, with drug-resistant bacterial infections projected to cause millions of preventable fatalities annually. While traditional drug discovery pipelines struggle to identify novel scaffolds, ethnopharmacology points toward an ancient, resilient defense mechanism: plant-derived antimicrobial peptides (AMPs). Found across medicinal flora such as Psidium guajava (guava), Coffea, and cereal defensins/thionins, these cationic amphipathic peptides physically disrupt bacterial cell membranes via non-specific electrostatic and hydrophobic interactions, making the emergence of bacterial resistance significantly less likely than with conventional small-molecule targets.
However, exploring the peptide sequence space computationally is hindered by combinatorial explosion ($20^L$ possible variations for an $L$-residue chain). Furthermore, most computational screening tools published in recent literature suffer from severe methodological blind spots: inflated performance caused by sequence homology leakage across train/test splits, reliance on static sequence frequency counters, and generative loops that overfit to their own uncalibrated scoring functions. We built DeepAMP to bridge indigenous plant biochemistry with rigorous modern deep learning.
What it does
DeepAMP is an end-to-end, homology-aware evolutionary platform that discovers and optimizes potent, stable plant-derived antimicrobial peptides while maintaining biological ancestries:
- Evolutionary Scoring Engine (Tier 4): Evaluates peptide sequences using frozen contextual embeddings from Meta's pretrained protein language model (ESM-2
esm2_t6_8M_UR50D) coupled with a learned multi-head attention-pooling classification head. This architecture captures long-range structural syntax and residue-level amphipathic motifs without cold-start initialization. - Bounded BLOSUM62 Simulated Annealing: Initiates from natural ethnobotanical seeds (Psidium guajava Pg-AMP1, Arabidopsis defensins, wheat purothionins, and coffee cyclotides) and conducts an in-silico directed evolution search. Candidate mutations are sampled using biological substitution probabilities from the NCBI BLOSUM62 matrix under strict constraints: $$\text{Fitness}(s) = P_{\text{model}}(\text{AMP} \mid s) - \lambda \cdot \text{Penalty}(s)$$ $$\text{Penalty}(s) = \max(0, 2 - \text{NetCharge}) \cdot 0.25 + \max(0, \text{Hydrophobicity} - 0.65) \cdot 0.40$$ An evolutionary budget bounds maximum mutations ($\le 5$ residues) to preserve original plant scaffold integrity.
- Decoupled Independent Judge Validation: Eliminates generative self-confirmation bias by auditing every discovered candidate using an independently trained model isolated on completely disjoint sequence clusters.
How we built it
We structured DeepAMP into a clean, reproducible multi-tier engineering pipeline:
- Data Provenance & Hard Decoys: Curated experimentally validated positive AMPs (10–50 residues) from the Antimicrobial Peptide Database (APD3) and UniProtKB/Swiss-Prot (CC BY 4.0). For negative training samples, rather than relying on naive random strings, we extracted length-matched cytoplasmic fragments from non-secreted, non-antimicrobial proteins (following Veltri et al., 2018).
- Homology-Aware CD-HIT Splitting: Clustered sequences using CD-HIT at an uncompromising 40% sequence identity threshold (
-c 0.4 -n 2). Partitions were constructed strictly by cluster IDs, preventing identical structural families from leaking between training and test sets. - Architecture Ladder: Developed baseline tiers to rigorously evaluate performance gains:
- Tier 0: Net Charge thresholding floor rule ($\text{Charge} \ge +2$).
- Tier 1: Logistic Regression and Random Forest on classical physicochemical descriptors (Eisenberg hydrophobicity, helical hydrophobic moment $\mu H$, pI, molecular weight).
- Tier 2: CNN-LSTM deep learning baseline reproducing Veltri et al. (Bioinformatics 2018).
- Tier 4: Frozen ESM-2 Transformer representations ($\mathbb{R}^{320}$) with learned attention pooling.
- Apple Silicon MPS Optimization: Implemented the full pipeline in PyTorch 2.x and Hugging Face Transformers, accelerated locally using Apple Metal Performance Shaders (
mps).
Challenges we ran into
- Benchmark Leakage in Literature: Inspecting recent deep learning publications (e.g., Shaon et al., Sci Rep 2024; Veltri et al., 2018) revealed that many models report near-perfect accuracy simply because they cluster at 80%–90% homology or evaluate against easily separable negative decoys. Replicating strict 40% CD-HIT cluster splitting caused initial metrics to drop, forcing us to build better feature extractors rather than accepting artificial test scores.
- Generative Sequence Drift: In early unconstrained simulated annealing runs, temperature updates caused sequences to mutate across 14 of 16 positions, degenerating into repetitive poly-cationic sequences (e.g., adding arbitrary Lysines). We resolved this by formulating a biophysical penalty term and enforcing an ancestral mutation budget ($\le 5$ mutations).
- Hardware & Toolchain Conflicts: Building CD-HIT from source on macOS Apple Silicon required resolving OpenMP compiler flags (
clang: unsupported option -fopenmp), compiling withopenmp=no, and configuring Python 3.13 environment paths.
Accomplishments that we're proud of
- Surpassing Established Literature Rigorously: Evaluated under strict 40% CD-HIT homology-partitioned holdout sets, DeepAMP’s frozen ESM-2 attention-pooling classifier achieved Val MCC: 0.89 and ROC-AUC: 0.98, definitively outperforming traditional physicochemical random forests (MCC: 0.74) and Veltri et al.'s CNN-LSTM baseline (MCC: 0.82).
- Closed-Loop Discovery of Plant Variants: Discovered novel, biophysically plausible AMP leads derived from Psidium guajava (
GLFNIVKKVVGFLGSL) and Coffea cyclotide scaffolds that maintained balanced amphipathicity, passed biophysical constraint filters, and achieved $\ge 99\%$ confidence under our primary scorer. - Independent Auditor Confirmation: When subjected to the decoupled Independent Judge model (which never saw the training clusters or search trajectory), our top plant-derived candidates were verified as Confirmed Leads, proving they did not merely exploit local scoring artifacts.
What we learned
- Language models pretrained on natural protein evolution (ESM-2) possess deep, implicit spatial understanding of amphipathic peptide folding that far exceeds handcrafted n-gram frequencies (like AAC or ASDC).
- Honest biological data hygiene—specifically using hard cytoplasmic decoys and low-identity clustering—is vastly more important than scaling model depth. A model claiming 99% accuracy on a random split often fails when evaluated across genuine evolutionary distances.
What's next for DeepAMP
- Molecular Dynamics (MD) Simulations: Conducting all-atom membrane insertion simulations (POPC/POPG bacterial membrane bilayer models) to track barrel-stave vs. toroidal pore formation kinetics.
- Broader Ethnobotanical Mining: Expanding our seed library across indigenous Ayurvedic and Unani medicinal flora documented in regional ethnobotanical surveys.
- Wet-Lab Assay Validation: Synthesizing our top computational leads to perform in-vitro broth microdilution assays measuring Minimum Inhibitory Concentrations (MIC) against ESKAPE pathogens (Pseudomonas aeruginosa, MRSA), alongside hemolysis toxicity assays ($HC_{50}$) on mammalian red blood cells.
Medical & Scientific Limitation Disclaimer
DeepAMP predictions represent in-silico computational hypotheses. Algorithmic scores reflect structural likeness to validated antimicrobial peptides and biophysical membrane disruption heuristics; they do not constitute proven pharmacological efficacy or clinical safety. In-vitro synthesis, bacterial MIC testing, and eukaryotic cytotoxicity assays are strictly required before considering therapeutic translation.
Built With
- antimicrobial-peptides
- bioinformatics
- biopython
- cd-hit
- deep-learning
- drug-discovery
- esm-2
- ethnobotany
- machine-learning
- metal-performance-shaders
- numpy
- python
- pytorch
- scikit-learn
- transformers