Drug recommendation method and system based on causal inference and molecular substructure alignment

By combining causal inference with molecular substructure alignment, a drug recommendation system is constructed, which solves the problem of ignoring causal relationships in drug recommendation systems and achieves more accurate and safe drug recommendations.

CN120809262APending Publication Date: 2025-10-17DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510732126.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing drug recommendation systems ignore causal relationships, resulting in biased recommendation results and false correlations that mislead recommendation accuracy.

Method used

A method based on causal inference and molecular substructure alignment is used to construct a causal relationship graph through recurrent neural networks, graph isomorphism networks and relational graph convolutional networks, extract key substructure features of drug molecules, dynamically adjust the probability of drug recommendation and constrain the risk of drug interaction.

Benefits of technology

It improves the accuracy and safety of drug recommendations, reduces recommendation bias caused by co-occurrence relationships, and optimizes the personalization and safety of medication plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120809262A_ABST
    Figure CN120809262A_ABST
Patent Text Reader

Abstract

The invention relates to a drug recommendation method and system based on causal reasoning and molecular substructure alignment, and belongs to the technical field of natural language processing. By combining the health data of the patient with the drug molecule substructure information, the causal reasoning technology is adopted to identify the causal relationship between the health condition of the patient and the drug, and the limitation that a traditional method only depends on co-occurrence data is avoided; and the substructure alignment module is used for accurately determining the molecular characteristics of the medicine and the actual condition of the patient. By combining the double features of the historical health information of the patient and the drug substructure, the recommendation probability is dynamically adjusted, and the bad interaction among the recommended drugs is optimized, so that a more accurate, personalized and safe drug recommendation scheme is provided, and the limitation of the existing method is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of natural language processing, and relates to a drug recommendation technology, in particular to a drug recommendation method and system based on causal inference and molecular substructure alignment. BACKGROUND

[0002] With the in-depth application of artificial intelligence in the medical field, drug recommendation systems have become an important tool for assisting clinical decision-making. These systems analyze patients' electronic health records and medical knowledge bases to provide personalized drug combination recommendations, aiming to improve treatment effectiveness and reduce drug adverse reactions.

[0003] However, existing drug recommendation systems still face many challenges. There are complex heterogeneous relationships between diseases, surgeries and drugs. Traditional recommendation systems usually rely on co-occurrence relationships or statistical correlations in data to establish the connection between drugs and diseases, while ignoring the mining of causal relationships. This correlation-based method is susceptible to confounding factors, leading to biased recommendation results. For example, the high co-occurrence rate of antidepressants and cardiovascular diseases may not be due to antidepressants directly causing cardiovascular diseases, but because patients with depression have a higher risk of cardiovascular diseases. This pseudo-correlation can mislead the recommendation system and reduce the accuracy of recommendations. SUMMARY

[0004] Therefore, the present application proposes a drug recommendation method and system based on causal inference and molecular substructure alignment, which uses causal inference to eliminate pseudo-correlations between drugs and medical entities, aligns patient characteristics and drug characteristics at the molecular substructure level, improves the granularity of recommendations, and dynamically adjusts the recommendation probability and constrains the drug-drug adverse effect risk of drug combinations, balancing accuracy and safety.

[0005] The technical solutions adopted by the present application are as follows:

[0006] On the one hand, the present application provides a drug recommendation method based on causal reasoning and molecular substructure alignment, comprising:

[0007] obtaining vector representations of the patient's surgeries, diagnoses and medications through a recurrent neural network;

[0008] using causal reasoning to construct a causal relationship graph of surgeries, diagnoses and drugs, and obtaining a disease-drug and surgery-drug causal effect matrix based on the causal relationship graph;

[0009] adopting a graph isomorphism network to extract a global representation of the drug; and adopting a recursive recognition-based chemical substructure splitting method to decompose the drug into multiple molecular substructures, and extracting key substructure features of the drug molecules through a substructure self-attention mechanism;

[0010] Based on the key substructure features of the drug molecules and the disease-drug and surgery-drug causal effect matrix, the patient-substructure aligned refined representation is generated by updating the substructure embedding through a relational graph convolution network, and the patient representation is obtained;

[0011] The patient representation is modeled by using a gated recurrent unit, and the patient representation is converted into a drug prediction probability by using a multi-layer perception;

