Antibacterial peptide length adaptive generation method and device based on a paired learning framework

By constructing a lead set and mapping table through a pairwise learning framework, explicitly defining length constraint rules, and training a sequence transformation model, the problem that the antimicrobial peptide generation model cannot generate antimicrobial peptides of a specific length is solved, achieving adaptability and diversity in antimicrobial peptide generation and improving generation efficiency.

CN121983142BActive Publication Date: 2026-06-09ZHEJIANG LAB

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG LAB
Filing Date
2026-04-07
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing antimicrobial peptide generation models cannot effectively generate antimicrobial peptides of specific lengths, especially long-sequence antimicrobial peptides. Furthermore, the scarcity of training datasets limits the generalization ability of these models, making it impossible to efficiently generate diverse and accurate antimicrobial peptide candidate sequences.

Method used

A pairwise learning framework-based approach is adopted. By constructing a lead set, a target set, and a mapping table, length constraint rules between leads and targets are explicitly defined. A sequence transformation model is trained to achieve controllable length of antimicrobial peptide generation. Data augmentation is performed by expanding the lead set.

Benefits of technology

This technology enables length adaptation in antimicrobial peptide generation, improves the diversity and accuracy of generated sequences, alleviates the challenge of generating long-sequence antimicrobial peptides, and enhances the efficiency of antimicrobial peptide discovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121983142B_ABST
    Figure CN121983142B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for adaptive antimicrobial peptide length generation based on a pairwise learning framework, belonging to the field of computational biology. The method includes: constructing a lead set, a target set, and a mapping table. The lead set contains several amino acid sequences, and the target set contains known antimicrobial peptide sequences. The mapping table is used to explicitly define the pairing relationship and length constraint rules between the lead set and the target set. Based on the pairwise training data composed of the lead set, target set, and mapping table, a sequence transformation model is trained. For any input test lead sequence, the sequence transformation model generates candidate antimicrobial peptide sequences with antimicrobial potential. This invention innovatively decouples the antimicrobial peptide generation framework from the traditional "data-model" binary structure; it derives a unique data augmentation method, which, by adjusting the length mapping rules in the mapping table, can achieve the need for adaptive adjustment of antimicrobial peptide sequence length, solving the current situation where cutting-edge generation models cannot generate a large number of long antimicrobial peptides.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of bioinformatics and artificial intelligence-driven computational biology, and particularly relates to a method and apparatus for adaptive generation of antimicrobial peptide length based on a pairwise learning framework. Background Technology

[0002] Antimicrobial resistance has significantly exacerbated the global burden of deaths due to microbial infections, becoming a major and long-standing challenge in the pharmaceutical industry. Antimicrobial peptides (AMPs), composed of short-chain amino acid sequences, can kill bacteria through various mechanisms, including disrupting bacterial cell membranes, immune regulation, specific target binding, or interfering with metabolic processes. Antimicrobial peptides have been proven to inhibit microbial pathogens, possessing broad-spectrum antimicrobial activity and a low risk of resistance, thus being considered promising candidates for developing novel alternative antibiotic therapies. They can help mitigate the threat posed by drug-resistant pathogens to patient lives and socioeconomic status. Therefore, the need to discover and design highly effective antimicrobial peptides is increasingly urgent.

[0003] Currently, various strategies exist for discovering novel antimicrobial peptides. For example, bioactivity assays (such as chromatographic separation and fluorescence screening) offer high precision but are time-consuming, costly, and difficult to scale up. Traditional bioinformatics methods, such as BLAST, have significant advantages in sequence alignment and can be used to identify antimicrobial peptides. However, their "homology filtering" mechanism limits the diversity of results and can easily limit the scope of exploration. In contrast, artificial intelligence strategies and multifunctional tools can significantly accelerate and expand the discovery process of antimicrobial peptides. To date, several AI-driven antimicrobial peptide design models have been developed, which can be broadly categorized into "recognition models" and "generative models." Recognition models aim to determine whether a given peptide sequence has antimicrobial activity. For instance, in 2022, Ma et al. successfully discovered novel antimicrobial peptides in the human gut microbiome using three antimicrobial peptide predictors: Attention, LSTM, and BERT. In 2025, Wang et al. proposed EvoGradient and successfully discovered novel antimicrobial peptides in the human oral microbiome. Generative models generate novel antimicrobial peptide candidate sequences with potential therapeutic effects, such as HydrAMP (2023), Pepdiffusion (2025), and AMP-designer (2025). The generated candidate peptides usually need to be iteratively screened by multiple recognition models or other filtering strategies (such as physicochemical properties, structural features) to meet the requirements of activity, specificity, and safety before experimental verification.

