Antibacterial peptide function interpretable prediction method and system based on graph causal learning

By constructing an antimicrobial peptide function prediction model based on graph causal learning, the problems of insufficient modeling of sequence structure information and poor interpretability in existing methods are solved. This enables efficient and interpretable prediction and verification of antimicrobial peptide function, and improves the robustness and generalization ability of the model.

CN120808899AActive Publication Date: 2025-10-17ANHUI AGRICULTURAL UNIVERSITY

Patent Information

Application Number
CN202511339234.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2025-10-17
Estimated Expiration
2045-09-18

AI Technical Summary

Technical Problem

Existing antimicrobial peptide function prediction methods lack the ability to model sequence structure information, making it difficult to express the complex spatial dependencies between residues. In addition, the models lack interpretability, making it difficult to provide mechanistic support for experimental verification and molecular design, and have weak ability to identify rare functional categories in multi-label prediction tasks.

Method used

A graph causal learning-based approach is adopted. By introducing a pre-trained protein language model to extract the contextual semantic vectors of residues, a residue contact probability matrix is ​​constructed and a binary contact map is formed. A graph neural network is used to encode and assign task-related weights to nodes and edges. The model is optimized by combining a multi-task classifier and contrastive learning to locate and visualize key functional regions.

Benefits of technology

It significantly enhances the ability to model spatial topological relationships, improves the robustness and generalization ability of the model, enables interpretable prediction and traceable verification of antimicrobial peptide function, and enhances the transparency and biological interpretability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808899A_ABST
    Figure CN120808899A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an antibacterial peptide function interpretable prediction method and system based on graph causal learning, and the method comprises the steps: coding residue nodes of a graph structure through employing a graph neural network GNN, endowing each node and a node edge relation with a task correlation weight based on an attention-guided feature screening mechanism, and carrying out the task correlation prediction of each node and a node edge relation. Dynamically compressing and weakening the redundant region to form graph representation; mapping the graph representation to a multi-layer contrast space, introducing a multi-task classifier, predicting a functional category label of the antibacterial peptide according to the graph representation, and jointly optimizing an overall objective function by using cross entropy loss and contrast loss to obtain an invariant graph representation; and based on the node attention weight and the edge importance score in the invariant graph representation, carrying out positioning and labeling on a region which plays a decisive role in predicting the antibacterial function, and forming a cause-effect sub-graph with a cause-effect basis. According to the method, the interpretability of the model is remarkably improved, and the accuracy and generalization ability of the model in a classification task are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The embodiment of the application belongs to the field of biological information technology, and particularly relates to an antimicrobial peptide function explainable prediction method and system based on graph causal learning. BACKGROUND

[0002] With the increasing drug resistance of pathogens such as bacteria, fungi and viruses to traditional chemical antibiotics, developing new, efficient and low-toxicity infection treatment methods has become an important research direction in the field of biological medicine. Antimicrobial peptides (AMPs) are an important part of the body's innate immune system and widely exist in animals, plants and microorganisms. They have broad-spectrum antibacterial, low drug resistance induction and immunomodulatory biological functions, and have become potential candidate molecules for replacing antibiotics and are widely used in infection control, tumor treatment and immune enhancement and other fields.

[0003] In recent years, with the development of high-throughput sequencing technology and experimental verification methods, a number of antimicrobial peptide databases have been established, such as APD3, DRAMP, dbAMP, AMPfun, etc., providing rich basic data resources for building computational models. On the basis of data accumulation, a large number of computational methods have been proposed for the identification and function prediction of antimicrobial peptides.

[0004] Existing methods such as iAMP-2L, AMPfun, etc. mainly use traditional machine learning models (such as KNN, SVM, RF, etc.) and manually constructed sequence features (PseAAC, AAC, RAAC, etc.) for prediction, but their ability to capture complex context dependence and spatial topological structure between residues is limited. In recent years, deep learning methods have been gradually introduced, such as iAMP-CA2L combining CNN and LSTM for two-stage modeling, and multi-AMP constructing a multi-task network to predict AMP and its function, but they still use linear sequences as input, lacking explicit modeling of structure information and functional motifs.

[0005] Therefore, although existing methods have achieved certain results in AMP identification and function prediction, and have practical value in specific tasks, there are still the following outstanding problems: first, the modeling ability of sequence structure information is lacking, making it difficult to express the complex spatial dependence between residues; second, the model is mostly a black box structure, lacking explainability, making it difficult to provide mechanism support for experimental verification and molecular design; third, the ability to identify rare functional categories in multi-label prediction tasks is weak, making it difficult to adapt to large-scale antimicrobial peptide screening and complex functional peptide development needs. SUMMARY

[0006] The purpose of the embodiments of the present application is to provide an antimicrobial peptide function explainable prediction method and system based on graph causal learning, so as to at least solve the technical problems of lack of modeling ability of sequence structure information and lack of explainability in AMP recognition and function prediction of related existing methods.

[0007] To achieve the above-mentioned purpose, the embodiments of the present application provide the following technical solutions.

[0008] According to one embodiment of the present application, an antimicrobial peptide function explainable prediction method based on graph causal learning is provided, comprising the following steps:

[0009] S101: Introducing a pre-trained protein language model, extracting the context semantic vector of each residue, and combining attention weight to construct a residue contact probability matrix, and forming a binary contact graph after threshold processing, taking protein residues as nodes and the binary contact graph as edges to construct a protein graph structure;

[0010] S102: Using a graph neural network GNN to encode the residue nodes of the graph structure, and based on an attention-guided feature screening mechanism, giving the task relevance weight of each node and node edge relationship, dynamically compressing and weakening the redundant area, obtaining a structure subgraph area related to the antimicrobial function, and forming a graph representation;

[0011] S103: Mapping the graph representation to a multi-layer contrast space to form an embedding representation for contrast optimization, the multi-layer contrast space including constructed semantic-level contrast learning and instance-level contrast learning; introducing a multi-task classifier to predict the function category label of the antimicrobial peptide according to the graph representation, using cross-entropy loss and contrast loss to jointly optimize the overall objective function, obtaining an invariant graph representation, through this joint optimization process, the model can extract an invariant graph representation with causal stability, providing a basis for subsequent function area positioning and explanation analysis;

[0012] S104: Based on the node attention weight and edge importance score in the invariant graph representation obtained in the training process, the area that plays a decisive role in predicting antimicrobial function is positioned and labeled, a causal subgraph with causal basis is constructed, the extracted causal subgraph nodes are mapped back to the original amino acid sequence, and a sliding window comparison is used to visualize the key functional motifs.

[0013] Preferably, in step S101:

[0014] Two non-shared multi-layer perceptrons are used to perform dimensional alignment and nonlinear fusion on the protein sequence and residue attributes to obtain node features;

[0015] The multi-layer multi-head attention weight tensor in the protein pre-training language model is extracted, cross-layer and cross-head weighted summation is performed, and the overall attention degree between the residue pairs is obtained;

[0016] A structure contact threshold is set to binarize the contact probability matrix to obtain a graph edge for constructing a protein graph structure;

[0017] A two-dimensional protein graph structure G=(V,E) is constructed with protein residues as nodes and a binary contact graph as edges, wherein, V is a node set, corresponding to each residue in the protein, N represents the number of residues of the amino acid sequence, and each residue is taken as a node to form the node set V; E is an edge set, corresponding to the residue pairs having a spatial proximity relationship, represents the relationship between the node and the node ; represents that the node has an edge with the node ;

[0018] The edge feature adopts a Gaussian radial basis function RBF to embed the contact strength continuous value, and finally obtains a K-dimensional edge feature embedding, denoted as:

[0019]

[0020] In the formula, is a fixed mean center, represents the kernel width; represents the edge feature of the residue pair; represents the sum of the multi-head attentions of each layer, and exp represents a natural exponential function, and K represents the dimension of the edge feature embedding;

