A failure mode driven closed loop intelligent discovery of antimicrobial peptides

CN122715784BActive Publication Date: 2026-10-16杭州深极科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611212694.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-10-16
Estimated Expiration
2046-08-11

AI Technical Summary

Technical Problem

1,分布偏移问题:现有模型仅在训练分布或测试分布内表现良好,一旦面对新生成的候选序列或真实部署数据,预测趋势易失真,无法适配真实筛选场景的分布特征

Benefits of technology

1,首创失效模式驱动的闭环优化范式,突破静态筛选的转化瓶颈。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122715784B_ABST
    Figure CN122715784B_ABST
Patent Text Reader

Abstract

A failure mode driven closed-loop intelligent discovery method of antibacterial peptides belongs to the technical field of artificial intelligence assisted drug discovery, obtains verified antibacterial peptide and non-antibacterial protein sequence, uniformly converts activity label into logarithmic index of geometric mean of minimum inhibitory concentration of multiple strains, adopts similarity perception grouping to construct non-leakage training and verification set; a classification-regression cascade baseline model BioPIR-v1 is constructed by taking a pre-trained protein language model as a backbone, a candidate set to be verified is obtained through virtual library physicochemical constraint screening; in view of the distribution offset problem, a flow matching model is constructed in a sequence embedding space to expand the training set and retrain, and a BioPIR-v2 model is obtained. The application adopts a failure mode driven closed-loop iteration paradigm, and directionally eliminates core prediction deviations such as distribution offset and systematic overestimation, and the prospective candidate hit rate is increased from 19.2% to 100%, substantially bridging the simulation-real gap, and breaking through the static screening conversion bottleneck of antibacterial peptides.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence-assisted drug discovery technology, specifically a failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides. Background Technology

[0002] Current AI screening techniques for antimicrobial peptides (AMPs) are mostly based on single-step modeling or single-round virtual screening, with an excessive focus on the novelty of the model structure. They generally suffer from the following technical defects, leading to significant deviations between predicted results and actual experimental performance: 1. Distribution shift problem: Existing models only perform well within the training or testing distribution. Once faced with newly generated candidate sequences or real deployment data, the predicted trend is easily distorted and cannot adapt to the distribution characteristics of real screening scenarios.

[0003] 2. Absolute calibration deficiency: Existing methods focus on candidate ranking ability but lack reliable calibration of the absolute scale of activity. This leads to a general systematic overestimation, resulting in a large number of candidates with mediocre actual activity being incorrectly ranked at the top.

[0004] 3. The problem of misjudgment of the activity cliff: Existing regression models tend to fit the global smooth trend and are difficult to capture the phenomenon of "a small number of site mutations causing a large change in activity", which leads to the misjudgment of key candidates.

[0005] 4. Lack of physical constraints: Pure data-driven schemes do not introduce biophysical consistency verification, which can easily lead to the advancement of sequences with high statistical scores but insufficient actual membrane action potential and unreasonable physical behavior into downstream processes, resulting in a large number of false positives.

[0006] 5. Limitations of static processes: Existing processes are mostly one-way links of "modeling-screening-ending", lacking a closed-loop mechanism to feed back the model evolution after explicitly diagnosing the failure modes deployed in the previous round, thus failing to achieve continuous optimization.

[0007] In existing technologies, mainstream AMP prediction models (such as APEX, SMEP, AMP-Cliff (ESM2), AMP-Cliff (ProGen2), and XGBoost-ESM2) perform similarly on public benchmark sets, but their overall hit rate in real prospective validation is only 42.0% to 45.1%, and their performance fluctuates greatly in different iteration rounds. The predicted values ​​deviate widely from the identity line from the measured values, have weak calibration capabilities, and are not robust enough under distribution shifts. They rely only on the probabilistic enrichment of specific batches and do not have transferable prediction patterns.

[0008] Therefore, there is an urgent need for a closed-loop solution that can diagnose and correct core failure modes such as distribution shift, absolute scale bias, activity cliff, and physical rationality round by round, so as to improve candidate hit efficiency, screening stability, and convertibility in real-world scenarios. Summary of the Invention

[0009] To address the shortcomings of existing technologies, this invention provides a failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides.

[0010] The present invention employs the following technical solutions to achieve its objectives.

[0011] A failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides includes: Step 1, Data Acquisition and Standardization: Acquire validated antimicrobial peptide and non-antimicrobial protein sequences to construct a sample set, and uniformly convert the active tags into logarithmic indices based on the geometric mean of the minimum inhibitory concentrations of multiple strains; adopt a similarity-aware grouping strategy, cluster according to sequence feature similarity and then divide them proportionally to construct training and validation sets without information leakage. Step 2, Construction of the baseline classification-regression cascade prediction model: Sequence representation is extracted using a pre-trained protein language model as a shared backbone, and a dual-task prediction head is used to output the antimicrobial peptide discrimination probability and activity prediction value respectively; the baseline prediction model is obtained by training until convergence. Step 3, Construction and initial screening of a large-scale virtual sequence library, and establishment of the BioPIR-v1 model: A large-scale virtual peptide sequence library is generated under preset physicochemical constraints, and then filtered through antimicrobial peptide discrimination, iterative round-adapted activity threshold filtering, multi-dimensional drug-likeness filtering and diversity clustering to obtain a set of candidate peptides to be verified. Step 4: Generative flow matching enhancement in the embedding space and establishing the BioPIR-v2 model: Construct a generative flow matching model in the sequence embedding space to learn the mapping path from noise distribution to real antimicrobial peptide distribution; generate diverse candidate sequences and expand the training set by screening high-potential sequences through pseudo-labels of the previous model; retrain the model to restore the monotonic correlation between predicted and measured values ​​and correct distribution shift.

[0012] Furthermore, step 1 includes: Step 101, Positive Sample Collection and Initial Screening: Extract antimicrobial peptide sequences validated by wet experiments from publicly available antimicrobial peptide databases and perform two-stage filtering: retain peptide segments that fit the typical functional length range of antimicrobial peptides and remove sequences whose length does not meet the requirements for drug development; exclude non-natural linear sequences with N-terminal or C-terminal post-translational modifications or intrachain covalent bonds, and retain only naturally sourced linear unmodified antimicrobial peptides to ensure the biological consistency and drug development basis of the positive sample set; Step 102, Negative Sample Adaptation Construction: For classification tasks, natural non-antimicrobial protein fragments that match the length distribution of positive samples are sampled from the natural protein database as negative samples to construct clear boundaries between antimicrobial peptide or non-antimicrobial peptide categories; for regression tasks, experimentally validated weak or inactive peptide segments are added to the positive sample set to cover the full range of activity distribution from low to high activity, thereby improving the prediction stability of the regression model for the full gradient activity range. Step 103, Sequence Compliance Cleaning: Perform standardized cleaning on all sequences, unify the sequence character format, filter out illegal sequences containing non-natural amino acids or unknown encoded residues, retain only compliant sequences encoded by 20 standard amino acids, and eliminate data noise introduced by abnormal characters; Step 104, Activity Label Standardization: The geometric mean of minimum inhibitory concentrations (GM_MIC) of multiple strains is used as the core activity evaluation index to comprehensively reflect the broad-spectrum antibacterial ability of peptides; the activity labels of heterologous experimental reports are normalized to unify the dimensions and statistical caliber; the interval reported values ​​and repeated measurement values ​​are standardized, mapped, and aggregated to eliminate label noise introduced by experimental batch differences; based on clinically accessible antibacterial concentration thresholds and therapeutic window safety thresholds, activity level classification rules are defined, including basic activity thresholds, high activity thresholds, and therapeutic window thresholds that take into account both efficacy and safety. Step 105, Leakage-Free Similarity Grouping: Grouping by sequence length intervals to reduce the computational complexity of similarity; calculating local feature similarity of sequences within the same length interval based on 3-mer Jaccard similarity; using a greedy clustering algorithm based on a preset similarity threshold to group highly similar sequences into the same functional group; randomly assigning the groups to the training and validation sets according to a preset ratio to ensure that similar sequences in the same group are not split; using a reproducible random assignment strategy to ensure the stability of the partitioning results; finally obtaining training and validation sets without information leakage to ensure that the validation metrics truly reflect the generalization performance of the model.

[0013] Furthermore, step 2 includes: Step 201, Shared backbone network configuration: Select a protein language model that has been self-supervised pre-trained on natural protein sequences as a shared sequence encoder; this model has the ability to capture amino acid semantic features, evolutionary conservation and hidden structural information, and can map discrete amino acid sequences into a continuous vector space with biological meaning. Step 202, Dual-Task Head Design: Decouple and set up two independent prediction branches to achieve task-differentiated feature learning: Classifier branch: Focuses on learning the discriminative features of antimicrobial peptides, outputs the probability value of the sequence having antimicrobial activity, and achieves efficient filtering of non-antimicrobial peptide noise by optimizing the class distinction boundary; The regressor branch focuses on learning the continuous mapping relationship between sequence activity and structure, outputting standardized quantitative activity predictions, and providing a reliable basis for activity ranking by aligning with the baseline activity label. Step 203, Training Parameter Configuration: Adopt an optimization strategy adapted to deep networks to ensure stable model convergence and generalization performance; utilize an adaptive optimization algorithm with momentum combined with regularization mechanism to suppress overfitting risk; balance stability in the early stage of training with convergence accuracy in the later stage through dynamic learning rate scheduling and warm-up mechanism; set a pruning strategy based on gradient norm to prevent training oscillations caused by gradient anomalies; introduce an early stopping mechanism based on validation set performance, using dual indicators of classification and regression tasks as monitoring criteria to ensure that the model terminates training in a timely manner when it reaches optimal performance, avoiding invalid iterations; Step 204, Baseline Performance Validation: Perform an objective evaluation on a reserved test set completely independent of the training process to validate the performance on classification and regression tasks.

[0014] Furthermore, step 3 includes: Step 301: Generation of a large-scale virtual peptide sequence library that meets physicochemical constraints: A virtual library is generated within the physicochemical boundaries that adapt to the membrane action characteristics and drug-likeness requirements of antimicrobial peptides, rather than unlimited enumeration of the entire sequence space; the constraints cover typical functional lengths, hydrophobic distribution, amphiphilic structural features and the proportion of hydrophilic residues, taking into account both targeting ability and synthetic feasibility, to obtain a large-scale compliant candidate set. Step 302, two-stage cascaded screening: using a baseline cascaded model to filter layer by layer to reduce costs and improve efficiency: first, the classification branch is used to coarsely screen and remove non-antimicrobial peptide noise, compressing the candidate size; then, the regression branch is used to finely screen and output the activity prediction value, dynamically adjusting the screening threshold according to the iteration round; the first round locks in high-confidence candidates, and the subsequent rounds expand the candidate pool to cover the distribution offset scenario, providing sufficient optimization samples for the correction module. Step 303, Multi-dimensional drug-likeness filtering: Perform triple rule verification: verify solubility based on amino acid composition empirical rules to ensure dispersion in the physiological environment; eliminate sequences containing known toxic motifs or hemolytic risks exceeding the therapeutic window based on built-in toxicology rules to meet safety requirements; perform dual similarity verification with publicly available peptide drugs, covering both global sequence and local motif similarity, with the local similarity verification method consistent with the grouping strategy in Step 1; Step 304, diversity control based on hierarchical agglomerative clustering: introduce hierarchical clustering based on chemical features to avoid candidate clustering: adopt simplified coding of residues with similar physicochemical properties to focus on overall feature differences, and aggregate sequences from bottom to top based on chemical distance after stratification by length; select high-potential clusters according to predicted activity, and select the representative sequence with the best activity from each selected cluster to form a candidate set to be verified by scale-adapted wet experimental verification.

[0015] Further, step 4 includes: Step 401, Embedding Space Generative Modeling: To address the prediction trend collapse problem of the baseline model on novel candidate sequences, a generative flow matching model is constructed in a continuous vector space; a lightweight protein language model is selected as a dedicated encoder to map known antimicrobial peptides to a low-dimensional continuous embedding space, reducing computational complexity and preserving core semantic features; a time-varying evolution path from noise distribution to the true antimicrobial peptide distribution is defined, and a vector field model based on the Transformer architecture is constructed. By fitting this path, the noise is gradually transformed into denoising dynamics with biologically meaningful sequence embeddings, and the model is trained until convergence to accurately approximate the true data distribution; Step 402, Candidate Sequence Generation and Decoding: Using the trained vector field model, inverse sampling is performed through an ordinary differential equation solver to gradually evolve high-potential antimicrobial peptide embeddings from random noise; the embeddings are decoded into specific amino acid sequences through a pre-trained language model head, and a controllable diversity sampling strategy is introduced in the decoding stage to explore the unknown sequence chemical space while ensuring the biological rationality of the sequence, and to avoid the generated results being limited to known training data; Step 403, pseudo-labeling and data augmentation: Use the baseline regressor to perform activity pseudo-labeling on the large-scale generated sequences, and screen candidate sequences whose predicted activity reaches the preset high potential threshold; merge these high potential sequences into the original training set to expand the data distribution boundary, and then retrain the prediction model so that the feature distribution learned by the model covers the chemical space of the real screening scenario, and restore the monotonicity of candidate ranking.

[0016] A failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides further includes: Step 5, self-supervised contrastive learning and k-nearest neighbor calibration, establishing a BioPIR-v3 model, conducting self-supervised contrastive learning based on the sequence representation output by the pre-trained protein language model, optimizing the embedding space neighborhood structure, and calibrating the regression prediction value based on the similarity weighted aggregation of k-nearest neighbor samples, introducing a consistency gating filter between the original regression prediction value and the calibrated value to eliminate the absolute scale bias of systematic overestimation: Step 501, Self-supervised contrastive pre-training to optimize the embedding space: Self-supervised contrastive learning is carried out based on the sequence representation output by the pre-trained protein language model; by constructing an enhanced view of the input sequence to build positive sample pairs, and taking other sequences in the same batch as negative samples, the contrastive loss function is used to maximize the semantic similarity of positive sample pairs and minimize the similarity of negative sample pairs, forcing functionally similar peptides to cluster in the local neighborhood of the embedding space, so that the distribution pattern of the embedding structure is aligned with the functional similarity of antibacterial activity; a linear mapping layer is connected to the output of the backbone network to transform the general features into the contrastive learning-specific space, and a limited number of training rounds are carried out using an adaptive optimization strategy, so as to optimize the local neighborhood structure while retaining the general biological semantics learned by the pre-trained model; Step 502, Activity value calibration inference based on k nearest neighbors: The optimized embedding space is used to introduce local neighborhood consensus to perform absolute scale calibration on the original predicted value of the regression model; the context-aware sequence characterization of the query peptide is extracted, and the set of the most similar nearest neighbor samples is retrieved in the pre-constructed antimicrobial peptide embedding library; the calibration predicted value is calculated through a weighted aggregation mechanism based on cosine similarity, where the nearest neighbor samples with higher similarity are given a larger aggregation weight, so that the calibration result reflects the consensus estimate of the activity of the query sequence in the local neighborhood of the embedding space, and corrects the absolute scale bias of the global regression prediction; Step 503, Consistency Gating Filtering to Eliminate Unstable Candidates: Introducing a consistency verification mechanism between the original regression prediction value and the k-nearest neighbor calibration value, setting a judgment threshold based on the difference in the active logarithmic scale, if the absolute deviation between the two exceeds the preset threshold, the candidate is judged to have prediction instability and is eliminated, only retaining highly consistent candidates to enter the subsequent steps, so as to correct the absolute scale deviation of the global regression based on the local neighborhood consensus of the embedding space and suppress systematic overestimation.

[0017] A failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides further includes: Step 6, multimodal modeling of activity cliff perception, establishing the first-stage BioPIR-v4 model, constructing homology activity cliff supervised comparison pairs and employing contrast quantity learning with adaptive intervals, while introducing protein three-dimensional structural information through cross-attention and sequence feature fusion to capture activity nonlinear fluctuations caused by key residue mutations and correct activity cliff errors: Step 601, Construction of supervised contrast pairs for activity cliff: Group sequences according to literature sources to ensure the comparability of activity values ​​within a group, calculate the activity difference between any two sequences within a group, define sequence pairs with significant activity differences as positive sample pairs of activity cliff and sequence pairs with small activity differences as negative sample pairs of non-cliff, construct a contrast learning sample set with supervised signals, and guide the model to focus on capturing small sequence differences that cause orders of magnitude changes in activity. Step 602, Adaptive contrast learning: Adopt a contrast learning strategy with adaptive interval, use the feature space distance as the sequence similarity metric, assign higher learning weights to difficult negative samples that are hard to distinguish, dynamically adjust the optimization boundary, enhance the model's sensitivity to key residue mutations, and align the feature space distribution with the nonlinear change law of activity. Step 603, Sequence-Structure Multimodal Fusion: Introducing the three-dimensional structural information output by the protein structure prediction tool, constructing a structural feature unit that integrates atomic spatial coordinates and elemental properties, and aligning the sequence feature dimensions through linear projection, a single-layer cross-attention encoder is used to achieve dual-modal deep fusion: using sequence features as query vectors to guide the model to focus on key regions in the structure that are related to function, and using structural features as bond and value vectors to provide physicochemical constraint information in three-dimensional space, while reducing the number of parameters and the risk of overfitting, it accurately captures the nonlinear fluctuations in activity caused by key residue mutations and conformational inversions, enabling the model to simultaneously possess sequence semantic understanding and structural spatial perception capabilities, providing a high-precision prediction basis for subsequent screening steps, and accurately capturing the nonlinear fluctuations in activity caused by key residue mutations and conformational inversions to correct the residual errors in the activity cliff region.