[0004] The dramatic drop in cost and shortened cycle time have made the optimization of antimicrobial peptide generation models a crucial step in the field of anti-infective therapy. However, existing antimicrobial peptide generation models still face the constraint of data scarcity. For example, the antimicrobial peptide database APD3 contains only 6,301 antimicrobial peptides (verified as of December 2025), far smaller than the datasets in the field of computer vision (the computer vision dataset ImageNet (Deng et al., 2009) contains over 14 million labeled data samples). Furthermore, directly augmenting antimicrobial peptide sequences lacks rigor, as even minor modifications to a single sequence can lead to drastic functional changes, and activity can only be verified through wet experiments. Therefore, directly altering sequences to amplify the antimicrobial peptide training dataset is ineffective. The scarcity of training datasets limits the generalization ability of the generation model, which in turn limits the accuracy of sequence generation. Therefore, performing data augmentation without altering the original antimicrobial peptide sequence to improve the generalization ability of the generation model presents a significant challenge.

[0005] On the other hand, the scarcity of data also leads to a skewed data distribution. Figure 1 The sequence length distribution in the antimicrobial peptide dataset APD3 is shown. Only 348 sequences are longer than 60 bytes. The sequence length of antimicrobial peptides affects their intrinsic functional properties. Both long and short antimicrobial peptide sequences have their own advantages (distinguished by whether the sequence length is greater than 60 bytes), and a comparison of these advantages is shown in Table 1.

[0006] Table 1 - Comparison of advantages in antimicrobial peptide sequence length

[0007]

[0008] However, cutting-edge antimicrobial peptide generation models cannot explicitly control the length of generated antimicrobial peptides. Furthermore, the sparsity of long antimicrobial peptide sequence data prevents existing generation models from efficiently generating such sequences. For example, HydrAMP antimicrobial peptide generation models, such as VAEs, aim to sample from a latent space that matches the training data distribution, and then decode the data using a trained decoder to reconstruct potential candidate sequences, thus generating antimicrobial peptides. In this process, it is impossible to clearly and specifically extract sample points from the latent space that can decode a sequence of the specified length. Therefore, these techniques cannot efficiently generate antimicrobial peptides of a specific length, especially long antimicrobial peptide sequences where the data itself is scarce. Although, at the target level, to achieve the goal of generating fixed-length antimicrobial peptide sequences, a generation model could generate far more antimicrobial peptide sequences than expected, and then manually select candidate sequences that meet the expected length, this method is ineffective for long antimicrobial peptide sequences. This is because existing generation models themselves cannot produce relatively long antimicrobial peptide sequences, thus fundamentally inhibiting this approach. Summary of the Invention

[0009] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and apparatus for adaptive generation of antimicrobial peptide length based on a pairing learning framework.

[0010] This method constructs a pairwise learning framework for antimicrobial peptide generation, comprising four core components: a lead set, a mapping table, a target set, and a converter. During the training phase, the mapping table explicitly establishes the correspondence between leads and targets, and the converter learns and internalizes this mapping mechanism. During the inference phase, the distribution of generated antimicrobial peptide sequences can be adjusted simply by regulating and changing the test leads. This invention addresses the problem of strong "data-model" coupling in the antimicrobial peptide generation paradigm and achieves controllable length of generated antimicrobial peptides at the model level, thereby alleviating the current limitation in generating long-sequence antimicrobial peptides. Furthermore, while maintaining the original antimicrobial peptide sequence, this invention can expand the training dataset by pairing with more diverse lead data. This data augmentation method improves the accuracy of the generated sequences. Evaluation experiments show that the antimicrobial peptides generated by this invention exhibit greater diversity while maintaining superior accuracy. Therefore, this invention will accelerate the efficiency of antimicrobial peptide discovery, contribute to the advancement of anti-drug resistance research, and help alleviate the global drug resistance problem.

[0011] The technical solution adopted in this invention is as follows:

[0012] This invention first provides a method for adaptive generation of antimicrobial peptide length based on a pairwise learning framework, which includes the following steps:

[0013] 1) Construct a lead set L, a target set S, and a mapping table M, wherein the lead set L contains n elements, each of which is an amino acid sequence; the target set S contains n elements, each of which is a known antimicrobial peptide sequence; and the mapping table M is used to explicitly define the pairing relationship and length constraint rules between each element in the lead set L and the corresponding element in the target set S.

[0014] 2) Based on the paired training data consisting of the lead set L, the target set S, and the mapping table M, train the sequence transformation model so that the sequence transformation model learns the mapping relationship from the lead sequence to the target antimicrobial peptide sequence, wherein the mapping relationship internalizes the length constraint rules in the mapping table M;

[0015] 3) For any input test lead sequence, input it into the trained sequence conversion model, and the sequence conversion model generates a candidate antimicrobial peptide sequence with antimicrobial potential. The length of the generated candidate antimicrobial peptide sequence is jointly controlled by the length of the test lead sequence and the length constraint rules internalized in the model.

[0016] According to a specific embodiment of the present invention, the length constraint rules defined in the mapping table M include at least one of the following:

[0017] The length compression rule stipulates that the length of the sequence in the lead set is not less than the length of its paired target antimicrobial peptide sequence;

[0018] The length extension rule stipulates that the length of the lead-set sequence is not greater than the length of its paired target antimicrobial peptide sequence.

