Disease-related piRNA classification method based on graph attention network
The graph attention network-based piRNA classification method enhances classification accuracy and efficiency, addressing inefficiencies in existing methods by using data preprocessing and tailored activation functions, thereby accelerating drug discovery.
Patent Information
- Application Number
- CN202411670097.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing methods for classifying disease-associated piRNAs are inefficient, leading to high laboratory workload and costs, and there is a need for accurate and high-throughput classification to accelerate drug discovery and design.
A disease-related piRNA classification method using a graph attention network with data preprocessing, two graph attention layers, and specific activation functions (Swish and Softmax) to enhance feature extraction and classification accuracy.
The proposed method improves classification performance, achieving an AUC of 0.9135 on the piRDisease test set, outperforming previous methods by accurately predicting piRNA categories and reducing the drug development cycle and costs.
Smart Images

Figure CN119152948A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of bioinformatics and relates to a disease-related piRNA classification method based on a graph attention network, which includes machine learning, deep learning, graph neural network and other technologies. Background Art
[0002] piRNAs are a class of small RNA molecules that interact with members of the PIWI protein family and play a key role in gene silencing and transposable element regulation. In human cancers, especially in germline and somatic tissues, the expression of PIWI proteins and piRNAs that interact with them is associated with poor clinical prognosis, suggesting that they may play an important role in cancer development. Therefore, accurate and high-throughput classification of disease-associated piRNAs is essential for prioritizing potential experimental screening candidates. Computational classification can reduce laboratory workload, save costs and time, and quickly identify potential drug-target interactions, thereby accelerating candidate substances into the experimental verification stage. Using machine learning methods to classify disease-associated piRNAs can accelerate the drug discovery and design process by analyzing large amounts of molecular structure and bioinformatics data. These methods can not only shorten the drug development cycle and reduce R&D costs, but also promote the discovery of new drugs. Summary of the invention
[0003] The present invention proposes a disease-related piRNA classification method based on graph attention network. This method pre-processes the original data and directly inputs it into the deep architecture, uses the graph attention network to process the graph structure data, and applies the Swish activation function with a parameter value of 450 to alleviate the gradient vanishing problem.
[0004] A disease-related piRNA classification method based on graph attention network includes three steps: data preprocessing, graph attention network training, and loading and classifying data. The specific steps are as follows: Step 1: Use the data loading function to obtain the adjacency matrix A and node features X; perform data integrity check to ensure that all necessary data components have been correctly loaded and are not damaged; add self-loop processing to the adjacency matrix, that is, add 1 to the diagonal position corresponding to each node; directly send the original data features to the deep architecture for feature extraction and classification.
[0005] Step 2. Define a deep architecture with two graph attention layers. The first graph attention layer applies the Swish activation function with a parameter value of 450, and the second graph attention layer uses the Softmax activation function to perform nonlinear mapping and smooth gradient processing on the input values; apply L2 regularization to the weight matrix and the weights of the attention mechanism in the graph attention layer; configure the Dropout layer after each graph attention layer; use the pre-trained model weights to initialize the graph attention layer, then train and save the trained model.
[0006] Step 3: Load the data through the data loading function defined in step 1 and preprocess it; input the preprocessed data into the model trained in step 2, and convert the classification probability output by the model into a specific category label; finally, analyze and interpret the classification results of each piRNA.
[0007] A disease-related piRNA classification method based on graph attention network. The implementation process of step 1 is as follows: Use the load_data function to load the graph dataset and return the adjacency matrix A, node features X, and training, validation, and test labels Y_train, Y_val, Y_test, and the corresponding indexes idx_train, idx_val, idx_test. The adjacency matrix A is a shape of ( N , N ) of which N is the number of nodes in the graph, and each element in the matrix A[ i ][ j ] indicates a node i and nodes j Whether there is an edge between them; perform data integrity check to ensure that all necessary data components have been loaded correctly and are not damaged; in order to allow the model to take into account the characteristics of the node itself when processing each node, add self-loop processing to the adjacency matrix, that is, add 1 to the diagonal position corresponding to each node, that is, A=A+ ; Represents the self-loops added to the adjacency matrix; assigns labels to the training set, validation set, and test set and constructs corresponding indexes; after preprocessing, the raw data features are directly fed into the deep architecture for feature extraction and classification.
[0008] A disease-related piRNA classification method based on graph attention network. The implementation process of step 2 is as follows: Define a deep architecture with two graph attention layers, where the first graph attention layer receives the feature vector of each node, denoted as X_in; this layer contains attn_heads attention heads, and the output feature dimension of each head is 8; and the nonlinear transformation is performed through the Swish activation function with a parameter value of 450, and the input value is nonlinearly mapped and smoothed gradient processing is performed, and L2 regularization is applied for weight decay; the output of the first graph attention layer is processed by Dropout and sent to the second graph attention layer; the second graph attention layer receives the adjacency matrix and uses the attention mechanism to weight the features of adjacent nodes to capture the complex dependencies between nodes. Finally, the Softmax activation function is used to output the probability distribution of each node belonging to two categories; L2 regularization is also used to prevent the model from overfitting; the graph attention layer is initialized with the pre-trained model weights, and then the trained model is trained and saved for subsequent classification tasks.
[0009] A disease-related piRNA classification method based on graph attention network. The implementation process of step 3 is as follows: To classify the new piRNA data, first load the data through the load_data function in step 1, which includes the adjacency matrix A and feature matrix X of each piRNA. In the data preprocessing stage, add self-loops to the adjacency matrix A to enhance the model's attention to the node's own features; load the model saved in step 2; input the preprocessed data into the model, and the model outputs the classification probability of each piRNA, and finally determines the final classification result of each piRNA based on these probabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 Flowchart of a disease-related piRNA classification method based on graph attention network.
[0011] Figure 2 It is a flowchart for building a deep architecture of graph attention network.
[0012] Figure 3 It is a classification flowchart for loading the trained graph attention network model. DETAILED DESCRIPTION
[0013] The present invention is described in detail below with reference to the accompanying drawings and examples.
[0014] The present invention proposes a disease-related piRNA classification method based on a linear graph attention network. The specific process is as follows: Figure 1 As shown: It includes three processes: data preprocessing, graph attention network training, and loading and classifying data. The specific steps are as follows: Step 1: A disease-related piRNA classification method based on graph attention network Figure 1 As shown: First, the original data set is obtained from the data file by calling the load_data function. This function loops 5 times, and returns a series of key data in each loop, including the adjacency matrix A, node features X, training set labels Y_train, validation set labels Y_val, test set labels Y_test, and corresponding indexes idx_train, idx_val, idx_test. These data form the basis for subsequent model processing and analysis. The obtained adjacency matrix A is self-looped, that is, a unit matrix A=A+ . Adding self-loops allows each node to establish a connection with itself, which helps the model better capture the feature information of the node itself and more comprehensively consider the relationship between the node and its neighbors (including itself) in subsequent calculations. Two GraphAttention layers are used in model construction. The first GraphAttention layer has 8 attention heads, the output feature dimension is 8, and the concat method is used to fuse the attention heads. The second GraphAttention layer has 1 attention head and the output feature dimension is 2, corresponding to the binary classification problem, and the average method is used to fuse the attention heads; the graph attention mechanism learns the weights between nodes by calculating the attention coefficients between each node and its neighbors; the model calculates the attention weights between nodes in each GraphAttention layer according to the input adjacency matrix A and the node feature X, so as to determine the degree of attention each node pays to its neighbors. Based on the calculated attention weights, the model aggregates the features of the neighbors; for each node, the model performs a weighted sum of the features of its neighbors according to the attention weights to obtain a comprehensive feature representation. This aggregation method enables nodes to fuse information from their neighbors, thereby better capturing the structural features of the graph and the relationship between nodes. The first GraphAttention layer uses a custom Swish activation function, which is defined as: (1) This activation function combines the input value x and after The values processed by the Sigmoid function after scaling can introduce nonlinear characteristics to the model and enhance the model's ability to fit complex data relationships. Using the graph attention network model that has been built and loaded with pre-trained weights, the adjacency matrix A and node features X are used as input, and the predict function is called for prediction; the model will output the category probability of each node based on the input data and its own learned parameters to obtain a probability matrix y_pred; in order to determine the predicted category of each node from the probability output by the model, the argmax function is called to select the category with the highest probability as its classification result, and a predicted category array Y_pred is obtained.
[0015] Step 2: Build the graph attention network model process as follows Figure 2 As shown in the figure: the first GraphAttention layer is defined, which receives the node feature matrix X_in and the adjacency matrix A_in as input; the first graph attention layer sets 8 attention heads; each attention head can learn different feature representations, which enhances the model's adaptability to data diversity. This layer uses the Swish activation function, as shown in Formula 1, and applies L2 regularization; the second GraphAttention layer is defined, which receives the output of the first layer and the adjacency matrix A_in as input; the second graph attention layer calculates the weights between nodes through the attention mechanism; similar to the first layer, it also determines the degree of attention each node pays to its neighbors based on the input adjacency matrix and node features. The weight calculation method enables the model to dynamically adjust the importance of features according to the actual relationship between nodes; based on the calculated attention weights, this layer performs weighted summation of the features of neighboring nodes; each node can fuse information from neighbors to form a more comprehensive feature representation. The second graph attention layer uses the Softmax activation function to convert the output into a probability distribution. Specifically, the mathematical expression of the Softmax activation function is: for an input vector containing n elements , after being processed by the Softmax activation function, the output vector is obtained ,in ; The activation function maps the output of the model to a probability space, so that the output of each node represents the probability of belonging to each category; In the disease-related piRNA classification method based on the graph attention network, the output of the second graph attention layer is processed by the Softmax activation function. For each node, its output value can be regarded as the probability estimate of the node belonging to different categories. By comparing the probabilities of different categories, the category to which each node is most likely to belong can be determined, thereby achieving accurate classification. The specific classification process is as follows: For a specific node, after calculating the probability of its belonging to each category, the category with the largest probability value is selected as the predicted category of the node; The characteristics of the Softmax activation function make the sum of the output probabilities equal to 1, which ensures the standardization of the probability distribution and provides a solid foundation for accurate classification decisions.
[0016] Step 3: Load the trained graph attention network model classification flow chart as shown below Figure 3 As shown in the figure: load_weights is used to load the pre-trained model weights. The weight file contains the best parameters learned by the model during training. For each data set, the adjacency matrix A and the node features X are passed as input to the model. Before passing, make sure that the adjacency matrix A adds self-loops by adding the identity matrix so that the model can better capture the node's own characteristics. Use the predict method to predict the input data and get the category probability of each node. When classifying, specify batch_size= N ,in N is the number of nodes in the graph, verbose=0 means no additional information is output during the prediction process; from the probability output by the model, the argmax function is used to determine the most likely classification category for each node. y_pred is the category probability matrix output by the model, and axis=1 means finding the index of the maximum value in each row of the probability matrix, that is, the predicted category.
[0017] The present invention uses the associated data set piRDisease for training and testing based on the method proposed in the present invention. The area under the ROC curve AUC of the method proposed in the present invention on the piRDisease test set is 0.9135, and the classification effect is better than the method proposed by the predecessors. The present invention modifies the traditional activation function and directly sends the original features of the data into the deep architecture for processing, so the performance is better than other existing methods, and the classification performance of disease-related piRNA can be effectively improved.
[0018] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A disease-related piRNA classification method based on graph attention network, characterized in that: After preprocessing, the original data is directly input into the deep architecture. The graph structure data is processed using the graph attention network, and the Swish activation function with a parameter value of 450 is applied to alleviate the gradient vanishing problem. The process includes three steps: data preprocessing, graph attention network training, and loading and classifying data. The specific steps are as follows: Step 1. Use the load_data function to load the graph dataset and return the adjacency matrix A, node features X, and training, validation, and test labels Y_train, Y_val, Y_test, and the corresponding indexes idx_train, idx_val, idx_test; the adjacency matrix A is a shape of ( N , N ) of which N is the number of nodes in the graph, and each element in the matrix A[ i ][ j ] indicates a node i and nodes j Is there an edge between them? Perform integrity checks on the data to ensure that all necessary data components have been loaded correctly and are not damaged; in order to allow the model to take into account the characteristics of each node when processing each node, add self-loop processing to the adjacency matrix, that is, add 1 to the diagonal position corresponding to each node, that is, A=A+ ; Represents the self-loops added to the adjacency matrix; assigns labels to the training set, validation set, and test set and constructs corresponding indexes; after preprocessing, the raw data features are directly fed into the deep architecture for feature extraction and classification; Step 2. Define a deep architecture with two graph attention layers, where the first graph attention layer receives the feature vector of each node, denoted as X_in; this layer contains attn_heads attention heads, and the output feature dimension of each head is 8; and a nonlinear transformation is performed through the Swish activation function with a parameter value of 450, and the input value is nonlinearly mapped and smoothed gradient processing is performed, and L2 regularization is applied for weight attenuation; the output of the first graph attention layer is processed by Dropout and sent to the second graph attention layer; the second graph attention layer receives the adjacency matrix, and uses the attention mechanism to weight the features of adjacent nodes to capture the complex dependencies between nodes; Finally, the Softmax activation function is used to output the probability distribution of each node belonging to two categories; L2 regularization is also used to prevent the model from overfitting. The graph attention layer is initialized using the pre-trained model weights, and then the trained model is trained and saved for subsequent classification tasks. Step 3: Classify the new piRNA data. First, load the data using the load_data function in step 1, which includes the adjacency matrix A and feature matrix X of each piRNA. In the data preprocessing stage, self-loops are added to the adjacency matrix A to enhance the model's attention to the node's own characteristics; the model saved in step 2 is loaded; the preprocessed data is input into the model, and the model outputs the classification probability of each piRNA, and finally the final classification result of each piRNA is determined based on these probabilities.
Citation Information
Patent Citations
Protein binding site prediction method based on attention twin network
CN112837747A
Video object tracking method for automatic machine learning map fusion
CN115880334A
RNA-disease correlation prediction method based on graph attention network
CN117012282A
Systems and methods for predicting compounds associated with transcriptional signatures
US20240194299A1