[0018] A failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides further includes: Step 7, physical consistency screening, establishing the BioPIR-v4 second-stage model: constructing a peptide-membrane complex simulation system and conducting molecular dynamics simulations, quantifying physical indicators from three dimensions: membrane binding robustness, peptide aggregation tendency, and maximum oligocluster size, and using weighted comprehensive scoring for filtering to eliminate false positive sequences with high statistical scores but no physical validity, and correcting for physical plausibility bias. Step 701, Construction of 3D Structure and Simulation System: Using multiple mainstream structure prediction tools, initial 3D conformations of candidate peptides with both diversity and rationality are generated. Peptide-membrane binding and peptide self-aggregation behavior are sampled simultaneously through a multi-copy array arrangement strategy. Secondary structure features of the initial conformation are preserved by coarse-grained force field conversion. A biomembrane system matching the composition of Gram-negative bacterial inner membrane is constructed, and a solvent environment simulating physiological ionic strength is set to form a complete peptide-membrane composite simulation system. Step 702, Molecular dynamics simulation: First, the energy of the simulation system is minimized to eliminate unreasonable conformational contact. Then, a production simulation of a sufficient duration is carried out under physiological temperature and pressure conditions. The simulation trajectory is saved at a preset frequency to obtain statistical data on the dynamic behavior of peptides on the membrane surface. Step 703, Quantification of physical indicators: The biophysical activity of candidate peptides is evaluated from three dimensions: first, membrane binding robustness, which quantifies the degree of stability of peptide binding to biological membranes; second, peptide aggregation tendency, which quantifies the non-specific aggregation characteristics of peptides; and third, maximum oligocluster size, which quantifies the ability of peptides to form dominant membrane-active assemblies. Step 704, Comprehensive Scoring and Filtering: Construct a weighted comprehensive scoring system with membrane binding stability as the core weighting term, while also considering peptide self-assembly characteristics; after normalizing the original scores, filter them according to a preset threshold, retaining only candidate peptides that meet the biophysical rationality standard, and removing false positive sequences with high statistical scores but no actual membrane action potential. This is to verify the membrane action potential of candidates based on biophysical priors, eliminate physical false positives, and provide a candidate set with real membrane disruption potential for wet experiments.

[0019] A failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides further includes: step 8, closed-loop iterative control. Step 801, Error Diagnosis and Failure Mode Decomposition: After each round of prospective wet experimental validation, the residual between the predicted activity value and the measured minimum inhibitory concentration (MIC) value is calculated. The error distribution is qualitatively and quantitatively analyzed to identify the dominant failure modes that currently restrict the screening hit rate, including four types of diagnosable modes: First, distribution shift, which is manifested as the loss of monotonic correlation between prediction and measurement and trend collapse; second, systematic overestimation, which is manifested as monotonic correlation between prediction and measurement but systematic deviation in absolute scale; third, activity cliff, which is manifested as the residual error concentrated in local regions with highly similar sequences but significant differences in activity; and fourth, insufficient physical rationality, which is manifested as the peptide predicted to be highly active lacking membrane binding stability or oligomerization ability at the biophysical level. Step 802, Targeted Correction Strategy Based on Failure Mode: Based on the identified dominant failure mode, to avoid blindly stacking model complexity, the corresponding correction module combination is automatically invoked to update the model architecture or training data in a targeted manner: For distribution shift, the embedding space flow matching generation enhancement process is invoked to learn the mapping path from noise to real antimicrobial peptides in the sequence embedding space and expand the training set to restore the monotonic correlation between predicted and measured values; For systematic overestimation, the self-supervised comparison and nearest neighbor calibration process is invoked to calibrate the absolute scale based on the consensus of the embedding space neighborhood and filter unstable candidates to suppress systematic overestimation; For activity cliff, the sequence-structure multimodal modeling process is invoked to fuse the three-dimensional structure through activity cliff supervised comparison and cross-attention to capture the nonlinear fluctuations in activity caused by residue mutations; For insufficient physical rationality, the physical consistency screening process is invoked to quantify membrane binding and oligomerization indicators through molecular dynamics simulation and weighted filtering to eliminate physical false positives; Step 803, step-by-step iterative evolution: each iteration fully inherits all the optimization results of the previous iteration, specifically addresses the core technical bottlenecks exposed in the current iteration, and sets the iteration termination condition: when the forward hit rate improvement of two consecutive iterations is less than 5%, or the RMSE of the regression task validation set is less than 1.2, the iteration is terminated; finally, a high consistency match between the prediction results and the wet experimental measured data is achieved.

[0020] A failure mode-driven closed-loop intelligent antimicrobial peptide discovery system, comprising: The data acquisition and cleaning module is used to acquire and clean antimicrobial peptide and non-antimicrobial protein sequences, unify the activity label as a log-normalized index, and output a set of normalized sequences. The similarity-aware data segmentation module, connected to the data acquisition and cleaning module, is used to cluster and group data based on sequence feature similarity and to divide the dataset, thereby constructing a training set and a validation set without information leakage. The classification-regression joint prediction module is connected to the similarity-aware data segmentation module. It is used to extract sequence representations with a pre-trained protein language model as the backbone, and output the antimicrobial peptide discrimination probability and activity prediction value through dual task heads to train the baseline prediction model. A large-scale virtual library construction module is connected to the classification-regression joint prediction module. It is used to generate a virtual peptide library under preset physicochemical constraints. The library is then filtered sequentially by antimicrobial peptide discrimination, activity threshold filtering, drug-likeness filtering and diversity clustering to output a candidate set to be verified. An embedding space flow matching generation enhancement module, connected to the large-scale virtual library construction module, is used to build a flow matching model in the sequence embedding space, generate and screen high-potential sequences to expand the training set, and solve the distribution offset problem. The self-supervised contrastive learning and nearest neighbor calibration module is connected to the large-scale virtual library construction module. It is used to optimize the embedding space neighborhood structure, calibrate the activity prediction value based on the aggregation of nearest neighbor samples, and eliminate unstable candidates by combining bias verification to solve the problem of systematic overestimation. The sequence-structure multimodal modeling module for activity cliff perception is connected to the large-scale virtual library construction module to construct activity cliff supervision sample pairs. Through adaptive contrastive learning and cross-attention fusion of three-dimensional structural information, it captures nonlinear changes in activity caused by residue mutations. The physical consistency screening module is connected to the closed-loop iterative control module and the large-scale virtual library construction module, respectively. It is used to construct a peptide-membrane simulation system, calculate membrane binding stability, aggregation characteristics and oligomerization ability through molecular dynamics, and screen physically reasonable candidates based on weighted scoring to solve the false positive problem. The closed-loop iterative control module is connected to each of the above modules. It is used to receive wet test data, identify the dominant failure mode of the current wheel and activate the corresponding correction module in a targeted manner, iterate progressively until the prediction is consistent with the actual measurement, and output a high-confidence candidate list. Each module can be deployed on the same machine or distributed across multiple computing nodes.

[0021] Compared with existing technologies, the present invention has the following significant advantages: 1. It pioneered a failure mode-driven closed-loop optimization paradigm, breaking through the conversion bottleneck of static screening.

[0022] Unlike existing unidirectional static processes of "one-time training, one-time screening," this invention uses the dominant failure modes exposed in each round of prospective wet experiments (in order of distribution shift, absolute scale bias, activity cliff, and insufficient physical rationality) as the core driving signal for iteration. It constructs a closed-loop diagnostic scheme of "error diagnosis - targeted correction - performance verification," fundamentally addressing the Sim-to-Real gap. After four rounds of iterative optimization, the model's root mean square error (RMSE) on the independent test set decreased from 3.336 in BioPIR-v1 to 1.111 in BioPIR-v4, and the prospective candidate hit rate increased from 19.2% to 100.0%, substantially achieving a leap from "effective benchmark indicators" to "transformable to real-world scenarios."

[0023] 2. Construct a progressive multi-module collaborative optimization path to avoid ineffective technology stacking.

[0024] This invention does not simply superimpose heterogeneous models, but strictly follows the order in which failure modes are exposed, introducing corresponding correction modules and forming a clear collaborative logic: First, step 4 uses embedded spatial flow matching to enhance and resolve the distribution offset problem, restoring the monotonicity of candidate ranking; then, step 5 uses self-supervised contrastive learning and k-nearest neighbor calibration to resolve the absolute scale bias problem, eliminating systematic overestimation; then, step 6 uses active cliff sensing sequence-structure multimodal modeling to resolve the local nonlinear structure-property relationship modeling problem; finally, step 7 uses physical consistency screening to resolve the physical rationality problem. Each module has a clear problem target, and the optimization benefits of the previous module are fully retained in the next iteration, forming an irreversible, step-by-step performance improvement path. Simultaneously, this invention innovatively introduces an automatic termination mechanism based on performance thresholds (termination occurs when the hit rate improvement is <5% or RMSE <1.2 for two consecutive rounds), ensuring full exploitation of model performance while eliminating computational waste and overfitting risks caused by "infinite closed loops," meeting the practical requirements of industrial-grade deployment.

[0025] 3. The embedded spatial neighborhood calibration mechanism significantly improves the reliability of absolute prediction.

[0026] To address the shortcomings of existing methods that only output global regression results and lack local validation, leading to systematic overestimation, this invention introduces nearest-neighbor consensus as a calibration basis based on the sequence embedding space constructed by a pre-trained protein language model. The log2(GM_MIC) output by the cascade regressor in step 2 is used as the global predicted value, while the calibration value obtained from the k-nearest neighbor weighted aggregation in step 5 is used as the local validation value. An unstable candidate is filtered through a consensus gating mechanism where the absolute difference between the two values ​​is ≤ 2 log2(GM_MIC) units. This mechanism reduces the systematic overestimation bias from 2 to 3 log2(GM_MIC) units to a negligible level. BioPIR-v3's RMSE decreases from 2.026 to 1.355, and the prospective hit rate increases from 40.7% to 76.6%, significantly improving candidate ranking stability and the reliability of absolute activity prediction.

[0027] 4. Active cliff perception multimodal modeling accurately captures nonlinear structure-property relationships.

[0028] To address the shortcomings of existing regression models that tend to fit global smooth trends and fail to identify the "activity cliff" where "a small number of residue mutations cause orders of magnitude changes in activity," this invention, on the one hand, explicitly constructs homologous activity cliff supervision pairs (in the same reported sequence, those with an activity difference >3 are defined as cliff positive samples, and those with an activity difference <1 are defined as non-negative samples), and enhances the model's sensitivity to local differences through contrast quantity learning with adaptive intervals; on the other hand, it introduces a single-layer eight-head cross-attention structure, fusing the three-dimensional structural information predicted by ESMFold with one-dimensional sequence semantic information, to achieve accurate modeling of the chemical microenvironment and conformational changes of key residues, overcoming the problem of residual error concentrated in local nonlinear regions, and further reducing the residual prediction bias compared to BioPIR-v3.

[0029] 5. A dual-constraint false positive prevention mechanism is established before physical consistency screening.

[0030] This invention breaks away from the conventional approach of using molecular dynamics simulations merely as a "post-hoc activity verification and mechanism of action explanation tool" in existing research. It moves the coarse-grained molecular dynamics physical screening in step 7 to the last step before candidate output: using a physical consistency score ≥80 as a hard entry threshold, together with the activity prediction of the statistical model and the nearest neighbor calibration results, it forms a dual constraint mechanism of "statistical prediction + biophysical verification". This effectively eliminates false positive sequences with high statistical scores but insufficient membrane binding stability and unreasonable aggregation characteristics, and significantly reduces the trial and error cost of subsequent wet experiments.

[0031] 6. The forward-looking verification results are excellent, effectively bridging the simulation-reality gap.

[0032] On an independent prospective validation dataset of 450 synthesized peptides, the overall hit rate of the five existing mainstream antimicrobial peptide prediction models (APEX, SMEP, AMP-Cliff (ESM2), AMP-Cliff (ProGen2), and XGBoost-ESM2) was only 42.0% to 45.1%, with significant fluctuations in performance across different iterations. The predicted values ​​deviated widely from the measured values, indicating insufficient calibration capabilities. In contrast, the BioPIR-v4 model of this invention achieved a 100.0% candidate hit rate, with predicted values ​​nearly linearly consistent with measured values, effectively bridging the Sim-to-Real gap and validating the applicability of the solution in real-world scenarios.

[0033] 7. It has strong versatility and transferability, and is suitable for biomolecular design in multiple scenarios.

[0034] Each functional module of this invention supports deployment on the same machine or in a distributed computing cluster. Core algorithms such as stream matching generation, comparative learning, and multimodal fusion can be decoupled and reused. The core logic is not limited to the antimicrobial peptide discovery scenario, but can be transferred to all biomolecular design tasks with sequence-property mapping, distribution shift, and local nonlinear structure-activity relationship problems, including but not limited to the screening and optimization of functional peptides, enzyme engineering candidates, nucleic acid aptamers, and peptide vaccines, and has broad industrial application value. Attached Figure Description

[0035] Figure 1 This is a schematic diagram illustrating the evolution of the BioPIR platform, designed to systematically bridge the Sim-to-Real gap. Figure 2 This is a schematic diagram of the failure mode-driven BioPIR evolution framework. Figure 3 This is a comparison chart of candidate peptide characteristics and forward generalization ability; Figure 4 This is a flowchart of the present invention. Detailed Implementation

[0036] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0037] This invention proposes a failure mode-driven closed-loop learning platform that continuously iterates through a process of "candidate generation - model prediction - multi-level screening - error diagnosis - targeted correction - re-screening". It identifies the dominant error sources in the current deployment stage in each round and introduces targeted correction modules to make the prediction results gradually approach the real application scenario.

[0038] This invention provides a failure mode-driven closed-loop intelligent antimicrobial peptide discovery system. The system includes a data acquisition and cleaning module, a similarity-aware data segmentation module, a classification-regression joint prediction module, a large-scale virtual library construction module, an embedded spatial flow matching generation enhancement module, a self-supervised contrastive learning and nearest neighbor calibration module, an activity cliff-aware sequence-structure multimodal modeling module, a physical consistency screening module, and a closed-loop iterative control module. Each module can be deployed on the same server or distributed across multiple computing nodes, achieving data interaction and task collaboration through a high-speed communication network. The specific functions and limitations of each module are as follows: 1. Data acquisition and cleaning module.

[0039] This module is used to construct a standardized initial dataset without information leakage. It is configured to acquire data from publicly available antimicrobial peptide and natural protein databases, specifically performing the following operations: obtaining positive sample sequences from the antimicrobial peptide database, filtering and retaining linear peptides of 8 to 40 amino acids in length and free from post-translational modifications; extracting negative samples from the natural protein database for classification tasks, and supplementing with low-activity sequences to cover the full activity range for regression tasks; standardizing and cleaning the sequences, removing sequences containing non-standard residues; uniformly converting activity tags to the standardized index log2 (GM_MIC), and mapping and converting interval values, repeated measurements, and different units; finally, defining the thresholds for determining active peptides, highly active peptides, and therapeutic windows. The module outputs a set of cleaned and standardized labeled sequences.

[0040] 2. Similarity-aware data segmentation module.

[0041] This module addresses the issue of inflated evaluation metrics caused by conventional random partitioning. Its configuration employs a grouping strategy to prevent information leakage from near-repeating sequences: first, sequences are bucketed by length; similarity between sequences is calculated based on 3-mer Jaccard similarity; and greedy threshold clustering groups sequences with similarity of at least 0.7 into the same similarity group. Then, these groups are randomly assigned to the training and validation sets in an 80:20 ratio, ensuring that no two sequences are split. All randomization processes are controlled by a fixed seed of 42. The module outputs training and validation sets with no information leakage.

[0042] 3. Classification-Regression Joint Prediction Module.

[0043] This module serves as the baseline prediction engine for the first iteration. Its configuration uses a pre-trained protein language model, ESM2-650M, as a shared backbone network. Sequences are segmented and padded or truncated to a maximum length of 40 tokens, with the last hidden state of the initial token used as the global representation. A two-layer multilayer perceptron task head is then connected to the backbone network, with a hidden layer width of 640, employing ReLU activation, 0.1 random deactivation, and layer normalization. The classification branch outputs the probability of antimicrobial peptides, trained using binary cross-entropy loss, while the regression branch outputs the log2(GM_MIC) predicted value, trained using mean squared error loss. Training utilizes the AdamW optimizer with a learning rate of 2×10⁻⁶. -5 With a weight decay of 0.01 and a batch size of 32, combined with cosine learning rate scheduling and a 1-epoch warm-up, the module is trained for a total of 10 epochs and an early stopping strategy is implemented. The output of this module is the probability and activity prediction value of the antimicrobial peptide of the candidate sequence.

[0044] 4. Large-scale virtual library construction module.

[0045] This module generates a candidate sequence space for screening. It is configured to generate a virtual peptide sequence library under preset physicochemical constraints, including a length of 8 to 15 amino acids, specific hydrophobicity, hydrophobic moments, and the number of hydrophilic residues. The generated sequence library undergoes two-stage filtering: the first stage uses the classification branch of the aforementioned classification-regression joint prediction module to retain sequences with a probability greater than 50%; the second stage uses the regression branch to screen sequences based on thresholds set according to iteration rounds. BioPIR-v1 uses a strict threshold of less than 3 predicted values, while BioPIR-v2 to v4 use a more lenient threshold of less than 6 predicted values. Subsequently, candidate sequences are filtered for solubility, toxicity, hemolysis risk, and similarity to known peptides. After stratification by sequence length, hierarchical agglomerative clustering based on Wardlinkage is performed, using simplified amino acid alphabet encoding. Each length group has a target cluster size of 64, and the top-1 candidate with the best prediction score is selected from the top 20 clusters. The module outputs the set of candidate peptides to be optimized for each iteration.

[0046] 5. Embedded spatial flow matching generation enhancement module.

[0047] This module addresses distribution offset failure modes. Its configuration involves generative modeling within the embedding space: a small-parameter ESM-2-8M model maps known antimicrobial peptides to a continuous embedding space of dimension 256. A time-varying Gaussian trajectory probability path from noisy embeddings to true embeddings is defined. A vector field model consisting of four Transformer encoder layers is trained, with eight attention heads and a 0.1 random deactivation factor, approximating an unconditionally denoised vector field under conditional flow matching loss. During inference, candidate embeddings are sampled by numerical integration of the learned vector field using an ordinary differential equation solver, with a step size of 0.02 and 50 steps. New peptide sequences are then decoded using the ESM language model head. The decoding stage employs a sampling strategy with a temperature of 1.2 and a Top-p of 0.95 to enhance generation diversity. The generated sequences are pseudo-labeled using the previous regressor, retaining high-potential sequences with predicted log2(GM_MIC) less than 6 and incorporating them into the training set to expand the coverage of the effective training distribution. The module outputs the amplified training dataset.