[0021] On each residue, the semantic vector of the protein pre-training language model is fused with the physicochemical features, and a weighted graph structure is constructed in combination with the edge weight, denoted as: G=(V,E,X,Φ), wherein V represents a node set, E represents an edge set, X represents a node feature, and Φ represents an edge feature.

[0022] Preferably, in step S102, a multi-layer stacked graph neural network structure is adopted, each layer of network structure includes a neighbor aggregation module, a message passing module and a node update module, wherein in the node update module, the original feature vector of the node v in the lth layer is represented as , and the update rule is represented as:

[0023]

[0024] In the formula, where Sigmoid represents the activation function, AGGREGATE represents the aggregation function, and are learnable parameters. represents the set of neighbor nodes of node v, represents the original feature vector of the l-1 layer node u, u represents a neighbor node that has an edge with node v.

[0025] Using the node attention channel, the importance of a single residue node to the current functional task is evaluated, represented as:

[0026]

[0027] where, represents the node attention score network, outputting the attention significance score of node v . represents the original feature vector of node u, represents the original feature vector of node v.

[0028] Using the edge attention channel, the structural propagation significance between two connected residues is evaluated, represented as:

[0029]

[0030] where, represents the edge attention function, represents vector concatenation; LeakyReLU represents the activation function, represents the original feature vector of node u, represents the original feature vector of node v. 、 represents the original feature vector of the edge, E represents the edge set.

[0031] Based on the node attention weight and the edge attention weight, the node feature and the edge feature are respectively updated with weighting, and finally the compressed graph representation is obtained, represented as:

[0032]

[0033] where, represents the graph representation focusing on the structure-function coupling region, represents the attention significance score of the node, represents the importance score of the edge; V represents the node set, v represents a node in the node set V, u represents a neighbor node that has an edge with node v, represents the edge feature, represents the original feature vector of node v.

[0034] Preferably, in step S103, the graph representation is mapped into the contrastive learning space, and an embedding representation of the unified antimicrobial peptide graph sample is constructed ;

[0035] wherein the mapping function adopts a double-layer nonlinear transformation, and is expressed as:

[0036]

[0037] wherein, represents a semantic feature transformer; , represents a linear transformation matrix, , represents a bias term, and ReLU represents an activation function, represents an activation function Sigmoid; represents a graph representation focusing on a structure-function coupling region.

[0038] Preferably, in step S103:

[0039] The constructed semantic-level contrastive learning objective includes: for each functional category , C represents the total number of functional categories, and a semantic center vector , represents a d-dimensional real number space; initialized or updated by aggregating sample embedding vectors; for any one graph sample , the graph-level representation is mapped to the contrastive space by an embedding function , wherein, represents the embedding representation of the i-th sample, and the semantic center vector is defined based on each antimicrobial function; the constructed semantic contrastive loss is expressed as:

[0040]

[0041] wherein, represents a temperature coefficient; T is a transpose operator, represents the real functional category of the i-th graph sample, and determines the semantic center to which the sample should be “close”; represents the semantic center vector corresponding to the real functional category of the i-th graph sample, and C represents the total number of functional categories, is the semantic center vector of the c-th functional category;

[0042] The constructed instance-level contrastive learning objective includes: calculating the contrastive loss of each graph sample with positive examples and negative examples together, and constructing a positive-negative pair for each sample , The constructed instance contrastive loss is expressed as:

[0043]

[0044] wherein, is another temperature coefficient, J is the number of negative samples; represents the positive example embedding of the i-th graph sample; represents the negative example embedding of the j-th graph sample; j represents the index of the negative example sample; T is the transpose operator, represents the embedding representation of the i-th antimicrobial peptide graph sample in the contrast learning space after mapping.

[0045] Preferably, in step S103, the structure graph representation is input into the classifier, and the sigmoid activation is used to obtain the functional label prediction probability , C represents the total number of functional categories; the prediction loss is the cross-entropy loss, which is represented as:

[0046]

[0047] wherein, C represents the total number of functional categories; represents the true label, represents the prediction probability;

[0048] The total objective function is constructed to include the multi-label cross-entropy, the instance contrast loss and the semantic contrast loss, which is represented as:

[0049]

[0050] wherein, represents the total objective function, represents the cross-entropy loss, represents the semantic contrast loss, represents the instance contrast loss, , all represent weights, .

[0051] Preferably, in step S104, the attention saliency score of the node v and the importance score of the edge are extracted from the output layer of the graph neural network GNN, wherein, is used to quantify the contribution of the node to the functional prediction; is used to represent the functional relevance of the interaction between residues;

[0052] The attention saliency score of the node v is normalized, and the normalized attention saliency score is represented as:

[0053]

[0054] A threshold adaptive mechanism is introduced to set a dynamic threshold , and residue nodes satisfying are screened out to form a key residue subset, and the key residue subset is taken as a node set , edges between nodes in the subset are retained, and a causal subgraph is constructed , wherein , v represents a node in the node set, u represents a neighbor node having an edge with the node v; and E represents an edge set.

[0055] Preferably, in step S104, a rule library containing key functional motifs is constructed, including di-amino acid motifs, tri-amino acid motifs, cation-rich regions and aromatic motifs; the key residue nodes of the causal subgraph are mapped back to the original amino acid sequence to obtain a corresponding sequence fragment , n is the number of key residues;

[0056] The sliding window algorithm is used to scan the fragment, the window length is set to 2-5, and the matching motif is detected by the following formula:

[0057]

[0058] , wherein correspond to di-amino acid motifs and tri-amino acid motifs, respectively; represents the detection result, represents a subsequence in the sequence fragment S starting from position i and having a length of k; and the motif library is the rule library of the key functional motif;

[0059] The cation-rich region is determined by an indicator function, and the formula is as follows:

[0060]

[0061] , wherein represents the indicator function; is used to determine whether the i-th residue is lysine K or arginine R, and b represents the starting position of the window;

[0062] The confidence of the matching motif is calculated , and the formula is as follows:

[0063]

[0064] The results with high correlation are retained according to the confidence, and the retained results are visually presented.

[0065] Preferably, binary and multi-classification indicators are introduced for performance evaluation and verification;

[0066] Among them, the binary classification indicators include precision, recall and F1 score; in the multi-classification indicators, a class adaptive threshold mechanism is introduced, and a plurality of indicators are combined for quantitative evaluation;

[0067] In the class adaptive threshold mechanism, for each functional label, different probability thresholds are enumerated, and the optimal threshold that maximizes the current class F1 score or AUPR is selected, and the optimal threshold is taken as the decision boundary of the current class;

[0068] In the quantitative evaluation combined with a plurality of indicators, the plurality of indicators include macro-averaged precision, macro-averaged recall and macro-averaged F1 score.

[0069] According to another embodiment of the present application, an antibacterial peptide function interpretable prediction system based on graph causal learning is provided, and the prediction system comprises the following modules:

[0070] A graph structure module is used to introduce a pre-trained protein language model, extract a context semantic vector of each residue, and construct a residue contact probability matrix combined with attention weights, and form a binary contact graph after threshold processing, and construct a protein graph structure taking protein residues as nodes and the binary contact graph as edges;

[0071] A graph representation module is used to encode the residue nodes of the graph structure by using a graph neural network GNN, and based on an attention-guided feature screening mechanism, to assign a task relevance weight to each node and node edge relationship, dynamically compress and weaken the redundant area, obtain a structure subgraph area related to the antibacterial function, and form a graph representation;

[0072] A contrast optimization module is used to map the graph representation to a semantic contrast space to form an embedding representation for contrast optimization, construct a semantic-level contrast learning target and an instance-level contrast learning target, and introduce a multi-task classifier to predict the functional class label of the antibacterial peptide according to the graph representation, and use a cross-entropy loss and a contrast loss to jointly optimize the overall objective function, and obtain an invariant graph representation;