[0019] The length equivalence rule applies, where the length of the sequence in the lead set is equal to the length of its paired target antimicrobial peptide sequence.

[0020] According to a specific embodiment of the present invention, the method of the present invention further includes the step of expanding the paired training data through data augmentation mode, which specifically includes: in step 2), keeping the target set S unchanged, expanding the lead set L, so that the same antimicrobial peptide sequence in the target set S is paired with multiple different lead sequences in the lead set L, thereby increasing the amount of paired training data while keeping the antimicrobial peptide sequence in the target set unchanged.

[0021] The present invention also provides an antimicrobial peptide length adaptive generation device based on a pair learning framework, the device comprising one or more processors and a graphics processing unit (GPU); the one or more processors are configured to execute instructions to implement the aforementioned antimicrobial peptide length adaptive generation method based on a pair learning framework.

[0022] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the aforementioned method for adaptive generation of antimicrobial peptide length based on a pairing learning framework.

[0023] The present invention also provides an electronic device comprising:

[0024] Memory, used to store computer programs;

[0025] One or more processors, and a graphics processing unit (GPU), are used to execute a computer program stored in the memory to implement the aforementioned antimicrobial peptide length adaptive generation method based on a pairwise learning framework.

[0026] Traditional generative frameworks rely on two core components: the target dataset and the algorithm model. Once the dataset and algorithm model are determined, the trained model generates candidate data with fixed distribution features. In this process, a strong reliance on the target dataset leads to fixed model learning biases. Furthermore, during the generation phase, it is typically necessary to sample from the latent space and use a decoder to reconstruct the samples into the target data type. The semantic collapse of latent space samples limits the controllability of the already trained model. Therefore, this invention proposes an antimicrobial peptide pairing learning framework. Based on the target dataset and model, this invention adds a lead set and a mapping table to regulate model generation. This gives the entire generative framework an adjustable exit point; the model and generated sequence lengths can be controlled by setting different lead sequence lengths. Attached Figure Description

[0027] Figure 1 The distribution of APD3 sequence lengths in the antimicrobial peptide dataset;

[0028] Figure 2 This is a schematic diagram of the antimicrobial peptide pairing learning framework of the present invention;

[0029] Figure 3 This is a flowchart of the antimicrobial peptide length adaptive generation method based on the pairing learning framework of the present invention;

[0030] Figure 4 For evaluation of physicochemical properties (benchmark comparison);

[0031] Figure 5 The candidate sequence length distribution generated for AMPDS;

[0032] Figure 6 The candidate sequence length distribution generated for HDA;

[0033] Figure 7 The candidate sequence length distribution generated for PDFS;

[0034] Figure 8 for The generated sequence length distribution;

[0035] Figure 9 for The generated sequence length distribution;

[0036] Figure 10 For physicochemical property evaluation (adjusting the length of the test lead set);

[0037] Figure 11 For physicochemical property evaluation (data augmentation). Detailed Implementation

[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0039] like Figure 2 As shown, this embodiment constructs a pairwise learning framework for antimicrobial peptide generation, which includes four core components: lead set, mapping table, target set, and converter.

[0040] The set of lead wires, denoted as The range of values ​​for each element in the set is . .

[0041] The target set, denoted as The range of values ​​for each element in the set is . .

[0042] Mapping table, denoted as ,in .

[0043] Converter, denoted as ,in These are the model parameters.

[0044] To regulate the training and generation of the generative model, this invention introduces a lead set as a control basis, and associates it with the target set through a mapping table to form a pairing set. The two sets have the same number of elements, that is... The converter is responsible for learning this mapping rule. During model inference, after receiving a customized test lead, the converter outputs the generated antimicrobial peptide candidate sequence, i.e. .

[0045] The core of this invention lies in the lead set and mapping table. In one specific embodiment, the transformer is fixed as a two-layer Transformer. This is because the Transformer was demonstrated at the 2020 ICLR conference as a mapping approximator between sequence spaces. The target set is defined as a set of antimicrobial peptide sequences that have been validated by wet experiments, where each sequence contains only 20 basic amino acids. To make the lead set explicitly expressible, we stipulate that its value range completely overlaps with the target set; that is, any element in the lead set is a sequence composed of 20 standard amino acids. This is exciting because the effect of the antimicrobial peptide pairing learning framework is to transform any protein sequence into an antimicrobial peptide, rather than being limited to protein backbones with optimization value, as in mutation or evolution tasks.

[0046] like Figure 3 As shown, based on the pairing learning framework for antimicrobial peptide generation described above, this embodiment proposes an adaptive antimicrobial peptide length generation method based on the pairing learning framework, which includes the following steps:

[0047] 1) Construct a lead set L, a target set S, and a mapping table M, wherein the lead set L contains n elements, each of which is an amino acid sequence; the target set S contains n elements, each of which is a known antimicrobial peptide sequence; and the mapping table M is used to explicitly define the pairing relationship and length constraint rules between each element in the lead set L and the corresponding element in the target set S.