[0048] 6. Self-supervised contrastive learning and nearest neighbor calibration module.

[0049] This module addresses systematic overestimation failure modes. Its configuration involves first training a contrastive learning model using the InfoNCE objective function on top of the ESM2-650M embedding representation, with a temperature parameter set to 0.05. A linear multilayer perceptron contrastive head with 256 hidden dimensions is then connected after the backbone network, and the model is trained for 5 epochs to optimize the local neighborhood structure of the embedding space. During the inference phase, the 100 nearest neighbor samples of the query sequence are retrieved based on this embedding space, and the nearest neighbor labels are aggregated using a similarity-weighted average to obtain a calibrated predicted value. A consistency-gated filtering mechanism is introduced: if the absolute difference between the original predicted value of the regressor and the nearest neighbor calibrated estimate exceeds 2 log2GM_MIC units, the candidate is deemed unstable and discarded. The module outputs the calibrated activity prediction value and a high-confidence candidate set.

[0050] 7. Sequence-structure multimodal modeling module for active cliff sensing.

[0051] This module addresses the failure modes of the activity cliff. Its configuration first groups sequences by literature source, calculates the activity difference between sequence pairs within each group, defines a difference greater than 3 as a positive sample of the large-difference activity cliff, and a difference less than 1 as a negative sample of the small-difference activity cliff. A contrast-based learning objective with adaptive margin is used to enhance the model's recognition ability. The initial margin is set to 1.0, the weight of difficult negative samples is set to 2.0, and the margin update factor is set to 0.02, trained for 10 epochs. Simultaneously, 3D structural information predicted by ESMFold is introduced. The one-hot encoded features of six elements—carbon, hydrogen, oxygen, nitrogen, sulfur, and selenium—are concatenated with 3D coordinates to form 9-dimensional structural feature units. After projecting onto a 1280-dimensional space, fusion is achieved through a single-layer eight-head cross-attention encoder. The cross-attention module includes layer normalization, a position-wise feedforward network with a hidden layer dimension of 1280, residual connections, and random deactivation with a ratio of 0.1. The module outputs an enhanced prediction value that captures local nonlinear structure-activity relationships.

[0052] 8. Physical consistency screening module.

[0053] This module addresses physical plausibility failure modes. Its configuration involves coarse-grained molecular dynamics simulations of candidate peptides: generating a three-dimensional structure using I-TASSER and Rosetta fold-and-dock, arranging 16 copies in a 4×4 array parallel to the membrane surface and 45 Å from the membrane center; and converting the structure to MARTINI using martinize.py. 2.2 Coarse-grained representation: Combining DSSP secondary structure constraints, the membrane system was modeled as a bilayer membrane composed of POPE and POPG in a 3:1 ratio, placed in a 10 nm × 10 nm × 12 nm periodic cell, with 0.1536 mol / L sodium chloride added to simulate physiological ionic strength. After 5000 steps of energy minimization, the system underwent a 200 nm production simulation in the NPT ensemble under conditions of 310 Kelvin and 1 bar, with the trajectory saved every 100 picoseconds. Three core metrics were defined using trajectory analysis tools: membrane binding robustness score (counting the copy number of the smallest peptide-membrane distance less than 5 Å in over 90% of trajectory frames, with a total score ranging from 0 to 16); peptide aggregation tendency mean (time average of the number of connected clusters per frame); and maximum oligocluster size mean (time average of the largest cluster size per frame). The original scores were linearly normalized to the 0-100 range, retaining only candidates with a normalized score not lower than 80. The output of this module is the final candidate set after biophysical validation.

[0054] 9. Closed-loop iterative control module.

[0055] This module is the core driving logic of the system. Its configuration includes receiving wet experimental in vitro MIC test data for each round of candidate peptides, calculating the error between predicted and measured values, and decomposing the dominant failure modes. Based on the diagnostic results, it automatically selects the corresponding correction module combination for the next round of training and screening. For distribution offset, it activates the embedded spatial flow matching generation enhancement module; for systematic overestimation, it activates the self-supervised contrastive learning and nearest neighbor calibration module; and for the activity cliff, it activates the sequence-structure multimodal modeling module and the physical consistency screening module. Each iteration fully inherits all the optimization results of the previous round, gradually building a progressive optimization path that calculates simulation-reality bias, corrects distribution offset ranking capabilities, calibrates absolute scale bias, and models nonlinear activity cliff effects, ultimately achieving a high consistency match between the calculated prediction results and the wet experimental measured data.

[0056] Figure 4 This is a flowchart of the present invention, as shown below. Figure 4 As shown, a failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides includes the following steps; Step 1: Data acquisition and standardization.

[0057] This step forms the data foundation for the entire closed-loop antimicrobial peptide screening scheme. The input consists of two types of publicly available authoritative databases: the DBAASP database, which specifically includes validated antimicrobial peptide sequences, and the UniProt database, which includes natural protein sequences. The output consists of a uniformly labeled training set and a validation set aligned with real-world application scenarios, providing compliant and reproducible basic data for the subsequent training of classification and regression models.

[0058] This solution involves two core prediction tasks, requiring the construction of tailored training data: 1. A binary classification task, aiming to determine whether an input peptide sequence belongs to a peptide with antibacterial activity, outputting an antibacterial peptide probability value; 2. A continuous value prediction regression task, aiming to quantitatively predict the specific activity level of antibacterial peptides, outputting a standardized activity value for subsequent candidate ranking. The training data requirements for the two tasks differ, therefore the negative sample construction logic differs. The specific implementation steps are as follows: Step 101, Positive Sample Collection and Initial Screening: Extract all wet-lab validated antimicrobial peptide sequences from the publicly available antimicrobial peptide database (DBAASP) and perform a two-stage filtering process: 1. Length filtering: Only peptides with 8 to 40 amino acid residues are retained, and sequences that are too short (no stable antibacterial conformation) or too long (poor drugability and high synthesis cost) are removed.

[0059] 2. Modification filtering: Remove all sequences with N-terminal or C-terminal modifications or intra-chain covalent bonds, and retain only linear, unmodified natural antimicrobial peptides to ensure the consistency of the initial dataset.

[0060] After the above filtering, a total of 8,436 positive sample sequences with broad-spectrum antibacterial activity were obtained, covering the activity data of multiple targets such as Gram-positive bacteria and Gram-negative bacteria.

[0061] Step 102, Negative Sample Fit Construction: Based on the type of downstream task, construct a targeted negative sample set: 1. For classification tasks: From the natural non-antimicrobial protein sequences collected in the UniProt database, protein fragments of length 8 to 40 were randomly selected, totaling 30,000 fragments as negative samples. These fragments do not naturally possess antimicrobial activity and can form a clear class boundary with the positive samples, helping the classifier learn the sequence characteristics of antimicrobial peptides.

[0062] 2. For regression tasks: In addition to the above positive sample set, 2000 validated low-activity peptides (i.e. sequences with a measured MIC greater than 128 μg / mL) are added to cover the full range of activity distribution from low to high activity, thereby improving the predictive stability of the regression model in the low-activity range and avoiding the model only performing well in the high-activity range.

[0063] Step 103, Sequence Compliance Cleaning: A uniform cleaning rule is applied to all positive and negative sample sequences to eliminate interference from abnormal characters: 1. Standardized format: All sequences are converted to uppercase letters to conform to the standard amino acid sequence representation specifications.

[0064] 2. Illegal residue removal: Only the coding characters corresponding to the 20 standard amino acids are retained, and sequences containing non-standard residues such as B, J, O, U, X or Z are removed to avoid interference from unknown residues in the model coding process.

[0065] Step 104, Standardization of Active Labels: The core activity evaluation metric in this protocol is the minimum inhibitory concentration (MIC), which refers to the lowest drug concentration capable of inhibiting visible microbial growth and is the gold standard for evaluating antimicrobial peptide activity. Since MIC determination is typically performed on multiple standard strains, this protocol uses the geometric mean of MICs from multiple strains as the final activity label, namely the geometric mean of minimum inhibitory concentration (GM_MIC). This metric comprehensively reflects the broad-spectrum antimicrobial activity of the peptide against multiple strains.

[0066] To eliminate dimensional differences and adapt to model training requirements, GM_MIC is standardized as follows: 1. Experimental activity labels are uniformly converted into standardized activity indicators: y=log2(GM_MIC) is preferentially used as the training objective for the regression task, where GM_MIC is the geometric mean minimum inhibitory concentration (MIC), representing the geometric mean of the minimum inhibitory concentrations (MICs) of a single peptide on a predefined strain panel. Since the values ​​of MICs typically exhibit a 2x gradient distribution, logarithmic transformation makes the data closer to a normal distribution, improving model convergence efficiency and prediction accuracy.

[0067] 2. Anomaly label mapping: For the minimum inhibitory concentration (MIC) measured in the original experiment that only gives the range (e.g., ≤a, ≥b, or a~b), it is uniformly mapped to the preset boundary value to avoid the interference of range labels on model training.

[0068] 3. Unit standardization: For minimum inhibitory concentration (MIC) measurements reported using different units in different studies, all measurements are converted to μM (micromolar) for a unified dimension.

[0069] 4. Repetitive value processing: When there are different independent experimental replicate values ​​for the same peptide on the same strain, first take the geometric mean of all replicate values, and then perform logarithmic transformation to reduce label noise caused by experimental error.

[0070] To clarify the criteria for subsequent screening, this protocol defines the activity level as follows: Active peptides: Peptides with GM_MIC ≤ 128 μg / mL, i.e. sequences that can inhibit bacterial growth at clinically accessible concentrations; Highly active hit peptides: peptides with GM_MIC ≤ 16 μg / mL, i.e. sequences with excellent antibacterial potential; Peptides within the therapeutic window: sequences that simultaneously satisfy the conditions of hemolysis rate ≤50% at a concentration of 128 μg / mL and GM_MIC ≤16 μg / mL, i.e., possessing both high antibacterial activity and low hemolytic toxicity, are potential candidates for development.

[0071] The prospective hit rate is defined as the percentage of candidate peptides with |predicted log2(GM_MIC) - measured log2(GM_MIC)| ≤ 1.5 out of the total number of peptides tested.

[0072] Step 105: Leakage-free similarity grouping.

[0073] Conventional methods of randomly partitioning training and validation sets can result in highly similar, nearly identical sequences being placed in both sets simultaneously. This leads to artificially inflated performance metrics on the validation set, failing to accurately reflect the model's actual performance after deployment. To address this issue, this step employs a similarity-aware grouping strategy to prevent information leakage at its source. 1. Length binning: First, the sequence is binned according to the amino acid length. Sequence similarity is calculated only within the same length interval, reducing computational complexity. 2. Similarity calculation: The similarity between pairs of sequences within the same bucket is calculated based on the 3-mer Jaccard similarity (which measures the similarity between two sequences by comparing the intersection and union ratio of all consecutive amino acid fragments of length 3 in the aligned sequence).

[0074] 3. Greedy clustering: A greedy threshold clustering algorithm is used to group sequences with a similarity of ≥0.7 into the same similarity group, ensuring that sequences within the group have a high degree of evolutionary or functional correlation.

[0075] 4. Set partitioning: Similarity groups are randomly assigned to the training set or validation set in an 80:20 ratio to strictly ensure that the same similarity group will not be split into different sets. All random allocation processes are controlled by a fixed seed of 42 to ensure the reproducibility of the partitioning results.

[0076] After the above processing, we finally obtained a training set and a validation set with no information leakage. The sequence similarity between the two sets of data is low enough, and the evaluation metrics on the validation set can truly reflect the performance of the model in subsequent real-world screening scenarios.

[0077] Step 2, Construction of the baseline classification-regression cascade prediction model.

[0078] This step builds upon the standardized, information-leak-free training and validation sets output from Step 1. The core objective is to construct the baseline prediction tool BioPIR-v1 for the first iteration. It employs a two-tiered architecture: first identifying the properties of antimicrobial peptides, then quantitatively predicting their antimicrobial activity. This approach balances the accuracy of antimicrobial peptide (AMP) identification with the reliability of activity prediction, addressing the problems of existing single-task models that either can only distinguish between AMP and non-AMP sequences or suffer from large prediction biases due to interference from numerous non-AMP sequences when directly regressing activity. The baseline model output from this step will serve as the core prediction engine for the first round of large-scale virtual screening, providing a quantifiable initial performance benchmark for subsequent iterations.

[0079] Step 201: Share backbone network configuration.

[0080] The 650M parameter version of the pre-trained evolutionary scale modeling protein language model (ESM2) was selected as the shared sequence encoder. This model has been self-supervised pre-trained on a large number of natural protein sequences and can capture the semantic features, evolutionary conservation and structural implicit information of amino acid sequences, which is suitable for the sequence representation requirements of AMP.

[0081] The processing flow for the input sequence is as follows: First, the amino acid sequence is tokenized according to the dedicated vocabulary of the Evolutionary Scale Modeling Protein Language Model (ESM2), mapping each standard amino acid to a corresponding semantic unit; Subsequently, the segmented sequences are padded or truncated to a maximum length of 40 tokens (including the start and end special tokens), adapting to the AMP length range of 8 to 40 amino acids set in step 1. Finally, the last hidden state of the starting special token is taken as the global pooled representation of the entire sequence. This representation incorporates the context information of the entire sequence and can be directly input into the downstream task header.

[0082] Step 202, Dual-task-head design.

[0083] To balance the needs of AMP discrimination and quantitative activity prediction, two independent task heads are connected after the output layer of the shared backbone network. A multilayer perceptron (MLP) structure is used to achieve task-differentiated learning, while reusing the common sequence features extracted from the shared backbone to avoid parameter redundancy. The unified configuration of the two task heads is: a two-layer MLP structure with a hidden layer width of 640, using a rectified linear unit (ReLU) activation function, and setting a dropout regularization and layer normalization (LayerNorm) ratio of 0.1 to suppress the risk of overfitting. The specific design of the two branches is as follows: 1. Classifier branch: Connects to the AMP binary classification task, outputs the probability value of the current sequence belonging to AMP, with a default threshold of 0.5. Sequences with a probability greater than 0.5 are judged as candidate AMP sequences. During the training phase, the binary cross-entropy loss function is used to optimize the model parameters and enhance the model's ability to distinguish AMP sequence features.

[0084] 2. Regressor branch: Connects to the quantitative activity prediction task, outputs a single log2(GM_MIC) activity scalar, which is fully aligned with the standardized label system in step 1; during the training phase, the mean squared error (MSE) loss function is used to optimize the model parameters and improve the consistency between the activity prediction value and the true value.

[0085] Step 203, Configure training parameters.

[0086] To ensure stable model convergence and achieve optimal generalization performance, the following training strategy is adopted, with all parameters remaining consistent with the baseline of subsequent iterations to ensure performance comparability: 1. The optimizer used is AdamW (Adam optimizer with weight decay), and the initial learning rate is set to 2×10. -5 The weight decay coefficient was set to 0.01 to suppress model overfitting.

[0087] 2. Set the batch size to 32 to balance training efficiency and gradient estimation stability.

[0088] 3. The learning rate is scheduled using a cosine annealing strategy, combined with a 1-epoch warm-up mechanism. The learning rate is gradually increased in the early stage of training to avoid model oscillation caused by an excessively high initial learning rate.

[0089] 4. The total number of training epochs is set to 10, and an early stopping strategy is adopted: for classification tasks, the area under the receiver operating characteristic curve (AUROC) of the validation set is used as the monitoring indicator, and for regression tasks, the root mean square error (RMSE) of the validation set is used as the monitoring indicator. The tolerance number is set to 2, that is, if the validation indicator does not improve for 2 consecutive epochs, the training is terminated immediately to avoid invalid iterations and overfitting.

[0090] 5. Gradient clipping with a maximum norm of 1.0 is applied during training to prevent training instability caused by gradient explosion.

[0091] Step 204, Baseline performance verification.

[0092] Performance validation was conducted on the independent, reserved test set (defined in step 1) that did not participate in any training or hyperparameter tuning process to ensure the objectivity of the evaluation results. The validation results show: 1. Classification task performance: The F1 score reached 0.904 and the AUROC reached 0.987, indicating that the model can accurately distinguish between AMP and non-AMP sequences and effectively filter out non-AMP noise sequences in the virtual library.

[0093] 2. Regression task performance: Coefficient of Determination (R²) 2 The correlation coefficient (CQC) reached 0.745, indicating that the model's predicted values ​​for AMP activity are highly correlated with the actual values, and can provide a reliable basis for activity ranking in subsequent candidate screening.

[0094] The baseline model has achieved state-of-the-art performance on the public benchmark set and can be used as the core prediction tool in the first round of iterations in large-scale virtual screening processes.

[0095] Step 3: Construction and initial screening of a large-scale virtual sequence library, and establishment of the BioPIR-v1 model.

[0096] This step follows the baseline classification-regression cascade prediction model (BioPIR-v1) trained in step 2. The core objective is to transform the model's capabilities into practical candidate discovery capabilities. Through a four-stage process of "virtual library construction - cascade filtering - druggability optimization - diversity control", it efficiently screens a set of candidate peptides with high activity potential, excellent druggability, and structural diversity from a chemical space of hundreds of millions.

[0097] This step addresses the problems of low throughput, high false positive rate, and severe homogenization of candidate structures in existing virtual screening technologies. It provides a high-quality subset of candidates to be verified for each iteration and serves as a key bridge connecting computational prediction and wet experimental verification.

[0098] Step 301: A large-scale virtual peptide sequence library conforming to physicochemical constraints is generated.

