A drug recommendation method and system based on neural enhanced fuzzy reasoning

By employing a neural-enhanced fuzzy reasoning method, combined with multilayer perceptron networks and Horn clause rules, the problems of feature definition dependence and poor generality in drug recommendation systems are solved, achieving adaptive feature learning and efficient recommendation.

CN122201603APending Publication Date: 2026-06-12BEIJING ELECTRONICS SCI & TECH INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ELECTRONICS SCI & TECH INST
Filing Date
2026-03-11
Publication Date
2026-06-12

Smart Images

  • Figure CN122201603A_ABST
    Figure CN122201603A_ABST
Patent Text Reader

Abstract

The application discloses a drug recommendation method and system based on neural enhanced fuzzy reasoning, and belongs to the technical field of artificial intelligence. The method comprises the following steps: obtaining a drug identifier and a disease identifier of a target drug, and extracting predefined atoms; obtaining corresponding embedding vectors according to the drug identifier and the disease identifier; splicing the drug embedding vector, the treatment field embedding vector and the predefined atom vector to obtain an initial enhanced feature vector; outputting learning atoms from the initial enhanced feature vector by using a multilayer perception network, splicing the learning atoms and the predefined atom vector to obtain a final enhanced feature vector; performing fuzzy reasoning on the final enhanced feature vector by using a preset Horn clause rule to obtain a reasoning result; and performing fuzzy operation on all the reasoning results to obtain a drug recommendation confidence degree. The neural enhancement module automatically learns potential features that are complementary to predefined medical features, thereby improving the recommendation accuracy while maintaining the explainability of the fuzzy reasoning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically to a drug recommendation method and system based on neural-enhanced fuzzy reasoning. Background Technology

[0002] Currently, drug recommendation systems mainly employ the following technical solutions. First, there are collaborative filtering-based methods. These methods utilize matrix factorization (such as SVD) or nearest neighbor algorithms (such as KNN) to analyze the drug-disease association matrix and make drug recommendations based on similarity calculations. Representative methods include similarity-constrained matrix factorization in drug relocation. Second, there are graph neural network-based methods. These methods construct heterogeneous knowledge graphs containing entities such as drugs, diseases, targets, and proteins. They use graph convolutional networks (GCN) or graph attention networks (GAT) to learn the embedding representations of entities and complete drug recommendations through link prediction. Representative methods, such as LightGCN, simplify graph convolution operations to improve efficiency. Third, there are traditional machine learning-based methods, using decision trees, random forests, etc., to perform recommendation classification based on drug chemical structure features (such as Morgan fingerprint) and disease features.

[0003] In existing technologies, Bartl et al. proposed a recommendation method based on a differentiable fuzzy neural network (DiffFNN). This method trains fuzzy weights through backpropagation, enabling end-to-end optimization of the fuzzy logic system. Its advantage lies in maintaining the interpretability of the rules, allowing users to trace the reasoning path of the predictive decision.

[0004] However, the aforementioned differentiable fuzzy neural network recommendation system has the following problems:

[0005] 1. In the DiffFNN recommender system, all input features must be manually defined by domain experts. This deficiency leads to three consequences: defining comprehensive features requires a significant amount of expert time; implicit patterns such as complex molecular structures and protein interactions cannot be fully captured; and recommendation accuracy is limited, making it impossible to adaptively discover new features.

[0006] 2. Fixed, predefined feature sets are difficult to adapt to different medical tasks, which leads to the need to redesign features for each task, resulting in poor versatility.

[0007] 3. Existing methods use the same optimization strategy for the symbolic reasoning part and the feature learning part, without considering the differences in the learning characteristics of different components. This leads to low training efficiency and the model performance does not reach the optimal standard. Summary of the Invention

[0008] In view of the above problems, the present invention is proposed to provide a drug recommendation method and system based on neurally enhanced fuzzy reasoning that overcomes or at least partially solves the above problems.