[0048] 2) Based on the paired training data consisting of the lead set L, the target set S, and the mapping table M, train the sequence transformation model so that the sequence transformation model learns the mapping relationship from the lead sequence to the target antimicrobial peptide sequence, wherein the mapping relationship internalizes the length constraint rules in the mapping table M;

[0049] 3) For any input test lead sequence, input it into the trained sequence conversion model, and the sequence conversion model generates a candidate antimicrobial peptide sequence with antimicrobial potential. The length of the generated candidate antimicrobial peptide sequence is jointly controlled by the length of the test lead sequence and the length constraint rules internalized in the model.

[0050] The core of this invention lies in learning the mapping relationship from the lead set to the target set, and controllingly training a converter with a length mapping mode by adjusting the mapping table during training to change the length mapping method. A schematic diagram of the execution mechanism of this invention is shown below. Figure 2 As shown. During the training phase, the input of this invention consists of three parts: a lead set (an arbitrary protein sequence composed of 20 standard amino acids), a target set (a series of antimicrobial peptides), and a mapping table (a mapping between the lead set and the target set). The output is a transformer (two-layer Transformer) trained from these three components. This transformer captures the mapping relationship between the lead set and the target set. During inference, new test lead data is input, and the model transforms it into protein sequences with antimicrobial potential as candidates for antimicrobial peptides.

[0051] During the training phase, different weight models can be constructed by controlling the mapping table. The most basic is random mapping, where each element in the target set is randomly matched with a sequence randomly sampled from the entire sequence space. This random strategy can amplify the differences between the lead set data. Even if two elements in the target set have high similarity, the sequence similarity between their respective lead targets can still have significant differences. This less constrained mapping mode will make the mapping from the entire sequence space to the antimicrobial peptide data more dispersed (maximum entropy theorem), which helps to explore a wider space. Based on this, we restrict the sequence length relationship between lead set elements and target set elements in the mapping table to control the length of the generated antimicrobial peptide sequences. This includes the following three mapping table construction methods.

[0052] Length compression: The sequence length in the paired lead set will not be less than the sequence length of the corresponding object set elements;

[0053] Length extension: The sequence length in the paired lead set will not exceed the length of the corresponding object set element sequence;

[0054] Equivalent length: The sequence length in the paired lead set is equal to the sequence length of the corresponding object set elements.

[0055] The experimental verification section below evaluates the sequences of these three different mapping relationships. Experimental results show that most of the antimicrobial peptides generated by this invention satisfy the mapping rules contained in the mapping table; that is, the length relationship between the test lead and its corresponding generated antimicrobial peptide sequence conforms to the length relationship in the mapping table. This further confirms that this invention has strong sequence length controllability and is suitable for generating antimicrobial peptides of arbitrary sequence length.

[0056] The key to the antimicrobial peptide pairing learning framework lies in its explicit introduction of lead sets and mapping tables, decoupling it from traditional generative architectures (such as diffusion models and VAE generative models) that rely solely on a "data-model" binary system. Therefore, the potential variable performance of lead sets and mapping tables can accommodate specific generative requirements. Taking a length-extended mapping table as an example, simply setting the length of the test lead set to greater than 60 during the inference phase allows the model to generate long-sequence antimicrobial peptides. This overcomes the limitation of current state-of-the-art models in effectively generating long-sequence antimicrobial peptides. Therefore, this invention can explore the sequence space more broadly and flexibly control the length of candidate antimicrobial peptide sequences.

[0057] The antimicrobial peptide pairing learning framework is well-suited for antimicrobial peptide generation. First, antimicrobial peptide sequences are generally short, typically consisting of 5 to 100 amino acids. Second, the amount of existing antimicrobial peptide data is relatively small. This makes it possible to use a lightweight transformation model that supports frequent training by continuously adjusting the mapping table, with low computational and resource consumption: short sequence lengths result in low GPU memory usage, and the small amount of antimicrobial peptide data shortens training time. Furthermore, antimicrobial peptide generation is essentially a filtering-based spatial exploration task, where the diversity and accuracy of the generated results are equally important. The pairing learning framework, by adjusting the mapping table and lead set, can provide more attempts in exploring the sequence space, rather than being limited by the two strongly coupled types of frameworks (such as diffusion models and VAE generation models), thus greatly improving the diversity of generated sequences.

[0058] By simultaneously manipulating the lead set and the mapping table, this invention achieves control over the converter and the generated candidate sequences. Therefore, without loss of generality, we assume I(L; S) > 0, where I(·) represents mutual information. This inequality shows that L and S are not independent, and the observed L can provide non-zero information for the generation of S. Subsequent experimental evaluations also verified the rationality of this assumption: using different test leads during the inference phase or different mapping tables during the training phase both lead to changes in the distribution of generated sequences. The generated sequences can be manipulated under the guidance of the lead set. However, the key point lies in how to standardize the construction of the test leads; Lemma 1 provides the necessary guidance for this.

[0059] Lemma 1: Let random variable L be the lead and random variable S be the generating sequence, then H(S) ≤ H(L), where H(·) represents entropy.