[0099] To avoid the explosive growth of meaningless random sequences, this step does not involve unlimited enumeration across the entire sequence space, but rather constructs a constrained virtual library within predefined physical and chemical boundaries. Specific constraints include: 1. Length constraint: The peptide chain length is limited to 8 to 15 amino acids. This range covers the functional length of most natural active antimicrobial peptides, while taking into account the feasibility and economy of chemical synthesis.

[0100] 2. Physical and chemical property constraints: Hydrophobicity: Controls the overall hydrophobicity distribution of the sequence to ensure that the peptide has the driving force to interact with the bacterial cell membrane; Hydrophobic moment: Calculate and constrain the hydrophobic moment values ​​of sequences to screen sequences with potential amphiphilic α-helical or β-sheet structures, which are typical features of membrane-active antimicrobial peptides; Number of hydrophilic residues: Defines the minimum number of charged or polar hydrophilic residues to maintain the solubility of the peptide in the aqueous phase and to help target the negatively charged bacterial membrane.

[0101] By applying the above constraints, a large-scale virtual peptide library containing tens of millions to hundreds of millions of sequences was constructed, serving as the basic data source for subsequent screening.

[0102] Step 302, two-stage cascaded screening.

[0103] Using the baseline classification-regression cascade prediction model output in step 2, the virtual library is filtered efficiently layer by layer, prioritizing the removal of obviously unqualified sequences and reducing computational overhead.

[0104] Phase 1: Identification of antimicrobial peptide properties (coarse screening).

[0105] The sequences from the virtual library are batch-input into the classifier branch of the baseline model, and the probability value of each sequence belonging to an antimicrobial peptide is output. Only sequences with a predicted probability greater than 50% are retained, and most natural protein fragments or random sequences that do not have antimicrobial potential are removed, reducing the candidate size to the millions.

[0106] Phase 2: Quantitative prediction of activity (fine screening).

[0107] The sequences selected in the first stage are input into the regressor branch of the baseline model, and the corresponding standardized activity prediction value log2(GM_MIC) is output. The threshold is dynamically adjusted by the regression branch according to the iteration round. In the first round (v1), a strict threshold log2(GM_MIC) < 3 is used, and in subsequent rounds it is relaxed to < 6 to expand the candidate pool to cover the distribution shift scenario.

[0108] BioPIR-v1 strategy: Employs a strict threshold, retaining only sequences with predicted values ​​< 3. This threshold corresponds to extremely high predicted activity, aiming to quickly identify the most likely high-potential candidates for success in the first round of validation. However, due to the risk of distribution shift, the hit rate at this stage is low (19.2%).

[0109] BioPIR-v2 to v4 strategy: Given that the strict threshold in v1 resulted in an excessively small candidate pool and was affected by distribution shifts, subsequent iterations adopted a more lenient threshold, retaining sequences with predicted values ​​< 6. This significantly expanded the coverage of the candidate pool, incorporating more potential candidates with moderate activity, and providing richer optimized samples for the subsequently introduced generation enhancement and calibration modules.

[0110] Step 303, multi-dimensional drug-likeness filtration.

[0111] To avoid the model focusing solely on activity while neglecting safety and drug-likeness, a strict rule-based filtering process was implemented on candidate sequences that passed the activity screening, eliminating sequences with potential toxicity or physicochemical defects: 1. Solubility filtration: Sequences with poor predicted water solubility are eliminated to ensure that candidate peptides can remain dispersed under physiological conditions. As a preferred method, water solubility is judged using empirical rules based on amino acid composition. Three conditions must be met simultaneously for a sequence to be considered qualified; otherwise, it is eliminated: First, the proportion of net charged residues (arginine and lysine are positively charged, aspartic acid and glutamic acid are negatively charged) in the sequence is not less than 15% of the total residues to avoid hydrophobic aggregation; second, the average hydrophilicity of the sliding window is calculated using the Hopp-Woods hydrophilicity scale, and there are no strongly hydrophobic windows with more than 5 consecutive residues in the entire sequence; third, the absolute value of the net charge of the sequence is not less than +1, which meets the physicochemical requirements for the binding of antimicrobial peptides to negatively charged bacterial membranes. 2. Toxicity and Hemolysis Risk Control: Based on the built-in toxicology prediction rules, sequences containing known toxic motifs or with excessively high predicted hemolysis risk are eliminated to ensure the safety of candidate peptides within the therapeutic window. As a preferred approach, the built-in toxicology prediction rules include two checks, and sequences are eliminated if either is not met: First, known toxic motif matching. A pre-loaded library of publicly available toxic peptide motifs (covering verified toxic motifs such as cytotoxicity, nephrotoxicity, and neurotoxicity) is used. If a candidate sequence contains three or more consecutive residues that perfectly match the motifs in the library, it is considered high-risk. Second, hemolysis risk estimation is performed using an empirical scoring formula: Hemolysis risk score = (net positive charge × average hydrophobicity) / sequence length. The scoring threshold is set to no higher than 1.2. This threshold is calibrated using BioPIR-v1 wet experimental data. Sequences that meet this threshold have a hemolysis rate of no more than 50% at a concentration of 128 μg / mL, which meets the safety requirements for the therapeutic window defined in step 104. 3. Known Peptide Similarity Filtering: Calculate the sequence similarity between candidate sequences and existing patented or marketed peptide drugs, and eliminate sequences highly similar to known sequences to ensure the novelty of candidates and avoid intellectual property risks. As a preferred method, load publicly available antimicrobial peptide databases such as DBAASP and APD3, as well as a database of marketed peptide drugs (covering clinical peptides such as polymyxin, insulin, and oxytocin). A two-step verification is used to avoid sequence similarity: First, global sequence identity verification, using the Needleman-Wunsch global alignment algorithm to calculate the identity between candidate sequences and sequences in the database; sequences with an identity greater than 80% are eliminated. Second, local motif verification, using the 3-mer Jaccard similarity (i.e., the intersection-to-union ratio of all consecutive amino acid fragments of length 3 in the aligned sequence), which is completely consistent with the calculation method in step 105; sequences with a similarity greater than 0.85 with sequences in the database are eliminated.

[0112] Step 304, diversity control based on hierarchical agglomerative clustering.

[0113] To avoid structural clustering of the final synthesized candidate peptides (i.e., all candidates originating from only a few families), this step introduces a diversity control mechanism based on chemical characteristics to ensure that the final validation set covers as much sequence chemistry space as possible: 1. Sequence Encoding: The sequence is encoded using a simplified amino acid alphabet that combines residues with similar chemical properties (e.g., grouping hydrophobic amino acids together) and focuses on overall physicochemical characteristics rather than precise sequence differences. 2. Hierarchical clustering: First, the sequences are grouped according to their length. Within each length group, a hierarchical agglomerative clustering algorithm based on Ward's minimum variance method is used to calculate the chemical distance between the sequences and perform bottom-up aggregation. 3. Intra-cluster optimization: Set the target number of clusters for each length group to 64. From the clusters formed by clustering, sort the clusters according to the average predicted activity and select only the top 20 clusters (i.e. the clusters with the most activity potential). 4. Final candidate determination: From the 20 clusters selected above, the top-ranked sequence with the best predicted activity score is selected from each cluster, thus forming a candidate set containing dozens to hundreds of sequences to be verified.

[0114] Step 4: Flow Matching Enhancement for Embedded Space Generation (Addressing Distribution Shift Failure Mode) to Build the BioPIR-v2 Model. This step builds upon the candidate set to be validated output from Step 3 and the baseline regressor constructed in Step 2. The core objective is to diagnose and resolve the distribution shift problem exposed by BioPIR-v1 in prospective validation. This problem manifests as the model performing well on the training and test sets, but its prediction trend collapses when faced with newly generated candidate sequences. To address this, this step introduces a generative modeling strategy based on flow matching. By interpolating and sampling in the continuous embedding space, the distribution boundary of the training data is expanded, enabling the model to cover the chemical space in real-world screening scenarios. The output of this step is an augmented, high-quality training dataset used to retrain the baseline model and restore its predictive reliability under distribution shift.

[0115] Step 401, embedding spatial generation model.

[0116] To avoid uncontrollable random mutations directly in a high-dimensional discrete sequence space, this step constructs a generative model in a continuous vector embedding space, as detailed below: 1. Lightweight Encoder Selection: The ESM-2-8M model with fewer parameters was selected as the dedicated embedding encoder, mapping the known antimicrobial peptide sequences to a continuous vector space of dimension 256. Compared to the 650M large model used in step 2, the 8M model significantly reduces the density of the embedding space and computational complexity while preserving the semantic features of the sequence, making it more suitable for generation tasks.

[0117] 2. Flow Matching Path Definition: Defines a time-varying Gaussian probability path from the standard Gaussian noise distribution to the true antimicrobial peptide data distribution. This path describes how the noise vector evolves over time into a biologically meaningful peptide sequence embedding.

[0118] 3. Vector Field Model Training: A neural network consisting of four Transformer encoder layers is constructed to fit the vector field corresponding to the probability path. All four Transformer encoder layers use a uniform configuration: a hidden dimension of 256, consistent with the embedding space dimension; eight parallel multi-head attention heads, each with a dimension of 32; each Transformer block is followed by a position-wise feedforward network, with intermediate layers having a dimension of 1024, four times the hidden dimension, consistent with the conventional configuration of pre-trained protein language models; each sub-layer uses a Pre-LayerNorm normalization strategy, with the normalization epsilon parameter set to 1e-5, and is equipped with residual connections and random deactivation regularization with a ratio of 0.1. During training, the model uses the conditional flow matching loss function as the optimization objective, with the loss calculated as the mean squared error between the predicted and true vector fields. The optimizer is Adam, and the learning rate is set to 2×10⁻⁶. -5 The weight decay was 0.01, the batch size was 128, and a total of 500 epochs were trained to finally obtain a vector field model that can accurately approximate the real denoising dynamics.

[0119] Step 402, candidate sequence generation and decoding.

[0120] Using the trained vector field model, inverse sampling is performed through an Ordinary Differential Equation (ODE) solver to generate novel candidate peptide embeddings: 1. Backsampling: Noise vectors are randomly sampled from a standard normal distribution. The learned vector field is then numerically integrated using an ordinary differential equation (ODE) solver. An integration step size of 0.02 is set, and 50 iterations are performed to progressively transform the noise vectors into high-potential antimicrobial peptide embedding vectors.

[0121] 2. Embedding Decoding: Input the generated embedding vector into the ESM language model head and decode it back into the specific amino acid sequence.

[0122] 3. Diversity Control: A sampling strategy with a temperature coefficient of 1.2 and a top-p kernel sampling (TOP-p) of 0.95 is adopted during the decoding stage. This configuration effectively improves the diversity of generated sequences while ensuring the biological validity of the sequences, avoiding the generation results being limited to known sequences in the training set, thereby exploring a wider range of unknown chemical spaces.

[0123] Step 403, pseudo-labeling and data augmentation.

[0124] To verify the activity potential of the generated sequences and transform them into effective training data, a large-scale pseudo-label screening was performed using the BioPIR-v1 baseline regressor: 1. Large-scale pseudo-labeling: A total of 3,728,896 candidate sequences were generated. The activity prediction (log2(GM_MIC)) of each sequence was performed using the baseline regressor from step 2.

[0125] 2. High-potential screening: Sequences with predicted values ​​log2(GM_MIC) < 6 were retained, resulting in 326,270 candidate peptides with high activity potential. This threshold setting is consistent with the screening strategy of BioPIR-v2 and subsequent versions, aiming to cover a broader range of medium-to-high activity regions.

[0126] 3. Dataset Expansion and Retraining: The high-potential sequences selected above are merged into the original training set to form a new, expanded training set. This dataset is then used to retrain the model, employing the Adam optimizer with a learning rate of 2×10⁻⁶. -5 The batch size was 128, and the training lasted for 500 epochs. This process essentially "filled" the area around the original training distribution with more regions that the model considered to have high potential, forcing the model to learn and adapt to the new data distribution.

[0127] The augmented model showed significant performance improvements in both independent test set retention and prospective validation, confirming that the distribution shift problem was effectively mitigated. 1. Improved regression accuracy: On the independently retained test set, the coefficient of determination R0 is improved. 2 The increase from 0.745 to 0.783 indicates that the model's ability to explain activity has improved.

[0128] 2. Reduced error in high-ranking subsets: For the most valuable Top200 and Top400 high-ranking candidate subsets, the mean squared error (MSE) was significantly reduced from 1.058 and 2.053 to 0.702 and 1.168, respectively, proving that the model is more accurate in ranking high-quality candidates.

[0129] 3. A significant leap in prospective hit rate: In actual wet experimental verification, the hit rate of candidate peptides increased dramatically from 19.2% in BioPIR-v1 to 40.7%, effectively alleviating the problem of prediction trend distortion caused by distribution offset. This marks a key step forward for the model from "effective on the benchmark set" to "usable in real-world scenarios".

[0130] Step 5: Self-supervised contrastive learning and k-nearest neighbor (kNN) calibration (for systematic overestimation of failure modes) to build the BioPIR-v3 model.

[0131] This step follows the optimized BioPIR-v2 model from step 4 and the candidate set for validation output from step 3. The core objective is to address the systematic overestimation failure mode exposed in the prospective validation of BioPIR-v2. While the model restores the monotonic ranking trend between predicted and measured values, predicted activities are generally 2-3 log2 minimum inhibitory concentrations (MICs) higher than measured values, resulting in many candidates with high predicted activity exhibiting mediocre actual activity. The root cause of this failure mode lies in the global smooth fitting characteristics of the regression model and the experimental conditional dependence of the MIC labels. Therefore, this step introduces a dual mechanism of "self-supervised embedding optimization + local neighborhood calibration," utilizing the functional similarity of neighborhoods in the embedding space to correct the absolute scale bias of the regression model. The output of this step is the calibrated activity prediction values ​​and a high-confidence candidate set after consistency screening, providing a more reliable prediction basis for the next iteration.

[0132] Step 501: Self-supervised comparison of pre-training to optimize the embedding space.

[0133] To align the local neighborhood structure of the embedding space with the functional similarity of the peptide, rather than just matching the surface similarity of the sequence, this step conducts self-supervised contrastive learning based on the sequence representation output by the pre-trained protein language model ESM2 (Evolutionary Scale Modeling)-650M: 1. Sample pair construction: For each input sequence, two enhanced copies are generated to form a positive sample pair; all other sequences in the same mini-batch are automatically used as negative samples of the positive sample pair, without the need for additional manual annotation, thus achieving self-supervised training.

[0134] 2. Loss Function and Objective: Information Noise Contrast Estimation (InfoNCE) is used as the loss function, with cosine similarity as the measure of sequence similarity. The temperature parameter τ is set to 0.05. The core of this loss function is to maximize the similarity of positive sample pairs and minimize the similarity of negative sample pairs, forcing functionally similar peptides to cluster in the embedding space and peptides with large functional differences to move away from each other. Ultimately, this ensures that the local neighborhood distribution in the embedding space conforms to the functional similarity rule of antibacterial activity.

[0135] 3. Contrast Head Configuration: A linear multilayer perceptron (MLP) contrast head is connected after the output layer of the pre-trained protein language model (ESM2-650M) backbone network. The hidden dimension is set to 256 to map the general sequence features extracted from the backbone to the dedicated feature space of contrast learning, avoiding the introduction of additional nonlinear interference to the semantic information of the pre-trained model.

[0136] 4. Training parameters: The optimizer used is Adam, and the initial learning rate is set to 2×10. -5The batch size is 32, and the training lasts for 5 epochs. The shorter training epochs ensure that the local structure of the embedding space is optimized, while avoiding overfitting that would destroy the general sequence features learned by the pre-trained model.

[0137] Step 502, calibrate inference based on activity value of k-nearest neighbors (kNN).

[0138] Using the optimized embedding space, this step introduces local neighborhood evidence to perform absolute scale calibration on the original predictions of the regression model. The specific process is as follows: 1. Query sequence characterization: For each query peptide to be predicted, its sequence characterization is extracted using ESM2-650M. The embedding vector after average pooling is used as the final representation of the sequence to ensure that the characterization contains the contextual information of the whole sequence.

[0139] 2. Nearest Neighbor Search: In the constructed antimicrobial peptide embedding library, the top 100 nearest neighbor samples most similar to the query sequence are retrieved based on cosine similarity. This number of nearest neighbors ensures that the calibration results have sufficient statistical reliability while avoiding the introduction of interference samples that are too far away or have irrelevant functions.

[0140] 3. Calibration value calculation: The calibration prediction value of the query sequence is obtained by aggregating the true activity labels of all nearest neighbor samples through similarity weighted averaging. The weight calculation formula is as follows: ; Among them, s i Let s be the cosine similarity between the i-th nearest neighbor and the query sequence; j Let τ be the cosine similarity between the j-th nearest neighbor and the query sequence; w This is a temperature hyperparameter used to adjust the influence of similarity on the weights. Neighbors with higher similarity receive greater weights and contribute more strongly to the calibration results. Essentially, this calibration value is a consensus estimate of the activity of the query sequence within the local neighborhood of the embedding space, which better reflects the true functional activity level compared to the global prediction of a single regression model.

[0141] Step 503: Consistency gating filter removes unstable candidates.

[0142] To avoid bias from a single prediction method, this step introduces a consistency verification mechanism between the original regression prediction value and the k-nearest neighbor calibration value to further filter unreliable candidates: 1. Consistency Judgment: If the absolute difference between the original predicted value of a candidate peptide and the k-nearest neighbor calibration estimate exceeds 2 log2MIC units, the predictive stability of the candidate is deemed insufficient. Such candidates are either located in an unmodeled activity cliff region (local mutations cause global regression failure) or have uncaptured feature biases, resulting in a significant difference between the actual activity and the predicted value.

[0143] 2. Candidate Screening: Only candidates with high consistency whose predicted values ​​differ within a threshold range are retained for subsequent stages. This gating mechanism effectively sets up a double verification checkpoint for candidate activity, significantly reducing the false positive rate caused by systematic overestimation.