[0009] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, embodiments of the present invention provide a drug recommendation method based on neurally enhanced fuzzy reasoning, comprising: Step 1. Obtain the drug identifier and disease identifier of the target drug, extract the predefined atoms of the target drug from the medical knowledge base, and construct a predefined atom vector based on the predefined atoms; Step 2. Using the drug identifier as an index, retrieve the corresponding drug embedding vector from the drug embedding parameter matrix; simultaneously, using the disease identifier as an index, retrieve the corresponding therapeutic domain embedding vector from the disease embedding parameter matrix; wherein, the drug embedding parameter matrix and the disease embedding parameter matrix serve as trainable parameters of the model, and are jointly optimized and updated with other model parameters during end-to-end model training; concatenate the drug embedding vector, the therapeutic domain embedding vector, and the predefined atomic vector to obtain the initial enhanced feature vector; Step 3. The obtained initial enhanced feature vector is subjected to nonlinear transformation learning using a multilayer perceptron network, and the transformed learning atoms are output. The learning atoms are concatenated with the predefined atom vectors to obtain the final enhanced feature vector. Step 4. Use several preset Horn clause rules to perform fuzzy reasoning on the final enhanced feature vector to obtain the Horn clause rule reasoning result; Step 5. Perform fuzzy OR aggregation on all Horn clause rule inference results to obtain the final drug recommendation confidence score.

[0010] Furthermore, in step 1, the predefined atomic values ​​of the target drug include drug property values, target-related class values, treatment category values, and data source values.

[0011] Furthermore, the obtained initial enhanced feature vector is subjected to nonlinear transformation learning using a multilayer perceptron network, and the transformed learning atoms are output. The specific steps include: The initial enhanced feature vector is processed through a hidden layer to obtain the hidden layer output vector:

[0012] in: Here is the weight matrix of the hidden layer. The bias vector of the hidden layer. Represents the ReLU activation function. This is the output vector of the hidden layer; The obtained hidden layer output vector is then input into the Dropout layer for regularization.

[0013] Where Dropout is a regularization operation. Represented by probability Randomly set the output of some neurons in the hidden layer to zero; This represents the output of the Dropout layer; Output the Dropout layer Input-output layer, to obtain the transformed learned atoms

[0014] in: This is the output layer weight matrix. This is the output layer bias vector. It is the Sigmoid activation function. This is the output of 10 learning atoms.

[0015] Furthermore, in step 4, fuzzy inference is performed on the final enhanced feature vector using several preset Horn clause rules, specifically including: Each Horn clause rule is mapped to a rule-atomic trainable weight. The trainable weights Mapped to fuzzy weights via the sigmoid function =sigmoid( ); Based on fuzzy weights, each rule selectively weights the atoms in the final enhanced feature vector and uses fuzzy AND and fuzzy NOT operators to calculate the rule output, thus obtaining the Horn clause rule inference result.

[0016] Furthermore, the above method also includes: By statistically analyzing the activation intensity of each Horn clause rule, the weight ratio of predefined atoms and learned atoms in all Horn clause rules is calculated, thereby quantifying the contribution of different types of features to the reasoning results of Horn clause rules. These different types of features include drug properties, target-related features, treatment category features, and data source features.

[0017] Furthermore, the above method also includes training the model using a differentiated learning rate strategy.

[0018] Secondly, embodiments of the present invention provide a drug recommendation system based on neurally enhanced fuzzy reasoning. The drug recommendation system includes a trained neurally enhanced Horn clause fuzzy reasoning drug recommendation model, wherein the neurally enhanced Horn clause fuzzy reasoning drug recommendation model includes: Data acquisition module: used to acquire the drug identifier and disease identifier of the target drug, extract the predefined atoms of the target drug from the medical knowledge base, and construct a predefined atom vector based on the predefined atoms; Initial Enhanced Feature Vector Construction Module: Based on the input drug identifier and disease identifier, the module retrieves the corresponding drug embedding vector and therapeutic domain embedding vector from the corresponding embedding parameter matrix by index; the module then concatenates the drug embedding vector, therapeutic domain embedding vector, and predefined atomic vectors to obtain the initial enhanced feature vector. The final enhanced feature vector construction module: The obtained initial enhanced feature vector is subjected to nonlinear transformation learning using a multilayer perceptron network. The learned atoms are then concatenated with predefined atom vectors to obtain the final enhanced feature vector. Fuzzy Inference Module: Uses several preset Horn clause rules to perform fuzzy inference on the final enhanced feature vector to obtain the Horn clause rule inference result; The results output module performs fuzzy OR aggregation on all Horn clause rule inference results to obtain the final drug recommendation confidence score.

