Drug adverse event identification method based on feature interaction
By cleaning and encoding the original data in the recognition of drug adverse events, build a characteristic interactive relationship diagram, and use the Transformer model to predict, solve the problem of low characteristics in existing technologies and inaccurate prediction results, and achieve more efficient efficiency Pharmaceutical adverse events prediction and stronger model interpretation ability.
Patent Information
- Application Number
- CN202411395328.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-24
AI Technical Summary
The existing technology has low feature interaction rate and inaccurate prediction results in the identification of adverse drug events, and fails to fully consider the underlying medical knowledge of the features, which limits the deep interpretation ability and application value of the model.
Construct a standard data set by obtaining raw data, cleaning and preprocessing it; use different encoding methods to process different types of features, calculate the topology and correlation strength between features, and build a feature interaction relationship diagram; use the Transformer model to extract features from feature interactions Learn feature interaction relationships in relationship diagrams to predict adverse drug events.
It improves the learning effect of characteristic interaction, achieves better drug adverse events predictive performance, has high application value, and enhances the model's interpretation ability.
Smart Images

Figure CN119361183A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical information processing, and in particular relates to a method for identifying adverse drug events based on feature interaction. Background Art
[0002] With the increasing use of drugs, the risk of drug use has become one of the major public health challenges facing the world today. Adverse drug events (ADEs) are defined as injuries caused by the use of drugs. They are the most common type of adverse events in patients' medical treatment, including adverse drug reactions (ADRs). The occurrence of ADEs can bring heavy burdens to patients and society, such as hospitalization, prolonged hospitalization, patient death, and increased medical expenses. Early detection of high-risk patients and timely and effective intervention measures are crucial to reduce the incidence of ADEs.
[0003] When evaluating adverse events, clinicians usually need to refer to multi-dimensional information such as the patient's basic information, disease conditions, surgical conditions, and laboratory test indicators. The diversity of data sources leads to the heterogeneity of features. These features may show correlation in some cases, but remain relatively independent in other cases, and the distribution of each feature is also different. Therefore, when building a model, it is necessary to fully consider the relationship between features. Existing methods mainly learn high-order interactions between features through automatic feature interaction techniques, such as fully connected networks, attention mechanisms, and residual connections, and have achieved good results. However, these methods indiscriminately calculate the correlation between all features, which may lead to the introduction of redundant features, thereby affecting the efficiency and accuracy of the model. In addition, such methods also fail to fully consider the underlying medical knowledge of the features, limiting the deep interpretation ability and application value of the model. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for identifying adverse drug events based on feature interaction, which solves the problems of low feature interaction rate and inaccurate prediction results in the process of adverse drug event identification.
[0005] In order to achieve the above objectives, the technical solution adopted by the present invention is: a method for identifying adverse drug events based on feature interaction, comprising the following steps:
[0006] S1. Obtaining raw data and processing the raw data to obtain a standard data set;
[0007] S2. According to the type of features in the standard data set, different methods are used to encode and obtain the feature value embedding vector;
[0008] S3, setting a semantic embedding vector, using the semantic embedding vector of the feature to calculate the topological structure between the features, and using the value embedding vector of the feature to calculate the association strength between the features, retaining important features through feature selection, and constructing a feature interaction relationship diagram;
[0009] S4. Use the Transformer model to learn feature interaction relationships from the feature interaction relationship graph, and perform adverse drug event prediction to complete adverse drug event identification based on feature interaction.
[0010] The beneficial effects of the present invention are as follows: based on the constructed standard data set, the present invention establishes a feature interaction relationship diagram between patient medical data features, improves the learning effect of feature interaction, achieves better drug adverse event prediction performance, and has high application value.
[0011] Furthermore, the S1 comprises the following steps:
[0012] S101, obtaining original data;
[0013] S102: Clean the original data and pre-process the cleaned data to obtain a standard data set.
[0014] The beneficial effect of the above further scheme is: the present invention cleans and preprocesses the original data, improves the quality and consistency of the data, and ensures the learning effect of the model.
[0015] Furthermore, the S102 includes the following steps:
[0016] S1021. Unify the units and formats of original data and the names of inspection items;
[0017] S1022. Based on the processing result of S1021, a box plot is used to make a visual judgment and delete any extreme outliers.
[0018] S1023. Use mean filling strategy to handle missing values;
[0019] S1024. According to the filling result, sequence encoding is used to process single-value category features, and one-hot encoding is used to process multi-value category features;
[0020] S1025. According to the filling result, the lengths of the patient's hospitalization examination index result sequences are aligned by taking the maximum value in equally divided intervals to obtain a standard data set.
[0021] The beneficial effects of the above further scheme are as follows: the present invention utilizes standardization to ensure the uniformity of data units and formats, uses box plot visualization and mean filling strategy to eliminate outliers and missing values in the data, uses sequence encoding and one-hot encoding to convert category features into numerical values, and ensures the consistency of sequence feature dimensions by taking the maximum value in equally divided intervals.
[0022] Furthermore, the S2 comprises the following steps:
[0023] S201, splitting the data set into numerical features, category features, and sequence features according to different feature types in the standard data set;
[0024] S202, encoding the numerical feature using a first linear mapping;
[0025] S203, encoding the category features using embedded table query;
[0026] S204, obtaining a state sequence according to the original sequence in the sequence feature;
[0027] S205, obtaining a change sequence by calculating adjacent interpolation values in the original sequence, and extracting features from the original sequence, the state sequence, and the change sequence using a long short-term memory model LSTM;
[0028] S206, encoding the sequence features using a second linear mapping according to the extracted features;
[0029] S207, concatenating the encoded numerical features, category features, and sequence features to obtain an encoded feature set, and obtaining a feature value embedding vector.
[0030] The beneficial effect of the above further scheme is: the present invention splits the data set and encodes it in different ways according to the different types of features, maps each feature to a high-dimensional vector, increases the information expression ability of the feature, and enables the model to learn more complex linear and nonlinear relationships.
[0031] Furthermore, the S3 comprises the following steps:
[0032] S301, setting a semantic embedding vector for each feature column in the standard data set and participating in learning optimization;
[0033] S302, according to the semantic embedding vector e i and e j The cosine similarity between them is used to calculate the topological relationship score g i (e i ,e j ), and set the topological threshold for filtering to construct the topological relationship matrix A between the features;
[0034] S303, using the learnable parameter matrix W, embedding the values obtained by different encoding methods into the vector z i and z j Mapped to the unified feature space, and using the following formula, the correlation strength score g is calculated w (z i ,z j ), and get the edge weight matrix G w ;
[0035]
[0036] Where W represents the learnable parameter matrix, diag(r) represents the diagonal matrix with diagonal elements r, and r represents the relationship vector to be learned;
[0037] S303, normalized edge weight matrix G w Diagonal elements, in terms of the edge weight matrix G w The diagonal elements are used as an evaluation of the importance of the feature itself. If the diagonal element is smaller than the preset threshold, all the values in the row and column are set to zero to obtain the edge weight matrix after feature selection.
[0038] S304. Use the Hadamard product to integrate the topological relationship matrix A and the edge weight matrix after feature selection to obtain a feature interaction relationship graph.
[0039] The beneficial effects of the above further scheme are as follows: the present invention uses semantic embedding vectors and value embedding vectors to obtain a topological relationship matrix and an edge weight matrix, and uses Hadamard product integration to construct a relationship graph between patient medical features, and simultaneously considers feature semantic associations and feature strength associations, thereby achieving more flexible feature interaction relationship modeling.
[0040] Furthermore, the S4 comprises the following steps:
[0041] S401, using the process of obtaining the feature interaction relationship diagram from the semantic embedding vector and the value embedding vector of the feature in S3 to replace the attention mechanism calculation process in the Transformer model, to obtain an improved Transformer model;
[0042] S402, stacking multiple layers of improved Transformer models, and using the stacked Transformer models to learn the interaction information between features from the feature interaction relationship graph obtained in S3 to obtain a feature interaction vector;
[0043] S403. Based on the feature interaction vector, a fully connected network is used to predict whether the patient has an adverse drug event, thereby completing adverse drug event identification based on feature interaction.
[0044] The beneficial effects of the above further scheme are as follows: the present invention is based on the calculation process of the feature interaction relationship graph, uses the Transformer model to learn feature interaction information from the constructed feature interaction relationship graph, and enhances the learning effect by stacking multiple layers of Transformer models to achieve better prediction performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION
[0046] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0047] Example
[0048] like Figure 1 As shown, the present invention provides a method for identifying adverse drug events based on feature interaction, and its implementation method is as follows:
[0049] S1. Obtain the original data and process the original data to obtain a standard data set. The implementation method is as follows:
[0050] S101, obtaining original data;
[0051] S102: clean the original data and preprocess the cleaned data to obtain a standard data set. The implementation method is as follows:
[0052] S1021. Unify the units and formats of original data and the names of inspection items;
[0053] S1022. Based on the processing result of S1021, a box plot is used to make a visual judgment and delete any extreme outliers.
[0054] S1023. Use mean filling strategy to handle missing values;
[0055] S1024. According to the filling result, sequence encoding is used to process single-value category features, and one-hot encoding is used to process multi-value category features;
[0056] S1025. According to the filling result, the lengths of the patient's hospitalization examination index result sequences are aligned by taking the maximum value in equally divided intervals to obtain a standard data set.
[0057] In this embodiment, the original data of patients who had abnormal liver function during hospitalization were randomly extracted from the medical information system of the cooperative hospital. The original data mainly included demographic information, basic diseases at admission, surgical conditions, and records of liver function and cardiac function indicators during hospitalization. Professional doctors judged and marked whether adverse events occurred in each case. The original data usually had problems such as inconsistencies in format and naming, outliers, and missing values, which would reduce the accuracy of the analysis and the performance of the model. After careful data cleaning and preprocessing, a standard data set was obtained.
[0058] In this embodiment, data standardization is performed on the original data of the patient; for manually recorded features (such as height and weight), the units and formats of the original data are unified, only the numerical part is retained, and non-numerical values are set to null values; for time data (such as admission date and sampling time), it is unified into the format of year, month, and day, which is used to calculate derived features such as the number of days of hospitalization; for the names of the examination items, the names need to be normalized and unified to standard names.
[0059] In this embodiment, outliers are detected and processed for the original data of the patient; outliers are identified by visualizing the original data using box plots; based on the observations exceeding the interquartile range, no values far exceeding the normal physiological range are found; considering that some outliers also reflect important health abnormality information, they are chosen to be retained.
[0060] In this embodiment, missing value processing is performed on the original data of the patient; missing values will affect the training process of the model, so a mean filling strategy is adopted to process the missing values in the original data. This method can maintain the overall distribution characteristics of the original data and minimize the impact of the filling value on the distribution of the original data.
[0061] In this embodiment, the original data of the patient is processed for category features; the category features include single-value category features and multi-value category features. For single-value category features such as gender and allergy history, sequence coding is used, that is, if there are m values, each category label is replaced with 0 to m-1 in sequence; for multi-value category features such as admission disease classification and surgical organs, multiple category labels can be taken at the same time. For these multi-value category features, unique hot coding is used, that is, when there are k category labels, they are converted into k new features x1,...,x k , where x i ∈{0,1},i∈[1,k], if and only if the category label exists x i Get 1.
[0062] In this embodiment, sequence feature processing is performed on the original data of the patient; the patient may need to undergo multiple liver function and heart function tests during hospitalization, and the results can be represented as a short sequence. Different patients have different examination times, resulting in different sequence lengths. When judging adverse drug events, the main focus is on the abnormal state and change trend of the indicators, so the length of the sequence is scaled. Assuming that all sequences need to be aligned to a length of t, first calculate the t quantile in the sequence, and then divide the sequence into multiple non-overlapping sub-intervals according to each t quantile, and then take the maximum value of each sub-interval to construct a new sequence [x1,...,x t ].
[0063] S2. According to the type of features in the standard data set, different methods are used to encode and obtain the value embedding vector of the feature. The implementation method is as follows:
[0064] S201, splitting the data set into numerical features, category features, and sequence features according to different feature types in the standard data set;
[0065] S202, encoding the numerical feature using a first linear mapping;
[0066] S203, encoding the category features using embedded table query;
[0067] S204, obtaining a state sequence according to the original sequence in the sequence feature;
[0068] S205, obtaining a change sequence by calculating adjacent interpolation values in the original sequence, and extracting features from the original sequence, the state sequence, and the change sequence using a long short-term memory model LSTM;
[0069] S206, encoding the sequence features using a second linear mapping according to the extracted features;
[0070] S207, concatenating the encoded numerical features, category features, and sequence features to obtain an encoded feature set, and obtaining a feature value embedding vector.
[0071] In this embodiment, in the standard data set, each feature column represents a specific meaning, such as weight and blood sugar, which reflects the health status of the patient. These features exist in the form of a single dimension, which has limitations in the expression and calculation of information. In order to overcome this limitation and retain the original information of each feature, it is necessary to convert it into a higher-dimensional feature embedding to enhance the expression ability of information. The features in the standard data set can be divided into numerical features, categorical features, and sequence features. Different encoding methods are used for these different types of features.
[0072] In this embodiment, numerical features refer to quantitative data obtained through actual measurement or calculation. These features are usually expressed as continuous numerical values, such as age, weight, and blood pressure level. For numerical features, their value embedding vectors can be obtained through linear mapping;
[0073] The formula of the linear mapping is as follows:
[0074]
[0075] in, Representing numerical features The corresponding value embedding vector, W i (num) ∈R d represents the weight matrix, Represents the bias vector of the i-th feature, which is used to increase the flexibility of the model. d Represents a vector space of dimension d, where d represents the feature dimension after encoding.
[0076] In this embodiment, the category feature refers to those features that reflect non-numerical attributes, such as gender and whether there is a history of allergies, etc. Each value represents a different state. Therefore, when the category feature When there are k values in total, an embedding table containing all value categories can be established, and the value embedding vector can be obtained by querying the embedding table;
[0077] The query embedding table formula is as follows:
[0078]
[0079] in, Represents category features The corresponding value embedding vector, Represents category features The transpose of the corresponding one-hot vector, W i (cat) ∈R d represents the weight matrix, Represents the bias vector.
[0080] In this embodiment, sequence features refer to a series of features recorded over time, such as the test results of indicators such as alanine aminotransferase and myoglobin, which can reflect the dynamic changes in the patient's health status. Due to the limited hospitalization time of the patient, the number of examinations performed is small, so the length of the obtained sequence is short. In this case, the result value of each inspection indicator is usually regarded as an independent numerical feature. However, when evaluating adverse drug events, the specific value of the indicator, the state it is in, and the change trend over time are all key information, and there is a close correlation between them. Therefore, the sequence features are treated as a whole. In order to effectively capture the state and change information in the sequence, the original sequence is first converted to obtain a state sequence and a change sequence respectively.
[0081] The state sequence focuses on the abnormal values in the original sequence inspection results. The inspection value in the state sequence is calculated as follows:
[0082]
[0083] in represents the jth check value in the state sequence, represents the original data, p represents the upper limit of the reference range of the medical indicator corresponding to the original data, and q represents the lower limit of the reference range of the medical indicator corresponding to the original data.
[0084] The change sequence is used to record the difference between two adjacent check values in the original sequence. The value in the change sequence is calculated as follows:
[0085]
[0086] in, represents the jth value in the changing sequence, Represents the original data. In order to keep the sequence length consistent, zero values are added at the end for padding.
[0087] In this embodiment, after the state sequence and the change sequence are constructed from the original sequence, the long short-term memory model LSTM is used to learn the association information of the original sequence, the state sequence and the change sequence, and a value embedding vector is obtained using linear mapping;
[0088] The linear mapping formula is as follows:
[0089]
[0090] in, Represents three types of sequence features, Represents the value embedding vector corresponding to the sequence feature, W i (seq ) represents the weight matrix, Represents the bias vector; the bias vector is unique to the weight matrix shared during the calculation process. In order to improve the generalization ability of the model while enabling the model to capture the unique information of each feature, a balance between model complexity and flexibility is achieved.
[0091] S3. Set the semantic embedding vector, use the semantic embedding vector of the feature to calculate the topological structure between the features, and use the value embedding vector of the feature to calculate the association strength between the features, retain important features through feature selection, and construct a feature interaction relationship diagram. The implementation method is as follows:
[0092] S301, setting a semantic embedding vector for each feature column in the standard data set and participating in learning optimization;
[0093] S302, according to the semantic embedding vector e i and e j The cosine similarity between them is used to calculate the topological relationship score g i (e i ,e j ), and set the topological threshold for filtering to construct the topological relationship matrix A between the features;
[0094] S303, using the learnable parameter matrix W, embedding the values obtained by different encoding methods into the vector z i and z j Mapped to a unified feature space, and using the following formula, the correlation strength score g is calculated w (z i ,z j ), and get the edge weight matrix G w ;
[0095]
[0096] Where W represents the learnable parameter matrix, diag(r) represents the diagonal matrix with diagonal elements r, and r represents the relationship vector to be learned;
[0097] S304, normalized edge weight matrix G w Diagonal elements, in terms of the edge weight matrix G w The diagonal elements are used as an evaluation of the importance of the feature itself. If the diagonal element is smaller than the preset threshold, all the values in the row and column are set to zero to obtain the edge weight matrix after feature selection.
[0098] S305. Use the Hadamard product to integrate the topological relationship matrix A and the edge weight matrix after feature selection to obtain a feature interaction relationship graph.
[0099] In this embodiment, compared with data such as images and text, tabular data usually lacks sufficient inductive bias, and its features show a high degree of heterogeneity, which means that there may be obvious correlations between some features, while other features may be completely independent and unrelated to any feature. In order to effectively model these complex relationships, it is attempted to regard the features in the tabular data as points on a graph, and the relationships between features as edges connecting the nodes, so as to construct a feature interaction relationship graph to enhance the learning ability of the model. Based on the semantic embedding similarity of the feature columns, a feature interaction relationship topological structure that implies the underlying medical knowledge is constructed, and then the feature value embedding is used to learn the feature correlation, and low-importance features are eliminated through feature selection, and then a comprehensive feature interaction relationship graph is obtained using Hadamard product integration to express the selective association information between features.
[0100] In this embodiment, the mutual connection of feature columns in the data set at the underlying knowledge level is revealed. First, a semantic embedding vector is set to describe it. Then, the cosine similarity between any two semantic embedding vectors is calculated to measure the static knowledge relationship between the semantic embedding vectors, thereby defining a topological relationship score. The topological relationship score is calculated as follows:
[0101]
[0102] Among them, G t [i,j] represents the static relationship between two nodes in the static topology graph, g t (e i ,e j ) represents the topological relationship score, e i and e j It means E=[e1,…,e m ]∈R c×m where is the semantic embedding vector in , E represents the learnable semantic embedding matrix, m represents the total number of feature columns, and c represents the dimension of semantic embedding.
[0103] The topological relationship matrix A is expressed by the formula A=1[σ(G t +b)>θ] obtained;
[0104] Among them, 1[*] represents the indicator function, which takes the value of 1 when the condition * is met, otherwise it is 0; θ represents the set threshold, b represents the learnable bias term, and σ represents the selected activation function, which is used to introduce nonlinear factors.
[0105] In this embodiment, according to two features x i and x j The value embedding vector z i and z j , the strong correlation score between the value embedding vectors is calculated by the following formula to obtain the edge weight matrix Gw ;
[0106] G w [i,j]=g w (z i ,z j )=(Wz i ) T ·diag(r)·(Wz j )
[0107] Among them, G w [i,j] represents the edge weight matrix, which is x i and x j The relationship weight between w (z i ,z j ) represents the strong correlation score, diag(r) represents a diagonal matrix with diagonal elements r, r represents the relationship vector to be learned, and W represents the learnable parameter matrix, which is used to convert z obtained by different encoding methods i and z j Mapping to a unified feature space;
[0108] In this embodiment, not only the correlation between features needs to be considered, but also the importance of each feature itself needs to be evaluated. Non-important features may cause model overfitting and performance degradation. w In , the diagonal elements reflect the importance of each feature. Based on this, the model can be optimized by removing unimportant features and their associated edges. The specific operation is as follows: First, G w The diagonal elements in G are processed by the normalized exponential function Softmax to obtain w ′, then through the feature selection threshold Adjust the nodes and edges to obtain the edge weight matrix G after feature selection s ;
[0109] The normalization formula is as follows:
[0110] G w ′=G w +diag(Softmax(v)-v)
[0111] Among them, G w ′ represents the edge weight matrix after the diagonal elements are normalized, Softmax(·) represents the normalized exponential function, and v represents G w The diagonal matrix of G w );
[0112] The formula for feature selection is as follows:
[0113] Among them, G s [i,j] represents the edge weight matrix after feature selection, represents the feature selection threshold, G w ′[i,j] represents the edge weight matrix after the diagonal elements are normalized.
[0114] In this embodiment, the above method establishes the topological relationship between features based on the knowledge view, learns the feature association strength based on the data view, and then performs feature selection based on the edge weight matrix. The diagonal elements that are less than the preset threshold and all values in the rows and columns are set to zero, which means that the nodes and corresponding edges corresponding to the non-important features in the relationship graph are deleted. Next, the topological relationship matrix A and the edge weight matrix G after feature selection are s Use Hadamard product for integration to get the feature interaction relationship diagram. The calculation formula is as follows:
[0115]
[0116] Among them, G represents the feature interaction graph, represents the Hadamard product, and σ(·) represents the activation function, which is used for the in-degree of each feature node.
[0117] S4. Use the Transformer model to learn the feature interaction relationship from the feature interaction relationship graph, and perform adverse drug event prediction to complete the identification of adverse drug events based on feature interaction. The implementation method is as follows:
[0118] S401, using the process of obtaining the feature interaction relationship diagram from the semantic embedding vector and the value embedding vector of the feature in S3 to replace the attention mechanism calculation process in the Transformer model, to obtain an improved Transformer model;
[0119] S402, stacking multiple layers of improved Transformer models, and using the stacked Transformer models to learn the interaction information between features from the feature interaction relationship graph obtained in S3 to obtain a feature interaction vector;
[0120] S403. Based on the feature interaction vector, a fully connected network is used to predict whether the patient has an adverse drug event, thereby completing adverse drug event identification based on feature interaction.
[0121] In this embodiment, after obtaining the feature interaction relationship graph, the Transformer model is used to extract feature interaction information from the feature interaction relationship graph, and the learning effect is further enhanced by stacking multiple layers of Transformer models. Finally, a fully connected network is used to predict whether an adverse drug event occurs.
[0122] In this embodiment, a multi-layer Transformer model is used to learn the interaction information between important features from the feature interaction relationship graph. l , the l+1th layer higher level feature X l+1 It can be obtained through the following calculation formula:
[0123] G l =FRG(X l )
[0124] V l =FFN(X l )
[0125] H l =G l V l +Dropout(X l )
[0126] X l+1 =FFN(H l )+Dropout(H l )
[0127] Among them, G l represents the adjacency matrix of the feature relationship graph obtained by calculating the features of the lth layer, FRG(·) represents the calculation process of the feature interaction relationship graph in S3, FFN(·) represents the feedforward neural network, V l H represents the features of the lth layer after being transformed by the feedforward neural network. l Denotes the hidden layer after residual connection, and Dropout(·) denotes random dropout. When learning FRG, multiple calculations are performed on this sublayer to capture effective information in different subspaces. In addition, the front layer normalization is used in the module to make the training process more stable.
[0128] In this embodiment, the feature interaction vector is passed through a fully connected network to obtain a prediction output, indicating whether the patient has an adverse drug event.
Claims
1. A method for identifying adverse drug events based on feature interaction, characterized in that: The following steps are involved: S1. Obtaining raw data and processing the raw data to obtain a standard data set; S2. According to the type of features in the standard data set, different methods are used to encode and obtain the feature value embedding vector; S3, setting a semantic embedding vector, using the semantic embedding vector of the feature to calculate the topological structure between the features, and using the value embedding vector of the feature to calculate the association strength between the features, retaining important features through feature selection, and constructing a feature interaction relationship diagram; S4. Use the Transformer model to learn feature interaction relationships from the feature interaction relationship graph, and perform adverse drug event prediction to complete adverse drug event identification based on feature interaction.
2. The method for identifying adverse drug events based on feature interaction according to claim 1, characterized in that: The S1 comprises the following steps: S101, obtaining original data; S102: Clean the original data and pre-process the cleaned data to obtain a standard data set.
3. The method for identifying adverse drug events based on feature interaction according to claim 2, characterized in that: The S102 comprises the following steps: S1021. Unify the units and formats of original data and the names of inspection items; S1022. Based on the processing result of S1021, a box plot is used to make a visual judgment and delete any extreme outliers. S1023. Use mean filling strategy to handle missing values; S1024. According to the filling result, sequence encoding is used to process single-value category features, and one-hot encoding is used to process multi-value category features; S1025. According to the filling result, the lengths of the patient's hospitalization examination index result sequences are aligned by taking the maximum value in equally divided intervals to obtain a standard data set.
4. The method for identifying adverse drug events based on feature interaction according to claim 1, characterized in that: The S2 comprises the following steps: S201, splitting the data set into numerical features, category features, and sequence features according to different feature types in the standard data set; S202, encoding the numerical feature using a first linear mapping; S203, encoding the category features using embedded table query; S204, obtaining a state sequence according to the original sequence in the sequence feature; S205, obtaining a change sequence by calculating adjacent interpolation values in the original sequence, and extracting features of the original sequence, the state sequence, and the change sequence using a long short-term memory model LSTM; S206, encoding the sequence features using a second linear mapping according to the extracted features; S207, concatenating the encoded numerical features, category features, and sequence features to obtain an encoded feature set, and obtaining a feature value embedding vector.
5. The method for identifying adverse drug events based on feature interaction according to claim 1, characterized in that: The S3 comprises the following steps: S301, setting a semantic embedding vector for each feature column in the standard data set and participating in learning optimization; S302, according to the semantic embedding vector e i and e j The cosine similarity between them is used to calculate the topological relationship score g i (e i ,e j ), and set the topological threshold for filtering to construct the topological relationship matrix A between the features; S303, using the learnable parameter matrix W, embedding the values obtained by different encoding methods into the vector z i and z j Mapped to a unified feature space, and using the following formula, the correlation strength score g is calculated w (z i ,z j ), and get the edge weight matrix G w ; Where W represents the learnable parameter matrix, diag(r) represents the diagonal matrix with diagonal elements r, and r represents the relationship vector to be learned; S304, normalized edge weight matrix G w Diagonal elements, in terms of edge weight matrix G w The diagonal elements are used as an evaluation of the importance of the feature itself. If the diagonal element is smaller than the preset threshold, all the values in the row and column are set to zero to obtain the edge weight matrix after feature selection. S305. Use the Hadamard product to integrate the topological relationship matrix A and the edge weight matrix after feature selection to obtain a feature interaction relationship graph.
6. The method for identifying adverse drug events based on feature interaction according to claim 5, characterized in that: The S4 comprises the following steps: S401, using the process of obtaining the feature interaction relationship diagram from the semantic embedding vector and the value embedding vector of the feature in S3 to replace the attention mechanism calculation process in the Transformer model, to obtain an improved Transformer model; S402, stacking multiple layers of improved Transformer models, and using the stacked Transformer models to learn the interaction information between features from the feature interaction relationship graph obtained in S3 to obtain a feature interaction vector; S403. Based on the feature interaction vector, a fully connected network is used to predict whether the patient has an adverse drug event, thereby completing adverse drug event identification based on feature interaction.
Citation Information
Patent Citations
Chinese medical named entity recognition method based on improved graph attention network
CN115879473A
Drug relocation method and system based on knowledge graph and message passing neural network
CN117594115A