[0144] The dual calibration mechanism in this step significantly suppresses the systematic overestimation bias of BioPIR-v2, and the performance improvement is reflected in two core dimensions: 1. Significantly improved absolute prediction accuracy: On the independently retained test set, the root mean square error (RMSE) decreased from 2.026 for BioPIR-v2 to 1.355, and the absolute deviation between the predicted and measured values ​​was reduced by nearly 50%, indicating that the calibrated prediction scale is close to the true activity level.

[0145] 2. Significantly enhanced reliability of prospective screening: In actual wet experimental validation, the hit rate of candidate peptides increased from 40.7% for BioPIR-v2 to 76.6%, the reliability of the predicted absolute scale was greatly improved, and the trial and error cost of wet experiments was significantly reduced.

[0146] At this point, the remaining prediction errors are mainly concentrated in the activity cliff region where "a small number of site mutations cause a large change in activity", which becomes the core failure mode that needs to be addressed in the next iteration.

[0147] Step 6: Multimodal modeling of active cliff perception (for active cliff failure modes), establishing the first-stage model of BioPIR-v4.

[0148] This step follows the optimized BioPIR-v3 model from Step 5 and the candidate set for validation output from Step 3. The core objective is to address the activity cliff failure mode exposed in the prospective validation of BioPIR-v3. This problem manifests as follows: although the model has been calibrated at the absolute scale, when faced with sequence pairs where "a few key residue mutations lead to orders of magnitude changes in antimicrobial activity," the predicted values ​​fail to capture such drastic fluctuations, resulting in residual errors concentrated in local nonlinear regions. To address this issue, this step introduces an enhancement strategy combining "sequence-structure dual-modal fusion" and "activity cliff supervised comparison." This leverages three-dimensional structural information to compensate for the limitations of one-dimensional sequence modeling, forcing the model to remain highly sensitive to changes in the chemical microenvironment of local key sites. The output of this step is an enhanced prediction value with structure-aware capabilities, capable of accurately identifying activity cliff features, laying the foundation for achieving strong alignment between predictions and experiments.

[0149] Step 601: Construction of active cliff supervised comparison pairs.

[0150] To explicitly teach the model the discriminative features of the liveness cliff, this step constructs supervised sample pairs specifically for contrastive learning, as follows: 1. Homologous sequence grouping: Sequences are grouped according to their source in the literature to ensure that sequences within the same group come from the same original study. Since the experimental conditions of the same study are highly consistent, the reported activity values ​​are directly comparable, avoiding noise introduced by differences in experimental batches.

[0151] 2. Calculation of activity difference: Within each group, calculate the activity difference between all pairs of sequences (Δlog2(GM_MIC)).

[0152] 3. Definition of sample pair: Cliff-Positive pairs are defined as sequence pairs with an activity difference greater than 3. This means that the two sequences have highly similar amino acid compositions, but their measured activities differ by more than 8 times. These are typical examples of activity cliff pairs, and the model needs to focus on learning to distinguish between these subtle structural differences.

[0153] Cliff-Negative pairs are defined as sequence pairs with an activity difference of <1. This means that the activities of the two sequences are on the same order of magnitude, and the model needs to learn to bring them closer together in the feature space.

[0154] Through this refined grouping and definition, high-quality supervisory signals are constructed to guide the model to focus on capturing subtle sequence differences that lead to dramatic changes in activity.

[0155] Step 602, adaptive contrast measurement learning.

[0156] Based on the supervised sample pairs constructed above, this step employs a contrast learning strategy with adaptive margins to enhance the model's ability to identify local nonlinear changes: 1. Distance metric: Euclidean distance is used as the metric for sequence similarity in the feature space.

[0157] 2. Adaptive Margin Mechanism: Unlike traditional fixed-margin contrast loss, this scheme introduces an adaptive margin parameter. Key hyperparameters are configured as follows: initial margin m = 1.0, hard negative sample weight (hard_weight) set to 2.0, and margin update factor (margin_update_factor) set to 0.02. This mechanism assigns higher learning weights to "hard negative samples" (i.e., samples with similar activity but large sequence differences, or similar sequences but large activity differences), dynamically adjusting the optimization boundary and forcing the model to pay more attention to subtle feature differences in the activity cliff region.

[0158] 3. Training Configuration: The model is trained for 10 epochs, using the Adam optimizer with a learning rate of 2×10⁻⁶. -5 The batch size is 32. This training strategy significantly improves the model's sensitivity to mutations in key residues, thereby effectively distinguishing live cliff samples at the feature level.

[0159] Step 603, sequence-structure multimodal fusion.

[0160] To fundamentally address the problem that one-dimensional sequences cannot characterize three-dimensional spatial conformations, this step introduces three-dimensional structural information predicted by the protein structure prediction tool (ESMFold), achieving deep fusion of sequence and structure through a cross-attention mechanism: 1. Construction of Structural Feature Units: First, the three-dimensional Cartesian coordinates and elemental properties of each atom are extracted from the output of the protein structure prediction tool (ESMFold). The six elements—carbon (C), hydrogen (H), oxygen (O), nitrogen (N), sulfur (S), and selenium (Se)—are converted into corresponding one-hot encoded features. These encoded features are then concatenated and fused with the three-dimensional coordinates to construct a nine-dimensional structural feature unit (token). This unit not only contains the positional information of the atom but also encodes the chemical properties of the element.

[0161] 2. Dimension Alignment and Projection: The structural feature unit is mapped to a feature space that matches the dimension (1280 dimensions) of the sequence hidden layer through linear projection, in preparation for subsequent cross-modal interaction.

[0162] 3. Single-layer Cross-Attention Fusion: A cross-attention encoder is employed to achieve deep coupling between the two modalities. Sequence feature units are used as query vectors to guide the model to focus on key regions in the structure related to the sequence; structural feature units are used as key and value vectors to provide physicochemical constraints in three-dimensional space. The constructed cross-attention module includes an eight-head multi-head attention mechanism, layer normalization, a position-wise feedforward network with a hidden layer dimension of 1280, residual connections, and a dropout regularization strategy with a ratio of 0.1. Preferably, both the attention sub-layer and the subsequent position-wise feedforward network sub-layer adopt the Pre-LayerNorm normalization strategy, with the normalization epsilon parameter set to 1e-5. The intermediate layer dimension of the position-wise feedforward network is set to 5120, which is four times the hidden layer dimension. Both sub-layers are equipped with residual connections and a dropout regularization with a ratio of 0.1. The dropout applies to both the attention weights and the neuron output.

[0163] This approach abandons the conventional approach of stacking multiple complex networks, achieving deep fusion of sequence and structural information using only a single cross-attention layer. This design significantly reduces the number of model parameters and computational complexity while effectively avoiding the risk of overfitting caused by introducing high-dimensional physical coordinates. The output after processing by this module is a structure-enhanced sequence embedding, which not only preserves the semantic information of the original sequence but also incorporates the physicochemical constraints of three-dimensional spatial conformation. With its keen perception of the local spatial environment, it achieves precise capture of key residue mutations and conformational inversions.

[0164] After this step, the model has the ability to simultaneously understand both linear information and spatial information of the sequence, and can effectively identify the minute structural changes that lead to the active cliff, providing a high-precision predictive basis for the next stage of introducing physical consistency screening.

[0165] Step 7, Physical consistency screening (for physical rationality failure modes), establish the BioPIR-v4 second-stage model.

[0166] This step builds upon the high-potential candidate peptide set output from step 6. Its core objective is to address the physical validity failure mode inherent in purely data-driven models. Specifically, some candidate peptides, while deemed highly active by the model based on sequence and structural characteristics, lack the physical ability to effectively interact with the bacterial cell membrane, leading to false positives in the computational predictions. To eliminate these statistically high-scoring but physically ineffective candidates, this step introduces a biophysical verification mechanism based on all-atom and coarse-grained molecular dynamics. By simulating the physical processes of peptide-membrane interactions, candidate peptides are quantitatively scored across three dimensions: membrane binding stability, peptide self-aggregation tendency, and oligomerization assembly ability. The output of this step is a final candidate set that has undergone rigorous biophysical verification, ensuring that sequences entering the wet experimental stage possess genuine membrane disruption potential.

[0167] Step 701, Construction of the three-dimensional structure and simulation system.

[0168] To assess peptide-membrane interactions under conditions close to physiological environments, this step involves constructing a complete simulation system for each candidate peptide, comprising the peptide, a biological membrane, and aqueous ions: 1. Initial 3D structure prediction: Using two mainstream structure prediction tools, I-TASSER and Rosetta fold-and-dock, reliable initial 3D conformations are generated for each candidate peptide to ensure that the starting point for subsequent simulations has structural diversity and rationality.

[0169] 2. Multi-copy array arrangement: To simulate peptide-membrane interactions and peptide self-aggregation behavior in a single simulation, a multi-copy replication strategy is employed. Sixteen peptide copies are arranged in a 4×4 array within a 100Å×100Å plane, with the long axes of all peptide chains parallel to the membrane surface and the centroid 45Å from the membrane center. This arrangement allows for simultaneous sampling of peptide-membrane binding and peptide-peptide aggregation events in a single simulation, significantly improving screening throughput.

[0170] 3. Coarse-grained system conversion: Mesoscale simulations were performed using the MARTINI 2.2 coarse-grained force field. The full atomic coordinates of the 16 peptide copies were converted to the MARTINI 2.2 coarse-grained representation using the martinize.py script. Combined with the secondary structure constraints provided by the DSSP algorithm (a protein secondary structure prediction tool), the α-helix or β-sheet features of the initial conformation were preserved, resulting in a coarse-grained array of 16 peptides, ensuring faithful transmission of structural information.

[0171] 4. Biomembrane modeling: A bilayer membrane system with a composition similar to the inner membrane of Gram-negative bacteria was constructed. The lipid components were POPE (palmitoyl oleoyl phosphatidyl ethanolamine) and POPG (palmitoyl oleoyl phosphatidyl glycerol) mixed in a molar ratio of 3:1 to obtain a coarse-grained bilayer membrane. This composition can effectively reflect the membrane physicochemical properties of the target pathogen.

[0172] 5. Solvent and Ionic Environment: A coarse-grained array of 16 peptides and a coarse-grained bilayer membrane were constructed to form a complete peptide-membrane composite system. The peptide-membrane composite system was then placed in a three-dimensional periodic box of 10nm×10nm×12nm, and a standard MARTINI coarse-grained water model was added. Sodium chloride (NaCl) ions at a concentration of 0.1536M were added to simulate the ionic strength and electrostatic shielding effect under physiological conditions.

[0173] Step 702, Molecular dynamics simulation.

[0174] To obtain statistical data on the dynamic behavior of peptides on the membrane surface, the constructed system was subjected to rigorous equilibrium and production simulation: 1. Energy minimization: Each system first undergoes 5000 steps of the steepest descent method for energy minimization to eliminate any unreasonable contact or high-energy conformation between atoms and prevent the system from collapsing due to excessive force in the early stages of the simulation.

[0175] 2. Production Simulation: Using the GROMACS 2022.4 software package, a 200 ns production simulation was conducted under constant temperature of 310 K (37℃) and constant pressure of 1 bar, within the NPT (particle number-pressure-temperature) ensemble. The simulation parameters were set as follows: the integration time step was 2 fs, and the Verlet truncation algorithm was used for integration; the cutoff radius for non-bonded interactions was set to 1.2 nm, and long-range electrostatic interactions were handled using the Particle Mesh Ewald (PME) algorithm. A trajectory snapshot was output every 100 ps during the simulation, resulting in 2000 valid trajectories for the single system, which were used for subsequent statistical analysis of membrane binding stability and oligomerization characteristics.

[0176] Step 703, quantification of physical indicators.

[0177] The molecular dynamics trajectory analysis tool MDAnalysis (version 2.4.0) was used to perform batch analysis of the full trajectory simulation files. Three core quantitative indicators were defined from three dimensions: membrane binding ability, self-aggregation characteristics, and oligomerization assembly ability, to comprehensively evaluate the potential activity of candidate peptides in interaction with biological membranes. 1. Membrane Binding Robustness Score: This score quantifies the robustness of the binding between candidate peptides and biological membranes. For 16 peptide copies arranged in the system, the score counts the number of copies where the minimum peptide-membrane distance is less than 5 Å in over 90% of the trajectory frames. One point is awarded for each copy meeting this requirement. The total score ranges from 0 to 16; a higher score indicates a more stable binding of the candidate peptide to the membrane and a lower likelihood of dissociation from the membrane surface.

[0178] 2. Cluster Avg (Cluster Aggregation Tendency): Used to quantify the non-specific aggregation characteristics of candidate peptides. The criterion is: if the cumulative contact area of ​​coarse-grained particles (Beads) with a distance of less than 6 Å between two peptides is greater than 15 square Å... 2 If the number of peptides in contact is found, it is determined that the two peptides have come into contact. The number of connected clusters formed by the contacting peptide copies in each frame of the simulated trajectory is counted, and the time average of the number of clusters in all frames of the entire trajectory is taken as the final value of this index. The lower the value of this index, the stronger the aggregation ability of the candidate peptide itself, and the easier it is to form a stable membrane-interacting assembly.

[0179] 3. Maximum Oligomeric Cluster Size (Size Avg): This reflects the ability of a candidate peptide to form a dominant oligomeric assembly. It is calculated by statistically averaging the number of peptide copies contained in the largest peptide cluster in each frame of the trajectory, and then taking the time average of the maximum cluster size across all frames of the entire trajectory. The higher the value of this index, the more easily the candidate peptide forms a dominant oligomeric structure covering the membrane surface, and the stronger its membrane disruption potential.

[0180] Step 704: Comprehensive scoring and filtering.

[0181] To integrate the above multidimensional physical indicators and construct a single-dimensional comprehensive scoring system for the final screening of candidate peptides: 1. Overall score calculation: The formula for calculating the overall score is as follows: Total Score=0.8×Contact Score+0.1×(16-Cluster avg)+0.1×Size avg; Among them, Total Score is the overall score; Contact Score is the membrane binding robustness score, which directly reflects the ability of peptides to anchor on the bacterial membrane surface and is a prerequisite for membrane disruption activity, so it is given the highest weight coefficient of 0.8; Cluster avg is the average peptide aggregation tendency, which reflects the self-aggregation characteristics of peptides. A constant of 16 is introduced into the formula for inversion operation, which converts "low aggregation tendency" into a positive score, making it positively correlated with Total Score. This index is given a weight coefficient of 0.1; Size avg is the average size of the largest oligomeric cluster, which reflects the ability of peptides to form dominant oligomeric assemblies, and is given a weight coefficient of 0.1.

[0182] The formula assigns the main weight (80%) to membrane binding stability to ensure that the screened candidates have core membrane targeting capabilities; at the same time, it uses peptide self-assembly characteristics as an auxiliary indicator (each accounting for 10%) to take into account the needs of pore-forming or carpet-like action mechanisms.

[0183] 2. Normalization and Threshold Filtering: The original comprehensive score is linearly normalized to the range of 0-100. Candidate peptides with a normalized score of not less than 80 are defined as high-potential antimicrobial peptides that pass the physical consistency verification and are allowed to enter the final output set. This strict physical gate significantly reduces the false positive rate supported solely by statistical scores, ensuring the biophysical rationality of the final candidate set.

[0184] After screening in this step, the final output set of candidate peptides not only showed high activity in computational prediction, but also verified their potential to interact with bacterial membranes at the biophysical level, providing a solid guarantee for the high hit rate of subsequent wet experimental verification.

[0185] Step 8: Closed-loop iterative control.

[0186] This step is the core control logic driving the continuous evolution of the entire BioPIR platform, aiming to solve the Sim-to-Real gap problem caused by the "one-time modeling, static screening" of traditional antimicrobial peptide screening technologies. Unlike existing technologies that only focus on improving the performance of a single model round, this step constructs a feedback mechanism of "experimental verification - error diagnosis - targeted correction." Using the measured minimum inhibitory concentration (MIC) data obtained from prospective wet experiments as the driving signal, it identifies the dominant failure mode of the current prediction system round by round and activates the corresponding algorithm correction modules accordingly, achieving a step-by-step leap in predictive capability from "effective on the benchmark set" to "usable in real-world scenarios." The input of this step is the wet experimental data of candidate peptides synthesized and tested after each iteration, and the output is the optimization strategy and updated model parameters for the next iteration, forming a self-improving closed-loop evolutionary path.

[0187] Step 801, Error Diagnosis and Failure Mode Decomposition.

[0188] After each round of prospective wet test validation, the system automatically calculates the residual between the model prediction (log2(GM_MIC)) and the measured wet test value, and performs qualitative and quantitative analysis of the error distribution to determine the dominant failure mode restricting the improvement of hit rate at the current stage. Based on empirical data from four rounds of iterations on the BioPIR platform, four typical diagnosable failure modes are defined: 1. Distribution Shift: This manifests as a loss of monotonic correlation between predicted and measured values, resulting in a collapse of the predicted trend. A typical example is the BioPIR-v1 stage, where although the model performed well on the retained test set, its prospective hit rate on newly designed candidate peptides was only 19.2%, indicating a significant deviation between the model's learned feature distribution and the actual chemical space.

[0189] 2. Systematic Overestimation: This manifests as a monotonic correlation between predicted and measured values, but the predicted values ​​are generally 2-3 log2 units higher than the measured values, causing many highly active candidates to fail in experiments. A typical characteristic is the BioPIR-v2 stage, where although the hit rate has improved, it is still plagued by absolute scale bias.

[0190] 3. Activity Cliff: This is characterized by residual error concentrated in localized regions, making it difficult to distinguish between sample pairs with highly similar sequences but vastly different activities. A typical feature is in the BioPIR-v3 stage, where the global regression trend has been calibrated, but the model fails to capture the drastic fluctuations in activity caused by mutations in a few key residues.

[0191] 4. Physical Plausibility Deficiency: This manifests as peptides predicted to be highly active lacking membrane-binding stability or oligomerization ability at the biophysical level, i.e., false positives that are "statistically high but physically invalid." A typical example is the BioPIR-v3 stage, which, although addressing scale bias, still shows that some candidate peptides cannot stably bind to the cell membrane in molecular dynamics simulations, revealing the deficiency of purely data-driven models lacking physical constraints.