[0019] Preferably, the neurally enhanced Horn clause fuzzy reasoning drug recommendation model employs a differentiated learning rate strategy for end-to-end training, specifically including: Horn clause weights use a learning rate greater than a set threshold for fast convergence, while multilayer perceptron network parameters use a learning rate less than a set threshold for fine-tuning the multilayer perceptron network. Meanwhile, L1 sparsity regularization constraints are applied to the weights of the Horn clauses to encourage the model to select key features and improve interpretability. The training process uses binary cross-entropy as the loss function and updates all model parameters simultaneously through backpropagation. These model parameters include the embedding parameter matrix, multilayer perceptron network parameters, and rule-atomic trainable weight parameters of the Horn clause layer. As can be seen from the above technical solution, compared with the prior art, the present invention discloses a drug recommendation method and system based on neural enhancement fuzzy reasoning, which has the following beneficial effects: This invention adds a neural enhancement module to the original DiffFNN, which contains four core components. First, there is an entity embedding layer that learns a low-dimensional vector representation for each drug and disease entity, with the embedding dimension ranging from 32 to 128. Second, there is a feature extraction network using a multilayer perceptron structure, including hidden layers and an output layer. The number of units in the hidden layer ranges from 32 to 128, and the output layer dimension ranges from 5 to 20. Third, there is a regularization mechanism that adds dropout layers between network layers, with a dropout rate ranging from 0.1 to 0.3 to prevent overfitting. Finally, there is a fuzzy output mechanism where the network output is mapped to the [0,1] interval using a sigmoid function, forming fuzzy atoms that meet the requirements of fuzzy logic. This module can automatically learn supplementary features without manual definition.

[0020] This invention designs a feature fusion layer that concatenates and fuses predefined medical atoms with neural network learning atoms to form an enhanced feature vector. Through a trainable weight matrix, the system can adaptively learn the contribution of each type of feature to different inference rules. Specifically, for scenarios with sufficient existing medical knowledge, the system automatically increases the weight of predefined atoms; for complex implicit patterns, the system automatically increases the weight of learned atoms. This mechanism results in different feature contribution distributions for different medical tasks, achieving an adaptive balance between knowledge-driven and data-driven approaches.

[0021] This invention employs differentiated optimization strategies for different components of the hybrid architecture. Regarding learning rate settings, a larger learning rate (range 0.01-0.05) is used for the Horn clause layer to facilitate rapid convergence of symbolic reasoning, while a smaller learning rate (range 0.0001-0.001) is used for meticulous optimization to avoid compromising interpretability. In terms of regularization constraints, L1 regularization is applied to the Horn clause weights, with a regularization coefficient ranging from 0.01 to 0.1, prompting the model to select only a small number of key features for each rule, thereby improving interpretability. For training, a unified loss function is used for end-to-end optimization, and all parameters are updated simultaneously through gradient backpropagation, achieving synergistic optimization of symbolic reasoning and neural learning.

[0022] This invention achieves quantifiable traceability of feature contributions by calculating the sum of the weights of different types of features in inference rules. The system can statistically analyze the weight percentage of predefined medical atoms in all rules, as well as the weight percentage of learning atoms, thereby quantifying the contribution of the two types of features to the prediction results. This mechanism achieves interpretability between complete black-box and complete symbolic interpretation, preserving the learning ability of neural networks while providing transparent decision-making basis. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0024] Figure 1 This is an overall flowchart of the method provided in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the method execution provided in this embodiment of the invention; Figure 3 This is a performance comparison box plot provided in an embodiment of the present invention; Figure 4 This is a feature importance heatmap provided in an embodiment of the present invention. Detailed Implementation

[0025] The following will refer to the appendices in the embodiments of the present invention. Figure 1-4 The technical solutions in the embodiments of the present invention are clearly and completely described herein. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0026] The drug recommendation model proposed in this application can be named the Neural Enhancement Horn Clause Fuzzy Reasoning Drug Recommendation Model (or simply DiffFNN-Med). This model consists of a data acquisition and predefined atom construction module, an entity embedding module, a neural enhancement module, a feature fusion module, a Horn clause fuzzy reasoning module, an aggregation output module, and an interpretability analysis module.