[0073] A causal subgraph module is used to locate and label the area that plays a decisive role in predicting the antibacterial function based on the node attention weight and edge importance score obtained during the training process, construct a causal subgraph with causal basis, map the extracted causal subgraph nodes back to the original amino acid sequence combined with the key functional motifs of the known antibacterial peptide structure, and use a sliding window comparison to visually display the key functional motifs.

[0074] Compared with the prior art, the antibacterial peptide function interpretable prediction method and system based on graph causal learning has the following beneficial effects:

[0075] The application extracts the context semantic vector of each residue by introducing a pre-trained protein language model, and constructs a residue contact probability matrix by combining the internal attention weight of the model, and forms a binary contact map after threshold processing. Each residue node further integrates the rationalization attribute to construct a multi-channel feature representation. Finally, a function-related graph structure is formed with residues as nodes and structural contacts as edges, which significantly enhances the modeling capability of the model for spatial topological relationships. This method does not require three-dimensional structure information, breaking through the limitations of traditional linear sequence modeling, and providing more semantically rich and structure-sensitive input expression for graph neural networks;

[0076] During the training process of the model of the application, the residue nodes and their connection relationships are dynamically assigned with task-related weights, the node attention value is used to filter the functionally significant area, a key subgraph is constructed, and the residue path irrelevant to the target function is effectively eliminated. This mechanism not only enhances the focusing ability of the model on the functional area, but also reduces the propagation interference of invalid information, and improves the robustness and generalization ability of the model under cross-data distribution. Compared with traditional graph encoding methods, this module realizes the organic combination of structure cognition and target recognition, and has stronger structure perception and expression compression ability;

[0077] The semantic-level comparison of the application guides the aggregation of samples of the same class in the embedding space by constructing a semantic center vector of the function category, and improves the intra-class consistency. The instance-level comparison is constructed by positive and negative samples, which optimizes the discriminability of graph embedding and improves the inter-class separability. This mechanism combines structure disturbance and sample transformation to mine the function structure features that remain stable in different environments and avoid the model learning of pseudo-related patterns. The contrast learning process is optimized by projection mapping and joint loss, guiding the model to extract invariant representations with causal stability;

[0078] In the prediction stage of the model, the node attention is used to identify the key functional area and map it back to the original sequence. Typical functional fragments such as di- / tri-amino acid motifs, cation-rich regions, and aromatic residues are detected by a sliding window algorithm. The matching results are presented in a visual way to construct an explanation path from the residue graph to the biological mechanism, realizing traceable verification of the model decision results, and significantly enhancing the transparency and biological explanation ability of the model. BRIEF DESCRIPTION OF DRAWINGS

[0079] The drawings accompanying the specification of this application serve to provide further understanding of the present application, the illustrative embodiments of the present application and their descriptions serve to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:

[0080] Figure 1 The flow architecture diagram of the antibacterial peptide function interpretable prediction method based on graph causal learning of the application;

[0081] Figure 2An implementation flowchart of the antibacterial peptide function interpretable prediction method based on graph causal learning of the present application;

[0082] Figure 3 An implementation flowchart of the antibacterial peptide function interpretable prediction method based on graph causal learning of the present application;

[0083] Figure 4 A structural block diagram of the antibacterial peptide function interpretable prediction system based on graph causal learning of the present application. DETAILED DESCRIPTION

[0084] In order for those skilled in the art to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0085] According to the embodiments of the present application, method embodiments of the antibacterial peptide function interpretable prediction method based on graph causal learning are provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0086] At present, in the antibacterial peptide function recognition process of the related technology, there are technical problems such as lack of structure modeling, insufficient prediction interpretability, and poor generalization ability of multi-label learning. The existing methods generally take linear sequences as input, and fail to fully capture the spatial dependence and structure function coupling relationship between residues in antibacterial peptides, making it difficult to effectively identify key functional regions. At the same time, most of the mainstream deep learning models are black box structures, lack clear biological explanation paths, and cannot provide mechanism support for downstream antibacterial peptide design and experimental verification. In addition, the label distribution of multi-functional antibacterial peptides is extremely unbalanced, and the existing models have weak recognition ability and poor robustness when facing rare functional categories.

[0087] To solve the above problems, the prediction method of the embodiments of the present application introduces a protein language model and an attention mechanism, constructs a residue structure graph, and fuses a graph neural network coding, a redundancy compression mechanism and a causal invariance contrast learning method to extract stable and reliable functional feature representations. At the same time, the present application introduces causal interpretability analysis and biological motif backtracking mechanism to realize the complete reasoning path from sequence to structure and from structure to function, effectively supporting antibacterial peptide screening, classification and interpretable prediction.

[0088] The prediction method of the present application will be described in detail below in combination with specific embodiments.

[0089] In an embodiment of the present application, an antibacterial peptide function explainable prediction method based on graph causal learning is provided. In the data collection and preprocessing step, a high-quality antibacterial peptide multi-classification data set is constructed. The positive samples are from public databases such as APD3, CAMP, DRAMP, etc. The negative samples are screened from UniProt and sequences containing antibacterial keywords are excluded. All sequences are subjected to a unified screening process to remove sequences with abnormal length or containing non-standard residues.

[0090] In addition, in order to reduce the redundancy and homology bias, CD-HIT tool is used for clustering filtering, and the similarity threshold is set to 40%, and the independent test set is relaxed to 50%. In addition, in order to avoid data leakage, there is no repeated or highly similar sequence between the test set and the training set, so as to ensure the scientificity and rigor of model training and evaluation.

[0091] Specifically, the antibacterial peptide prediction task is divided into two stages in the present application. The first stage is to identify antibacterial peptides, and the second stage is to identify the functional activity of antibacterial peptides. Different data sets are collected for the two stages.

[0092] For the first stage: the training data is integrated from 7 public antibacterial peptide databases (APD3, CAMP, dbAMP, DRAMP, YADAMP, ADAPTABLE and AMPfun), and the positive samples are experimentally verified antibacterial peptide sequences. The original sequences are uniformly processed, and sequences with length less than or equal to 10 or greater than or equal to 100, and samples containing non-standard amino acid residues (B, J, O, U, X, Z) are filtered. The negative samples are obtained by screening from UniProt database, and records containing antibacterial related keywords such as "antibacterial" are removed, and the same standard is used for cleaning. In order to eliminate sequence redundancy and homology bias, CD-HIT tool is used for clustering of positive and negative samples, and the sequence similarity threshold is set to 40%, and finally a training set composed of 5430 positive samples and 5430 negative samples is obtained. The independent test set is integrated from DRAMP2.0 database, data published by Veltri et al. and Bhadra et al. The samples are processed according to the same cleaning process, and the CD-HIT clustering threshold is increased to 50% to balance sequence diversity and quantity. The test set contains 3446 positive samples and 3446 negative samples. All models are subjected to five-fold cross-validation on the basis of the unified data to eliminate the performance bias caused by the difference of the original training set, and to ensure the comparability of the experimental results and the reliability of the conclusions.

[0093] For the second stage, the training data was mainly integrated from public databases such as AMPfun, dbAMP, DRAMP and ADAPTABLE, and the sequences of antimicrobial peptides with clear multi-function label annotations were retained. The original samples were uniformly subjected to standard cleaning procedures, including length filtering (10-100 residues), non-standard residue removal, and homology redundancy removal processing. Among them, the CD-HIT clustering threshold was set to 40% to control the sequence similarity and improve the diversity and representativeness of the training set.

[0094] Finally, a total of 19840 antimicrobial peptide samples were obtained in the multi-label training set, wherein single-label and multi-label samples were distributed. The independent test set was derived from the same data system as the training set, and an independent function annotation subset not used for training was selected, and after the same preprocessing and clustering operation (similarity threshold was set to 50%), a test set of 4510 multi-functional antimicrobial peptide samples was finally obtained.

