| # Protein_Sequence_Toxicity_Predictor | |
| ## Overview | |
| The **Protein_Sequence_Toxicity_Predictor** is a specialized sequence classification model designed to predict the potential toxicity level of an arbitrary peptide or protein sequence. This model is critical for early-stage drug discovery, synthetic biology, and material science, where quick assessment of a novel sequence's risk profile is essential. | |
| It treats the amino acid sequence (e.g., "M-A-S-K...") as a sentence and the amino acids as tokens, adapting the BERT architecture for biological sequence understanding. | |
| ## Model Architecture | |
| The model is based on a modified **BERT (Bidirectional Encoder Representations from Transformers)** architecture, specifically **BertForSequenceClassification**. | |
| * **Base Model:** A custom BERT-like model was trained from scratch on a large corpus of protein sequences (Uniref/Swiss-Prot), with a vocabulary size of 30, including the 20 standard amino acids, special tokens (CLS, SEP, PAD), and modified amino acids. | |
| * **Input:** The input is a raw amino acid sequence (e.g., 'MVLSPADKTN...'). | |
| * **Tokenizer:** A simple BPE-like or character-level tokenizer is used, where each amino acid is treated as a single token. | |
| * **Classification:** A standard linear classification layer outputs the probability distribution across three toxicity classes: `Non_Toxic`, `Mildly_Toxic`, and `Highly_Toxic`. | |
| * **Training:** Fine-tuned on a curated dataset of experimentally verified toxic and non-toxic peptide sequences, including antimicrobial peptides and known allergens. | |
| ## Intended Use | |
| * **Drug Design Safety:** Rapidly screening candidate therapeutic peptides for potential adverse effects before expensive *in vitro* or *in vivo* testing. | |
| * **Synthetic Biology:** Predicting the safety of novel proteins designed for industrial or research applications. | |
| * **Allergen Prediction:** Initial assessment of newly discovered or engineered food proteins for potential allergenic risk. | |
| * **High-Throughput Screening:** Integrating into automated pipelines for filtering large libraries of generated protein sequences. | |
| ## Limitations | |
| * **Context Dependency:** Toxicity is often highly dependent on the protein's 3D folding, concentration, and the organism/cell line exposed. This model, being based solely on the primary (1D) sequence, cannot fully account for all these factors. | |
| * **Novel Sequence Space:** Performance on entirely novel sequences, especially those with non-canonical or heavily modified amino acids, may be lower than on sequences closely related to the training data. | |
| * **Threshold Bias:** The definition and threshold between `Mildly_Toxic` and `Highly_Toxic` are based on the training dataset's experimental methodology, which may not generalize perfectly to all external assays. | |
| * **Sequence Length:** The current configuration is optimized for typical peptide lengths ($\le 510$ tokens, corresponding to roughly 510 amino acids). Very large protein sequences (e.g., multi-domain proteins) will require truncation, potentially missing important structural information. |