[0027] This embodiment is based on the MedDRA (Dictionary of Medical Regulatory Activities) dataset, which contains adverse reaction information for 1,054 drugs and 11 major therapeutic areas, totaling 3,332 drug-therapeutic area association records with a data density of 27.53%. The task objective is to recommend potentially applicable or noteworthy therapeutic areas for a given drug.

[0028] This example uses "Drug X" (a kinase inhibitor anticancer drug) as the target drug to determine whether it is suitable for the "cardiovascular treatment field". The entire reasoning process consists of 6 steps: input processing → neural enhancement → feature fusion → fuzzy reasoning → decision aggregation → interpretability analysis, with the output of each step serving as the input for the next step.

[0029] Step 1: Input Processing The system receives the following inputs: drug identifier (drug_id=156) and treatment area identifier (disease_id=3, cardiovascular area). The drug identifier is a unique number assigned to each drug by the system; in this example, drug X has the unique identifier 156 in the system's drug database. The treatment area identifier is a unique number assigned to each treatment area; the unique identifier for the cardiovascular treatment area is 3. Using these two unique identifiers, the system can accurately locate the specific drug and treatment area.

[0030] Extract the predefined atomic values ​​of drug X from the medical knowledge base: Meaning of each atom: High efficacy (0.85), moderate toxicity (0.72), primarily metabolized in the liver (0.91), minimal renal excretion (0.35), targeted kinase (0.92), moderate cardiovascular relevance (0.45), low CNS penetration (0.15), approved (1.0).

[0031] Step 2: Neural Enhancement Processing Based on the unique identifier input, the corresponding entity vector is retrieved from the model's embedding parameter matrix by index: Drug embedding vector: The system maintains a drug embedding parameter matrix, where the number of rows represents the total number of drugs in the system (1,054 in this example). Based on drug identifier 156, the 156th row of this matrix is ​​retrieved by index to obtain a 64-dimensional drug embedding vector, which encodes the latent feature representation of drug X.

[0032] Treatment domain embedding vector: The system also maintains a disease embedding parameter matrix, where the number of rows represents the total number of treatment domains (11 in this example). Based on the treatment domain identifier 3, the 3rd row of this matrix is ​​retrieved by index to obtain the 32-dimensional treatment domain embedding vector.

[0033] It should be noted that the drug embedding parameter matrix and the disease embedding parameter matrix mentioned above are all trainable parameters of the model as a whole. They are not obtained by pre-training alone, but are used as part of the model and are jointly optimized and updated with the multilayer perceptron network parameters and the Horn clause layer weight parameters during the end-to-end training process. Specifically, during the training phase, for each training sample triple (m, d, y) (where m is the drug identifier, d is the treatment domain identifier, and y∈{0,1} indicates whether there is a correlation between the drug and the treatment domain), the complete forward propagation process of the model sequentially goes through the following steps: First, the corresponding embedding vectors are retrieved from the embedding parameter matrix based on the drug identifier m and the treatment domain identifier d, respectively. Then, the embedding vectors are concatenated with predefined atomic vectors extracted from the medical knowledge base to form an initial enhanced feature vector. Next, the initial enhanced feature vector passes through the multilayer perceptron network to output learning atoms, which are then concatenated with the predefined atomic vectors to form the final enhanced feature vector. Subsequently, the final enhanced feature vector passes through the Horn clause fuzzy inference layer and fuzzy OR aggregation operation to obtain the recommendation confidence. Finally, the error between the predicted output and the true label is calculated using binary cross-entropy as the loss function, and the embedding parameter matrix, multilayer perceptron network parameters, and Horn clause layer weight parameters are updated simultaneously through the backpropagation algorithm. Therefore, the learning of the embedding parameter matrix is ​​always carried out within the complete inference process involving predefined atomic vectors, ensuring that the embedding vectors can learn potential representations complementary to the predefined medical features. During the inference phase, the parameters of the embedded parameter matrix are fixed, and only the operation of looking up and reading vectors by index is performed.