[0095] There is a certain degree of class imbalance in the multi-label distribution, and the application introduces a multi-label contrast learning mechanism and a class adaptive threshold strategy in the training process to improve the recognition ability of the model for low-frequency function categories. All experiments adopt a unified five-fold cross-validation design to ensure the performance stability and generalization ability of the model in the multi-function recognition scenario.

[0096] Please refer to Figure 1 and Figure 2 , the application provides an antimicrobial peptide function interpretable prediction method based on graph causal learning;

[0097] comprising the following steps:

[0098] S101: Introduce a pre-trained protein language model to extract the context semantic vector of each residue, and combine the attention weight to construct a residue contact probability matrix, and form a binary contact graph after threshold processing, to construct a protein graph structure with protein residues as nodes and a binary contact graph as edges;

[0099] The step S101 of the embodiment of the application aims to convert the linear protein sequence into a structured graph representation, which is convenient for subsequent modeling of the graph neural network model; the application introduces a structure adaptation mechanism and a residue expression enhancement strategy on the basis of a general protein pre-training framework, realizes deep semantic representation and function-related feature modeling of the amino acid sequence, and extracts the context dependency information between residues through a multi-layer Transformer encoder. On this basis, a contact probability matrix between residues is constructed, and a binary contact graph is formed after threshold screening, which is used to define the structural connection in the sequence. Each residue node fuses the semantic vector of the protein pre-training language model and its physicochemical properties (such as charge, polarity, hydrophobicity, etc.), forming a multi-dimensional feature representation. Finally, a two-dimensional graph structure related to function is constructed with residues as nodes and structural contacts as edges.

[0100] Further, structure contact edge prediction and binarization processing are performed;

[0101] Please refer to Figure 3 The step S101 of the embodiment specifically includes:

[0102] S201: Adopting two non-shared multi-layer perception machines to perform dimensional alignment and nonlinear fusion on protein sequence and residue attribute to obtain node features;

[0103] Specifically, the step S201 is a step of extracting protein residue semantic features, wherein a protein pre-training language modeling method (Protein Language Model, PLM) optimized for an antibacterial peptide task is adopted to perform semantic embedding on an original amino acid sequence; assuming that an input is a protein sequence containing amino acid residues, the initial representation is , indicating the high-dimensional embedding features of the i-th residue in the improved PLM model output;

[0104] To enhance the explainability and physical and chemical properties of protein nodes, the embodiment of the application further introduces residue physicochemical property encoding , including hydrophobicity, acidity and alkalinity, charge condition, aromaticity and other attributes, a total of 50-dimensional physicochemical attribute vectors representing the attributes of each residue;

[0105] Finally, two non-shared multi-layer perception machines are adopted to perform dimensional alignment and nonlinear fusion on the above two channels, and the node features are fused through the following form:

[0106]

[0107] Wherein, MLP represents a multi-layer perception machine, which is used to map the original embedding to a unified dimension d; is a multi-layer perception machine for processing high-dimensional embedding features in the improved PLM model output, is a multi-layer perception machine for processing 50-dimensional physicochemical attribute vectors.

[0108] S202: Extracting each multi-layer multi-head attention weight tensor in the protein pre-training language model, performing cross-layer and cross-head weighted summation to obtain the overall attention degree between residue pairs;

[0109] In step S202, each layer multi-head attention weight tensor in the protein pre-training language model is extracted , cross-layer and cross-head weighted summation is performed to obtain the overall attention degree between residue pairs, and the overall attention degree is represented by the sum of each layer multi-head attention , which is represented as:

[0110]

[0111] wherein, represents an activation function sigmoid, is an adjustable weight; L represents the number of layers, and H represents the number of heads.

[0112] S203: setting a structure contact threshold, binarizing the contact probability matrix, and obtaining a graph edge for constructing a protein graph structure;

[0113] In step S203, a structure contact threshold is set , and the contact probability matrix is binarized, and is represented as:

[0114]

[0115] Thus, a preliminary adjacency matrix is obtained , and the binary adjacency matrix is used for edge structure construction of the graph, indicating that there is spatial proximity between two residues.

[0116] Further, it also includes:

[0117] S204: constructing a two-dimensional protein graph structure with protein residues as nodes and a binary contact graph as edges;

[0118] In this embodiment, the constructed two-dimensional protein graph structure is represented as: G=(V,E), wherein, is a node set, corresponding to each residue in the protein, represents the number of residues of the amino acid sequence, and one residue is taken as a node to form the node set V; is an edge set, corresponding to a pair of residues having spatial proximity, represents the relationship between the node and the node ; represents that there is an edge between the node and the node ;

[0119] The edge feature adopts a Gaussian radial basis function RBF to embed the contact strength continuous value, and finally obtains a K-dimensional edge feature embedding, represented as:

[0120]

[0121] In the formula, is a fixed mean center, represents the kernel width; represents the edge feature of the residue pair (i,j); represents the sum of the multi-head attention of each layer (i.e., the contact strength continuous value), exp represents the natural exponential function, and K represents the dimension of the edge feature embedding;

[0122] Further, on each node residue, the semantic vector of the fusion protein pre-training language model is combined with the physicochemical characteristics, and the weight of the edge is constructed into a weighted graph structure, represented as: G=(V, E, X, Φ), wherein V represents a node set, E represents an edge set, X represents a node feature, and Φ represents an edge feature.

[0123] The weighted graph structure constructed in this embodiment retains sequence context information and structural contact information, and introduces physical and chemical constraints, thereby enhancing the identification ability of function-related residues in the modeling process. Compared with the existing method which only uses single semantics or contact graph structure, the application introduces a contact semantic joint modeling mechanism assisted by physicochemical properties, which effectively improves the representation ability and model generalization ability of the function sites without the need for three-dimensional structure input.

[0124] In summary, the application extracts the context semantic vector of each residue by introducing a pre-trained protein language model, and constructs a residue contact probability matrix by combining the model internal attention weight. After threshold processing, a binary contact graph is formed, and each residue node is further fused with physicochemical properties to construct a multi-channel feature representation. Finally, a function-related graph structure is formed with residues as nodes and structural contacts as edges, which significantly enhances the modeling ability of the model for spatial topological relationships. This method does not require three-dimensional structure information, breaking through the limitations of traditional linear sequence modeling, and providing a more semantically rich and structure-sensitive input expression for graph neural networks.

[0125] Please continue to refer to Figure 1 and Figure 2 On the basis of the residue contact graph of the antibacterial peptide constructed in the previous step, to further improve the model's ability to identify key functional regions and inhibit the interference of redundant information transmission, the antibacterial peptide function explainable prediction method based on graph causal learning in the embodiment of the application further comprises:

[0126] S102: using a graph neural network GNN to encode the residue nodes of the graph structure, and based on an attention-guided feature screening mechanism, giving each node and node edge relationship a task-related weight, dynamically compressing and weakening the redundant area, obtaining a structure subgraph area related to the antibacterial function, and forming a graph representation;

[0127] In step S102, the graph encoding method combining structure perception feature extraction and task-driven compression mechanism is used to fuse topological structure and residue semantics modeling, and the function-related subgraph area is identified through the attention mechanism, and the interference of the structural redundant area is effectively inhibited.

[0128] Specifically, in the graph encoding mechanism of structure perception feature extraction, the constructed two-dimensional residue contact graph is first input into the graph neural network (GNN) structure, and a semantic expression based on topological information and residue context is constructed; the weighted graph wherein V represents a node set, E represents an edge set, and X represents a node feature, represents an edge feature; the node feature contains the context vector extracted by the protein language model, the residue physicochemical property encoding, and the position bias information, etc.

