Intelligent optimization and learning fusion method for protein classification considering topological features
Patent Information
- Application Number
- CN202410866600.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2044-07-01
AI Technical Summary
然而,基于氨基酸序列的分类方法未能充分利用蛋白质的空间结构信息
[0056] The beneficial effects of adopting the above technical solution are as follows: The protein classification method that integrates intelligent optimization and learning considering topological features provided by this invention (1) clusters birth and death pairs extracted from protein structures. Through the clustering algorithm, these birth and death pairs are divided into N categories, which can classify similar birth and death pairs, making it convenient to apply the bag-of-words model in the future. (2) The bag-of-words model is used to vectorize the features of proteins. The bag-of-words model has been applied in the fields of natural language processing and computer vision, and can be used to process text and image feature points, respectively. This invention also models the topological features of proteins through the bag-of-words model to generate a fixed-length vector, which is convenient to feed into the neural network. (3) A neural network model is designed for classification. This model not only includes the topological feature vector generated by the bag-of-words model, but can also integrate other features of proteins. This feature fusion method enables the neural network to use the multi-dimensional information of proteins for more accurate classification.
Smart Images

Figure CN118861848B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of topology data analysis, intelligent optimization, and machine learning, and in particular to a protein classification method that integrates intelligent optimization and learning considering topological features. Background Technology
[0002] Proteins are molecules composed of amino acids formed by dehydration condensation. They make up about 18% of the human body's mass, second only to water molecules, and are one of the key substances for maintaining normal life functions. Different proteins have different functions; for example, insulin regulates blood sugar, hemoglobin transports oxygen, and transthyretin repairs tissues. The function and role of a protein are determined by its structure, which is divided into primary, secondary, tertiary, and quaternary structures. The primary structure is the sequence of amino acids in a protein, equivalent to an amino acid sequence; the secondary structure refers to the conformation formed by the backbone atoms of the polypeptide chain in a certain way; the tertiary structure is formed by further winding and folding of the secondary structure; and the quaternary structure is the spatial arrangement of polypeptide chains with tertiary structures.
[0003] Determining structure, function, and role through experimental methods is a complex process. As early as 1985, the Human Genome Project, aiming to determine the DNA sequence of the entire human genome, pioneered bioinformatics and greatly promoted its development. Bioinformatics is an interdisciplinary field that analyzes biological information using methods from statistics, mathematics, computer science, and biology. It plays a beneficial role in protein function detection, using machine learning and deep learning to analyze biological data and achieve tasks such as protein classification and structure prediction. Classification tasks effectively determine the type and function of proteins, playing a positive role in protein drug design and development, drug interactions, protein identification, and protein evolution research. Furthermore, protein classification involves knowledge of natural language processing and computer vision, applying improved text and image classification methods to the protein field. This process not only benefits the development of artificial intelligence itself but also further promotes its application in the biological field, possessing significant practical value. In addition, research on protein structure has also driven the application of topological data analysis, as it is a tool for analyzing high-dimensional data and is equally applicable to the three-dimensional structure of proteins. The combination of topological data analysis and artificial intelligence technology has brought new opportunities to protein research. For example, features extracted through topological data analysis can be used as input to machine learning models to achieve protein classification tasks.
[0004] Research on protein classification tasks focuses on two main input sources: amino acid sequence information and three-dimensional spatial structure. Ehsaneddin Asgari et al. proposed a vectorization method for protein sequences and combined it with a machine learning model for classification. Debarshi Kundu et al. developed a model called Quantum Tensor Networks for protein sequence classification. On the other hand, Yufei Huang et al. extracted vectors from the spatial structure of proteins to complete the classification task. Zuobai Zhang et al. constructed a pre-trained model to learn geometric features from protein structure and applied it to protein classification.
[0005] Analysis of relevant research revealed several key issues. First, protein function is often closely related to its three-dimensional structure, which provides richer information than one-dimensional amino acid sequences. However, amino acid sequence-based classification methods fail to fully utilize the spatial structural information of proteins. Furthermore, spatial structure classification may require more complex neural network models to process three-dimensional protein information, undoubtedly increasing the difficulty of model design and the demand for computational resources. Although spatial structure-based methods may have greater advantages in revealing protein function, in practice, a balance must be struck between model complexity and accuracy. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing a protein classification method that integrates intelligent optimization and learning considering topological features, thereby achieving the classification of protein three-dimensional structures.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a protein classification method that integrates intelligent optimization and learning considering topological features, comprising the following steps:
[0008] Step 1: Generate birth-death pairs based on the three-dimensional structure of protein samples;
[0009] Draw a sphere with the coordinates of each Ca atom in the protein as the center and r as the radius, where r increases continuously over time;
[0010] If the spheres corresponding to two atoms are tangent, intersect, or the distance between the spheres is less than a set threshold, the two atoms will be connected. Each atom is considered as h0. When two spheres contain each other's centers, the two atoms are connected. If two atoms are connected, it is considered that the h0 corresponding to one of the atoms disappears. If the connection of multiple atoms forms a loop, a loop structure h1 is formed. Here, h0 reflects the connectivity in the protein space, and h1 reflects the loop structure in the protein space. Similar samples have similar topological properties.
[0011] As the radius r changes, h0 and h1 will appear and disappear continuously; the pair of values formed by r corresponding to the appearance and disappearance of h1 is selected as the birth and death pair of the protein.
[0012] Step 2: Construct a topological bag-of-words model for each protein sample;
[0013] Step 2.1: Using the birth and death pairs of each protein sample as topological points, cluster the birth and death pairs of each protein sample into N classes using the K-means clustering algorithm;
[0014] Step 2.2.1: Using r at birth as the x-axis and r at death as the y-axis, draw each birth-death pair in a Cartesian coordinate system, called the h1 topological point;
[0015] Step 2.2.2: Randomly select N topological points as the marker centers, denoted as x. i Let i = 1, 2, ..., N, and each label center corresponds to a class; find the nearest label center for each topological point, if the nearest label center of the topological point is x. i If the topological point belongs to the i-th class, then the topological point belongs to the i-th class.
[0016] Step 2.2.3: Calculate the new centroids for each class. The x-coordinate of each new centroid is the mean x-coordinate of all topological points in that class, and the y-coordinate of each new centroid is the mean y-coordinate of all topological points in that class. Repeat the steps of classifying and updating the labeled points until the clustering stopping condition is met.
[0017] Step 2.2: Generate bag-of-words vectors based on the clustered topological points;
[0018] Step 2.2.1: Generate an array of length N with an initial value of 0 for each protein sample;
[0019] Step 2.2.2: For a protein, iterate through each of its topological points. If the nearest label center to that topological point is x... i If the topological point belongs to the i-th class, the element with index i-1 in the array is incremented by 1;
[0020] Step 2.2.3: Iterate through each protein and perform the operation of step 2.2.2 for each protein. Finally, a corresponding bag-of-words vector is generated for each protein sample.
[0021] Step 2.3: Optimize the bag-of-words vectors corresponding to protein samples;
[0022] An improved version of TF-IDF was used to optimize the bag-of-words vectors corresponding to protein samples;
[0023] (1) For a bag-of-words vector v, sum up the values of all its elements, denoted as s1, and then divide each element of vector v by s1 to obtain the v-tf vector.
[0024] (2) Construct a vector v-df with the same length as the bag-of-words vector. This vector is generated through the global dataset. No matter how many protein samples there are, there is only one v-df vector. For the v-df vector, each element is 1. Then iterate through each position of all bag-of-words vectors. If the element at that position is not 0, then add 1 to the corresponding position of v-df.
[0025] (3) Let the sum of the total number of protein samples plus 1 be s3. Replace each element of the v-df vector with the logarithm of the quotient of s3 divided by that element to obtain a new vector. Then add 1 to each element of the new vector, denoted as vector v-idf.
[0026] (4) Generate a corresponding v-tf vector for each bag-of-words vector, and then multiply the vector element by element with the vector v-idf. The resulting vector is then L2 normalized. The final vector is denoted as v-tf-idf and is used to replace the original bag-of-words vector.
[0027] Step 3: Extract the SIFT features of the protein and vectorize them to obtain SIFT bag-of-words vectors;
[0028] Step 3.1: Initialize the protein distance matrix; initialize a distance matrix with a length and width of n for each protein, where n is the number of Ca atoms in the protein;
[0029] Step 3.2: Traverse the Ca atom sequence: Traverse each Ca atom pair in the protein, calculate its Euclidean distance, and place the calculation result in the corresponding position in the distance matrix;
[0030] Step 3.3: Visualize the distance matrix and convert it into a grayscale image;
[0031] Step 3.4: Extract SIFT features from the grayscale image corresponding to the protein sample;
[0032] Step 3.5: Construct SIFT bag-of-words vectors;
[0033] Following the process of generating N-dimensional topological bag-of-words vectors from topological points in step 2, SIFT feature points are processed in the same way to generate corresponding SIFT bag-of-words vectors.
[0034] Step 4: Construct a neural network structure for protein classification;
[0035] The neural network structure includes two inputs, which correspond to the N-dimensional topological bag-of-words vector of each protein sample, denoted as vector x1, and the N-dimensional SIFT bag-of-words vector, denoted as vector x2. The output is the category label corresponding to the protein sample.
[0036] The neural network structure employs a feature fusion neural network for protein classification, and the specific process is as follows:
[0037] 1) Connect the input vector x1 to a layer d1 with only one neuron, where the activation function is ReLU, and obtain the output weight value w1;
[0038] 2) Then connect the input vector x2 to layer d2, which also has only one neuron, where the activation function is still ReLU, to obtain the output weight value w2;
[0039] 3) Multiply vector x1 element by element with weight value w2 to obtain a new vector x3;
[0040] 4) Multiply vector x2 element by element with weight value w1 to obtain a new vector x4;
[0041] 5) Add vectors x3 and x4 to obtain vector x5;
[0042] 6) Connect vector x5 to layer d3 with n1 neurons and ReLU activation function. The output of this layer is vector x6.
[0043] 7) Connect vector x6 to layer d4 with n2 neurons and ReLU activation function. The output of this layer is vector x7.
[0044] 8) Connect vector x7 to the output layer with two neurons and use Softmax as the activation function;
[0045] 9) Set the parameters for neural network training, including epoch and batch size, as well as the optimizer and loss function for model training;
[0046] Step 5: Adaptively select the number of neurons in the neural network based on an evolutionary algorithm;
[0047] The NSGA-II multi-objective optimization algorithm is used to determine the appropriate number of neurons, specifically:
[0048] Step 5.1: Initialize the population: Randomly generate an initial population, which consists of individuals, each representing a solution;
[0049] Step 5.2: Assess fitness: Calculate the fitness of each individual in the population;
[0050] An optimization algorithm model is built using the Pymoo library. The objective functions are to minimize the negative value of the neural network accuracy and to minimize the total number of parameters. The fitness of an individual in the population is equivalent to the values of the two objective functions corresponding to that individual.
[0051] Step 5.3: Non-dominated sorting: The population is non-dominated, and individuals in the population are divided into non-dominated layers;
[0052] Step 5.4: Calculate crowding distance: Calculate the crowding distance for each individual. This indicator helps maintain population diversity.
[0053] Step 5.5: Selection, Crossover, and Mutation: Select superior parent individuals based on their non-dominant ranking and crowding distance; then, generate a new generation of individuals, called offspring individuals, through crossover and mutation operations.
[0054] Step 5.6: Population Merging and Reselection: Merge the population composed of offspring individuals with the population composed of parent individuals, and select individuals of the same size as the original population from the merged population through non-dominated sorting and crowding distance calculations to maintain the elitism of the population.
[0055] Step 5.7: Iterative loop: Repeat the steps of fitness calculation, non-dominated sorting, crowding distance calculation, selection operation, and population merging until the specified termination condition is met.
[0056] The beneficial effects of adopting the above technical solution are as follows: The protein classification method that integrates intelligent optimization and learning considering topological features provided by this invention (1) clusters birth and death pairs extracted from protein structures. Through the clustering algorithm, these birth and death pairs are divided into N categories, which can classify similar birth and death pairs, making it convenient to apply the bag-of-words model in the future. (2) The bag-of-words model is used to vectorize the features of proteins. The bag-of-words model has been applied in the fields of natural language processing and computer vision, and can be used to process text and image feature points, respectively. This invention also models the topological features of proteins through the bag-of-words model to generate a fixed-length vector, which is convenient to feed into the neural network. (3) A neural network model is designed for classification. This model not only includes the topological feature vector generated by the bag-of-words model, but can also integrate other features of proteins. This feature fusion method enables the neural network to use the multi-dimensional information of proteins for more accurate classification. Attached Figure Description
[0057] Figure 1 This is a schematic diagram of solenoid proteins and non-solenoid proteins provided in an embodiment of the present invention, wherein (a) is a solenoid protein and (b) is a non-solenoid protein;
[0058] Figure 2 A flowchart of a protein classification method that integrates intelligent optimization and learning considering topological features, provided in an embodiment of the present invention;
[0059] Figure 3 A grayscale image of a protein distance matrix provided in an embodiment of the present invention;
[0060] Figure 4 The objective function value provided by the multi-objective evolutionary algorithm in the embodiments of the present invention. Detailed Implementation
[0061] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0062] This embodiment uses solenoid and non-solenoid protein datasets as examples to classify proteins using the protein classification method of the present invention that integrates intelligent optimization and learning considering topological features.
[0063] Solenoid proteins (an example is...) Figure 1 As shown in the image (source: https: / / www.rcsb.org / structure / 4YEI, related literature: "Synthetic beta-solenoid proteins with the fragment-free computational design of a beta-hairpin extension"), they exhibit a helical structure. Non-solenoid proteins (an example of which is...) Figure 1 As shown in the image (source: https: / / www.rcsb.org / structure / 3pos, related literature: "X-ray structure of the human calreticulin globular domain reveals a Peptide-binding area and suggests a multi-molecular mechanism"), its overall spatial characteristics are dissimilar to those of solenoid proteins.
[0064] The dataset used in this embodiment contains the three-dimensional coordinates of 105 solenoid proteins and 247 non-solenoid proteins. This dataset has been mentioned in multiple papers, and the paper "RAPHAEL: Recognition, periodicity and insertion assignment of solenoid protein structures" also involves the identification of solenoid proteins, which to some extent proves the value of this dataset.
[0065] In this embodiment, a protein classification method that considers the fusion of intelligent optimization and learning based on topological features is used, such as... Figure 2 As shown, it includes the following steps:
[0066] Step 1: Generate birth-death pairs based on the three-dimensional structure of protein samples;
[0067] Proteins often contain a large number of atoms, which makes protein representation, analysis, and modeling difficult. Therefore, this embodiment only considers the Ca atoms (hereinafter referred to as atoms) of each protein. This approach improves efficiency and captures the main structure of the protein.
[0068] This embodiment uses a single protein as an example to illustrate the process of obtaining birth-death pairs:
[0069] First, draw a sphere with the coordinates of each atom in the protein as the center and r as the radius, where r increases continuously over time;
[0070] Secondly, if the spheres corresponding to two atoms are tangent, intersect, or the distance between the spheres is less than a set threshold, the two atoms will be connected. In this embodiment, each atom is considered as h0. When two spheres contain each other's centers, the two atoms are connected. If two atoms are connected, it is considered that the h0 corresponding to one of the atoms disappears. If the connection of multiple atoms forms a loop, it can be considered that a loop structure h1 has been formed. Here, h0 reflects the connectivity in space, and h1 reflects the loop structure in space. Similar samples may have similar topological properties.
[0071] Finally, as r changes, h0 and h1 will continuously appear and disappear. For each h0 or h1, the r corresponding to its appearance and disappearance forms a pair of values, called a birth-death pair. In this embodiment, the pair of values formed by the r corresponding to the appearance and disappearance of h1 is selected as the birth-death pair of this protein.
[0072] Step 2: Construct a topological bag-of-words model for each protein sample;
[0073] Step 2.1: Using the birth and death pairs of each protein sample as topological points, the birth and death pairs of each protein sample are clustered into 1000 classes using the K-means clustering algorithm;
[0074] Step 2.2.1: Using r at birth as the x-axis and r at death as the y-axis, draw each birth-death pair in a Cartesian coordinate system, called the h1 topological point;
[0075] Step 2.2.2: Randomly select 1000 topological points as the marker centers, denoted as x. i Let i = 1, 2, ..., 1000, and each label center corresponds to one class; find the nearest label center for each topological point, if the nearest label center of the topological point is x i If the topological point belongs to the i-th class, then the topological point belongs to the i-th class.
[0076] Step 2.2.3: Calculate the new centroids for each class. The x-coordinate of each new centroid is the average x-coordinate of all topological points in that class, and the y-coordinate of each new centroid is the average y-coordinate of all topological points in that class. Repeat the steps of classifying and updating the markers until the clustering stops (e.g., the number of iterations reaches a specified value).
[0077] Step 2.2: Generate bag-of-words vectors based on the clustered topological points;
[0078] Step 2.2.1: Generate an array of length 1000 with an initial value of 0 for each protein sample;
[0079] Step 2.2.2: For a protein, iterate through each of its topological points. If the nearest label center to that topological point is x... i If the topological point belongs to the i-th class, the element with index i-1 in the array is incremented by 1;
[0080] Step 2.2.3: Iterate through each protein and perform the operation of step 2.2.2 for each protein. Finally, a corresponding bag-of-words vector is generated for each protein sample.
[0081] Step 2.3: Optimize the bag-of-words vector corresponding to the protein samples; use an improved version of TF-IDF to optimize the bag-of-words vector corresponding to the protein samples;
[0082] There are various optimization methods for the bag-of-words model, a common one being TF-IDF. In language models, TF-IDF can calculate the importance of different words using term frequency and inverse document frequency. This example presents optimization schemes for a basic version and an improved version of TF-IDF, ultimately using the improved scheme to optimize the bag-of-words vectors, where the base of the logarithm operation is the natural base.
[0083] The optimization plan for the basic version is as follows:
[0084] 1. For a bag-of-words vector v, sum the values of all its elements, denoted as s1, and then divide each element of vector v by s1 to obtain the v-tf vector.
[0085] 2. Construct a vector v-df with the same length as the bag-of-words vector. This vector is generated from the global dataset, and there is only one v-df vector regardless of the number of protein samples. For v-df, each element is 1 (initializing to 1 is to ensure that the divisor is not zero in the next step, which involves division). Then, iterate through each position of each bag-of-words vector. If the element at that position is not 0, increment the corresponding position in v-df by 1.
[0086] 3. Let the total number of samples be s2. Replace each element of the v-df vector with the logarithm of the quotient of s2 divided by that element. The new vector is denoted as v-idf.
[0087] 4. Generate a corresponding v-tf vector for each bag-of-words vector, and then multiply this vector element by v-idf. The new vector is denoted as v-tf-idf and is used to replace the original bag-of-words vector.
[0088] The optimization scheme for the improved version is as follows:
[0089] (1) For a bag-of-words vector v, sum up the values of all its elements, denoted as s1, and then divide each element of vector v by s1 to obtain the v-tf vector.
[0090] (2) Construct a vector v-df with the same length as the bag-of-words vector. This vector is generated from the global dataset. No matter how many protein samples there are, there is only one v-df vector. For the v-df vector, each element is 1. Then, iterate through each position of each bag-of-words vector. If the element at that position is not 0, then add 1 to the corresponding position of v-df.
[0091] (3) Let the sum of the total number of documents plus 1 be s3. Replace each element of the v-df vector with the logarithm of the quotient of s3 divided by the element to obtain a new vector. Then add 1 to each element of the new vector, which is denoted as v-idf.
[0092] (4) Generate a corresponding v-tf vector for each bag-of-words vector, and then multiply the vector element by v-idf. The resulting vector is then L2 normalized. The final vector is denoted as v-tf-idf and is used to replace the original bag-of-words vector.
[0093] Step 3: Extract the SIFT features of the protein and vectorize them to obtain SIFT bag-of-words vectors;
[0094] Features extracted through topological data analysis may be more abstract, so using them alone may not yield good results. Therefore, they can be used in combination with other features.
[0095] Proteins possess a variety of features that can be used for machine learning modeling, one typical feature being sequence characteristics. Protein sequences are composed of amino acids, each amino acid can be viewed as a word, and each protein can be seen as a sentence composed of many words. Therefore, natural language processing techniques such as Word2vec, Doc2vec, and GloVe can be used to vectorize proteins. Physicochemical properties, such as hydrophobicity, can also be used to vectorize proteins.
[0096] This embodiment uses another type of feature derived from protein structure: SIFT features. SIFT features are two-dimensional representations of the protein structure. Extracting features from the same protein structure in different ways allows for more efficient use of structural information. Non-structural features of proteins rely on other information, placing more stringent demands on the protein dataset. In the paper "Quantitative analysis of visual codewords of a protein distance matrix," the authors extracted KAZE features from the protein distance matrix and then constructed a bag-of-words model, achieving high classification performance. This embodiment uses a similar approach, replacing KAZE with SIFT and extracting SIFT bag-of-words vectors of the same length as the topological bag-of-words vectors, facilitating subsequent feature fusion.
[0097] The entire process is divided into several parts, including calculating the distance matrix, extracting SIFT features, and constructing bag-of-words vectors. The specific steps are as follows:
[0098] Step 3.1: Initialize the protein distance matrix; initialize a distance matrix with a length and width of n for each protein, where n is the number of Ca atoms in the protein;
[0099] Step 3.2: Traverse the Ca atom sequence: Traverse every Ca atom pair in the protein, calculate their Euclidean distance, and place the calculation results in the corresponding positions in the distance matrix;
[0100] For example, if the coordinates of the k-th Ca atom in the protein are (k1, k2, k3) and the coordinates of the g-th Ca atom are (g1, g2, g3), then the Euclidean distance d between the two atoms can be calculated by setting the values of the k-th row and g-th column and the g-th row and k-th column of the distance matrix to d. The formula for calculating d is as follows:
[0101]
[0102] Step 3.3: Visualize the distance matrix and convert it into a grayscale image;
[0103] This example uses the Matplotlib library in Python to convert the distance matrix into a grayscale image and save it. The grayscale image corresponding to one protein sample is shown below. Figure 3 As shown.
[0104] Step 3.4: Extract SIFT features from the grayscale image corresponding to the protein sample;
[0105] In this embodiment, SIFT features are extracted from each grayscale image using the OpenCV library, and each SIFT feature point corresponds to a 128-dimensional vector.
[0106] Step 3.5: Construct SIFT bag-of-words vectors;
[0107] Following the process of generating N-dimensional topological bag-of-words vectors from topological points in step 2, SIFT feature points are processed in the same way to generate corresponding SIFT bag-of-words vectors.
[0108] After the above steps, each protein will correspond to a 1000-dimensional topological bag-of-words vector and a 1000-dimensional SIFT bag-of-words vector.
[0109] Step 4: Construct a neural network structure for protein classification;
[0110] A neural network is a model that simulates the workings of the human brain. It consists of multiple neurons and typically includes input layers, hidden layers, and output layers to fit the complex relationship between inputs and outputs.
[0111] The input layer is the first layer of the neural network, representing the raw data that is fed into the subsequent hidden layers.
[0112] Hidden layers typically consist of one or more layers and are used to process input data, guiding it through neuronal computations and other steps before feeding it into the final output layer. To improve the learning ability of hidden layers, non-linear activation functions are often introduced. In this embodiment, the hidden layer uses the ReLU activation function, as shown below:
[0113] ReLU(x) = max(0,x)
[0114] Here, x is the input of the function. The output of the ReLU function is the maximum value between the input x and 0, which means that all negative values are set to 0, while positive values remain unchanged.
[0115] The output layer is the last layer of the neural network, representing the result output by the network. In regression problems, the output layer typically has only one neuron and does not use an activation function, while in classification problems, the number of neurons in the output layer is usually equal to the number of classes. In this embodiment, the output layer uses the Softmax activation function to convert the output of the last layer into a probability distribution. The class with the highest probability is the classification result given by the network. The Softmax function is shown below:
[0116]
[0117] Where m is the number of feature categories, and in this embodiment m equals 2.
[0118] The advantages of neural networks are: if the input and output are complex, human experience alone cannot effectively identify the relationship between them, while neural networks can automatically learn patterns from data; when properly trained, neural networks can classify and predict unseen data; and neural networks are flexible, existing in different structures to suit different problems. Common neural networks include multilayer perceptrons, convolutional neural networks, and recurrent neural networks. This embodiment proposes a neural network structure for protein sample classification, as shown below:
[0119] Each protein sample corresponds to two inputs: a 1000-dimensional topological bag-of-words vector (denoted as x1) and a 1000-dimensional SIFT bag-of-words vector (denoted as x2). The output is the category label (solenoid protein and non-solenoid protein) corresponding to the protein sample.
[0120] In this embodiment, a feature fusion neural network is used for protein classification, and the specific process is as follows:
[0121] 1) Connect x1 to layer d1 with only one neuron, where the activation function is ReLU, and obtain the output weight value w1.
[0122] 2) Then connect x2 to layer d2, which also has only one neuron, where the activation function is still ReLU, to obtain the output weight value w2.
[0123] 3) Multiply vector x1 element by weight value w2 to obtain a new vector x3.
[0124] 4) Multiply vector x2 element by element with weight value w1 to obtain a new vector x4.
[0125] 5) Add vectors x3 and x4 together to get vector x5.
[0126] 6) Connect vector x5 to layer d3 with a specific number of neurons (denoted as n1) and the activation function is ReLU. The output of this layer is vector x6.
[0127] 7) Connect vector x6 to layer d4 with a specific number of neurons (denoted as n2) and the activation function is ReLU. The output of this layer is vector x7.
[0128] 8) Connect vector x7 to the output layer with two neurons and use Softmax as the activation function.
[0129] 9) Set the parameters of the neural network: epoch is set to 5, and batch size is set to 8. An epoch of 5 means the entire training set has undergone 5 forward and backward propagation cycles, while a batch size of 8 means the model updates its weights once using 8 protein samples each time. The optimizer RMSprop can adapt to the learning rate, which is beneficial for model training. The optimizer is set to RMSprop, indicating that the model can adapt to the learning rate. The model also uses the cross-entropy loss function to measure the difference between the model output and the true label.
[0130] In this embodiment, the lengths of both the topological bag-of-words vector and the SIFT bag-of-words vector are 1000. If the lengths of the two are different, feature fusion cannot proceed smoothly, and the hidden layer is needed to convert the vectors of unequal length into vectors of equal length.
[0131] Step 5: Adaptively select the number of neurons in the neural network based on an evolutionary algorithm;
[0132] Since the number of neurons in layers d3 and d4 of the neural network is uncertain, this embodiment uses the NSGA-II multi-objective optimization algorithm to determine the appropriate number of neurons. This optimization algorithm model includes two objectives: one is to maximize the accuracy of the neural network, and the other is to minimize the total number of parameters, so as to maintain accuracy while having as few neurons as possible, thereby improving the model's computational speed.
[0133] The process by which the NSGA-II multi-objective optimization algorithm determines the appropriate number of neurons is as follows:
[0134] Step 5.1: Initialize the population: Randomly generate an initial population, which consists of individuals, each representing a solution;
[0135] Step 5.2: Assess fitness: Calculate the fitness of each individual in the population.
[0136] This embodiment uses the Pymoo library to build an optimization algorithm model. Since Pymoo requires minimizing the objective function, the objective function is actually minimizing the negative value of the neural network's accuracy and minimizing the total number of parameters. The fitness of an individual in the population is equivalent to the values of the two objective functions corresponding to that individual.
[0137] Step 5.3: Non-dominated sorting: The population is non-dominated, and individuals in the population are divided into non-dominated layers.
[0138] Step 5.4: Calculate crowding distance: Calculate the crowding distance for each individual. This indicator helps maintain population diversity.
[0139] Step 5.5: Selection, Crossover, and Mutation: Select superior parent individuals based on their non-dominated rank and crowding distance. Then, generate a new generation of individuals, called offspring, through crossover and mutation operations.
[0140] Step 5.6: Population Merging and Reselection: Merge the population composed of offspring individuals with the population composed of parent individuals, and select individuals of the same size as the original population from the merged population through non-dominated sorting and crowding distance calculations to maintain the elitism of the population.
[0141] Step 5.7: Iterative loop: Repeat the steps of fitness calculation, non-dominated sorting, crowding distance calculation, selection operation, and population merging until the specified termination condition is met.
[0142] In this embodiment, the relevant parameters of the NSGA-II multi-objective optimization algorithm are shown in Table 1.
[0143] Table 1 Parameter settings for NSGA-II multi-objective optimization algorithm
[0144]
[0145] In the table, var1 and var2 are two variables to be optimized. Through calculation, the number of neurons in layers d3 and d4 can be obtained, denoted by n1 and n2 respectively. The calculation method is as follows:
[0146]
[0147] Here, int represents rounding down.
[0148] The objective function for NSGA-II multi-objective optimization is shown below:
[0149]
[0150] Where -avr (accuracies) represents the negative of the average accuracy of the neural network model on the two-fold dataset, and sum (parameters) represents the sum of the number of parameters, calculated as follows:
[0151] 1. Layer d1 has one neuron, the input dimension of which is 1000, and it has 1001 parameters.
[0152] 2. Layer d2 has one neuron, and the input dimension of this layer is 1000, with 1001 parameters.
[0153] 3. Layer d3 has n1 neurons, the input dimension of which is 1000, and it has 1001n1 parameters.
[0154] 4. Layer d4 has n2 neurons, the input dimension of which is n1, and it has (n1+1)n2 parameters.
[0155] 5. The output layer has 2 neurons. The input dimension of this layer is n2-dimensional, and it has 2(n2+1) parameters.
[0156] Summing and rearranging the above parameters, the total number of parameters is shown in the following formula:
[0157] sum(parameters)=1001n1+n1n2+3n2+2004
[0158] The optimal number of neurons for the five neurons obtained using the NSGA-II algorithm is shown in Table 2 (accuracy is rounded to four decimal places). This embodiment also visualizes the results, as shown below. Figure 4 As shown. In Figure 4 In the diagram, the horizontal axis represents the value of function f1 (the negative value of accuracy), and the vertical axis represents the value of function f2 (the number of parameters).
[0159] Table 2 Experimental Results of Optimization Algorithm
[0160] 1 5 5 7049 0.9688 2 5 10 7089 0.9773 3 5 15 7129 0.9830 4 5 130 8049 0.9943 5 15 165 19989 0.9972
[0161] Combined with Table 2 and Figure 4 Analysis shows that different solutions can be selected based on the degree of importance attached to the number of neurons and accuracy.
[0162] To further verify the experimental performance of the neural network model, this embodiment also removes the feature fusion part of the aforementioned neural network, resulting in a new network. The input to this new network can only be a bag-of-words vector, either a topological bag-of-words vector or a SIFT bag-of-words vector, i.e., a single vector. When adjusting parameters using a multi-objective optimization algorithm, the epoch was set to 5 to improve the algorithm's running speed. However, in actual training, increasing the epoch might result in more thorough training. Furthermore, to further observe the performance of the optimal solution at a specific epoch on the model after epoch adjustment, this comparative experiment adjusted the epoch to 10. It was found that the solution with epoch 5 still performed as expected after adjusting the epoch to 10. The number of neurons used in the experiment was (15, 165), (5, 130), and (5, 15), respectively. The validation method was two-fold cross-validation, and the accuracy was averaged and rounded to four decimal places. The results are shown in Table 3. Due to the randomness of the experiment and the different parameters, the experimental results in Table 3 are not the same as those in Table 2.
[0163] Table 3 Comparison of experimental results
[0164] (15,165) 0.9943 0.9915 0.8466 (5,130) 0.9972 0.9943 0.8438 (5,15) 0.9858 0.9688 0.8097
[0165] The above comparative experiments show that fused features produce better results than single features, thus verifying the effectiveness of the present invention.
[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A protein classification method that integrates intelligent optimization and learning considering topological features, characterized in that: Includes the following steps: Step 1: Generate birth-death pairs based on the three-dimensional structure of protein samples; Step 2: Construct a topological bag-of-words model for each protein sample; Step 2.1: Using the birth and death pairs of each protein sample as topological points, cluster the birth and death pairs of each protein sample into N classes using the K-means clustering algorithm; Step 2.1.1: Using r at birth as the x-axis and r at death as the y-axis, draw each birth-death pair in a Cartesian coordinate system, called the h1 topological point; Step 2.1.2: Randomly select N topological points as the marker centers, denoted as... x i , i =1,2,……,N, where each marker center corresponds to one class; For each topological point, find the nearest label center. If the nearest label center of the topological point is... x i Then the topological point belongs to the th i kind; Step 2.1.3: Calculate the new centroids for each class. The x-coordinate of each new centroid is the mean x-coordinate of all topological points in that class, and the y-coordinate of each new centroid is the mean y-coordinate of all topological points in that class. Repeat the steps of classifying and updating the labeled points until the clustering stopping condition is met. Step 2.2: Generate bag-of-words vectors based on the clustered topological points; Step 2.2.1: Generate an array of length N with an initial value of 0 for each protein sample; Step 2.2.2: For a protein, iterate through each of its topological points. If the nearest marker center to that topological point is... x i Then the topological point belongs to the th i Class, array index is i Add 1 to elements that are -1; Step 2.2.3: Iterate through each protein and perform the operation of step 2.2.2 for each protein. Finally, a corresponding bag-of-words vector is generated for each protein sample. Step 2.3: Optimize the bag-of-words vectors corresponding to protein samples; An improved version of TF-IDF was used to optimize the bag-of-words vectors corresponding to protein samples; (1) For a bag-of-words vector v, sum up the values of all its elements, denoted as s1, and then divide each element of vector v by s1 to obtain the v-tf vector. (2) Construct a vector v-df with the same length as the bag-of-words vector. This vector is generated through the global dataset. No matter how many protein samples there are, there is only one v-df vector. For the v-df vector, each element is 1. Then iterate through each position of all bag-of-words vectors. If the element at that position is not 0, then add 1 to the corresponding position of v-df. (3) Let the sum of the total number of protein samples plus 1 be s3. Replace each element of the v-df vector with the logarithm of the quotient of s3 divided by that element to obtain a new vector. Then add 1 to each element of the new vector, and denote it as vector v-idf. (4) Generate a corresponding v-tf vector for each bag-of-words vector, and then multiply the vector element by element with the vector v-idf. The resulting vector is then L2 normalized. The final vector is denoted as v-tf-idf and is used to replace the original bag-of-words vector. Step 3: Extract the SIFT features of the protein and vectorize them to obtain SIFT bag-of-words vectors; Step 4: Construct a neural network structure for protein classification; The neural network structure includes two inputs, which correspond to the N-dimensional topological bag-of-words vector of each protein sample, denoted as vector x1, and the N-dimensional SIFT bag-of-words vector, denoted as vector x2. The output is the category label corresponding to the protein sample. Step 5: Adaptively select the number of neurons in the neural network based on evolutionary algorithms.
2. The protein classification method based on intelligent optimization and learning fusion considering topological features according to claim 1, characterized in that: The specific method for step 1 is as follows: Draw a sphere with the coordinates of each Ca atom in the protein as the center and r as the radius, where r increases continuously over time; If the spheres corresponding to two atoms are tangent, intersect, or the distance between the spheres is less than a set threshold, the two atoms will be connected. Each atom is considered as h0. When two spheres contain each other's centers, the two atoms are connected. If two atoms are connected, it is considered that the h0 corresponding to one of the atoms disappears. If the connection of multiple atoms forms a loop, a loop structure h1 is formed. Here, h0 reflects the connectivity in protein space, and h1 reflects the loop structure in protein space. Similar samples have similar topological properties. As the radius r changes, h0 and h1 will appear and disappear continuously; the pair of values formed by r corresponding to the appearance and disappearance of h1 is selected as the birth and death pair of the protein.
3. The protein classification method based on intelligent optimization and learning fusion considering topological features according to claim 2, characterized in that: The specific method for step 3 is as follows: Step 3.1: Initialize the protein distance matrix; initialize a distance matrix with a length and width of n for each protein, where n is the number of Ca atoms in the protein; Step 3.2: Traverse the Ca atom sequence: Traverse each Ca atom pair in the protein, calculate its Euclidean distance, and place the calculation result in the corresponding position in the distance matrix; Step 3.3: Visualize the distance matrix and convert it into a grayscale image; Step 3.4: Extract SIFT features from the grayscale image corresponding to the protein sample; Step 3.5: Construct SIFT bag-of-words vectors; Following the process of generating N-dimensional topological bag-of-words vectors from topological points in step 2, SIFT feature points are processed in the same way to generate corresponding SIFT bag-of-words vectors.
4. The protein classification method based on intelligent optimization and learning fusion considering topological features according to claim 3, characterized in that: Step 4 describes a neural network structure that uses a feature fusion neural network for protein classification. The specific process is as follows: 1) Connect the input vector x1 to a layer d1 with only one neuron, where the activation function is ReLU, and obtain the output weight value w1; 2) Then connect the input vector x2 to layer d2, which also has only one neuron, where the activation function is still ReLU, to obtain the output weight value w2; 3) Multiply vector x1 element by element with weight value w2 to obtain a new vector x3; 4) Multiply vector x2 element by element with weight value w1 to obtain a new vector x4; 5) Add vectors x3 and x4 to obtain vector x5; 6) Connect vector x5 to layer d3 with n1 neurons and ReLU activation function. The output of this layer is vector x6. 7) Connect vector x6 to layer d4 with n2 neurons and ReLU activation function. The output of this layer is vector x7. 8) Connect vector x7 to the output layer with two neurons, and use Softmax as the activation function; 9) Set the parameters for neural network training, including epoch and batch size, as well as the optimizer and loss function for model training.
5. The protein classification method based on intelligent optimization and learning fusion considering topological features according to claim 4, characterized in that: Step 5 uses the NSGA-II multi-objective optimization algorithm to determine the appropriate number of neurons, specifically: Step 5.1: Initialize the population: Randomly generate an initial population, which consists of individuals, each representing a solution; Step 5.2: Assess fitness: Calculate the fitness of each individual in the population; An optimization algorithm model is built using the Pymoo library. The objective functions are to minimize the negative value of the neural network accuracy and to minimize the total number of parameters. The fitness of an individual in the population is equivalent to the values of the two objective functions corresponding to that individual. Step 5.3: Non-dominated sorting: The population is non-dominated, and individuals in the population are divided into non-dominated layers; Step 5.4: Calculate crowding distance: Calculate the crowding distance for each individual. This indicator helps maintain population diversity. Step 5.5: Selection, Crossover, and Mutation: Select superior parent individuals based on their non-dominant ranking and crowding distance; then, generate a new generation of individuals, called offspring individuals, through crossover and mutation operations. Step 5.6: Population Merging and Reselection: Merge the population composed of offspring individuals with the population composed of parent individuals, and select individuals of the same size as the original population from the merged population through non-dominated sorting and crowding distance calculations to maintain the elitism of the population. Step 5.7: Iterative loop: Repeat the steps of fitness calculation, non-dominated sorting, crowding distance calculation, selection operation, and population merging until the specified termination condition is met.
Citation Information
Patent Citations
Protein classification method based on self-attention neural network and coarsening algorithm
CN111916144A
Protein conformation-aware representation learning method based on pre-trained language model
WO2023151314A1