[0192] Step 802, Targeted correction strategy based on failure mode.

[0193] Based on the dominant failure mode diagnosed in step 801, the system automatically matches and loads the corresponding combination of correction modules to perform targeted updates to the model architecture or training data, rather than blindly increasing the model complexity. 1. Correction for distribution shift: When the diagnostic result is a distribution shift, activate the step of embedding spatial flow matching to generate enhancement (step 4). Utilize the pseudo-label data generated by the model in the previous round on the real distribution to expand the coverage of the training set, forcing the model to learn the data boundaries in the real scene and restore its ranking ability (corresponding to BioPIR-v2 optimization).

[0194] 2. Correction for systematic overestimation: When the diagnostic result shows absolute scale bias, activate the self-supervised contrastive learning and k-nearest neighbor calibration steps (step 5). Utilize local neighborhood consensus in the embedding space to correct the global prediction bias of the regression head, and introduce a consensus gating mechanism to remove unstable prediction outliers (corresponding to BioPIR-v3 optimization).

[0195] 3. Correction for the activity cliff: When the diagnostic result indicates a failure of local nonlinear relationships, only the multimodal modeling step of activity cliff perception is activated (step 6). By introducing three-dimensional structural information and supervised comparative learning with the activity cliff, the model's sensitivity to key residue mutations is enhanced, accurately capturing the dramatic changes in activity caused by minor sequence variations. (Corresponding to the first stage optimization of BioPIR-v4).

[0196] 4. Correction for insufficient physical rationality: When the diagnostic result is a physical false positive or abnormal biophysical behavior, only the physical consistency screening step (step 7) is activated. Biophysical priors are introduced through molecular dynamics simulation to quantify membrane binding stability and oligomerization characteristics, eliminate false positive sequences with high statistical scores but no actual membrane action potential, and establish a physical screening gate (corresponding to the second stage optimization of BioPIR-v4).

[0197] Step 803: Step-by-step iterative evolution.

[0198] This platform achieves continuous technological evolution through the aforementioned cycle of diagnosis and correction. Each iteration fully inherits all the optimization results of the previous iteration and, based on that, specifically addresses the core technical bottlenecks exposed in that iteration.

[0199] To avoid wasting computing power and the risk of overfitting caused by infinite iteration, and to ensure the feasibility of the solution, this step sets clear iteration termination conditions: when the prospective hit rate improvement of two consecutive iterations is less than 5%, or the RMSE of the regression task validation set is less than 1.2, the system automatically determines that the model performance has converged or reached the accuracy threshold required for clinical translation, and terminates the closed-loop iteration process.

[0200] The prospective hit rate is defined as the proportion of peptides whose predicted log2(GM_MIC) differs from the actual value by no more than 1.5. The RMSE (root mean square error) is used to quantify the average deviation between the predicted and measured values. The RMSE threshold of 1.2 is set based on the tolerance of wet experimental error. When RMSE < 1.2, the prediction error is controlled within ±1 log2 unit, which has extremely high clinical guiding significance.

[0201] Before the termination conditions are met, the system will continue to execute the "diagnosis-correction" loop, sequentially building an irreversible, step-by-step optimization path: Round 1 (BioPIR-v1): Establish baselines and identify distribution shift issues.

[0202] The second round (BioPIR-v2) introduces enhanced flow matching generation, corrects distribution offsets, restores sorting monotonicity, and identifies systematic overestimation problems.

[0203] The third round (BioPIR-v3) introduces self-supervised comparison and k-nearest neighbor calibration to eliminate systematic overestimation and calibrate the absolute scale; it also identifies the activity cliff problem.

[0204] The fourth round (BioPIR-v4) first introduces multimodal fusion to overcome the activity cliff and capture local nonlinear effects; then it introduces physical consistency screening to eliminate physical false positives. Ultimately, it achieves strong alignment between predictions and measurements.

[0205] This progressive approach involves four core optimization tasks: First, calculating the simulation-to-real activity bias to clarify the gap between the current prediction system and real-world application scenarios; second, correcting the candidate peptide ranking ability under distribution offset conditions to restore the monotonic correlation of prediction results; third, calibrating the absolute scale bias of activity to eliminate systematic overestimation; and fourth, modeling the nonlinear activity cliff effect to capture the drastic activity fluctuations caused by local residue mutations. Through this progressive and interconnected optimization logic, a high degree of consistency between the calculated prediction results and wet experimental data is ultimately achieved, substantially bridging the gap between simulation and real-world applications.

[0206] After completing the aforementioned closed-loop iterative screening process, this invention ultimately outputs a list of high-confidence antimicrobial peptide candidates that has undergone multi-dimensional verification. This list includes the following content, and all scoring indicators maintain strict consistency with the terminology and calculation methods used in the preceding steps: 1. Candidate antimicrobial peptide sequence list: contains the primary amino acid sequences of candidate peptides that have passed all screening gates; 2. Antimicrobial peptide classification probability: The probability value of a sequence being classified as an antimicrobial peptide by the baseline classification-regression cascade prediction model described in step 2, which represents the confidence level that the sequence has antimicrobial properties; 3. Activity prediction value: The standardized activity index log2(GM_MIC) output by the regression branch described in step 2 represents the model's global estimate of the absolute activity of the sequence. 4. Nearest Neighbor Calibration Value: The activity estimate output by the k-nearest neighbor (kNN) calibration inference module described in step 5 represents the consensus prediction of sequence activity in the local neighborhood of the embedding space and is used to correct systematic bias. 5. Activity cliff sensitivity score: The feature vector or confidence index output by the activity cliff perception multimodal modeling module described in step 6 represents whether the sequence is located in a nonlinear region of drastic activity change and the model's ability to capture this local mutation. 6. Physical consistency score: The comprehensive normalized score (0~100) calculated by the physical consistency screening module described in step 7 represents the potential and stability of the candidate peptide in interacting with the bacterial membrane at the biophysical level. 7. Priority Ranking List: Based on the above multi-dimensional indicators, a comprehensive ranking list is constructed. The sequences with a physical consistency score of not less than 80 and whose activity prediction value is highly consistent with the nearest neighbor calibration value are preferred as the highest priority.

[0207] The output results can not only be directly used to guide subsequent R&D decisions such as sequence synthesis, in vitro activity verification and preclinical research, but also serve as standardized upstream candidate inputs, seamlessly connecting to other drug discovery platforms or automated wet laboratory systems to achieve intelligent and automated antimicrobial peptide R&D processes.

[0208] The advantages of this invention are as follows: 1. It pioneers a failure mode-driven closed-loop evolution paradigm, breaking through the limitations of traditional single-step benchmark set index optimization.

[0209] This invention overcomes the shortcomings of existing antimicrobial peptide screening technologies, which "only test the iterative model based on publicly available benchmark sets and are out of touch with actual deployment scenarios." Instead, it uses the dominant failure modes exposed in each round of prospective wet experiments (in order of distribution shift, absolute scale bias, activity cliff, and insufficient physical rationality) as the core driving signals for iteration. It constructs a closed-loop diagnostic scheme of "error diagnosis - directional correction - performance verification," which is completely different from the existing static process of "one training, one screening." This solves the Sim-to-Real gap problem from the underlying logic.

[0210] 2. Construct a progressive multi-module collaborative framework to sequentially address core prediction biases.

[0211] This invention does not simply stack heterogeneous models, but strictly follows the order in which failure modes are exposed, introducing corresponding correction modules and forming a collaborative logic: First, it addresses the distribution offset problem and restores the monotonicity of candidate ranking by embedding spatial flow matching enhancement (step 4); then, it addresses the absolute scale bias problem and eliminates systematic overestimation by self-supervised contrastive learning and k-nearest neighbor calibration (step 5); next, it addresses the problem of modeling local nonlinear structure-property relationships by sequence-structure multimodal modeling with activity cliff awareness (step 6); and finally, it addresses the physical rationality problem by physical consistency screening (step 7). Each module has a clear problem target, and the optimization benefits of the previous module are fully retained in the next iteration, forming an irreversible, step-by-step performance improvement path. Simultaneously, this invention innovatively introduces an automatic termination mechanism based on performance thresholds (termination occurs when the hit rate improvement is <5% or RMSE <1.2 for two consecutive rounds), ensuring the full exploitation of model performance while eliminating the computational waste and overfitting risks caused by "infinite closed loops," meeting the practical requirements for industrial-grade deployment.

[0212] 3. It pioneers an active absolute calibration mechanism driven by embedded spatial neighborhood evidence.

[0213] To address the shortcomings of existing methods that only output global regression results and lack local validation leading to systematic overestimation, this invention introduces nearest neighbor consensus as a calibration basis based on the sequence embedding space constructed by the ESM2-650M pre-trained model: the log2(GM_MIC) output by the cascade regressor in step 2 is used as the global prediction value, and the calibration value obtained by the k-nearest neighbor weighted aggregation in step 5 is used as the local validation value. Unstable candidates are filtered through a consensus gating mechanism that ensures the absolute difference between the two is ≤ 2 log2(GM_MIC) units, thereby increasing the prospective hit rate from 40.7% to 76.6%, significantly improving the stability of candidate ranking and the credibility of absolute activity prediction.

[0214] 4. Integrating active cliff supervision with sequence-structure cross-modal interaction, it accurately captures nonlinear structure-activity relationships.

[0215] To address the shortcomings of existing regression models that tend to fit global smooth trends and fail to identify the "activity cliff" where "a small number of residue mutations cause orders of magnitude changes in activity," this invention, on the one hand, explicitly constructs homologous activity cliff supervision pairs (in the same reported sequence, those with an activity difference >3 are defined as positive cliff samples, and those with an activity difference <1 are defined as non-negative samples), and enhances the model's sensitivity to local differences through contrast quantity learning with adaptive intervals; on the other hand, it introduces a single-layer eight-head cross-attention structure, fusing the three-dimensional structural information predicted by ESMFold with one-dimensional sequence semantic information, to achieve accurate modeling of the chemical microenvironment and conformational changes of key residues, thus solving the problem of residual errors concentrated in local nonlinear regions.

[0216] 5. Physical consistency screening is moved forward as a candidate output gate to construct a dual constraint mechanism of "statistics + physical".

[0217] This invention breaks away from the conventional approach of using molecular dynamics simulations merely as a "post-hoc activity verification and mechanism of action explanation tool" in existing research. It moves the coarse-grained molecular dynamics physical screening in step 7 to the last step before candidate output: using a physical consistency score ≥80 as a hard entry threshold, together with the activity prediction of the statistical model and the nearest neighbor calibration results, to form a "dual constraint" mechanism. This effectively eliminates false positive sequences with high statistical scores but insufficient membrane binding stability and unreasonable aggregation characteristics, significantly reducing the trial and error cost of subsequent wet experiments.

[0218] 6. It possesses excellent engineering deployability and cross-task portability.

[0219] Each functional module of this invention supports deployment on the same machine or in a distributed computing cluster. Core algorithms such as stream matching generation, comparative learning, and multimodal fusion can be decoupled and reused. The core logic is not limited to the antimicrobial peptide discovery scenario, but can be transferred to all biomolecular design tasks with sequence-property mapping, distribution shift, and local nonlinear structure-activity relationship problems, including but not limited to the screening and optimization of functional peptides, enzyme engineering candidates, nucleic acid aptamers, and peptide vaccines, and has broad industrial application value.

[0220] Figure 1 This is a schematic diagram illustrating the evolution of the BioPIR platform, designed to systematically bridge the Sim-to-Real gap. Figure 1 The left side is a schematic diagram of the iterative workflow, illustrating the BioPIR platform's progressively upgraded workflow through four rounds of iterations in the discovery of antimicrobial peptides (AMPs). The entire process revolves around a dual core of "statistical prediction - physical validation," introducing new modules layer by layer to address bottlenecks in the preceding exposure stages. BioPIR-v1 (Baseline Construction Stage): Establishes a basic cascade screening process. First, an initial peptide library is constructed using a sequence generator under preset compositional constraints (such as specific amino acid ratios). Then, activity scoring is performed using a protein language model (ESM-AMP). Finally, a preliminary list of candidate peptides is output by combining multi-level bioinformatics indicators such as solubility, toxicity, and similarity.

[0221] BioPIR-v2 (Distribution Shift Correction Stage): Addressing the distribution shift problem exposed by BioPIR-v1, an embedding space flow matching generation enhancement strategy is introduced. Sequence data is mapped to a high-dimensional latent space, and the generative model is used to expand the effective training distribution boundary, thereby correcting the collapse of prediction trends caused by the difference between the training set and the real samples, and restoring the monotonicity of candidate peptide sorting.

[0222] BioPIR-v3 (Absolute Scale Calibration Stage): Addressing the systematic overestimation problem exposed by BioPIR-v2, a self-supervised contrastive learning (CL) and k-nearest neighbor (kNN) calibration mechanism is introduced. Building upon ESM2-AugAMP, contrastive learning enhances the discriminative power of sequence features, and the kNN algorithm is used to find consensus among nearest-neighbor samples in the embedding space as the basis for activity absolute scale calibration, effectively suppressing the overall overestimation of predicted values.

[0223] BioPIR-v4 (Local Nonlinearity and Physical Rationality Optimization Stage): Addressing the activity cliff problem exposed by BioPIR-v3, it is comprehensively upgraded to a multimodal modeling architecture. It integrates one-dimensional sequence semantics and three-dimensional structural information (using ESMFold to predict structures), introduces contrastive learning for activity cliff awareness to capture dramatic changes in activity caused by local mutations; finally, it moves coarse-grained molecular dynamics (MD) physical screening forward to the output gate, constructing a dual constraint mechanism of "statistical prediction + biophysical verification" to ensure the rationality of output candidates in physical behavior.

[0224] Figure 1 The right side shows the prospective experimental validation results. Through scatter plots and quantitative indicators, it intuitively presents the degree of fit between the predicted activity (log2(GM_MIC)) and the measured activity in four iterations, revealing the gradual bridging process of the Sim-to-Real gap: BioPIR-v1 (Distribution Shift Dominance): Predicted values ​​deviate significantly from the identity line, exhibiting a disordered distribution. Among 120 tested peptides, the RMSE was as high as 3.336, with a prospective hit rate of only 19.2%, indicating that the model failed to capture the true data distribution, and the predicted trend completely collapsed.

[0225] BioPIR-v2 (Systemic Overestimation Dominance): The predicted trend returned to monotonicity, but there was a significant systemic overestimation bias (predicted values ​​were generally higher than measured values). Among 118 tested peptides, the RMSE decreased to 2.026, and the hit rate improved to 40.7%, but the absolute activity prediction remained unreliable.

[0226] BioPIR-v3 (Activity Cliff Dominant): Systemic overestimation was effectively suppressed, and predicted clusters converged towards the true values. Among 111 tested peptides, the RMSE decreased to 1.355, and the hit rate significantly improved to 76.6%. However, discrete points still exist in local regions, indicating that the model has difficulty distinguishing highly activity-sensitive sequence mutations.

[0227] BioPIR-v4 (Sim-to-Real Gap Closure): Predicted and measured values ​​highly overlap, closely aligning around the isostatic line. Among 101 tested peptides, the RMSE decreased to 1.111, achieving a prospective hit rate of 100.0%. This demonstrates that the model successfully overcomes obstacles such as distribution shift, scale bias, and activity cliff, achieving a leap from "valid for the baseline set" to "usable in real-world scenarios."

[0228] Overall, this figure illustrates how BioPIR utilizes prospective experimental feedback to iteratively diagnose and correct key obstacles in the translation process, thereby gradually transforming benchmark-level predictive capabilities into antimicrobial peptide discovery capabilities that can guide experimental practice.

[0229] Figure 2 This is a schematic diagram of the failure mode-driven BioPIR evolution framework. Figure 2 The image shows a schematic diagram of the BioPIR platform. The BioPIR platform employs a closed-loop workflow of "design-test-learning": after constrained sequence generation, model prediction, error correction, coarse-grained and fine-grained screening, and prospective experimental validation are performed sequentially. During continuous iterations, the platform further introduces sequence augmentation, multimodal sequence-structure fusion, and multi-objective self-supervised contrastive learning to correct for the dominant failure modes exposed in the previous iteration. b is the receiver operating characteristic (ROC) curve of the BioPIR-v1 classifier on the test set; used to evaluate the model's ability to distinguish between antimicrobial peptides and non-antimicrobial peptides. c represents the BioPIR-v1 regression performance, showing the correspondence between the predicted log2GM_MIC and the labeled value; e represents the UMAP projection of the data distribution expansion after embedding spatial augmentation in BioPIR-v2; Figures d, f, g, and h represent the prediction-test comparisons of BioPIR-v1 to v4, respectively, illustrating the characteristics of distribution shift, systematic overestimation, activity cliff, and final alignment. The relationship between the model's predicted activity (log2(GM_MIC)) and the in vitro measured activity of prospective synthetic peptides clearly reveals the process of bridging the Sim-to-Real gap. d(BioPIR-v1): Due to severe distribution shift, the predicted points deviate widely from the true values ​​and lack obvious monotonic trends, indicating that the model has not yet captured the true biological laws. f(BioPIR-v2): After introducing flow matching augmentation, the predicted value shows a clear monotonically increasing trend, but it is significantly higher than the measured value on the vertical axis, revealing a systematic overestimation defect. h(BioPIR-v3): After nearest-neighbor calibration, the predicted clusters move closer to the diagonal, and the global scale is corrected. However, a small number of discrete points deviating from the diagonal are still visible in local regions, suggesting the challenge of local discontinuities caused by the active cliff.

[0230] g(BioPIR-v4): After integrating multimodal modeling and physical screening, the vast majority of predicted points closely fit the diagonal, achieving the strongest consistency between predicted and measured values, marking a significant achievement in closed-loop evolution.

[0231] i represents the absolute prediction error distribution across four iterations, visually demonstrating the trend of Sim-to-Real bias gradually decreasing with each iteration.