[0129] A multi-layer stacked graph neural network structure is adopted, and each layer of the network structure includes a neighbor aggregation module, a message passing module, and a node updating module. In the node updating module, the original feature vector of a node v in the lth layer is represented as , and the update rule is represented as:

[0130]

[0131] In the formula, represents an activation function Sigmoid, AGGREGATE represents an aggregation function, and are learnable parameters; represents a neighbor node set of the node v, represents an original feature vector of a node u in the (l-1)th layer, and u represents a neighbor node having an edge with the node v;

[0132] Further, in the task-driven compression mechanism, considering that there are a large number of structure regions in the antibacterial peptide that are not directly related to the target function prediction, if the regions are directly used for graph-level representation learning without screening, the model generalization ability may be reduced.

[0133] Therefore, the embodiments of the present application dynamically calculate the task relevance weight of the node and the edge, realize compression of redundant information, assign the task relevance weight to the node and the edge, and realize structure focusing of important subgraph regions;

[0134] Specifically, two attention channels are introduced:

[0135] The node attention channel is used to evaluate the importance of a single residue node to the current function task, and is represented as:

[0136]

[0137] In the formula, represents a node attention score network, and outputs an attention saliency score of the node v ; represents an original feature vector of a node u, represents an original feature vector of the node v;

[0138] The edge attention channel is used to evaluate the structure propagation saliency between two connected residues, and is represented as:

[0139]

[0140] wherein, denotes the edge attention function, denotes vector splicing; LeakyReLU denotes an activation function, denotes the original feature vector of node u, denotes the original feature vector of node v; 、 denotes the original feature vector of the edge, and E denotes an edge set;

[0141] Based on the node attention weight and the edge attention weight, the node feature and the edge feature are respectively updated by weighting, and finally a compressed graph representation is obtained, denoted as:

[0142]

[0143] wherein, denotes the graph representation focusing on the structure-function coupling region, denotes the attention saliency score of the node, denotes the importance score of the edge; V denotes a node set, v denotes a node in the node set V, and u denotes a neighbor node having an edge with the node v, denotes the edge feature, denotes the original feature vector of the node v.

[0144] In the training process of the model of the present application, the task correlation weight is dynamically assigned to the residue node and the connection relationship thereof, the function saliency region is screened by using the node attention value, the key subgraph is constructed, and the residue path irrelevant to the target function is effectively eliminated; the mechanism not only enhances the focusing ability of the model on the functional region, but also reduces the propagation interference of invalid information, and improves the robustness and generalization ability of the model under the cross-data distribution; compared with the traditional graph coding method, the module realizes the organic combination of structure cognition and target recognition, and has stronger structure perception and expression compression ability.

[0145] Further, in order to enhance the generalization ability and interpretability of the model in the multi-functional antibacterial peptide prediction task, the present application introduces a causal invariance contrast learning framework, combines a multi-level contrast target and a multi-label supervision mechanism, and learns a stable and robust functional feature representation; specifically, the antibacterial peptide function interpretable prediction method based on graph causal learning of the present application further comprises:

[0146] S103: mapping the graph representation to a multi-layer contrast space to form an embedding representation for contrast optimization, wherein the multi-layer contrast space comprises constructed semantic-level contrast learning and instance-level contrast learning; a multi-task classifier is introduced, the function category label of the antibacterial peptide is predicted according to the graph representation, the cross-entropy loss and the contrast loss are used to jointly optimize the overall objective function, and an invariant graph representation is obtained.

[0147] Through the joint optimization process, the model can extract an invariant graph representation with causal stability, providing a basis for subsequent functional area positioning and explanation analysis;

[0148] In one implementation, in step S103, the structure-function coupled graph representation extracted in step S103 is mapped into a contrast learning space to construct an embedded representation of the uniform antimicrobial peptide graph sample . ;

[0149] Wherein, the mapping function adopts a double-layer nonlinear transformation, represented as:

[0150]

[0151] In the formula, represents a semantic feature transformer (Semantic Projection Layer); , represents a linear transformation matrix, , represents a bias term, and ReLU represents an activation function, represents an activation function Sigmoid; represents a graph representation focusing on the structure-function coupled region.

[0152] Further, in step S103:

[0153] The semantic-level contrast learning objective is constructed, which aims to narrow the distance between samples of the same functional category in the embedding space, forming an intra-class compact structure, while pushing away the representations between different functional categories;

[0154] Specifically, for each functional category , C represents the total number of functional categories, and a semantic center vector , is defined, which represents a d-dimensional real space and is initialized or updated by aggregating sample embedding vectors;

[0155] For any graph sample , the graph-level representation is mapped to the contrast space through an embedding function , wherein, represents the embedded representation of the i-th sample;

[0156] Further, based on the semantic center vector defined for each antimicrobial function, the semantic contrast loss encourages the embedding of samples of the same class to be close to the class semantic center, enhancing the intra-class compactness;

[0157] Among them, the constructed semantic contrast loss is expressed as follows:

[0158]

[0159] Where, Represents the temperature coefficient; T is the transposition operator symbol, Represents the true functional category of the i-th graph sample and determines the semantic center that the sample should be “close to”; represents the semantic center vector corresponding to the true functional category of the i-th graph sample, C represents the total number of functional categories, is the semantic center vector of the cth functional category;

[0160] Furthermore, the instance-level contrastive learning objective is constructed to enhance the inter-class separability and sample discrimination ability. The idea is to The positive examples (usually the same image under different perspectives / data enhancement) and negative examples (other image samples) are used to calculate the contrast loss and construct a positive-negative pair for each sample. 、 , the constructed instance contrast loss is expressed as:

[0161]

[0162] Where, is another temperature coefficient, J is the number of negative samples; represents the positive embedding of the i-th graph sample; Represents the negative example embedding of the jth graph sample; j represents the index of the negative sample; T is the transposition operator symbol, It represents the embedding representation of the i-th antimicrobial peptide graph sample in the contrastive learning space after mapping.

[0163] Furthermore, a semantic fusion mechanism is introduced to further improve the stability and semantic consistency of the embedding space. The contrast embedding vector of each sample is weightedly fused with its corresponding semantic center to form the final embedding representation for contrast optimization:

[0164]

[0165] in: : Control the fusion ratio of individual representation and category prototype; Indicates the semantic center of the current category; Represents the final contrast embedding representation after fusion; this mechanism further strengthens the intra-class consistency and stability against structural perturbations without sacrificing the expression of individual differences, and is suitable for generalization modeling of antimicrobial peptide structures under multiple distributions.

[0166] Further, in step S103, the embodiment performs task prediction and joint optimization; specifically, the structure graph representation is input into the classifier, and a sigmoid activation is used to obtain a functional label prediction probability , where C represents the total number of functional categories; the prediction loss is a cross-entropy loss, denoted as:

[0167]

[0168] In the formula, C represents the total number of functional categories; represents the true label, represents the prediction probability;

[0169] A total objective function is constructed, which includes a multi-label cross-entropy, an instance contrast loss, and a semantic contrast loss, and is denoted as:

[0170]

[0171] wherein, represents the total objective function, represents the cross-entropy loss, represents the semantic contrast loss, represents the instance contrast loss, , all represent weights, .

[0172] The target function of the embodiment ensures that the model has classification ability while learning to obtain invariant feature representations that remain stable across tasks, species, and distributions, and is suitable for application scenarios such as high-throughput antibacterial peptide screening and complex functional peptide recognition.

[0173] The semantic-level contrast of the present application guides the aggregation of samples of the same class in the embedding space by constructing semantic center vectors of functional categories, improving intra-class consistency; the instance-level contrast is constructed by positive and negative sample pairs, optimizing the discriminability of graph embedding and improving inter-class separability; this mechanism combines structure disturbance and sample transformation to mine functional structural features that remain stable in different environments and avoid the model learning pseudo-relevant patterns; the contrast learning process is optimized through projection mapping and joint loss, guiding the model to extract invariant representations with causal stability.