[0060] Proof: Based on the definition of entropy, we can derive H(S) − H(L) = H(S | L) − H(L | S). The specific derivation method is as follows.

[0061]

[0062] Conditional entropy H(L | S) represents the information entropy of random variable L given random variable S. Similarly, conditional entropy H(S | L) is also expressed. This invention aims to map leads in the entire sequence space to a space representing the distribution of antimicrobial peptides. Specifically, for any given lead, the generated sequence is uniquely determined; conversely, given a generated sequence, its corresponding lead cannot be uniquely determined because multiple different leads may map to the same sequence. Therefore, H(L | S) ≥ H(S | L). Combining the above equation, we get H(S) − H(L) = H(S | L) − H(L | S) ≤ 0. Q.E.D.

[0063] This lemma indicates that the entropy of the generated sequence in this invention is governed by the entropy of the test lead sequence. If the leads occupy only a small region of the sequence space, the candidate sequences will tend to cluster, increasing their similarity and decreasing their diversity. In extreme cases, all sequences in the test lead set may be identical or differ by only a few residues. Even if the leads themselves are significantly different, they may still be mapped to the same sequence, leading to output redundancy and further compressing the effective entropy. Thus, this lemma provides operational guidance: if the task objective is to obtain diverse antimicrobial peptide candidate sequences, the lead set should be dispersed throughout the sequence space; if exploring variants around a single protein backbone, the leads can be restricted to a narrow mutation radius.

[0064] The amount of antimicrobial peptide data is relatively small, and directly augmenting antimicrobial peptide sequences lacks rigor. For example, altering a single residue in an antimicrobial peptide sequence to obtain an approximate sequence and then identifying this sequence as an antimicrobial peptide is flawed. This is because even a small change in a single sequence can lead to a drastic change in its function, and its activity can only be verified through wet experiments. Therefore, the method of directly altering sequences to amplify the antimicrobial peptide training dataset is ineffective.

[0065] The method of this invention can make full use of the target dataset, thereby generating an indirect data augmentation mode: by expanding the set of leads, different leads are anchored to the same target instance, thereby expanding the scale of training data.

[0066] Specifically, in an optional implementation, step 2) of the method of the present invention includes a step of expanding the paired training data through data augmentation. This step involves keeping the target set S unchanged and expanding the lead set L so that the same antimicrobial peptide sequence in the target set S is paired with multiple different lead sequences in the lead set L, thereby increasing the amount of paired training data. The expansion of the lead set L includes: randomly generating new amino acid sequences as new lead sequences; or partially masking the antimicrobial peptide sequences in the target set S and using the masked sequences as new lead sequences.

[0067] For example, a single paired training sample This can be achieved by pairing the same target with another lead. The dataset is expanded to two distinct samples. Table 2 shows detailed examples (double pairing: data size increased from 100 to 200). Under this strategy, the original antimicrobial peptide sequence can be expanded into the training dataset without any changes. It should be noted that the data augmentation mode of this invention is not limited to double pairing; triple pairing or even more can be implemented. This will result in a training set with a larger dataset. The increased training data will encourage the model to improve the accuracy of generating antimicrobial peptides.

[0068] Table 2 - Examples of Data Augmentation in this Invention

[0069]

[0070] This data augmentation strategy relies on a pairwise learning framework. Because the pairwise learning framework of this invention introduces lead sets, the model's input evolves from a single antimicrobial peptide dataset to a binary input pattern <lead, antimicrobial peptide>. This achieves the fundamental condition of expanding the training set without changing the original antimicrobial peptide dataset: only the binary input dataset needs to be expanded. That is, only the lead set needs to be added while ensuring the antimicrobial peptide sequence remains unchanged. Simultaneously, the expanded pairwise data will generate more localization matching anchor points. This makes the distribution of lead sets in the encoding latent space more closely match the distribution of antimicrobial peptides during training, ultimately improving the accuracy of the generated sequences. This can be well understood from an information theory perspective. The converter in the pairwise framework actually maps the lead space with larger values ​​to the antimicrobial peptide space with smaller values; this is a form of space compression. During the inference phase, some lead sets are mapped to non-antimicrobial peptide spaces. During the training phase, introducing more pairwise datasets <lead, antimicrobial peptide> is equivalent to introducing more spatial pairwise anchor points. This increases the amount of pairwise information seen by the model during training (increased pairwise determinism). Consequently, during inference, the certainty that the sequence generated by the model belongs to the antimicrobial peptide space increases accordingly, that is, the probability that the generated sequence is an antimicrobial peptide increases.

[0071] To make the objectives, technical solutions, and advantages of this invention clearer, the invention has been further described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described above are merely illustrative of the invention and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention. The implementation methods described in the exemplary embodiments above do not represent all implementation methods consistent with this invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0072] An implementation example of the present invention was carried out on a machine equipped with an Intel Core i7-1255U CPU, an NVIDIA A40 GPU with 48GB of video memory, and 16GB of RAM. The target set of the present invention was set to the antimicrobial peptide dataset APD3, and the transformer was set to a two-layer Transformer with its parameters set to the default Transformer parameters (h=8). ; The loss function is set to LabelSmoothingKLDivLoss, and the training epochs are set to 1000.