[0232] This figure illustrates the statistical distribution of the absolute prediction error (|predicted value − measured value|) of the sample during four consecutive updates. As the iterations progress, the peak value of the error distribution gradually shifts towards zero, and the distribution range narrows significantly. This macroscopic trend intuitively demonstrates that by performing targeted corrections to the dominant failure mode round by round, the platform's prediction accuracy continuously improves, and the Sim-to-Real bias is substantially reduced.

[0233] Figure 3 This is a comparison chart of candidate peptide characteristics and forward generalization ability; Figure 3 In the diagram, 'a' represents the UMAP projection of the reference AMP dataset and the BioPIR-designed peptides, showing the joint distribution projection of the AMP dataset (grey point cloud) and the BioPIR-designed peptides (green dot clusters) in the dimension-reduced embedding space (UMAP). It can be seen that the candidate peptides generated by BioPIR are not submerged in the background noise of the known AMP dataset, but rather aggregate into a unique and connected region. This distribution characteristic intuitively demonstrates the effectiveness of BioPIR in sequence space expansion: it achieves both distribution expansion and maintains functional novelty. b represents the similarity distribution between the candidate sets of BioPIR-v1 to v4 and known AMP sequences (usually calculated using sequence identity or distance matrices). Statistical results show that the candidate peptides in each round maintain only a moderate degree of similarity to known AMP sequences, without exhibiting the "mediocre repetition" phenomenon of extreme convergence to known highly active peptides. This indicates that BioPIR possesses the ability to overcome the limitations of existing sequence libraries and explore entirely new chemical spaces. c represents the site-specific amino acid composition of the BioPIR-v4 peptide. The size of the circle represents the frequency of amino acid occurrence at each position. The more red the color, the more positively the amino acid is associated with enhanced activity, and the more blue the color, the more negatively it is associated with decreased activity, reflecting the non-degenerative characteristics of the design space. Image d is a coarse-grained molecular dynamics snapshot of the representative peptide BioPIR-361, showing the evolution of peptide-membrane interactions and verifying the effectiveness of physical screening. e shows a comparison between predictions and experimental results of existing AMP prediction models on a dataset of 450 BioPIR peptides. The comparison reveals that existing models generally deviate from the identity line, exhibiting significant performance fluctuations across different iterations, highlighting the performance advantages of this invention. The comparison also includes a comparison of the predicted log2 (GM_MIC) values ​​of five existing mainstream AMP prediction models (APEX, SMEP, AMP-Cliff (ESM2), AMP-Cliff (ProGen2), and XGBoost-ESM2) on 450 synthesized BioPIR prospective validation peptides with in vitro experimental values. Although the overall prospective hit rates of these external benchmark models are relatively close, ranging from 42.0% to 45.1%, their predicted points generally deviate significantly from the ideal identity line (y=x), and their performance fluctuates dramatically across different iterations or subtypes. This significant comparison strongly supports the overwhelming advantage of this invention in terms of generalization ability and prediction robustness in real-world scenarios.

[0234] BioPIR-v1, BioPIR-v2, BioPIR-v3, and BioPIR-v4 are four versions of the failure mode-driven closed-loop antimicrobial peptide discovery platform BioPIR, which were successively developed through four rounds of iterative optimization. The four versions belong to the progressive upgrade relationship of the same technology platform. Each version fully inherits all the technical capabilities of the previous version, and only adds corresponding correction modules for the dominant failure modes exposed in the previous round of prospective wet experimental verification, gradually narrowing the gap between simulation prediction and real experiments. They are not four independent technical solutions.

[0235] BioPIR-v1 is the platform's first baseline version, corresponding to the baseline classification-regression screening workflow (steps 2 and 3). This version uses an ESM2-650M pre-trained protein language model as a shared sequence encoder. Two multilayer perceptrons are connected after the backbone network to handle antimicrobial peptide classification and activity regression tasks, respectively. For virtual peptide libraries that meet preset constraints such as length, hydrophobicity, and the number of hydrophilic residues, classification filtering, regression filtering, solubility filtering, toxicity / hemolysis risk filtering, known peptide similarity filtering, and diversity clustering screening are performed sequentially, ultimately outputting a candidate peptide set. The first round of prospective validation testing on 120 synthetic peptides showed a root mean square error of 3.336 and a prospective hit rate of 19.2%. This first test revealed a distribution shift failure mode, meaning that the model's predictive trends on the public benchmark set completely collapsed in real-world deployment scenarios.

[0236] BioPIR-v2 is the second-round optimized version of the platform, featuring enhanced embedding spatial flow matching (step 4 + v1 baseline). It fully inherits all the capabilities of BioPIR-v1 and adds an enhanced embedding spatial flow matching generation module to address the distribution offset problem. This version uses the ESM-2-8M model with fewer parameters to map known antimicrobial peptides to a continuous embedding space. It defines a time-varying Gaussian trajectory probability path from noisy embeddings to true embeddings and trains a vector field model consisting of a four-layer Transformer encoder to generate candidate sequences. After generating a total of 3,728,896 new sequences, they are pseudo-labeled using the BioPIR-v1 regressor. 326,270 high-potential sequences with predicted log2GM_MIC less than 6 are retained and incorporated into the training set. At the same time, the regression filtering threshold is relaxed from less than 3 in BioPIR-v1 to less than 6 to expand the coverage of the candidate pool. The second round of prospective validation tests on 118 synthetic peptides reduced the root mean square error to 2.026 and improved the prospective hit rate to 40.7%. The distortion of the predicted trend caused by the distribution offset was alleviated, but a systematic overestimation failure mode was exposed, that is, the predicted activity was generally 2 to 3 log2GM_MIC units higher than the measured activity.

[0237] BioPIR-v3 is the third optimized version of the platform, featuring self-supervised contrastive learning and k-nearest neighbor (kNN) calibration (step 5 + v2 model). It fully inherits all the capabilities of BioPIR-v2 and adds self-supervised contrastive learning and k-nearest neighbor (kNN) calibration modules to address the systematic overestimation problem. This version uses the InfoNCE objective function to train the contrastive learning model based on the ESM2-650M embedding representation, making functionally similar sequences more clustered in local neighborhoods in the embedding space. During the inference phase, the 100 nearest neighbor samples of each candidate sequence are retrieved, and the nearest neighbor labels are aggregated through similarity-weighted averaging to obtain the calibrated activity prediction value. At the same time, a consistency gating is added: if the absolute difference between the original prediction value of the regressor and the k-nearest neighbor (kNN) calibration estimate exceeds 2 log2GM_MIC units, the candidate is deemed to have insufficient stability and is removed. The third round of prospective validation tests on 111 synthetic peptides reduced the root mean square error to 1.355 and improved the prospective hit rate to 76.6%. Systematic overestimation bias was effectively suppressed, but the remaining error was concentrated in the activity cliff region, which is a local nonlinear structure-activity relationship region where a small number of residue mutations can lead to large fluctuations in activity.

[0238] BioPIR-v4 is the fourth optimized version of the platform, featuring multimodal sequence-structure fusion and physical consistency screening (step 6 + step 7 + v3 model). It fully inherits all the capabilities of BioPIR-v3 and adds an activity cliff sensing multimodal modeling module and a physical consistency screening module to solve the remaining activity cliff problem and reduce the false positive rate. This version first groups sequences according to their literature sources, calculates the activity difference between sequence pairs within each group, defines a difference greater than 3 as a positive sample with a large activity cliff, and a difference less than 1 as a negative sample with a small activity cliff. A contrast-based learning objective with adaptive margins is used to enhance the model's ability to identify local nonlinear changes. Simultaneously, 3D structural information predicted by ESMFold is introduced, concatenating the one-hot encoded features of six elements (carbon, hydrogen, oxygen, nitrogen, sulfur, and selenium) with 3D Cartesian coordinates to form 9D structural feature units. A single-layer eight-head cross-attention encoder achieves deep fusion of sequence and structural features. Finally, coarse-grained molecular dynamics simulations are performed on all candidate peptides, calculating physical consistency scores from three dimensions: membrane binding robustness, peptide aggregation tendency, and oligomerization assembly ability. Only candidates with a normalized score of at least 80 are retained for the final output set. In the fourth round of prospective validation testing on 101 synthetic peptides, the root mean square error was reduced to 1.111, the prospective hit rate reached 100.0%, and the gap between simulation and reality was substantially bridged, with predicted values ​​and measured values ​​showing near-linear consistency.

[0239] Example 1: Specific implementation and performance verification of four-round iteration.

[0240] This invention completed four rounds of iterative verification, synthesizing and testing a total of 450 candidate peptides. Specific implementation details and performance are as follows: 1. BioPIR-v1 Implementation and Validation: Using the baseline protocol of steps 1-3, 76,509,716 virtual sequences were screened, and 120 peptides were finally synthesized for in vitro MIC testing. The results showed that 74.1% of the synthesized peptides had a MIC ≤ 64 μg / mL, of which 27 were highly active broad-spectrum peptides (MIC ≤ 16 μg / mL); however, the RMSE between prediction and measurement was 3.336, with a prospective hit rate of only 19.2%. The dominant error was distribution shift, indicating that the predicted trend collapsed in the actual deployment scenario.

[0241] 2. BioPIR-v2 Implementation and Validation: To address the distribution shift issue of v1, flow matching enhancement was introduced in step 4, amplifying 326,270 high-potential sequences into the training set. 36,297,996 new virtual sequences were screened, and 118 peptides were ultimately synthesized for testing. Results showed improved sequencing performance of high-activity regions, with predictions and measurements returning to a monotonic trend. However, a systematic overestimation of 2-3 log2 units was observed, reducing the RMSE to 2.026 and increasing the hit rate to 40.7%. The dominant error was insufficient absolute scale calibration.

[0242] 3. BioPIR-v3 Implementation and Validation: To address the systematic overestimation problem in v2, self-supervised comparison and kNN calibration from step 5 were introduced, and consistency gating was added to filter unstable candidates. Finally, 111 peptides were synthesized for testing. Results showed that systematic overestimation was effectively suppressed, RMSE decreased to 1.355, and the hit rate increased to 76.6%. The remaining errors were concentrated in the activity cliff region, with the dominant error being insufficient modeling of the local nonlinear structure-activity relationship.

[0243] 4. BioPIR-v4 Implementation and Validation: To address the activity cliff issue of v3, multimodal modeling in step 6 and physical screening in step 7 were introduced, ultimately synthesizing 101 peptides for testing. The results showed that the predictions and experiments were nearly linearly consistent, the RMSE decreased to 1.111, the prospective hit rate reached 100.0%, and the Sim-to-Real gap was substantially bridged.

[0244] Example 2: Wet experimental verification of candidate peptides.

[0245] The candidate peptides screened by BioPIR-v4 were systematically validated using wet experiments. The results are as follows: 1. In vitro activity and safety screening: The candidate peptides of BioPIR-v4 were tested for activity and hemolysis. A total of 23 peptides met the requirements of the therapeutic window (hemolysis ≤50% and GM_MIC ≤16μg / mL). These 23 peptides showed excellent activity against clinically resistant Gram-negative bacteria (such as ESBL-producing Escherichia coli and carbapenem-resistant Acinetobacter baumannii CRAB), with more than half of the candidate peptides having a MIC ≤8μg / mL against the target strains.

[0246] 2. Synergistic effect verification: The synergistic effect of the above 23 peptides with polymyxin B (PMB) was tested. The interaction was quantified using the fractional inhibitory concentration index (FICI). Among them, the FICI of BioPIR 383, BioPIR 423, and BioPIR 361 with PMB was 0.5, which met the preset synergistic standard. They can be used as adjuvants to enhance the sensitivity of PMB and reduce its clinical dosage and toxicity.

[0247] 3. Mechanism of Action Verification: Flow cytometry analysis of PI uptake, NPN outer membrane permeability assay, DiSC3-5 inner membrane depolarization assay, and transmission electron microscopy (TEM) confirmed that the three leading peptides can rapidly disrupt the integrity of the bacterial envelope: after 10 min of treatment, the proportion of PI-positive cells reached 39.2% (Acinetobacter baumannii) and 47.2% (Escherichia coli); dose-dependent increase in outer membrane permeability and inner membrane depolarization level, with the signal in the 16 μg / mL treatment group being more than 2-fold higher than that in the 4 μg / mL group; TEM showed that the bacterial envelope was thinner, cytoplasmic leakage occurred, and normal structures disappeared; LPS binding assay showed a concentration-dependent increase in relative fluorescence intensity (RFI), with RFI generally exceeding 200% at 128 μg / mL; transcriptome sequencing showed that after treatment, bacteria induced the expression of genes related to efflux pumps, membrane transport, envelope synthesis, and oxidative stress (adeA, adeB, bfmR, soxR, etc.), verifying the membrane-targeting mechanism at the molecular level.

[0248] 4. In vivo efficacy and safety verification: Mouse models of peritonitis and deep thigh infection were established to verify in vivo efficacy. In monotherapy, the bacterial load in organs of the three leading peptides decreased by approximately one order of magnitude, comparable to low-dose PMB. In combination with PMB, the bacterial load decreased by approximately two orders of magnitude, comparable to high-dose PMB. Safety assessment showed that after administration of the 40 mg / kg dose of the three leading peptides, mouse body weight and organ weight remained stable, and serum AST, ALT, CREA, BUN, and LDH levels showed no significant differences compared to the control group, with no hepatotoxicity or nephrotoxicity. In contrast, the mortality rate on day 1 in the high-dose PMB group reached 6 / 8, and the low-dose PMB group also experienced acute weight loss, with significant liver and kidney tissue pathology showing damage. This demonstrates that the safety of BioPIR leading peptides is significantly superior to that of PMB, a current last-line antibiotic in clinical practice.

[0249] Example 3: Comparison and verification with existing models.

[0250] Retrospective testing was conducted on 450 synthesized BioPIR peptide datasets using five existing mainstream AMP prediction models (APEX, SMEP, AMP-Cliff(ESM2), AMP-Cliff(ProGen2), and XGBoost-ESM2). The results showed that, despite the different model architectures, the overall hit rate was only 42.0%–45.1%, with no significant performance advantage. Furthermore, the performance fluctuated greatly across different iterations, with APEX showing a continuous decline in performance from early to later stages, XGBoost-ESM2 showing a gradual increase, and SMEP and AMP-Cliff variants exhibiting significant fluctuations. The predicted values ​​deviated widely from the identity line, indicating insufficient calibration capability and poor robustness under distribution shifts. This demonstrates that existing models cannot achieve stable forward-looking transformations, further highlighting the performance advantages of this invention.

[0251] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides, characterized in that, include: Step 1, Data Acquisition and Standardization: Acquire validated antimicrobial peptide and non-antimicrobial protein sequences to construct a sample set, and uniformly convert the active tags into logarithmic indices based on the geometric mean of the minimum inhibitory concentrations of multiple strains; adopt a similarity-aware grouping strategy, cluster according to sequence feature similarity and then divide them proportionally to construct training and validation sets without information leakage. Step 2, Construction of the baseline classification-regression cascade prediction model: Sequence representation is extracted using a pre-trained protein language model as a shared backbone, and a dual-task prediction head is used to output the antimicrobial peptide discrimination probability and activity prediction value respectively. The baseline prediction model is obtained by training until convergence. Step 3, Construction and initial screening of a large-scale virtual sequence library, and establishment of the BioPIR-v1 model: A large-scale virtual peptide sequence library is generated under preset physicochemical constraints, and then filtered through antimicrobial peptide discrimination, iterative round-adapted activity threshold filtering, multi-dimensional drug-likeness filtering and diversity clustering to obtain a set of candidate peptides to be verified. Step 4, Generative flow matching enhancement in the embedding space, and establishing the BioPIR-v2 model: Construct a generative flow matching model in the sequence embedding space to learn the mapping path from noise distribution to real antimicrobial peptide distribution; generate diverse candidate sequences and expand the training set by screening high-potential sequences through pseudo-labels of the previous model; retrain the model to restore the monotonic correlation between predicted and measured values ​​and correct distribution bias. Step 5: Self-supervised contrastive learning and k-nearest neighbor calibration. A BioPIR-v3 model is established. Self-supervised contrastive learning is performed based on the sequence representation output by the pre-trained protein language model to optimize the embedding space neighborhood structure. Regression predictions are calibrated using similarity-weighted aggregation based on k-nearest neighbor samples. A consistency gating filter between the original regression predictions and the calibrated values ​​is introduced to eliminate the absolute scale bias caused by systematic overestimation. Step 6: Multimodal modeling of activity cliff perception. Establish the first-stage model of BioPIR-v4, construct homology activity cliff supervision comparison pairs and use contrast quantity learning with adaptive intervals. At the same time, introduce protein three-dimensional structure information and fuse it with sequence features through cross attention to capture the nonlinear fluctuations in activity caused by key residue mutations and correct the activity cliff error. Step 7, Physical consistency screening, establishing the second-stage BioPIR-v4 model: Constructing a peptide-membrane complex simulation system and conducting molecular dynamics simulations, quantifying physical indicators from three dimensions: membrane binding robustness, peptide aggregation tendency, and maximum oligocluster size, and using weighted comprehensive scoring for filtering to eliminate false positive sequences with high statistical scores but no physical validity, and correcting for deviations in physical plausibility: Step 8, Closed-loop iterative control: The input is the wet experimental data of the candidate peptides synthesized and tested after each iteration. The dominant failure mode of the current prediction system is identified in each round, and the corresponding algorithm correction module is activated in a targeted manner. The output is the optimization strategy and updated model parameters for the next iteration, forming a self-improving closed-loop evolutionary path.

