A general drug property prediction method and device based on a conditional perception graph neural network
By constructing a condition-specific training dataset and a prediction model with a dual-branch architecture, and combining it with an inequality-constrained loss function, the problem of data sparsity and label bias caused by ignoring experimental conditions in existing methods is solved. This achieves high-precision prediction of drug properties under multiple tasks and conditions, and has zero-shot prediction capability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU INSTITUTE OF MEDICAL SCIENCES CHINESE ACADEMY OF SCIENCES
- Filing Date
- 2026-02-26
- Publication Date
- 2026-05-29
AI Technical Summary
Existing methods for predicting molecular properties based on graph neural networks ignore the influence of experimental conditions, leading to data sparsity and label bias. They also lack generalization ability across tasks and are difficult to make effective predictions in zero-shot scenarios.
A condition-specific training dataset is constructed, and a prediction model with a dual-branch architecture is adopted, including a semantic extraction module, a dual-branch molecular graph encoder, and a conditional hybrid expert prediction head. Combined with an inequality constraint loss function, a staged pre-training strategy is used to achieve high-precision prediction under multiple tasks and conditions.
It significantly improves the prediction accuracy of the model under complex experimental conditions, can effectively utilize truncated data, has zero-sample prediction capability, and has the versatility and adaptability to thousands of bioassay tasks.
Smart Images