[0034] The predefined atom (8-dimensional) is concatenated with the drug embedding vector (64-dimensional) and the therapeutic domain embedding vector (32-dimensional) to form a 104-dimensional input vector:

[0035] The nonlinear transformation is performed using a two-layer MLP (Multilayer Perceptron) network. The specific calculation process is as follows: Step 1: Hidden Layer Calculation

[0036] in: Here is the weight matrix of the hidden layer. The bias vector of the hidden layer. It is a ReLU activation function. This is the output vector of the hidden layer.

[0037] Step 2: Input the obtained hidden layer output vector into the Dropout layer for regularization:

[0038] Where: Dropout is a regularization operation, based on probability. To prevent overfitting, the outputs of some neurons in the hidden layer are randomly set to zero.

[0039] Step 3: Input the output of the Dropout layer into the output layer to obtain the transformed learning atoms.

[0040] in: The weight matrix of the output layer d. This is the output layer bias vector. The Sigmoid activation function is used to map the output to the [0,1] interval. This is the output of 10 learning atoms.

[0041] After the above neural network calculations, the 10 learned atoms output are:

[0042] Step 3: Feature Fusion Predefined atoms and learned atoms are concatenated and merged to form an enhanced feature vector:

[0043] Enhanced feature vectors There are 18 dimensions in total, consisting of 8 predefined medical atoms and 10 learning atoms, with the following specific meanings: Dimensions 1-8: Predefined medical atoms (corresponding to the 8 interpretable medical features defined in Table 1)

[0044] Dimensions 9-18: Learning Atoms (10 features automatically learned by a multilayer perceptron network)

[0045] The learning atoms are automatically discovered from the data by the neural network. Although they do not have direct medical semantics, their contribution to the recommendation results can be traced through the weights of the Horn clause layer.

[0046] Therefore, the complete enhanced feature vector for this example is:

[0047]

[0048] Step 4: Fuzzy Reasoning The system uses 12 Horn clause rules for inference. Each rule selectively weights 18 dimensions of the enhanced feature vector. In the following formula, These correspond to the 18 dimensions of the enhanced feature vector: to For predefined medical atoms (such as Indicates high efficacy, (Indicates low toxicity, etc.) to To learn about atoms. Indicates the first Rule number 1 The attention weight (fuzzy weight) of each atom is in the range of [0,1]. The higher the weight, the more the rule values ​​the feature.

[0049] The following demonstrates the calculation process for the key rules: Rule 1 (Focus on efficacy and safety):

[0050] Assume the key weights for rule 1 are: (Emphasis on high efficacy, corresponding) ), (Emphasis on low toxicity, corresponding) ), (Pay attention to cardiovascular relevance, corresponding) Other weights are lower (approximately 0.1-0.3).

[0051] The calculation process (using fuzzy logic operators, where fuzzy OR is defined as follows) Fuzzy NOT is defined as ):

[0052]

[0053]

[0054] Rule 1 output (using fuzzy AND, defined as) ):

[0055] Rule 3 (Focus on kinase targeting and learning characteristics): Assume that rule 3 is important: (Targeted kinase, corresponding) ), (Studying atom L3, corresponding to) ), (Studying Atom L8, corresponding to) After similar calculations, rule 3 outputs:

[0056] Rule 7 (Comprehensive Rule): Output of Rule 7:

[0057] Step 5: Decision Aggregation Perform fuzzy OR aggregation on the output of all 12 rules:

[0058] Using recursive computation (fuzzy OR is defined as follows) ):

[0059] The final recommendation confidence level is 0.92, indicating that the system highly recommends paying attention to the application of drug X in the cardiovascular field.