[0073] This invention (denoted as LMT) was compared with existing technologies, including HydroAMP (published in Nature Communications in 2023), Pepdiffusion (published in Science Advances in 2025), and AMP-designer (published in Science Advances in 2025), abbreviated as HDA, PDFS, and AMPDS, respectively. The impact of the test lead set on the generated sequences was then evaluated. Finally, the impact of the data augmentation mode employed in this invention on the generated results was tested. For each technology, 10,000 non-redundant sequences were selected for evaluation.

[0074] Evaluation indicators:

[0075] The evaluation metrics consist of two aspects: sequence diversity and antimicrobial peptide generation accuracy. Sequence diversity was assessed using Levenshtein distance. Antimicrobial peptide generation accuracy was evaluated using three antimicrobial peptide predictors published in Nature Biotechnology in 2022 by Ma et al.: Attention, 1STM, and BERT. Many studies have successfully used these three predictors to discover novel antimicrobial peptides, thus this accuracy evaluation method is valid. The outputs of these three predictors are values ​​between 0 and 1, with values ​​closer to 1 indicating a higher likelihood of a potential antimicrobial peptide. We selected a threshold of 0.8 and considered generated sequences with scores from all three predictors greater than or equal to this threshold as potential antimicrobial peptides.

[0076] Actual test results of this scheme:

[0077] 1) Benchmark Comparison. First, we compared our invention with cutting-edge antimicrobial peptide generation models. We constructed a random mapping table and trained a converter. Based on this, we constructed two different sets of test leads for evaluation: one set was a randomly assembled set of leads (denoted as Lt, where the sequence length of the test leads was limited to 100), and the resulting generated sequences were denoted as follows: The other set is a customized set of leads (the length of the lead sequences is fixed between 30 and 40 to match the sequence length range of the advanced antimicrobial peptide generation model). The generated sequences are denoted as follows: The evaluation results are as follows: Figure 4 As shown in Table 3.

[0078] Table 3 - Generated Sequence Diversity and Accuracy (Benchmark Comparison)

[0079]

[0080] The physicochemical properties of all generated models were tested using the modlAMP analysis suite, and the results are shown in Figure 4. The sequence distributions generated by each model differed; among them, The distribution of the samples highly overlaps with that of the training set, indicating that the model has internalized the potential distribution of antimicrobial peptides and can generate sequences with similar distributions through different leads. Table 3 summarizes the diversity indicators. The sequence diversity was significantly higher than that of the control method; even with strict constraints on the test lead set. The model still maintains greater diversity than existing antimicrobial peptide generation models, highlighting the advantages of LMT in generating novel antimicrobial peptide candidates. Table 3 also provides an accuracy assessment: the predictor's accuracy on the training set is 74.37%, indicating that the evaluation method still has false negatives. Further, 0.1 M sequences were uniformly sampled within the length range of 10-100. Evaluation by these three independent predictors showed that the probability of random protein sequences having antimicrobial activity was approximately 1.02%. This value constitutes a lower bound for effectiveness—a generation model with a prediction accuracy higher than this threshold is considered effective. The accuracy rate reached 90.40%, significantly exceeding the lower bound, validating its effectiveness. The results also revealed the inherent trade-off between diversity and accuracy in antimicrobial peptide generation: while AMPDS boasts high accuracy, its diversity is limited. Diversity is lower than It is more accurate and surpasses all existing technologies in both metrics, achieving the optimal balance between the two.

[0081] Furthermore, the advanced antimicrobial peptide model cannot generate long-sequence antimicrobial peptides (sequence length greater than 60). Figures 5 to 9 The distribution of candidate sequence lengths generated by various antimicrobial peptide generation models was statistically analyzed. The results show that all three cutting-edge models generated zero long-sequence antimicrobial peptides. Of the generated antimicrobial peptide candidates, 3497 had a sequence length greater than 60. As a control group of this invention, by limiting the sequence length in the test lead set, the length distribution of the generated antimicrobial peptides is made to match the distribution of existing technologies. Therefore, it can generate only short-sequence antimicrobial peptides. Thus, this invention can adaptively control the length of the generated antimicrobial peptides, alleviating the shortcoming of current research models that cannot efficiently generate long-sequence antimicrobial peptides. Furthermore, experimental evaluation results show that the antimicrobial peptide sequences generated by this invention possess both high sequence diversity and generation accuracy.