[0174] Further, to improve the biological mechanism explainability and functional region positioning ability in antibacterial peptide recognition, the present application introduces a causal importance subgraph extraction and functional motif backtracking mechanism to realize traceable mapping of model prediction results to structural regions, sequence fragments, and functional motifs.

[0175] Please continue to refer to Figure 1 and Figure 2The antibacterial peptide function explainable prediction method based on graph causal learning of the embodiment of the application further includes:

[0176] S104: Based on the node attention weight and edge importance score in the invariant graph representation obtained in the training process, the region that plays a decisive role in predicting the antibacterial function is located and labeled, and a causal subgraph with causal basis is constructed; in combination with the key functional motifs of the known antibacterial peptide structure, the extracted causal subgraph nodes are mapped back to the original amino acid sequence, a sliding window comparison is adopted, and the key functional motifs are visually displayed.

[0177] Specifically, the step S104 of the embodiment of the application includes three steps of constructing a causal importance subgraph, mapping the subgraph to the sequence and detecting functional motifs, and visualizing explanation.

[0178] In the step of constructing the causal importance subgraph, the dynamic extraction of the causal importance subgraph aims to locate the core region that plays a decisive role in predicting the antibacterial function from the graph structure; first, the attention saliency score of the node v is extracted from the output layer of the graph neural network GNN and the importance score of the edge , wherein is used to quantify the contribution of the node to the function prediction; is used to represent the functional relevance of the interaction between residues;

[0179] The attention saliency score of the node v is normalized, and the normalized attention saliency score is represented as:

[0180]

[0181] Further, the embodiment of the application introduces a threshold adaptive mechanism, sets a dynamic threshold (which can be adjusted according to the characteristics of the functional category), and screens out residue nodes that satisfy to form a key residue subset; taking the key residue subset as a node set , the edges between the nodes in the subset are retained (based on the binary contact graph constructed in step S101), and a causal subgraph is constructed, which only retains the structural path directly related to the antibacterial function, effectively eliminating redundant information;

[0182] wherein , v represents a node in the node set, u represents a neighbor node having an edge with the node v; and E represents an edge set.

[0183] ​Further, in the step of mapping sub-graphs to sequences and detecting functional motifs, the construction and matching of the functional motif rule library is the key link between connecting causal sub-graphs and biological significance. Based on the recognized knowledge in the field of antibacterial peptides, the rule library containing key functional motifs is constructed, including di-amino acid motifs (such as RW, KR), tri-amino acid motifs (such as RRR, KRL), cation-rich regions (continuous 3 or more K / R residues), aromatic motifs (rich in F, W, Y residues); the key residue nodes of the causal sub-graphs are mapped back to the original amino acid sequences to obtain the corresponding sequence fragments , n is the number of key residues;

[0184] The sliding window algorithm is used to scan the fragment, and the window length is set to 2-5. The matching motifs are detected by the following formula:

[0185]

[0186] Wherein, k = 2, 3 respectively correspond to di-amino acid motifs and tri-amino acid motifs; M k represents the detection result, represents the sub-sequence in the sequence fragment S starting from position i with length k; the motif library is the rule library of key functional motifs;

[0187] The cation-rich region is determined by the indicator function, and the formula is as follows:

[0188]

[0189] Wherein, represents the indicator function; is used to determine whether the i-th residue is lysine K or arginine R, and b represents the starting position of the window;

[0190] The confidence C m of the matching motif is calculated, and the formula is as follows:

[0191]

[0192] The results with high correlation are retained according to the confidence, and the retained results are visually presented.