[0012] According to the drug prediction probability and the logical constraints of the Boolean satisfiability problem, a final drug recommendation combination is generated.

[0013] Further, it also includes: using the disease-drug and surgery-drug causal effect matrix to correct the drug prediction probability.

[0014] Further, the vector representation of the patient's surgery, diagnosis, and medication is obtained, and the surgery, diagnosis, and medication causal relationship graph is constructed using causal reasoning, including:

[0015] For the i-th visit of the patient, the i-th diagnosis and surgery record of the patient is selected, and two different embedding tables are designed, E p ∈R |P|*dim , where dim represents the embedding dimension, respectively represent the number of diagnoses and surgeries;

[0016] The patient's visit record is mapped into the embedding space to obtain the respective embedding vectors;

[0017] Based on the Bayesian network, a medical entity causal graph is constructed, a greedy intervention equivalent search algorithm is used to introduce intervention and cut off non-causal paths, eliminate false associations of drugs with diagnoses / surgeries, and generate an optimized causal graph;

[0018] The diagnosis nodes in the causal graph are divided into main nodes, effect nodes, center nodes and independent nodes, and their weights in the patient representation are dynamically adjusted;

[0019] The propensity score matching method is used to evaluate the potential causal effect of different drugs on surgery or diagnosis results, and the weighted regression analysis is used to evaluate the impact of drugs on treatment results, and the disease-drug and surgery-drug causal effect matrix is obtained.

[0020] Further, the causal effect matrix is used to correct the drug recommendation probability, including:

[0021] For drugs with significant positive causal effect, increase their recommendation probability; otherwise, reduce their recommendation probability.

[0022] Further, according to the drug prediction probability and the logical constraints of the Boolean satisfiability problem, a final drug recommendation combination is generated, including:

[0023] Modeling the drug-drug interaction as a Boolean satisfiability problem, generating a final drug recommendation combination according to the adjusted recommended probability and the drug-drug interaction constraint;

[0024] In the model training process, different loss functions are defined respectively, including a multi-label margin loss function, a binary cross-entropy loss function and a drug-drug interaction loss function;

[0025] The weight coefficient of the drug-drug interaction loss is adjusted using a dynamic strategy to obtain the overall loss function of the final model.

[0026] Further, the threshold of the drug prediction score is set to 0.5, and if the score is greater than 0.5, the drug is considered to be recommended, otherwise the drug is not recommended.

[0027] In another aspect, the application also provides a drug recommendation system based on molecular substructure alignment of causal reasoning, comprising:

[0028] A patient representation module obtains a vector representation of the patient's surgery, diagnosis and medication through a recurrent neural network; a causal reasoning is used to construct a surgery, diagnosis and medication causal relationship graph; and a disease-drug and surgery-drug causal effect matrix is obtained based on the causal relationship graph;

[0029] A drug processing module extracts a global representation of the drug using a graph isomorphism network; and a chemical substructure splitting method based on recursive identification is used to decompose the drug into multiple molecular substructures, and a substructure self-attention mechanism is used to extract key substructure features of the drug molecules; based on the key substructure features of the drug molecules and the disease-drug and surgery-drug causal effect matrix, the substructure embedding is updated through a relational graph convolution network to generate a patient-substructure aligned refined representation, and a patient representation is obtained;

[0030] A drug recommendation module models the patient representation using a gated recurrent unit, converts the patient representation into a drug prediction probability through a multilayer perceptron, and generates a final drug recommendation combination according to the drug prediction probability and the logical constraints of the Boolean satisfiability problem.

[0031] Further, it also includes a fine-tuning module for correcting the drug prediction probability using the disease-drug and surgery-drug causal effect matrix.

[0032] Compared with the prior art, the application has the following advantages:

[0033] (1) The causal reasoning technology is used to eliminate the heterogeneous relationship between the drug and the medical entity, accurately identify the causal relationship between the patient's health status and the drug, and reduce the recommendation deviation caused by the co-occurrence relationship.

[0034] (2) The application extracts the molecular substructure characteristics of drugs, establishes a drug molecular level representation, and maps it with the patient's health status, so that the recommendation system can optimize the drug use scheme based on key molecular characteristics.