2. The failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides according to claim 1, characterized in that, Step 1 includes: Step 101, Positive Sample Collection and Initial Screening: Extract antimicrobial peptide sequences validated by wet experiments from publicly available antimicrobial peptide databases and perform two-stage filtering: retain peptide segments that fit the typical functional length range of antimicrobial peptides and remove sequences whose length does not meet the requirements for drug development; exclude non-natural linear sequences with N-terminal or C-terminal post-translational modifications or intrachain covalent bonds, and retain only naturally sourced linear unmodified antimicrobial peptides to ensure the biological consistency and drug development basis of the positive sample set; Step 102, Negative Sample Adaptation Construction: For classification tasks, natural non-antimicrobial protein fragments that match the length distribution of positive samples are sampled from the natural protein database as negative samples to construct clear boundaries between antimicrobial peptide or non-antimicrobial peptide categories; for regression tasks, experimentally validated weak or inactive peptide segments are added to the positive sample set to cover the full range of activity distribution from low to high activity, thereby improving the prediction stability of the regression model for the full gradient activity range. Step 103, Sequence Compliance Cleaning: Perform standardized cleaning on all sequences, unify the sequence character format, filter out illegal sequences containing non-natural amino acids or unknown encoded residues, retain only compliant sequences encoded by 20 standard amino acids, and eliminate data noise introduced by abnormal characters; Step 104, Activity Label Standardization: The geometric mean of minimum inhibitory concentrations (GM_MIC) of multiple strains is used as the core activity evaluation index to comprehensively reflect the broad-spectrum antibacterial ability of peptides; the activity labels of heterologous experimental reports are normalized to unify the dimensions and statistical caliber; the interval reported values ​​and repeated measurement values ​​are standardized, mapped, and aggregated to eliminate label noise introduced by experimental batch differences; based on clinically accessible antibacterial concentration thresholds and therapeutic window safety thresholds, activity level classification rules are defined, including basic activity thresholds, high activity thresholds, and therapeutic window thresholds that take into account both efficacy and safety. Step 105, Leakage-Free Similarity Grouping: Grouping by sequence length intervals to reduce the computational complexity of similarity; based on 3-mer Jaccard similarity, which measures the similarity between two sequences by comparing the intersection and union ratio of all consecutive amino acid fragments of length 3 in the sequence, calculating the local feature similarity of sequences within the same length interval; using a greedy clustering algorithm based on a preset similarity threshold to group highly similar sequences into the same functional group; randomly assigning the groups to the training and validation sets according to a preset ratio to ensure that similar sequences in the same group are not split; using a reproducible random assignment strategy to ensure the stability of the partitioning results, finally obtaining training and validation sets without information leakage, ensuring that the validation metrics truly reflect the generalization performance of the model.

3. The failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides according to claim 2, characterized in that, Step 2 includes: Step 201, Shared backbone network configuration: Select a protein language model that has been self-supervised pre-trained on natural protein sequences as a shared sequence encoder; this model has the ability to capture amino acid semantic features, evolutionary conservation and hidden structural information, and can map discrete amino acid sequences into a continuous vector space with biological meaning. Step 202, Dual-Task Head Design: Decouple and set up two independent prediction branches to achieve task-differentiated feature learning: Classifier branch: Focuses on learning the discriminative features of antimicrobial peptides, outputs the probability value of the sequence having antimicrobial activity, and achieves efficient filtering of non-antimicrobial peptide noise by optimizing the class distinction boundary; The regressor branch focuses on learning the continuous mapping relationship between sequence activity and structure, outputting standardized quantitative activity predictions, and providing a reliable basis for activity ranking by aligning with the baseline activity label. Step 203, Training Parameter Configuration: Adopt an optimization strategy adapted to deep networks to ensure stable model convergence and generalization performance; utilize an adaptive optimization algorithm with momentum combined with regularization mechanism to suppress overfitting risk; balance stability in the early stage of training with convergence accuracy in the later stage through dynamic learning rate scheduling and warm-up mechanism; set a pruning strategy based on gradient norm to prevent training oscillations caused by gradient anomalies; introduce an early stopping mechanism based on validation set performance, using dual indicators of classification and regression tasks as monitoring criteria to ensure that the model terminates training in a timely manner when it reaches optimal performance, avoiding invalid iterations; Step 204, Baseline Performance Validation: Perform an objective evaluation on a reserved test set completely independent of the training process to validate the performance on classification and regression tasks.

4. The failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides according to claim 3, characterized in that, Step 3 includes: Step 301: Generation of a large-scale virtual peptide sequence library that meets physicochemical constraints: A virtual library is generated within the physicochemical boundaries that adapt to the membrane action characteristics and drug-likeness requirements of antimicrobial peptides, rather than unlimited enumeration of the entire sequence space; the constraints cover typical functional lengths, hydrophobic distribution, amphiphilic structural features and the proportion of hydrophilic residues, taking into account both targeting ability and synthetic feasibility, to obtain a large-scale compliant candidate set. Step 302, two-stage cascaded screening: using a baseline cascaded model to filter layer by layer to reduce costs and improve efficiency: first, the classification branch is used to coarsely screen and remove non-antimicrobial peptide noise, compressing the candidate size; then, the regression branch is used to finely screen and output the activity prediction value, dynamically adjusting the screening threshold according to the iteration round; the first round locks in high-confidence candidates, and the subsequent rounds expand the candidate pool to cover the distribution offset scenario, providing sufficient optimization samples for the correction module. Step 303, Multi-dimensional drug-likeness filtering: Perform triple rule verification: verify solubility based on amino acid composition empirical rules to ensure dispersion in the physiological environment; eliminate sequences containing known toxic motifs or hemolytic risks exceeding the therapeutic window based on built-in toxicology rules to meet safety requirements; perform dual similarity verification with publicly available peptide drugs, covering both global sequence and local motif similarity, with the local similarity verification method consistent with the grouping strategy in Step 1; Step 304, diversity control based on hierarchical agglomerative clustering: introduce hierarchical clustering based on chemical features to avoid candidate clustering: adopt simplified coding of residues with similar physicochemical properties to focus on overall feature differences, and aggregate sequences from bottom to top based on chemical distance after stratification by length; select high-potential clusters according to predicted activity, and select the representative sequence with the best activity from each selected cluster to form a candidate set to be verified by scale-adapted wet experimental verification.

5. The failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides according to claim 4, characterized in that, Step 4 includes: Step 401, Embedding Space Generative Modeling: To address the prediction trend collapse problem of the baseline model on novel candidate sequences, a generative flow matching model is constructed in a continuous vector space; a lightweight protein language model is selected as a dedicated encoder to map known antimicrobial peptides to a low-dimensional continuous embedding space, reducing computational complexity and preserving core semantic features; a time-varying evolution path from noise distribution to the true antimicrobial peptide distribution is defined, and a vector field model based on the Transformer architecture is constructed. By fitting this path, the noise is gradually transformed into denoising dynamics with biologically meaningful sequence embeddings, and the model is trained until convergence to accurately approximate the true data distribution; Step 402, Candidate Sequence Generation and Decoding: Using the trained vector field model, inverse sampling is performed through an ordinary differential equation solver to gradually evolve high-potential antimicrobial peptide embeddings from random noise; the embeddings are decoded into specific amino acid sequences through a pre-trained language model head, and a controllable diversity sampling strategy is introduced in the decoding stage to explore the unknown sequence chemical space while ensuring the biological rationality of the sequence, and to avoid the generated results being limited to known training data; Step 403, pseudo-labeling and data augmentation: Use the baseline regressor to perform activity pseudo-labeling on the large-scale generated sequences, and screen candidate sequences whose predicted activity reaches the preset high potential threshold; merge these high potential sequences into the original training set to expand the data distribution boundary, and then retrain the prediction model so that the feature distribution learned by the model covers the chemical space of the real screening scenario, and restore the monotonicity of candidate ranking.

6. The failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides according to claim 5, characterized in that, Step 5 includes: Step 501, Self-supervised contrastive pre-training to optimize the embedding space: Self-supervised contrastive learning is carried out based on the sequence representation output by the pre-trained protein language model; by constructing an enhanced view of the input sequence to build positive sample pairs, and taking other sequences in the same batch as negative samples, the contrastive loss function is used to maximize the semantic similarity of positive sample pairs and minimize the similarity of negative sample pairs, forcing functionally similar peptides to cluster in the local neighborhood of the embedding space, so that the distribution pattern of the embedding structure is aligned with the functional similarity of antibacterial activity; a linear mapping layer is connected to the output of the backbone network to transform the general features into the contrastive learning-specific space, and a limited number of training rounds are carried out using an adaptive optimization strategy, so as to optimize the local neighborhood structure while retaining the general biological semantics learned by the pre-trained model; Step 502, Activity value calibration inference based on k nearest neighbors: The optimized embedding space is used to introduce local neighborhood consensus to perform absolute scale calibration on the original predicted value of the regression model; the context-aware sequence characterization of the query peptide is extracted, and the set of the most similar nearest neighbor samples is retrieved in the pre-constructed antimicrobial peptide embedding library; the calibration predicted value is calculated through a weighted aggregation mechanism based on cosine similarity, where the nearest neighbor samples with higher similarity are given a larger aggregation weight, so that the calibration result reflects the consensus estimate of the activity of the query sequence in the local neighborhood of the embedding space, and corrects the absolute scale bias of the global regression prediction; Step 503, Consistency Gating Filtering to Eliminate Unstable Candidates: Introducing a consistency verification mechanism between the original regression prediction value and the k-nearest neighbor calibration value, setting a judgment threshold based on the difference in the active logarithmic scale, if the absolute deviation between the two exceeds the preset threshold, the candidate is judged to have prediction instability and is eliminated, only retaining highly consistent candidates to enter the subsequent steps, so as to correct the absolute scale deviation of the global regression based on the local neighborhood consensus of the embedding space and suppress systematic overestimation.

7. The failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides according to claim 6, characterized in that, Step 6 includes: Step 601, Construction of supervised contrast pairs for activity cliff: Group sequences according to literature sources to ensure the comparability of activity values ​​within a group, calculate the activity difference between any two sequences within a group, define sequence pairs with significant activity differences as positive sample pairs of activity cliff and sequence pairs with small activity differences as negative sample pairs of non-cliff, construct a contrast learning sample set with supervised signals, and guide the model to focus on capturing small sequence differences that cause orders of magnitude changes in activity. Step 602, Adaptive contrast learning: Adopt a contrast learning strategy with adaptive interval, use the feature space distance as the sequence similarity metric, assign higher learning weights to difficult negative samples that are hard to distinguish, dynamically adjust the optimization boundary, enhance the model's sensitivity to key residue mutations, and align the feature space distribution with the nonlinear change law of activity. Step 603, Sequence-Structure Multimodal Fusion: Introducing the three-dimensional structural information output by the protein structure prediction tool, constructing a structural feature unit that integrates atomic spatial coordinates and elemental properties, and aligning the sequence feature dimensions through linear projection, a single-layer cross-attention encoder is used to achieve dual-modal deep fusion: using sequence features as query vectors to guide the model to focus on key regions in the structure that are related to function, and using structural features as bond and value vectors to provide physicochemical constraint information in three-dimensional space, while reducing the number of parameters and the risk of overfitting, it accurately captures the nonlinear fluctuations in activity caused by key residue mutations and conformational inversions, enabling the model to simultaneously possess sequence semantic understanding and structural spatial perception capabilities, providing a high-precision prediction basis for subsequent screening steps, and accurately capturing the nonlinear fluctuations in activity caused by key residue mutations and conformational inversions to correct the residual errors in the activity cliff region.

8. The failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides according to claim 7, characterized in that, Step 7 includes: Step 701, Construction of 3D Structure and Simulation System: Using multiple mainstream structure prediction tools, initial 3D conformations of candidate peptides with both diversity and rationality are generated. Peptide-membrane binding and peptide self-aggregation behavior are sampled simultaneously through a multi-copy array arrangement strategy. Secondary structure features of the initial conformation are preserved by coarse-grained force field conversion. A biomembrane system matching the composition of Gram-negative bacterial inner membrane is constructed, and a solvent environment simulating physiological ionic strength is set to form a complete peptide-membrane composite simulation system. Step 702, Molecular dynamics simulation: First, the energy of the simulation system is minimized to eliminate unreasonable conformational contact. Then, a production simulation of a sufficient duration is carried out under physiological temperature and pressure conditions. The simulation trajectory is saved at a preset frequency to obtain statistical data on the dynamic behavior of peptides on the membrane surface. Step 703, Quantification of physical indicators: The biophysical activity of candidate peptides is evaluated from three dimensions: first, membrane binding robustness, which quantifies the degree of stability of peptide binding to biological membranes; second, peptide aggregation tendency, which quantifies the non-specific aggregation characteristics of peptides; and third, maximum oligocluster size, which quantifies the ability of peptides to form dominant membrane-active assemblies. Step 704, Comprehensive Scoring and Filtering: Construct a weighted comprehensive scoring system with membrane binding stability as the core weighting term, while also considering peptide self-assembly characteristics; after normalizing the original scores, filter them according to a preset threshold, retaining only candidate peptides that meet the biophysical rationality standard, and removing false positive sequences with high statistical scores but no actual membrane action potential. This is to verify the membrane action potential of candidates based on biophysical priors, eliminate physical false positives, and provide a candidate set with real membrane disruption potential for wet experiments.

9. The failure mode-driven closed-loop intelligent discovery method for antimicrobial peptides according to claim 8, characterized in that, Step 8 includes: Step 801, Error Diagnosis and Failure Mode Decomposition: After each round of prospective wet experimental validation, the residual between the predicted activity value and the measured minimum inhibitory concentration (MIC) value is calculated. The error distribution is qualitatively and quantitatively analyzed to identify the dominant failure modes that currently restrict the screening hit rate, including four types of diagnosable modes: First, distribution shift, which is manifested as the loss of monotonic correlation between prediction and measurement and trend collapse; second, systematic overestimation, which is manifested as monotonic correlation between prediction and measurement but systematic deviation in absolute scale; third, activity cliff, which is manifested as the residual error concentrated in local regions with highly similar sequences but significant differences in activity; and fourth, insufficient physical rationality, which is manifested as the peptide predicted to be highly active lacking membrane binding stability or oligomerization ability at the biophysical level. Step 802, Targeted Correction Strategy Based on Failure Mode: Based on the identified dominant failure mode, to avoid blindly stacking model complexity, the corresponding correction module combination is automatically invoked to update the model architecture or training data in a targeted manner: For distribution shift, the embedding space flow matching generation enhancement process is invoked to learn the mapping path from noise to real antimicrobial peptides in the sequence embedding space and expand the training set to restore the monotonic correlation between predicted and measured values; For systematic overestimation, the self-supervised comparison and nearest neighbor calibration process is invoked to calibrate the absolute scale based on the consensus of the embedding space neighborhood and filter unstable candidates to suppress systematic overestimation; For activity cliff, the sequence-structure multimodal modeling process is invoked to fuse the three-dimensional structure through activity cliff supervised comparison and cross-attention to capture the nonlinear fluctuations in activity caused by residue mutations; For insufficient physical rationality, the physical consistency screening process is invoked to quantify membrane binding and oligomerization indicators through molecular dynamics simulation and weighted filtering to eliminate physical false positives; Step 803, step-by-step iterative evolution: each iteration fully inherits all the optimization results of the previous iteration, specifically addresses the core technical bottlenecks exposed in the current iteration, and sets the iteration termination condition: when the forward hit rate improvement of two consecutive iterations is less than 5%, or the RMSE of the regression task validation set is less than 1.2, the iteration is terminated; finally, a high consistency match between the prediction results and the wet experimental measured data is achieved.

10. A failure mode-driven closed-loop intelligent antimicrobial peptide discovery system, characterized in that, This system is configured to execute a failure mode-driven closed-loop intelligent antimicrobial peptide discovery method according to any one of claims 1 to 9, comprising: The data acquisition and cleaning module is used to acquire and clean antimicrobial peptide and non-antimicrobial protein sequences, unify the activity label as a log-normalized index, and output a set of normalized sequences. The similarity-aware data segmentation module, connected to the data acquisition and cleaning module, is used to cluster and group data based on sequence feature similarity and to divide the dataset, thereby constructing a training set and a validation set without information leakage. The classification-regression joint prediction module is connected to the similarity-aware data segmentation module. It is used to extract sequence representations with a pre-trained protein language model as the backbone, and output the antimicrobial peptide discrimination probability and activity prediction value through dual task heads to train the baseline prediction model. A large-scale virtual library construction module is connected to the classification-regression joint prediction module. It is used to generate a virtual peptide library under preset physicochemical constraints. The library is then filtered sequentially by antimicrobial peptide discrimination, activity threshold filtering, drug-likeness filtering and diversity clustering to output a candidate set to be verified. An embedding space flow matching generation enhancement module, connected to the large-scale virtual library construction module, is used to build a flow matching model in the sequence embedding space, generate and screen high-potential sequences to expand the training set, and solve the distribution offset problem. The self-supervised contrastive learning and nearest neighbor calibration module is connected to the large-scale virtual library construction module. It is used to optimize the embedding space neighborhood structure, calibrate the activity prediction value based on the aggregation of nearest neighbor samples, and eliminate unstable candidates by combining bias verification to solve the problem of systematic overestimation. The sequence-structure multimodal modeling module for activity cliff perception is connected to the large-scale virtual library construction module to construct activity cliff supervision sample pairs. Through adaptive contrastive learning and cross-attention fusion of three-dimensional structural information, it captures nonlinear changes in activity caused by residue mutations. The physical consistency screening module is connected to the closed-loop iterative control module and the large-scale virtual library construction module, respectively. It is used to construct a peptide-membrane simulation system, calculate membrane binding stability, aggregation characteristics and oligomerization ability through molecular dynamics, and screen physically reasonable candidates based on weighted scoring to solve the false positive problem. The closed-loop iterative control module is connected to each of the above modules. It is used to receive wet test data, identify the dominant failure mode of the current wheel and activate the corresponding correction module in a targeted manner, iterate progressively until the prediction is consistent with the actual measurement, and output a high-confidence candidate list. Each module can be deployed on the same machine or distributed across multiple computing nodes.

Citation Information

Patent Citations

  • Antibacterial peptide recognition and directed evolution method based on deep learning

    CN118298907A

  • Antibacterial peptide generation and screening method based on conditional potential diffusion model

    CN121789781A