[0193] Further, in the step of visualizing the explanation, the causal sub-graph is constructed by the validation set data, and the key edge set on which the model depends when predicting the antibacterial activity is located , wherein the importance score of the key edge is an edge importance threshold, which can be set to 0.6; multiple versions of training data are generated, and the edges of the causal sub-graph are processed according to the retention ratio (namely, retaining Key edges are randomly deleted from the original graph structure data to form a series of perturbed graph structure data

[0194] In the model prediction stage of the application, node attention is used to identify key functional regions, and is mapped back to the original sequence. Typical functional fragments such as di / triamino acid motifs, cation-rich regions, and aromatic residues are detected by a sliding window algorithm. The matching results are presented in a visual manner to construct an explanation path from the residue graph to the biological mechanism, realize traceable verification of the model decision results, and significantly enhance the transparency and biological explanation ability of the model.

[0195] Finally, in order to comprehensively evaluate the performance of the antibacterial peptide function explainable prediction method based on graph causal learning in the application in binary classification and multi-classification tasks, the application uses multiple evaluation indexes to quantitatively analyze the function recognition accuracy, class distinction ability and overall generalization stability of the model.

[0196] The evaluation content covers two sub-tasks of binary classification and multi-classification indexes, that is, the application introduces binary classification and multi-classification indexes for performance evaluation and verification.

[0197] Among them, the binary classification indexes include precision, recall and F1 score.

[0198] In the multi-classification indexes, a class adaptive threshold mechanism is introduced, and multiple indexes are combined for quantitative evaluation.

[0199] In the class adaptive threshold mechanism, different probability thresholds are enumerated for each functional label, and the optimal threshold that maximizes the current class F1 score or AUPR is selected as the decision boundary of the current class.

[0200] In the quantitative evaluation combined with multiple indexes, the multiple indexes include macro-averaged precision, macro-averaged recall and macro-averaged F1 score.

[0201] Specifically, in this embodiment, the precision (Precision) is the proportion of samples that are truly antibacterial peptides among all samples predicted by the model to be antibacterial peptides, which reflects the accuracy of the model prediction results. Let TP represent the number of samples correctly predicted by the model to be antibacterial peptides, and FP represent the number of samples incorrectly predicted by the model to be antibacterial peptides, then The calculation formula is: ​​

[0202]

[0203] The evaluation recall measures the proportion of all true antibacterial peptides correctly identified by the model, reflecting the coverage ability of the model; the number of correctly predicted antibacterial peptides is calculated as the proportion of the number of correctly predicted antibacterial peptides. Let TP be the number of correctly predicted antibacterial peptides, and FN represent the number of incorrectly predicted non-antibacterial peptides, then the calculation formula of Recall is: ;

[0204] In the F1 score, the harmonic mean of precision and recall is considered, and a balanced evaluation index is provided, and F1 can more comprehensively reflect the quality of model explanation, avoid one-sided evaluation when using precision or recall alone, and the calculation formula of F1 is: .

[0205] Further, in the multi-classification of the embodiments of the present application, in the antibacterial peptide multi-function identification stage, the model needs to judge whether each sample has multiple antibacterial functions at the same time, which belongs to the multi-label classification problem. Due to the extremely uneven distribution of each function label, the number of samples of some function categories is extremely small, and if a fixed probability threshold (such as 0.5) is directly used for judgment, it is easy to lead to insufficient identification performance of small categories. Therefore, the present application introduces a class adaptive threshold mechanism (Per-Class Optimal Thresholding), and combines multiple indicators to quantitatively evaluate the multi-function prediction ability of the model; wherein the class adaptive threshold mechanism includes:

[0206] On the validation set, for each function label, different probability thresholds are enumerated, and the optimal threshold that maximizes the F1 score or AUPR of the class is selected as the decision boundary of the class. This method fully considers the difference in class distribution, effectively improves the recognition sensitivity of the model to low-frequency function labels and the overall prediction stability.

[0207] In the macro-precision (Macro-Precision), the precision of each function label is calculated and averaged, which measures the prediction accuracy of each class, and is defined as:

[0208]

[0209] In the macro-recall (Macro-Recall), the recall of each function label is calculated and averaged, which reflects the coverage ability of the model on different functions, and is defined as:

[0210]

[0211] In the macro average F1 score (Macro-F1), the harmonic mean of precision and recall, F1 is calculated for each function label respectively, and then averaged, the expression is as follows:

[0212]

[0213] Wherein, , are the precision and recall of the label respectively.

[0214] The embodiment of the application balances the prediction performance of the model on high-frequency and low-frequency function labels through the above-mentioned multi-index combination evaluation mechanism, and cooperates with the class optimal threshold strategy based on the dynamic adjustment of the verification set, thereby enhancing the adaptability and generalization ability of the modeling of the multifunctional distribution of the antibacterial peptide.

[0215] To verify the effectiveness of the method of the application, the application respectively performs experimental evaluation on the independent test set of the binary classification task (Stage1: antibacterial peptide identification) and the multi-classification task (Stage2: antibacterial peptide function prediction), and compares with the existing mainstream method. The comparison model used in the experiment includes AMP-BERT, TriNet, AMPpredMFA, amPEPpy, TranslmbAMP, IAMPCN and IAMP-CA2L, etc.

[0216] The evaluation indexes include accuracy (ACC), precision (Precision), recall (Recall), F1 score (F1), specificity (Specificity) and AUC, etc. comprehensive performance indexes, to comprehensively reflect the prediction ability of the model in different tasks.

[0217] Table 1: Binary classification task result table

[0218]

[0219] Table 2: Multi-classification task result table

[0220]

[0221] As can be seen from Table 1, in the binary classification task (Stage1), the method of the application is significantly better than the comparison model in all evaluation indexes, especially in precision (0.8659), specificity (0.8871) and AUC (0.8643), which shows that the method can effectively identify the antibacterial peptide sample while ensuring high accuracy, and has strong generalization performance.

[0222] As can be seen from Table 2, in the multi-classification task (Stage 2), the method of the present application also shows obvious advantages, and the overall accuracy reaches 0.6440, and the AUC is 0.7054, which are higher than those of the existing comparative method; meanwhile, the precision and recall are greatly improved compared with the comparative model, which verifies that the present application has stronger robustness and discriminant ability in processing complex tasks of multi-label and class imbalance.

[0223] In summary, the experimental results show that the present application not only achieves significant performance improvement in the antimicrobial peptide recognition task, but also exhibits superior stability and generalization ability in the antimicrobial peptide function multi-classification task, and can effectively support the practical application requirements of large-scale antimicrobial peptide screening and function prediction.

[0224] As shown in Figure 4 According to another embodiment of the present application, an antimicrobial peptide function interpretable prediction system based on graph causal learning is provided, and the prediction system comprises the following modules:

[0225] A graph structure module 301 is used to introduce a pre-trained protein language model, extract a context semantic vector of each residue, and construct a residue contact probability matrix in combination with an attention weight, and after threshold processing, a binary contact graph is formed, and a protein graph structure is constructed with the protein residues as nodes and the binary contact graph as edges;

[0226] A graph representation module 302 is used to encode the residue nodes of the graph structure by using a graph neural network GNN, and based on an attention-guided feature screening mechanism, task-related weights are given to each node and node edge relationship, and a structural subgraph region related to the antimicrobial function is obtained by dynamically compressing and weakening the redundant area, and a graph representation is formed;

[0227] A contrast optimization module 303 is used to map the graph representation to a semantic contrast space to form an embedding representation for contrast optimization, construct a semantic-level contrast learning target and an instance-level contrast learning target, respectively, introduce a multi-task classifier, predict the function category label of the antimicrobial peptide according to the graph representation, and use a cross-entropy loss and a contrast loss to jointly optimize the overall objective function, and obtain an invariant graph representation;

[0228] A causal subgraph module 304 is used to locate and label the region that plays a decisive role in predicting the antimicrobial function based on the node attention weight and edge importance score obtained during the training process, construct a causal subgraph with causal basis, map the nodes of the extracted causal subgraph back to the original amino acid sequence in combination with the key functional motifs of the known antimicrobial peptide structure, and use a sliding window to align and visually display the key functional motifs.

[0229] While embodiments of the application have been disclosed in connection with the above specification, it will be apparent to those skilled in the art that numerous modifications can be made thereto without departing from the scope of the application as set forth in the claims and equivalents thereof. Accordingly, it is intended that all such modifications come within the scope of the claims and equivalents thereof.

Claims

1. An interpretable prediction method for antimicrobial peptide functions based on graph causal learning, characterized by: The following steps are involved: S101: Introducing a pre-trained protein language model, extracting the contextual semantic vector of each residue, and combining it with attention weights to construct a residue contact probability matrix. After threshold processing, a binary contact graph is formed. The protein graph structure is constructed using protein residues as nodes and the binary contact graph as edges. S102: A graph neural network (GNN) is used to encode the residual nodes of the graph structure. Based on an attention-guided feature screening mechanism, task-relevance weights are assigned to each node and node-edge relationship, and redundant regions are dynamically compressed and weakened to obtain structural subgraph regions related to antibacterial function, forming a graph representation. S103: Mapping the graph representation to a multi-layer contrastive space to form an embedded representation for contrastive optimization, wherein the multi-layer contrastive space includes the constructed semantic-level contrastive learning and instance-level contrastive learning; introducing a multi-task classifier to predict the functional category labels of the antimicrobial peptides based on the graph representation, and jointly optimizing the overall objective function using cross-entropy loss and contrastive loss to obtain an invariant graph representation; S104: Based on the node attention weights and edge importance scores in the invariant graph representation obtained during the training process, the regions that play a decisive role in predicting antibacterial function are located and labeled, and a causal subgraph with causal basis is constructed. Combined with the key functional motifs of the known antimicrobial peptide structure, the extracted causal subgraph nodes are mapped back to the original amino acid sequence, and the key functional motifs are visualized using sliding window alignment.

2. The method for interpretable prediction of antimicrobial peptide functions based on graph causal learning according to claim 1, characterized in that: In step S101: Two non-shared multi-layer perceptrons are used to align the dimensions and nonlinearly fuse the protein sequence and residue attributes to obtain node features. Extract the multi-head attention weight tensors from each layer of the protein pre-trained language model, perform cross-layer and cross-head weighted summation, and obtain the overall attention between residue pairs; Set the structural contact threshold, binarize the contact probability matrix, and obtain the graph edges used to construct the protein graph structure; Using protein residues as nodes and binary contact graphs as edges, a two-dimensional protein graph structure G=(V,E) is constructed, where is a set of nodes corresponding to each residue in the protein, Represents the number of residues in the amino acid sequence, with one residue as a node, forming a node set V; is a set of edges corresponding to residue pairs with spatial proximity, Representation node With node The relationship between Representation node With node There are edges between them; The edge feature uses Gaussian radial basis function RBF to embed the continuous value of contact strength, and obtains K-dimensional edge feature embedding, which is expressed as: ; Where, is a fixed mean center, represents the kernel width; Represents the edge features of residue pairs; represents the sum of multi-head attention in each layer, exp represents the natural exponential function, and K represents the dimension of edge feature embedding; At each residue, after fusing the semantic vector and physicochemical features of the protein pre-trained language model, the weights of the edges are combined to construct a weighted graph structure, expressed as: G=(V,E,X,Φ), where V represents the node set, E represents the edge set, X represents the node feature, and Φ represents the edge feature.

3. The method for interpretable prediction of antimicrobial peptide functions based on graph causal learning according to claim 2, characterized in that: In step S102, a multi-layer stacked graph neural network structure is adopted, and each layer of the network structure includes a neighbor aggregation module, a message passing module, and a node update module; Among them, in the node update module, the original feature vector of node v in the lth layer is expressed as , the update rule is expressed as: ; Where, Represents the activation function Sigmoid, AGGREGATE represents the aggregation function, and is a learnable parameter; represents the set of neighbor nodes of node v, represents the original feature vector of node u in the l-1th layer, where u represents the neighboring node with an edge to node v; Utilize node attention channels to evaluate the importance of individual residue nodes to the current functional task; Using the edge attention channel to evaluate the structural propagation significance between two connected residues; Based on the node attention weight and edge attention weight, the node features and edge features are weighted updated respectively, and the compressed graph representation is finally obtained, which is expressed as: ; Where h G A graphical representation focusing on the structural-functional coupling area, represents the attention saliency score of node v, Represents the importance score of the edge; V represents the node set, v represents a node in the node set V, and u represents the neighbor node with an edge to node v. represents edge features, Denotes the graph representation of node v.

4. The method for interpretable prediction of antimicrobial peptide functions based on graph causal learning according to claim 3, characterized in that: In step S103, the graph representation h G Mapping into the contrastive learning space to construct a unified embedding representation of antimicrobial peptide graph samples ; Among them, the mapping function adopts a two-layer nonlinear transformation, which is expressed as: ; Where, Represents a semantic feature transformer; 、 Represents the linear transformation matrix, b1 and b2 represent bias terms, and ReLU represents the activation function. Represents the activation function Sigmoid; A graphical representation focusing on the area of ​​structure-function coupling is presented.

5. The method for interpretable prediction of antimicrobial peptide functions based on graph causal learning according to claim 4, characterized in that: In step S103: The constructed semantic-level contrast learning objectives include: for each functional category , C represents the total number of functional categories, and defines a semantic center vector , Represents a d-dimensional real space; initializes or updates by aggregating sample embedding vectors; for any graph sample , the graph-level representation is achieved through the embedding function is mapped to the contrast space, where Represents the embedding representation of the i-th sample, and defines the semantic center vector based on each type of antibacterial function , the constructed semantic contrast loss is expressed as follows: ; Where, Represents the temperature coefficient; T is the transposition operator symbol, represents the true functional category of the i-th graph sample; represents the semantic center vector corresponding to the true functional category of the i-th graph sample, C represents the total number of functional categories, is the semantic center vector of the cth functional category; The instance-level comparative learning objectives constructed include: The positive and negative examples are used together to calculate the contrast loss and construct the positive and negative pairs of each sample. 、 , constructed instance contrast loss Expressed as: ; Where, is another temperature coefficient, J is the number of negative samples; represents the positive embedding of the i-th graph sample; Represents the negative example embedding of the jth graph sample; j represents the index of the negative sample; T is the transposition operator symbol, It represents the embedding representation of the i-th antimicrobial peptide graph sample in the contrastive learning space after mapping.

6. The method for interpretable prediction of antimicrobial peptide functions based on graph causal learning according to claim 5, characterized in that: In step S103, the structure diagram is represented Input into the classifier and use sigmoid activation to obtain the function label prediction probability , C represents the total number of functional categories; the prediction loss is the cross entropy loss , expressed as: ; Where C represents the total number of functional categories; represents the true label, represents the predicted probability; Construct the overall objective function including multi-label cross entropy, instance contrast loss and semantic contrast loss, which is expressed as: ; in, represents the overall objective function, represents the cross entropy loss, represents the semantic contrast loss, represents the instance contrast loss, 、 Both represent weights, and .

7. The method for interpretable prediction of antimicrobial peptide functions based on graph causal learning according to claim 6, characterized in that: In step S104, the attention saliency score of node v is extracted from the output layer of the graph neural network GNN and edge importance scores ,in, , used to quantify the contribution of nodes to function prediction; , used to characterize the functional relevance of interactions between residues; Attention saliency score for node v Normalized, normalized attention saliency score Expressed as: ; The threshold adaptive mechanism is introduced, and the dynamic threshold is expressed as , filter out The residue nodes form a key residue subset, with the key residue subset as the node set , retain the edges between nodes in the subset and construct a causal subgraph ,in, , v represents a node in the node set, u represents the neighboring node that has an edge with node v; E represents the edge set.

8. The method for interpretable prediction of antimicrobial peptide functions based on graph causal learning according to claim 7, characterized in that: In step S104, a rule library containing key functional motifs is constructed, including diamino acid motifs, triamino acid motifs, cation-rich regions, and aromatic motifs; the key residue nodes of the causal subgraph are mapped back to the original amino acid sequence to obtain the corresponding sequence fragments. , n is the number of key residues; The sliding window algorithm was used to scan the fragments, with the window length set to 2-5, and the matching motif was detected using the following formula: ; Among them, k = 2, 3 correspond to two-amino acid motifs and three-amino acid motifs, respectively; Indicates the test results. It represents a subsequence of length k starting from position i in the sequence fragment S; the motif library is a rule library of key functional motifs; The cation-rich region is determined by the indicator function, which is as follows: ; in, represents the indicator function; Used to determine whether the i-th residue is lysine K or arginine R, b represents the starting position of the window; Calculate confidence for matching motifs , the formula is as follows: ; Sort by confidence level to retain the highly relevant results, and visualize the retained results.

9. The method for interpretable prediction of antimicrobial peptide functions based on graph causal learning according to claim 8, characterized in that: Introducing binary and multi-classification metrics for performance evaluation and verification; binary classification metrics include precision, recall, and F1 score; for multi-classification metrics, introducing a category-adaptive threshold mechanism and combining multiple metrics for quantitative evaluation; In the category adaptive threshold mechanism, for each feature label, different probability thresholds are enumerated, and the optimal threshold that maximizes the F1 score or AUPR of the current category is selected, and the optimal threshold is used as the decision boundary of the current category; In the quantitative evaluation combining multiple indicators, multiple indicators include macro-average precision, macro-average recall and macro-average F1 score.

10. A prediction system for implementing the method for interpretable prediction of antimicrobial peptide functions based on graph causal learning as claimed in any one of claims 1 to 9, characterized in that: Includes the following modules: The graph structure module is used to introduce a pre-trained protein language model, extract the contextual semantic vector of each residue, and construct a residue contact probability matrix based on the attention weight. After threshold processing, a binary contact graph is formed. The protein graph structure is constructed with protein residues as nodes and the binary contact graph as edges; The graph representation module uses a graph neural network (GNN) to encode the residual nodes of the graph structure. Based on an attention-guided feature screening mechanism, it assigns task-relevance weights to each node and node-edge relationship, dynamically compresses and weakens redundant regions, and obtains structural subgraph regions related to antibacterial function to form a graph representation. The contrastive optimization module is used to map the graph representation to a semantic contrastive space to form an embedded representation for contrastive optimization. Semantic-level contrastive learning objectives and instance-level contrastive learning objectives are constructed separately. A multi-task classifier is introduced to predict the functional category labels of antimicrobial peptides based on the graph representation. The cross-entropy loss and contrastive loss are used to jointly optimize the overall objective function to obtain an invariant graph representation. The causal subgraph module is used to locate and annotate the regions that play a decisive role in predicting antibacterial function based on the node attention weights and edge importance scores in the invariant graph representation obtained during the training process, construct a causal subgraph with causal basis, and map the extracted causal subgraph nodes back to the original amino acid sequence in combination with the key functional motifs of the known antimicrobial peptide structure. The key functional motifs are then visualized using a sliding window alignment.

Citation Information

Patent Citations

  • Novel method for efficiently cloning antibacterial peptide encoding gene

    CN102154260A

  • Protein signal peptide prediction method and device based on geometric graph neural network

    CN112002378A

  • Antibacterial peptide sequence design framework based on protein language model supervised fine tuning and human feedback reinforcement learning

    CN120048356A

  • Antibacterial peptide screening framework based on protein language model and biological information calculation software

    CN120048357A

  • Inplanatable node classification prediction method based on adversarial causal graph learning

    CN120524163A

Cited By

  • Phenotype prediction and phenotype prediction model training method

    CN121459933A