[0035] (3) The application uses a causal effect matrix to dynamically adjust the drug recommendation probability, which can ensure that the recommended results are more in line with the personalized needs of patients.

[0036] (4) The application models the drug-drug interaction problem as a Boolean satisfiability problem, reduces the risk of potential adverse drug combinations through constraint optimization, and improves the safety of the recommendation. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0038] Figure 1 The flowchart of a drug recommendation method based on causal reasoning and molecular substructure alignment in an embodiment of the present application;

[0039] Figure 2 The network structure diagram of the drug recommendation model in an embodiment of the present application. DETAILED DESCRIPTION

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

[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and in the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0042] As shown in the figure, the drug recommendation method based on causal reasoning of molecular substructure alignment in the embodiment of the application specifically comprises the following steps: Figure 1

[0043] S1, for the i-th visit of the patient, the i-th diagnosis and operation record of the patient is selected, that is Two different embedding tables are designed, where dim represents the embedding dimension, respectively represent the number of diagnoses and operations. The patient's each visit record is mapped into the embedding space to obtain the respective embedding vectors:

[0044]

[0045] Based on the Bayesian network, a causal graph of medical entities (diagnosis, operation, and history of medication) is constructed, a greedy intervention equivalent search (GIES) algorithm is used to introduce intervention and cut off non-causal paths, eliminate false associations of drugs with diagnoses / operations, and generate an optimized causal graph:

[0046]

[0047] Where N represents the distribution of electronic health record (EHR) data, n represents the number of nodes in the causal graph, X i represents the i-th node in the graph, represents the parent node of the node X i , represents the optimized causal graph.

[0048] The diagnosis nodes in the causal graph are divided into main nodes, effect nodes, center nodes and independent nodes, and the weights of the nodes in the patient representation are dynamically adjusted:

[0049]

[0050] ​where the function Classification(·) represents the classification of the diagnostic entity d i assigned to the specified category. The propensity score matching (PSM) method was used to evaluate the potential causal effects of different drugs on surgical or diagnostic outcomes, and the weighted regression analysis was used to evaluate the impact of drugs on treatment outcomes:

[0051]

[0052] where T represents the drug use (1 for use, 0 for non-use), X1,X2,X3,…,X k represent the independent variables of the model, including diagnosis, surgery and medication records. β represents the coefficient in the regression model, β0 represents the intercept, β1,β2,β3,…,β k represent the regression coefficients of the corresponding variables.

[0053] Finally, the disease-drug and surgery-drug causal effect matrices are obtained, respectively represented as

[0054] S2, using graph isomorphism network (GIN) to globally encode drug molecules, obtaining the global representation h m of the drug. And through the BRICS method based on recursive identification of chemical substructure decomposition, combined with the self-attention mechanism (S-SAM) to dynamically weight the importance of substructure, we get:

[0055]

[0056] where E s represents the drug substructure embedding table, LayerNorm(·) represents the layer normalization function, W s ,b s represent weights and biases, respectively, A s represents the self-attention weight:

[0057]

[0058] where for input X, Q x ,K x ,V x represent the query matrix, key matrix and value matrix obtained by different transformations, d k is the dimension of the key embedding. For each drug k, its representation r k is extracted from the global representation, and its substructure representation r s is selected from the substructure embedding table. The importance score a ks of the substructure s to the drug k is calculated through the attention mechanism:

[0059]

[0060] r′ k =r k W1,r′ s =r s W2#(11)

[0061] Among them, W1 and W2 are the k ,r s The weight matrix to be linearly transformed.

[0062] A substructure-diagnosis / surgery relevance matrix (SDR) is constructed, and the substructure embedding is updated through a relational graph convolutional network (RGCN) to generate a refined representation of patient-substructure alignment.

[0063] c ij =f(s i ,d j )#(12)

[0064] l ij =Layering(c ij )#(13)

[0065]

[0066] where f(·) represents the function that calculates the correlation between drug substructures and diagnosis / surgery, and Layering(·) divides the correlation into n categories. W represents the specific weight matrix used for relationship type r at layer l, is the set of edge types, is the set of nodes adjacent to node u under type r. Repeat the above process to finally obtain the entity embedding of surgery and diagnosis.

[0067] The entity embedding is further optimized through the attention mechanism to generate the patient representation h v :