[0082] 2) Adjusting the length of the test lead set. In this experimental setup, all test leads were constructed through uniform random sampling under a defined length constraint. For example... The lead length is limited to [10, 20], and the remaining lead sets follow the same rule, where the length span is fixed at 10. The lead length is limited to [30, 40]. The lead length is limited to [50, 60]. The lead length is limited to [70, 80]. For example... Figure 10 As shown, different test leads resulted in significant differences in the generated distribution; short leads biased the generator towards short sequence candidates, while long leads produced a wider distribution. The experimental results further demonstrate that LMT can regulate the generation of antimicrobial peptide candidates through lead design, achieving length-adaptive generation of antimicrobial peptides. Table 4 evaluates the diversity and accuracy of the generation results: short leads produced narrower candidate diversity but higher accuracy; conversely, long leads expanded the sequence space, resulting in a slight decrease in accuracy.

[0083] Table 4 - Generated Sequence Diversity and Accuracy (Adjusting Test Lead Set Length)

[0084]

[0085] 3) Testing the length mapping relationship. This invention uses three different length mapping tables and trains three different converter weights for testing and comparison. These three different models are denoted as follows: , and The lead sequences in their mapping tables are all randomly generated, but each has a length constraint: length equivalence (corresponding to...). ), length extension (corresponding) ) and length compression (corresponding to For example, length extension means that the length of the sequence in the paired lead set will not be greater than the length of the corresponding target set element sequence.

[0086] We will evaluate whether this invention still maintains this length-dependent rule during the reasoning process. Let This indicates the number of sequences in the test lead set whose length exceeds the length of the corresponding generated sequence. and The definition is similar. And the ratio... This is defined as the quotient obtained by dividing the cumulative sum of the length differences between each generated sequence and its paired lead sequence by the total number of generated sequences. The test evaluation results are shown in Table 5. Experimental results show that the length relationships in the mapping table are reproduced during the reasoning process. For example, in... In the mapping table, the length of the sequences in the target set uniformly exceeds the length of their corresponding leads. This length dependency was confirmed in the inference: out of 10,000 generated results, 8,388 generated sequences were longer than their paired test leads. This indicates that the converter successfully learned the length mapping relationship and achieved the goal of controllable antimicrobial peptide length generation by manipulating lead length. Taking LMTeq as an example, although the number of pairs with the same length is relatively small, The value approaching zero indicates that the deviation between the lead length and the generated sequence length remains at a very small level. This also verifies that the pairing learning framework has learned this length dependency. Therefore, this invention can indeed control the length of the generated antimicrobial peptide by controlling the test lead length. This achieves the goal of generating antimicrobial peptides of arbitrary sequence lengths, alleviating the bottleneck in the current research field where antimicrobial peptide generation models cannot efficiently generate antimicrobial peptides.

[0087] Table 5 - Statistical Comparison of Test Lead Sequence Length and Generated Sequence Length

[0088]

[0089] 4) Data Augmentation. This invention achieves indirect data augmentation by expanding the lead set: different leads are anchored to the same target instance, thereby expanding the training data. We use two mapping methods—random mapping and masking (a common strategy in natural language models)—to verify the effectiveness of this augmentation strategy. The baseline model using masking is denoted as... The lead data in the mapping table is obtained by masking the target set (antimicrobial peptide sequences) with a masking rate of 0.5. In this experiment, using... and This is the control model. That is, the training data has not undergone data augmentation: the number of elements in its lead set is exactly the same as the number of elements in the target set. However, for... The cardinality of its lead set is twice that of the target set. This is three times the original value. The lead sets of these models are randomly paired with the target set, and each element in the target set appears two or three times. and Following the same principles, the original antimicrobial peptide sequences can be expanded into the training set without any modification. All models use the same set of test leads (Lt) for sequence generation, and the evaluation results are as follows: Figure 11 As shown in Table 6.

[0090] Table 6 - Generated sequence diversity, accuracy, and proportion of unique sequences (data augmentation)

[0091]

[0092] Figure 11 The physicochemical properties of the generated antimicrobial peptide sequences are presented. The results show differences in the sequence distribution generated by different models. Table 6 summarizes the diversity and accuracy evaluation results of the generated candidate sequences. All models exhibit high sequence diversity. Furthermore, the accuracy of the generated sequences monotonically increases with the degree of data augmentation. The experimental results confirm the effectiveness of the data augmentation strategy in this invention: it can improve the accuracy of the antimicrobial peptide sequences generated by the model.

[0093] Based on the comprehensive experimental evaluation results, this invention can adaptively generate antimicrobial peptides of arbitrary length, alleviating the problem that advanced generative models cannot generate long-sequence antimicrobial peptides. Furthermore, the data augmentation method derived from this invention can amplify training data without altering the original antimicrobial peptide sequences, thus improving the generation accuracy of the trained model. Finally, experimental results also demonstrate that the antimicrobial peptide sequences generated by this invention have high accuracy and diversity. Therefore, this invention can accelerate the efficiency of antimicrobial peptide discovery, contribute to the advancement and development of antimicrobial resistance research, and help alleviate the global problem of antimicrobial resistance.

[0094] Corresponding to the aforementioned embodiments of the antimicrobial peptide pairing learning and generation method based on artificial intelligence algorithms, the present invention also provides embodiments of an apparatus for the antimicrobial peptide pairing learning and generation method based on artificial intelligence algorithms.