Figure CN122117131A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence-assisted drug discovery and computational chemistry, and in particular to a general method and apparatus for predicting drug properties based on conditional perceptual graph neural networks. Background Technology
[0002] In drug discovery, accurately predicting the pharmacological properties of molecules (such as biological activity and ADMET properties) is a crucial step in screening candidate drugs. Traditional wet experimental methods are time-consuming and costly, hence the emergence of computer-aided drug property prediction technology.
[0003] With the development of deep learning, graph neural networks (GNNs) have become the mainstream method for processing molecular topology. However, existing GNN-based methods for predicting molecular properties still face significant challenges. First, current methods treat biological activity only as a static property of molecular structure, ignoring the significant impact of experimental conditions (such as experimental indicators, cell lines, and detection methods) on experimental results. This simplification makes it difficult for models to integrate heterogeneous data from different sources and under varying conditions, exacerbating the sparsity problem of drug development data.
[0004] Secondly, existing methods and standard datasets typically discard truncated data with inequality constraints (such as ">10µM" or "<50%) or treat them as exact values. This not only wastes a large amount of valuable boundary information but also introduces serious label bias.
[0005] Furthermore, most existing models are "dedicated models" trained from scratch for a single task. They not only lack cross-task generalization ability but also cannot utilize information from similar tasks or test data, making it difficult for them to make effective predictions in "zero-shot" scenarios where there is no training data. Although large language models have powerful semantic reasoning capabilities, their autoregressive generation methods are difficult to use for accurate numerical regression predictions.
[0006] Therefore, there is an urgent need for a general method for predicting drug molecule properties that can integrate molecular structure, task semantics, and experimental conditions, and effectively utilize boundary information of truncated data. Summary of the Invention
[0007] To address the technical problems existing in the prior art, this invention proposes a general drug property prediction method and device based on conditional perceptual graph neural networks. By using a graph cue learning mechanism, the task and conditional semantics are explicitly integrated into the molecular representation, and by combining an inequality constraint loss function, high-precision prediction and zero-sample prediction of drug molecular properties under multiple tasks and conditions are achieved.
[0008] On the one hand, to achieve the above objectives, this invention provides a general drug property prediction method based on conditional perceptual graph neural networks, comprising: Construct a condition-specific training dataset, wherein each sample in the dataset includes molecular structure, task semantic description, experimental condition description and corresponding bioactivity label; A prediction model is constructed, which is a dual-branch architecture, including a semantic extraction module, a dual-branch molecular graph encoder, and a conditional hybrid expert prediction head. The dual-branch molecular graph encoder includes a condition-aware branch and a structure-preserving branch. A phased pre-training strategy is adopted to train the prediction model based on the training dataset to obtain a trained general molecular property prediction model. The phased pre-training strategy includes physicochemical property perception pre-training and large-scale biological activity pre-training. Using the trained general molecular property prediction model, combined with task and experimental condition descriptions, the molecular chemical structure is processed, and the predicted values of molecular properties under specific task and experimental conditions are output.
[0009] Preferably, a condition-specific training dataset is constructed, including: Obtain raw bioactivity data including molecular structure, description of experimental conditions, and experimental results; The experimental condition descriptions are processed using a large language model and combined with task semantics to construct a dataset containing triples of molecular structure, task semantics, and experimental conditions, along with corresponding labels. The experimental conditions include the inherent structured terms in the database, key experimental parameters extracted from unstructured text using a large language model, and the original test description text. The labels include precise numerical values as well as truncated data with inequality constraints.
[0010] Preferably, the semantic extraction module is used to convert the task description text and experimental condition text into task semantic embedding vectors; The conditional-aware branch is used to explicitly introduce the task semantic embedding vector as a virtual node during the graph convolutional encoding process using a graph cue learning mechanism, and to dynamically apply the experimental conditional embedding vector to the GNNs hierarchical feature update using a feature linear modulation mechanism, thereby generating a context-aware representation rich in task and conditional semantics. The structure preservation branch is used to encode the original molecular structure features using learnable soft cue vectors, and to extract and preserve the intrinsic structural information of the molecule. The conditional hybrid expert prediction head is used to dynamically generate gating weights based on experimental conditional embedding vectors, weight and aggregate the outputs of different expert networks, and output the final prediction result based on the context-aware representation and the inherent structural information.
[0011] Preferably, the processing procedure for the condition-aware branch includes: Construct a comprehensive conditional embedding vector; Based on the comprehensive conditional embedding vector, the scaling and translation factors required for feature linear modulation are generated using a multilayer perceptron, and the modulation parameters are applied to each convolution operation of the graph neural network. By performing an affine transformation on the intermediate feature distribution, the adaptability of the model to specific experimental conditions is dynamically adjusted to obtain updated node features.
[0012] Preferably, the comprehensive conditional embedding vector is constructed as follows: ; In the formula, For the comprehensive conditional embedding vector, As an inherent structural feature, Extracting features for large language models These are the original descriptive features. , , These are three different linear layers of a neural network; The updated node characteristics are: ; In the formula, For the updated node features, Scaling factor The translation factor is... These are the original node features.
[0013] Preferably, the conditional hybrid expert prediction head includes a general expert network, several parallel specific expert networks, and a gated network; Specifically, the gated network uses the comprehensive conditional embedding vector as input to calculate the activation weights of each specific expert network, as follows: ; In the formula, To activate the weights, It is a multilayer perceptron.
[0014] Preferably, the physicochemical property perception pre-training is performed by pre-training the model backbone network using a large-scale molecular basic physicochemical property dataset; The large-scale bioactivity pre-training involves using the condition-specific training dataset and employing an inequality-constrained loss function to perform full-parameter pre-training of the model.
[0015] Preferably, the inequality constraint loss function is: ; In the formula, The loss function is an inequality constraint. Basic loss term, N The number of samples in the dataset. i For a single sample in the dataset, The mask indicator function is defined according to the tag type, specifically: ; In the formula, For indicator functions, These are predicted values for molecular properties. These are the actual values of molecular properties. It is a relational symbol.
[0016] On the other hand, to achieve the above objectives, the present invention also provides a general drug property prediction device based on a conditionally aware graph neural network, comprising: The memory is used to store the computer program and the general drug property prediction model trained according to the general drug property prediction method based on the conditional perceptual graph neural network. A processor, used to perform the following steps when executing the computer program: Receive chemical structure information of the molecule to be predicted, a description of the target task, and a description of the set experimental conditions; The general drug property prediction model is invoked for processing, and the predicted property values of the molecule under the corresponding task and conditions are output.
[0017] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the general drug property prediction method based on a conditionally aware graph neural network.
[0018] Compared with the prior art, the present invention has the following advantages and technical effects: (1) Panoramic spatial mapping: This invention is the first to model molecular property prediction as a joint mapping of molecular structure, task semantics and experimental conditions, which breaks through the limitation of traditional methods that rely only on molecular structure and can significantly improve the prediction accuracy of the model under complex experimental conditions. (2) Maximize data utilization: By introducing an inequality constraint loss function, this invention can effectively utilize truncated data with boundary information, transform fuzzy boundaries into precise monitoring signals, and greatly expand the scale of available data. (3) Zero-shot prediction capability: With the help of the semantic understanding capability of large language models and large-scale multi-task pre-training, this invention can understand the linguistic definition of biological targets, thereby achieving high-precision zero-shot prediction in new target points or experimental scenarios without training data. (4) Universality and adaptability: The model constructed in this invention has the characteristics of "generalist". A single model can adapt to thousands of different bioassay tasks, avoiding the waste of computing power to train a model separately for each task. Attached Figure Description
[0019] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of a general drug property prediction method based on a conditional graph neural network according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the diagram prompting fusion module and the backbone encoder according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the conditional hybrid expert network structure according to an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the principle of the inequality constraint loss function in an embodiment of the present invention. Figure 5 The flowchart shows the application of the model in the fine-tuning and zero-shot scenarios according to the embodiment of the present invention, where (a) is the fine-tuning scenario and (b) is the zero-shot scenario. Detailed Implementation
[0020] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0022] Example 1 This embodiment proposes a general drug property prediction method based on conditional perceptual graph neural networks, such as... Figure 1 ,include: Construct a condition-specific training dataset, wherein each sample in the dataset includes molecular structure, task semantic description, experimental condition description and corresponding bioactivity label; A prediction model is constructed, which is a dual-branch architecture, including a semantic extraction module, a dual-branch molecular graph encoder, and a conditional hybrid expert prediction head. The dual-branch molecular graph encoder includes a condition-aware branch and a structure-preserving branch. A phased pre-training strategy is adopted to train the prediction model based on the training dataset to obtain a trained general molecular property prediction model. The phased pre-training strategy includes physicochemical property perception pre-training and large-scale biological activity pre-training. Using the trained general molecular property prediction model, combined with task and experimental condition descriptions, the molecular chemical structure is processed, and the predicted values of molecular properties under specific task and experimental conditions are output.
[0023] Furthermore, a condition-specific training dataset is constructed, including: Obtain raw bioactivity data including molecular structure, description of experimental conditions, and experimental results; The experimental condition descriptions are processed using a large language model and combined with task semantics to construct a dataset containing triples of molecular structure, task semantics, and experimental conditions, along with corresponding labels. The experimental conditions include the structured terms inherent in the database, key experimental parameters extracted from unstructured text using a large language model, and the original test description text. The labels include precise numerical values as well as truncated data with inequality constraints.
[0024] Specifically, a condition-specific training dataset is constructed. This step aims to address the lack of experimental conditions, truncation information, and task metadata in traditional drug discovery datasets.
[0025] 1. Raw data acquisition: Raw bioactivity data, including molecular structures (SMILES), descriptions of experimental conditions, and experimental results, were obtained from the publicly available ChEMBL database.
[0026] 2. Triple construction: The large language model (LLaMA-3.1) is used to construct triples containing "molecular structure-task semantics-experimental conditions".
[0027] Molecular structure: the chemical structure information of drug molecules.
[0028] Task semantics: Leveraging the LLaMA large language model, enrichment is achieved through prompting engineering techniques. Specifically, using task keywords and drug action mechanisms as input, specific prompt words are constructed to guide the model in generating rich text descriptions.
[0029] Experimental conditions: It consists of three parts: (1) the inherent structured terms in the database (BAO tags, indicators, units, species, etc.); (2) using the LLaMA large language model, through prompting engineering technology, to extract key parameters that have a significant impact on activity from the unstructured test description text (incubation time, temperature, drug concentration, test method, etc.); (3) the original test description text.
[0030] 3. Tag processing: Extract the corresponding bioactivity tags, including precise values and truncated data with inequality constraints (>, <).
[0031] Furthermore, a prediction model is constructed, which adopts a dual-branch architecture, such as... Figure 2 Specifically, it includes a semantic extraction module, a dual-branch molecular graph encoder, and a conditional hybrid expert prediction head; the dual-branch molecular graph encoder includes a condition-aware branch and a structure-preserving branch; Specifically, the semantic extraction module is used to convert the task description text and experimental condition text into task semantic embedding vectors; Conditional-aware branch: In the process of graph convolutional encoding, the task semantic embedding vector is explicitly introduced as a virtual node using the graph hint learning mechanism, and the experimental conditional embedding vector is dynamically applied to the GNN layer feature update using the feature linear modulation mechanism to generate a context-aware representation rich in task and conditional semantics. Structure-preserving branch: used to encode the original molecular structural features using learnable soft cue vectors, extracting and preserving the intrinsic structural information of the molecule; Conditional Hybrid Expert Prediction Head: Used to dynamically generate gating weights based on experimental conditional embedding vectors, weighted aggregate the outputs of different expert networks, and output the final prediction result based on the context-aware representation and the inherent structural information.
[0032] Furthermore, the processing procedure for the condition-aware branch includes: Construct a comprehensive conditional embedding vector; Based on the comprehensive conditional embedding vector, the scaling and translation factors required for feature linear modulation are generated using a multilayer perceptron, and the modulation parameters are applied to each convolution operation of the graph neural network. By performing an affine transformation on the intermediate feature distribution, the adaptability of the model to specific experimental conditions is dynamically adjusted to obtain updated node features.
[0033] Specifically, the condition-aware branch first constructs a comprehensive conditional embedding vector. Its inherent structural characteristics are due to the database. Large language model feature extraction and original descriptive features It is assembled after being processed by their respective encoders, and the calculation method is as follows: ; In the formula, , , These are three different linear layers of a neural network; Based on the comprehensive conditional embedding vector, the model utilizes a multilayer perceptron (MLP). Scaling factor required to generate characteristic linear modulation Translation factor As shown in the following formula: ; Subsequently, the aforementioned modulation parameters are applied to each convolutional operation of the graph neural network, thereby adjusting the distribution of intermediate features. Affine transformation is performed to dynamically adjust the model's adaptability to specific experimental conditions, and the updated node features are... As shown in the following formula: ; In the formula, These are the original node features.
[0034] In addition, this branch instantiates the task semantic embedding vector as a virtual node, which serves as a hard cue to establish a full connection with the atomic nodes in the molecular graph, thereby introducing global task semantic guidance during message passing.
[0035] Furthermore, in the structure preservation branch, a task-based learnable vector is used as a soft cue to guide the graph neural network to focus on the extraction of molecular topological features, preventing the loss of intrinsic structural information of molecules when adapting to varying experimental conditions.
[0036] Furthermore, conditional mixed expert prediction heads such as Figure 3 As shown, the conditional hybrid expert prediction head comprises a general expert, multiple specific experts, and a gating network. The gating network uses... Calculate activation weights for input As shown in the following formula: ; In the formula, To activate the weights, It is a multilayer perceptron.
[0037] The final output is a weighted aggregation of the outputs from each expert network, as shown in the following formula: ; In the formula, The representation vector obtained by aggregation, For general expert networks, For specific expert networks, The initial molecular representation vector is the input. These are the activation weight values corresponding to each specific expert network.
[0038] Furthermore, to improve the model's generalization ability, this embodiment adopts a staged pre-training strategy: Phase 1: Physicochemical property perception pre-training. A backbone GNN network is trained using a large-scale physicochemical property dataset to learn basic chemical rules, giving the model a preliminary understanding of molecular structure.
[0039] Phase 2: Large-scale bioactivity pre-training. Based on the model parameters obtained in Phase 1, full-parameter training is performed using a constructed condition-specific dataset of tens of millions of data points to learn the complex mapping from "structure-task-condition" to activity.
[0040] like Figure 4 As shown, in order to utilize truncated data, this embodiment proposes an inequality-constrained loss function.
[0041] The total loss is calculated as follows: ; In the formula, The loss function is an inequality constraint. Basic loss term, N The number of samples in the dataset. i For a single sample in the dataset, This is a mask indicator function defined according to the label type, used to control the gradient backpropagation mechanism under different constraints.
[0042] The specific definition is as follows: ; In the formula, For indicator functions, These are predicted values for molecular properties. These are the actual values of molecular properties. The relational operators are (0: equal sign, 1: less than sign, 2: greater than sign).
[0043] Figure 4 It intuitively demonstrates that when the label has "greater than" or "less than" constraints, gradient penalty is only generated when the predicted value falls in the error interval (shaded area), thus transforming the fuzzy boundary into effective supervision.
[0044] like Figure 5 (a)- Figure 5 As shown in (b), this is a flowchart of the model's application in fine-tuning and zero-shot scenarios.
[0045] Fine-tuning mode: When there is a small amount of training data for a specific task, the model is initialized using pre-trained weights and fine-tuned on a specific dataset, using conditional awareness to quickly adapt.
[0046] Zero-shot mode: When faced with a completely new target or experiment (without training data), the user inputs a natural language description of the new task and experimental conditions. The model maps this description to a semantic space through a semantic extraction module and outputs prediction results using a conditional awareness network, effectively solving the cold start problem.
[0047] After training on a constructed dataset containing tens of millions of data points, experimental results show that the prediction error of the model in this embodiment is reduced by 13.9%, 16.7%, and 38.9% respectively compared with mainstream baseline models (such as Uni-Mol, KANO, GIMLET, etc.) in scenarios with abundant data, few samples, and zero samples.
[0048] Example 2 This embodiment also provides a general drug property prediction device based on a conditional perceptual graph neural network, including: The memory is used to store computer programs and general drug property prediction models trained according to a general drug property prediction method based on conditional perceptual graph neural networks. A processor, used to perform the following steps when executing the computer program: Receive chemical structure information of the molecule to be predicted, a description of the target task, and a description of the set experimental conditions; The general drug property prediction model is invoked for processing, and the predicted property values of the molecule under the corresponding task and conditions are output.
[0049] In practical applications, the device can be deployed on cloud servers or local high-performance computing workstations to provide medicinal chemists with real-time property prediction services.
[0050] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a general drug property prediction method based on a conditionally aware graph neural network.
[0051] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A general drug property prediction method based on conditional perceptual graph neural networks, characterized in that, include: Construct a condition-specific training dataset, wherein each sample in the dataset includes molecular structure, task semantic description, experimental condition description and corresponding bioactivity label; A prediction model is constructed, which is a dual-branch architecture, including a semantic extraction module, a dual-branch molecular graph encoder, and a conditional hybrid expert prediction head. The dual-branch molecular graph encoder includes a condition-aware branch and a structure-preserving branch. A phased pre-training strategy is adopted to train the prediction model based on the training dataset to obtain a trained general molecular property prediction model. The phased pre-training strategy includes physicochemical property perception pre-training and large-scale biological activity pre-training. Using the trained general molecular property prediction model, combined with task and experimental condition descriptions, the molecular chemical structure is processed, and the predicted values of molecular properties under specific task and experimental conditions are output.
2. The general drug property prediction method based on conditional perceptual graph neural network according to claim 1, characterized in that, Construct a condition-specific training dataset, including: Obtain raw bioactivity data including molecular structure, description of experimental conditions, and experimental results; The experimental condition descriptions are processed using a large language model and combined with task semantics to construct a dataset containing triples of molecular structure, task semantics, and experimental conditions, along with corresponding labels. The experimental conditions include the inherent structured terms in the database, key experimental parameters extracted from unstructured text using a large language model, and the original test description text. The labels include precise numerical values as well as truncated data with inequality constraints.
3. The general drug property prediction method based on conditional perceptual graph neural network according to claim 1, characterized in that, The semantic extraction module is used to convert the task description text and experimental condition text into task semantic embedding vectors. The conditional-aware branch is used to explicitly introduce the task semantic embedding vector as a virtual node during the graph convolutional encoding process using a graph cue learning mechanism, and to dynamically apply the experimental conditional embedding vector to the GNNs hierarchical feature update using a feature linear modulation mechanism, thereby generating a context-aware representation rich in task and conditional semantics. The structure preservation branch is used to encode the original molecular structure features using learnable soft cue vectors, and to extract and preserve the intrinsic structural information of the molecule. The conditional hybrid expert prediction head is used to dynamically generate gating weights based on experimental conditional embedding vectors, weight and aggregate the outputs of different expert networks, and output the final prediction result based on the context-aware representation and the inherent structural information.
4. The general drug property prediction method based on conditional perceptual graph neural network according to claim 3, characterized in that, The processing procedure for the condition-aware branch includes: Construct a comprehensive conditional embedding vector; Based on the comprehensive conditional embedding vector, the scaling and translation factors required for feature linear modulation are generated using a multilayer perceptron, and the modulation parameters are applied to each convolution operation of the graph neural network. By performing an affine transformation on the intermediate feature distribution, the adaptability of the model to specific experimental conditions is dynamically adjusted to obtain updated node features.
5. The general drug property prediction method based on conditional perceptual graph neural network according to claim 4, characterized in that, The comprehensive conditional embedding vector is constructed as follows: ; In the formula, For the comprehensive conditional embedding vector, As an inherent structural feature, Extracting features for large language models These are the original descriptive features. , , These are three different linear layers of a neural network; The updated node characteristics are: ; In the formula, For the updated node features, Scaling factor The translation factor is... These are the original node features.
6. The general drug property prediction method based on conditional perceptual graph neural network according to claim 5, characterized in that, The conditional hybrid expert prediction head includes a general expert network, several parallel specific expert networks, and a gated network. Specifically, the gated network uses the comprehensive conditional embedding vector as input to calculate the activation weights of each specific expert network, as follows: ; In the formula, To activate the weights, It is a multilayer perceptron.
7. The general drug property prediction method based on conditional perceptual graph neural network according to claim 1, characterized in that, The aforementioned physicochemical property perception pre-training involves pre-training the model backbone network using a large-scale molecular basic physicochemical property dataset. The large-scale bioactivity pre-training involves using the condition-specific training dataset and employing an inequality-constrained loss function to perform full-parameter pre-training of the model.
8. The general drug property prediction method based on conditional perceptual graph neural network according to claim 7, characterized in that, The inequality constraint loss function is: ; In the formula, The loss function is defined by inequality constraints. Basic loss term, N The number of samples in the dataset. i For a single sample in the dataset, The mask indicator function is defined according to the tag type, specifically: ; In the formula, For indicator functions, These are predicted values for molecular properties. These are the actual values of molecular properties. It is a relational symbol.
9. A general drug property prediction device based on a conditional perceptual graph neural network, characterized in that, include: A memory for storing a computer program and a general drug property prediction model trained by the method according to any one of claims 1-8; A processor, used to perform the following steps when executing the computer program: Receive chemical structure information of the molecule to be predicted, a description of the target task, and a description of the set experimental conditions; The general drug property prediction model is invoked for processing, and the predicted property values of the molecule under the corresponding task and conditions are output.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1-8.