[0068]

[0069] Among them, the weight α i,j Indicates that in the current diagnosis The relative importance of each disease W is a trainable weight matrix, and b is a bias term. Indicates that at the time of the i-th visit, the set D j Finally, we concatenate these three entities to get the patient representation

[0070]

[0071] S3, model the sequence of historical representations of patients using gated recurrent units (GRUs) to capture time-series features, and convert the patient representations to drug prediction probabilities P(m i ) using a multi-layer perceptron (MLP):

[0072]

[0073] P(m i ) = σ(h v ) # (19)

[0074] Adjust the drug recommendation probabilities dynamically based on the causal effect matrix M d-m and M p-m . For drugs with significant positive causal effects, increase their recommendation probabilities; and vice versa:

[0075]

[0076] where Δ1 and Δ2 represent the adjustment amounts of the probabilities, θ1 represents a pre-set upper threshold, and θ2 is a pre-set lower threshold.

[0077] Model the drug-drug interactions (DDIs) as a Boolean satisfiability (2-SAT) problem, and generate the final drug recommendation combination based on the adjusted recommendation probabilities

[0078]

[0079] During the model training process, different loss functions are designed, including a multi-label margin loss function a binary cross-entropy loss function and a DDI loss function which are defined as:

[0080]

[0081] In the above equation, is the predicted result, is the true result, and M ddi is the DDI matrix. During the entire training process, the weight coefficient of the DDI loss is adjusted using a dynamic strategy, and the overall loss function of the final model is obtained:

[0082]

[0083] In the above equation, γ is the current DDI rate, τ is a hyperparameter, and δ is a pre-set threshold.

[0084] As Figure 2As shown, the drug recommendation method in the above embodiment is completed by using a drug recommendation model, which mainly includes a patient representation module, a drug processing module, and a fine-tuning module, which respectively execute steps S1-S3 in the above drug recommendation method.

[0085] The drug recommendation method in the above embodiment eliminates the pseudo-correlation between drugs and medical entities by using causal inference, aligns patient features and drug features at the molecular substructure level, improves the granularity of the recommendation, and balances accuracy and safety by dynamically adjusting the recommendation probability and constraining the drug interaction risk of drug combinations.

[0086] Corresponding to the drug recommendation method in the above embodiment, the present embodiment also provides a drug recommendation system based on causal inference and molecular substructure alignment, comprising:

[0087] The patient representation module obtains the vector representation of the patient's surgery, diagnosis, and medication through a recurrent neural network; uses causal reasoning to construct a surgery, diagnosis, and medication causal relationship graph; and obtains a disease-drug and surgery-drug causal effect matrix based on the causal relationship graph.

[0088] The drug processing module extracts the global representation of the drug using a graph isomorphism network; and decomposes the drug into multiple molecular substructures using a recursive recognition-based chemical substructure splitting method, extracts the key substructure features of the drug molecules through a substructure self-attention mechanism; based on the key substructure features of the drug molecules and the disease-drug and surgery-drug causal effect matrix, updates the substructure embedding through a relational graph convolution network to generate a patient-substructure aligned refined representation, and obtains a patient representation.

[0089] The drug recommendation module models the patient representation using a gated recurrent unit, converts the patient representation into a drug prediction probability through a multi-layer perceptron; and generates a final drug recommendation combination according to the drug prediction probability and the logical constraints of the Boolean satisfiability problem.

[0090] In another embodiment, the fine-tuning module also includes a disease-drug and surgery-drug causal effect matrix to correct the drug prediction probability.

[0091] For the drug recommendation system of the present embodiment, since it corresponds to the drug recommendation method in the above embodiment, the description is relatively simple, and the relevant similarities can be referred to the description of the drug recommendation method part in the above embodiment. Therefore, it will not be described in detail here.