[0095] The antimicrobial peptide pairing learning and generation device based on artificial intelligence algorithm provided in this embodiment of the invention includes one or more processors and a GPU processor, used to implement the antimicrobial peptide pairing learning and generation method based on artificial intelligence algorithm in the above embodiment.

[0096] The embodiments of the antimicrobial peptide pairing learning and generation method device based on artificial intelligence algorithms of the present invention can be applied to any device with data processing capabilities, such as a computer. The device embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of any data processing device reading the corresponding computer program instructions from non-volatile memory into memory and executing them. From a hardware perspective, such as... Figure 7 The diagram shown is a hardware structure diagram of any data processing-capable device, including the protein optimization design and screening device based on artificial intelligence algorithms of this invention. (Except for...) Figure 7 In addition to the central processing unit, memory, network interface, non-volatile memory, GPU processor, and I / O devices shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.

[0097] The specific implementation process of the functions and roles of each unit in the above-described device is detailed in the corresponding steps of the above-described method, and will not be repeated here. For the device embodiments, since they basically correspond to the method embodiments, relevant details can be found in the descriptions of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0098] Corresponding to the aforementioned embodiments of the antimicrobial peptide pairing learning and generation method based on artificial intelligence algorithms, this embodiment of the invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the antimicrobial peptide pairing learning and generation method based on artificial intelligence algorithms described in the above embodiments.

[0099] The computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.

[0100] This invention is widely applicable to various computing environments, including single-machine high-performance computing, cluster computing, and cloud computing, ensuring efficient completion of the antimicrobial peptide pairing learning and generation process under various computing power configurations. The above description is merely a preferred embodiment of the invention and should not be construed as limiting the scope of the invention. For those skilled in the art, various changes, combinations, simplifications, modifications, substitutions, and readjustments should be considered equivalent substitutions that do not depart from the scope of protection of this invention. Therefore, although the invention has been described in detail through the above embodiments, it is not limited to these embodiments and includes many other equivalent embodiments within the scope of protection.

Claims

1. A method for adaptive generation of antimicrobial peptide length based on a pairwise learning framework, characterized in that, Includes the following steps: 1) Construct a lead set L, a target set S, and a mapping table M. The lead set L contains n elements, each representing an amino acid sequence. The amino acid sequences in the lead set are sequences randomly assembled from a set of 20 standard amino acids, or are arbitrary protein sequence fragments derived from non-antimicrobial peptides. The known antimicrobial peptide sequences in the target set contain only 20 basic amino acids. The target set S contains n elements, each representing a known antimicrobial peptide sequence. The mapping table M is used to explicitly define the pairing relationships and length constraints between each element in the lead set L and the corresponding element in the target set S. The length constraint rules defined in the mapping table M include at least one of the following: The length compression rule stipulates that the length of the sequence in the lead set is not less than the length of its paired target antimicrobial peptide sequence; The length extension rule stipulates that the length of the leaded sequence is not greater than the length of its paired target antimicrobial peptide sequence. The length equivalence rule, in which the length of the sequence in the lead set is equal to the length of its paired target antimicrobial peptide sequence; 2) Based on the paired training data consisting of the lead set L, the target set S, and the mapping table M, a sequence transformation model is trained so that the sequence transformation model learns the mapping relationship from the lead sequence to the target antimicrobial peptide sequence, wherein the mapping relationship internalizes the length constraint rules in the mapping table M; the sequence transformation model is a neural network model based on the Transformer architecture. 3) For any input test lead sequence, input it into the trained sequence conversion model, and the sequence conversion model generates a candidate antimicrobial peptide sequence with antimicrobial potential. The length of the generated candidate antimicrobial peptide sequence is jointly controlled by the length of the test lead sequence and the length constraint rules internalized in the model.

2. The method according to claim 1, characterized in that, The length constraint rule defined in the mapping table M is the length extension rule, which means that the length of the sequence in the lead set is not greater than the length of its paired target antimicrobial peptide sequence.

3. The method according to claim 1, characterized in that, Step 2) also includes the step of expanding the paired training data through data augmentation mode, which specifically involves: keeping the target set S unchanged, expanding the lead set L, so that the same antimicrobial peptide sequence in the target set S is paired with multiple different lead sequences in the lead set L, thereby increasing the amount of paired training data.

4. The method according to claim 3, characterized in that, The methods for expanding the lead set L include: randomly generating new amino acid sequences as new lead sequences; or partially masking the antimicrobial peptide sequences in the target set S and using the masked sequences as new lead sequences.

5. An antimicrobial peptide length adaptive generation device based on a pairwise learning framework, characterized in that, The device includes one or more processors, and a graphics processing unit (GPU); The one or more processors are configured to execute instructions to implement the method of any one of claims 1 to 4.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 4.

7. An electronic device, characterized in that, include: Memory, used to store computer programs; One or more processors, and a graphics processing unit (GPU), for executing a computer program stored in the memory to implement the method of any one of claims 1 to 4.