[0060] Step 6: Interpretability Analysis (corresponding to Innovation Point 4) The system generates a recommendation explanation report, which includes the following information: Recommendation result: Drug X Cardiovascular treatment field Recommendation confidence level: 0.92 (high confidence level) Key activation rules: Rule 3 (confidence level 0.68), Rule 7 (confidence level 0.55) Rule 3 depends on the following features: Targeted kinase (weight 0.92), Learning feature L3 (weight 0.85), and Learning feature L8 (weight 0.78). Rule 7 depends on the following characteristics: high efficacy (weight 0.88), and approved status (weight 0.82). Feature contribution: 52.7% for predefined atoms, 47.3% for learned atoms. The model training in this invention employs a differentiated strategy, as detailed below: In this invention, the training of the DiffFNN-Med model optimizes and updates the parameters of each module. These parameters include at least: the embedding parameter matrix of the entity embedding module, the multilayer perceptron network parameters of the neural enhancement module, and the rule-atom trainable weight parameters w_{ij} of the Horn clause fuzzy inference module (and are derived from...). =sigmoid( (Gaining attention weight).

[0061] (1) Parameter grouping: Group 1: Horn Clause Layer Weight Matrix

[0062] Group 2: Neural enhancement module parameters (embedding parameter matrix, MLP weights) (2) Loss function:

[0063] During the training phase, training sample triples (m, d, y) are constructed, where m is the drug identifier, d is the treatment domain identifier, and y ∈ {0, 1} indicates whether there is an association between the drug and the treatment domain. Known associations are used as positive samples (y=1), and negative sampling can be used to extract negative samples (y=0) from unlabeled drug-treatment domain pairs. During training, the model outputs the recommendation confidence y. hat ∈[0,1], using binary cross-entropy as the loss function, and simultaneously updating the embedding parameter matrix, the parameters of the Neural Enhancement Module (MLP), and the rule-atomic trainable weight parameters of the Horn clause layer through backpropagation. .

[0064] The L1 regularization term makes the weights of the Horn clauses sparse, so that each rule only focuses on a few key features, thus improving interpretability.

[0065] (3) Training effect: After 200 rounds of training, the model achieved the following performance on the MedDRA dataset: P@5 (Precision of the top 5 recommendations): 0.985 R@5 (Recall rate of top 5 recommendations): 0.152 NDCG@5 (Normalized Loss Cumulative Gain): 0.991 Compared to the strongest baseline method (integrated medical machine learning), this method improves the P@5 metric by 23.1% and has a fully interpretable inference process.

[0066] Feature contribution comparison This method exhibits adaptive feature balancing properties across different medical tasks:

[0067] Feature contribution distribution of different tasks This result verifies that the selective feature fusion mechanism can automatically adjust the contribution ratio of the two types of features according to the characteristics of the task, achieving an adaptive balance between knowledge-driven and data-driven approaches.

[0068] Regarding the neural network structure, the main approach uses a two-layer multilayer perceptron (hidden layer + output layer). Alternative approaches could use a single-layer direct mapping to simplify computation, or a three-layer deeper network to enhance expressive power.

[0069] Regarding feature fusion methods, the main approach uses splicing fusion to directly connect learning atoms and predefined atoms. Alternative approaches include weighted fusion, which sets learnable weight coefficients to dynamically adjust the ratio of the two types of features, or gated fusion, which uses a gating mechanism to dynamically select features based on the input.

[0070] Regarding the types of fuzzy logic operators, the main scheme adopts the product t-norm ( AND To perform fuzzy AND operations, an alternative could be to use the minimum t-norm ( AND (or other forms of t-norm operators.)

[0071] Regarding regularization methods, the main approach uses L1 sparse regularization to promote feature selection. Alternative approaches can use L2 regularization to control parameter amplitude, or not use regularization when data is sufficient.

[0072] Regarding learning rate settings, the main approach uses different learning rates for the Horn layer and the neural layer to achieve differentiated training, while the alternative approach can use a uniform learning rate for all parameters to simplify hyperparameter tuning.

[0073] Figure 2 The diagram illustrates the overall architecture of the DiffFNN-Med drug recommendation method disclosed in this invention. The left side of the diagram represents the input portion, including disease identifiers (d) and drug identifiers (m); the upper middle section contains predefined interpretable atomic modules, and the lower section contains neural enhancement modules (including entity embeddings and MLP networks); the fused features are then input into multiple parallel Horn clause layers (…). Each rule outputs a fuzzy inference result ( The rightmost side uses fuzzy OR aggregation to obtain the final recommendation confidence score. ).

[0074] Figure 3 Box plots show the performance comparison between our method and 13 baseline methods on three medical datasets, illustrating the P@5 (top 5 recommendation accuracy) performance. The horizontal axis represents different recommendation methods, and the vertical axis represents the P@5 score. Box plots illustrate the distribution across 100 experiments. As can be seen, our method (Our Model) significantly outperforms all baseline methods on the MedDRA dataset, achieves competitive performance on the SCMFDD and TTD datasets, and maintains a fully interpretable inference process.

[0075] Figure 4 This is a feature importance heatmap, showing the contribution distribution of predefined atoms and learned atoms in different medical tasks. The horizontal axis represents different feature types (including 8 predefined atoms P1-P8 and 10 learned atoms L1-L10), and the vertical axis represents three different medical tasks (MedDRA, SCMFDD, and TTD). The color intensity indicates the weight of the feature in the inference rule; darker colors indicate higher contributions. The heatmap clearly shows that: MedDRA task: Predefined atoms contribute 52.7%, learned atoms contribute 47.3%, and the two types of features are relatively balanced.

[0076] The SCMFDD task: predefined atoms contributed 48.7%, and learned atoms contributed 51.3%, slightly biased towards data-driven approaches.

[0077] TTD task: Predefined atoms contributed 70.9%, learned atoms contributed 29.1%, mainly relying on medical knowledge.

[0078] Based on the same inventive concept, embodiments of the present invention also provide a drug recommendation system based on neurally enhanced fuzzy reasoning, comprising: Data acquisition module: used to acquire the drug identifier and disease identifier of the target drug, extract the predefined atoms of the target drug from the medical knowledge base, and construct a predefined atom vector based on the predefined atoms; Initial Enhanced Feature Vector Construction Module: Based on the input drug identifier and disease identifier, the module reads the corresponding drug embedding vector and therapeutic domain embedding vector from the pre-trained corresponding embedding parameter matrix by index; the module concatenates the drug embedding vector, therapeutic domain embedding vector, and predefined atomic vectors to obtain the initial enhanced feature vector; The final enhanced feature vector construction module: The obtained initial enhanced feature vector is subjected to nonlinear transformation learning using a multilayer perceptron network, and the transformed learning atoms are output. The learning atoms are concatenated with predefined atom vectors to obtain the final enhanced feature vector. Fuzzy Inference Module: Uses several preset Horn clause rules to perform fuzzy inference on the final enhanced feature vector to obtain the Horn clause rule inference result; The output module performs fuzzy OR aggregation on all Horn clause rule inference results to obtain the final drug recommendation confidence score. Since the principles of the problems solved by these systems are similar to those of the aforementioned drug recommendation methods, the implementation of this system can refer to the implementation of the aforementioned methods, and the repeated parts will not be repeated.

[0079] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0080] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A drug recommendation method based on neurally enhanced fuzzy reasoning, characterized in that, include: Step 1. Obtain the drug identifier and disease identifier of the target drug, extract the predefined atoms of the target drug from the medical knowledge base, and construct a predefined atom vector based on the predefined atoms; Step 2. Using the drug identifier as an index, retrieve the corresponding drug embedding vector from the drug embedding parameter matrix; simultaneously, using the disease identifier as an index, retrieve the corresponding therapeutic domain embedding vector from the disease embedding parameter matrix; wherein, the drug embedding parameter matrix and the disease embedding parameter matrix serve as trainable parameters of the model, and are jointly optimized and updated with other model parameters during end-to-end model training; concatenate the drug embedding vector, the therapeutic domain embedding vector, and the predefined atomic vector to obtain the initial enhanced feature vector; Step 3. The obtained initial enhanced feature vector is subjected to nonlinear transformation learning using a multilayer perceptron network, and the transformed learning atoms are output. The learning atoms are concatenated with the predefined atom vectors to obtain the final enhanced feature vector. Step 4. Use several preset Horn clause rules to perform fuzzy reasoning on the final enhanced feature vector to obtain the Horn clause rule reasoning result; Step 5. Perform fuzzy OR aggregation on all Horn clause rule inference results to obtain the final drug recommendation confidence score.

2. The drug recommendation method as described in claim 1, characterized in that, In step 1, the predefined atomic values ​​of the target drug include drug property values, target-related class values, treatment category values, and data source values.

3. The drug recommendation method as described in claim 1, characterized in that, In step 3, the obtained initial enhanced feature vector is subjected to nonlinear transformation learning using a multilayer perceptron network, and the transformed learning atoms are output. This specifically includes the following steps: The initial enhanced feature vector is processed through a hidden layer to obtain the hidden layer output vector: in: Here is the weight matrix of the hidden layer. The bias vector of the hidden layer. This represents the ReLU activation function. This is the output vector of the hidden layer; The obtained hidden layer output vector is then input into the Dropout layer for regularization. Where Dropout is a regularization operation. Represented by probability Randomly set the output of some neurons in the hidden layer to zero; This represents the output of the Dropout layer; Output the Dropout layer Input-output layer, to obtain the transformed learned atoms in: This is the output layer weight matrix. This is the output layer bias vector. It is the Sigmoid activation function. This is the output of 10 learning atoms.

4. The drug recommendation method as described in claim 1, characterized in that, In step 4, fuzzy inference is performed on the final enhanced feature vector using several preset Horn clause rules, specifically including: Each Horn clause rule is mapped to a rule-atomic trainable weight. The trainable weights Mapped to fuzzy weights via the sigmoid function =sigmoid( ); Based on fuzzy weights, each rule selectively weights the atoms in the final enhanced feature vector and uses fuzzy AND and fuzzy NOT operators to calculate the rule output, thus obtaining the Horn clause rule inference result.

5. The drug recommendation method as described in claim 1, characterized in that, Also includes: By statistically analyzing the activation intensity of each Horn clause rule, the weight ratio of predefined atoms and learned atoms in all Horn clause rules is calculated, thereby quantifying the contribution of different types of features to the reasoning results of Horn clause rules. These different types of features include drug properties, target-related features, treatment category features, and data source features.

6. The drug recommendation method as described in claim 1, characterized in that, Also includes: A differentiated learning rate strategy is used to train the model.

7. A drug recommendation system based on neurally enhanced fuzzy reasoning, characterized in that, The drug recommendation system includes a trained neurally enhanced Horn clause fuzzy reasoning drug recommendation model, which includes: Data acquisition module: used to acquire the drug identifier and disease identifier of the target drug, extract the predefined atoms of the target drug from the medical knowledge base, and construct a predefined atom vector based on the predefined atoms; The initial enhanced feature vector construction module is used to use the drug identifier as an index to search for and read the corresponding drug embedding vector from the drug embedding parameter matrix; at the same time, it uses the disease identifier as an index to search for and read the corresponding therapeutic domain embedding vector from the disease embedding parameter matrix; and it concatenates the drug embedding vector, the therapeutic domain embedding vector, and the predefined atomic vector to obtain the initial enhanced feature vector. The final enhanced feature vector construction module is used to perform nonlinear transformation learning on the obtained initial enhanced feature vector using a multilayer perceptron network, output the transformed learning atoms, and concatenate the learning atoms with predefined atom vectors to obtain the final enhanced feature vector. Fuzzy Inference Module: Uses several preset Horn clause rules to perform fuzzy inference on the final enhanced feature vector to obtain the Horn clause rule inference result; The results output module performs fuzzy OR aggregation on all Horn clause rule inference results to obtain the final drug recommendation confidence score.

8. The drug recommendation system as described in claim 7, characterized in that, The neurally enhanced Horn clause fuzzy reasoning drug recommendation model employs a differentiated learning rate strategy for end-to-end training, specifically including: Horn clause weights use a learning rate greater than a set threshold for fast convergence, while multilayer perceptron network parameters use a learning rate less than a set threshold for fine-tuning the multilayer perceptron network. Meanwhile, L1 sparsity regularization constraints are applied to the weights of the Horn clauses to encourage the model to select key features and improve interpretability. The training process uses binary cross-entropy as the loss function and updates all model parameters simultaneously through the backpropagation algorithm. The model parameters include the embedding parameter matrix, the multilayer perceptron network parameters, and the rule-atomic trainable weight parameters of the Horn clause layer.