[0092] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A drug recommendation method based on molecular substructure alignment based on causal reasoning, characterized in that: include: Obtain vector representations of patients’ surgeries, diagnoses, and medications through recurrent neural networks; Using causal reasoning to construct a causal relationship diagram of surgery, diagnosis, and drugs, and based on the causal relationship diagram, obtaining a disease-drug and surgery-drug causal effect matrix; A graph isomorphism network is used to extract the global representation of the drug. A chemical substructure splitting method based on recursive recognition is used to decompose the drug into multiple molecular substructures, and the key substructure features of the drug molecule are extracted through the substructure self-attention mechanism. Based on the key substructure features of the drug molecule and the disease-drug and surgery-drug causal effect matrices, the substructure embedding is updated through a relational graph convolutional network to generate a refined representation of patient-substructure alignment and obtain a patient representation; The patient representation is modeled using a gated recurrent unit, and the patient representation is converted into a drug prediction probability using a multilayer perceptron; A final drug recommendation combination is generated based on the drug prediction probabilities and the logical constraints of the Boolean satisfiability problem.

2. The drug recommendation method according to claim 1, characterized in that: Also includes: The disease-drug and surgery-drug causal effect matrices were used to modify the drug prediction probability.

3. The drug recommendation method according to claim 1, characterized in that: Obtain vector representations of the patient's surgery, diagnosis, and medication, and use causal reasoning to construct a causal relationship graph for surgery, diagnosis, and medication, including: For the patient’s i-th visit, select the patient’s i-th diagnosis and surgery records and design two different embedding tables. E p ∈R |P|*dim , where dim represents the embedding dimension, represent the number of diagnoses and surgeries, respectively; Map each patient's visit record into the embedding space to obtain their respective embedding vectors; Construct a medical entity causal graph based on a Bayesian network, use a greedy intervention equivalent search algorithm to introduce interventions and cut off non-causal paths, eliminate false associations between drugs and diagnosis / surgery, and generate an optimized causal graph; The diagnosis nodes in the causal graph are divided into main nodes, effect nodes, central nodes and independent nodes, and their weights in patient representation are dynamically adjusted; The propensity score matching method was used to evaluate the potential causal effects of different drugs on surgical or diagnostic outcomes, and weighted regression analysis was used to evaluate the impact of drugs on treatment outcomes, thus obtaining the disease-drug and surgery-drug causal effect matrices.

4. The drug recommendation method according to claim 2, characterized in that: Use the causal effect matrix to modify the probability of drug recommendation, including: For drugs with significant positive causal effects, the recommendation probability is increased; otherwise, the recommendation probability is reduced.

5. The drug recommendation method according to claim 1, characterized in that: Based on the drug prediction probability and the logical constraints of the Boolean satisfiability problem, the final drug recommendation combination is generated, including: Modeling drug-drug interaction as a Boolean satisfiability problem, generating the final drug recommendation combination based on the adjusted recommendation probability and drug-drug interaction constraints; During the model training process, different loss functions are defined, including multi-label marginal loss function, binary cross entropy loss function, and drug-drug interaction loss function; A dynamic strategy is used to adjust the weight coefficient of the drug-drug interaction loss to obtain the overall loss function of the final model.

6. The drug recommendation method according to claim 1, characterized in that: The threshold of the drug prediction score is set to 0.

5. If the score is greater than 0.5, the drug is recommended; otherwise, the drug is not recommended.

7. A drug recommendation system based on molecular substructure alignment based on causal reasoning, characterized by: include: The patient representation module uses a recurrent neural network to obtain vector representations of the patient's surgery, diagnosis, and medication; Use causal reasoning to construct a causal relationship diagram for surgery, diagnosis, and medication; and obtain a disease-drug and surgery-drug causal effect matrix based on the causal relationship diagram. The drug processing module uses a graph isomorphism network to extract the global representation of the drug. It also uses a chemical substructure splitting method based on recursive recognition to decompose the drug into multiple molecular substructures and extracts the key substructure features of the drug molecule through a substructure self-attention mechanism. Based on the key substructure features of the drug molecule and the disease-drug and surgery-drug causal effect matrices, the substructure embedding is updated through a relational graph convolutional network to generate a refined representation of patient-substructure alignment and obtain a patient representation; The drug recommendation module uses a gated recurrent unit to model the patient representation and converts the patient representation into a drug prediction probability through a multi-layer perceptron; and generates a final drug recommendation combination based on the drug prediction probability and the logical constraints of the Boolean satisfiability problem.

8. The drug recommendation system according to claim 7, characterized in that: Also includes: The fine-tuning module uses the disease-drug and surgery-drug causal effect matrices to correct the drug prediction probability.