A method and system for virtual screening of drugs based on on-the-fly adaptation
By employing a dual-encoder architecture and an adaptive weight allocation strategy, the problems of imbalanced training data and differences in feature distribution in virtual drug screening are solved, enabling efficient drug screening under unsupervised conditions and improving the model's generalization ability and screening accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2026-04-07
AI Technical Summary
Existing virtual drug screening methods rely on high-quality structural annotations and affinity labels. The imbalance of training data leads to insufficient generalization ability of the model during the testing phase, and the large difference in feature distribution between the training and testing phases affects the screening accuracy.
A dual-encoder architecture is used for joint training, combining contrastive learning and self-supervised auxiliary tasks. Through adaptive weight allocation and meta-learning strategies, the small molecule screening model is dynamically adapted to the features of test samples under unsupervised conditions, and the adaptation process during testing is simulated to improve model performance.
Without relying on precise labels, the model's generalization performance and screening accuracy are significantly improved, making it suitable for various drug screening scenarios, reducing dependence on experimental data, and enhancing the method's practicality.
Smart Images

Figure CN120727141B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of computer-aided drug discovery and deep learning, specifically relating to a test-time adaptive virtual drug screening method and system. Background Technology
[0002] Virtual drug screening, a crucial early-stage step in new drug development, aims to rapidly identify small molecule candidates from massive small molecule libraries that may bind to specific protein targets, thereby improving the efficiency and success rate of new drug discovery. With the continuous expansion of publicly available molecular libraries, the importance of virtual screening technology in shortening development cycles and reducing costs is becoming increasingly prominent, making it one of the key tools in computer-aided drug design.
[0003] Traditional virtual screening methods primarily rely on molecular docking techniques, assessing interaction strength by constructing protein-small molecule complex structures and calculating their binding energies. These methods typically require precise conformational sampling and energy scoring for each small molecule, resulting in high computational costs and failing to meet the efficiency requirements of today's large-scale drug screening. Furthermore, these methods are highly dependent on the accuracy of the scoring function and prior structural information, making them susceptible to incomplete conformational space or errors in the scoring function.
[0004] With the development of deep learning technology, an increasing number of studies are attempting to use deep neural networks to model the binding ability between protein-small molecule pairs, thereby achieving efficient screening without relying on traditional docking simulations. Typical methods include supervised learning-based binding affinity prediction or conformational modeling. These methods significantly improve screening speed, but generally suffer from two problems: first, model training heavily relies on high-quality structural annotations or affinity labels, which are usually costly and inefficient to obtain; second, training data often only contains positive samples (i.e., known bound protein-small molecule pairs) and lacks sufficient hard negative samples, making it difficult for the model to accurately distinguish non-bound molecules during actual testing, thus affecting generalization ability.
[0005] To address these issues, a class of feature alignment methods based on contrastive learning has emerged. These methods perform embedding representation learning on protein pockets and small molecules under unsupervised conditions, achieving virtual screening without affinity labels. However, the method's approach to constructing negative samples during training is relatively simple, only using "non-homologous pairs" as negative samples. This fails to cover the more challenging non-binding pairs in the testing phase, leading to significant differences in feature distribution between training and inference phases, thus limiting the model's practical applicability. Summary of the Invention
[0006] This invention aims to address the shortcomings of existing technologies and provides the following solutions:
[0007] A test-time adaptation-based virtual drug screening method includes the following steps:
[0008] Collect historical datasets of protein pocket-small molecule pairings;
[0009] Construct a dual encoder architecture consisting of a protein pocket encoder and a small molecule encoder;
[0010] The dual encoder architecture is jointly trained based on the historical dataset to obtain a small molecule screening model.
[0011] Protein pocket data is obtained, and candidate small molecules corresponding to the protein pocket data are screened and sorted based on the small molecule screening model to obtain the corresponding active compounds.
[0012] Preferably, the method for obtaining the historical dataset includes:
[0013] Obtain historical protein pocket data with three-dimensional structural information from publicly available protein databases;
[0014] Collect diverse historical small molecule structure data from publicly available compound databases;
[0015] For each historical protein pocket data point, the corresponding historical small molecule structure data is selected to form a protein pocket-small molecule pairing dataset, thus obtaining the historical dataset.
[0016] Preferably, the method for obtaining the small molecule screening model includes:
[0017] A contrastive learning strategy is adopted to construct positive and negative sample pairs based on the historical dataset and jointly train the dual encoder architecture.
[0018] The parameters of the trained dual encoder architecture are locally fine-tuned using a self-supervised auxiliary task, and the model is dynamically adapted during testing using an adaptive weight allocation method.
[0019] A meta-learning-based auxiliary training framework is constructed to simulate the adaptation process during testing during training, thereby improving the main task performance of the dual encoder architecture under the guidance of the auxiliary task, completing model training, and obtaining the small molecule screening model.
[0020] Preferred methods for local fine-tuning include:
[0021] During the model inference phase, several self-supervised tasks are introduced for each test sample. The auxiliary loss is calculated through the self-supervised tasks, and the model parameters are fine-tuned at the sample level to enhance the adaptability of the dual encoder architecture to the structural features of the test samples.
[0022] The self-supervised tasks include atom type prediction, 3D coordinate reconstruction, distance prediction, KL divergence minimization, and contrastive learning.
[0023] Preferably, the adaptive weight allocation method includes:
[0024] Multi-scale features of the dual encoder architecture at the top, middle and bottom layers are extracted. The weights of each auxiliary task are calculated through a task-specific multilayer perceptron network. The loss of each task is weighted and fused using a normalization method to complete the dynamic weight adjustment of sample features during testing.
[0025] Preferably, the working method of the auxiliary training framework includes:
[0026] During the training phase, the model adapts to the simulation test by first updating the sub-parameters such as the normalization layer based on the auxiliary task, and then optimizing the main task through gradient backpropagation. The two-stage update strategy guides the model to learn to improve the performance of the main task based on the auxiliary task, while preventing the auxiliary task from interfering with or overfitting the main task.
[0027] Preferably, the method for screening and sorting the candidate small molecules includes:
[0028] The protein pocket data is obtained, and the similarity score between the protein pocket data and the feature representation of the small molecule is calculated using the small molecule screening model.
[0029] All candidate small molecules are sorted according to their similarity score with the protein pocket, and molecules with similarity scores higher than a threshold are selected as potential binding ligands to obtain the corresponding active compounds.
[0030] The present invention also provides a drug virtual screening system based on test-time adaptation, wherein the method described in any of the above-mentioned methods includes: a historical data acquisition module, a dual encoder construction module, a model training module, and a drug virtual screening module;
[0031] The historical data acquisition module is used to collect historical datasets of protein pocket-small molecule pairings.
[0032] The dual encoder building module is used to construct a dual encoder architecture consisting of a protein pocket encoder and a small molecule encoder.
[0033] The model training module performs joint training on the dual encoder architecture based on the historical dataset to obtain a small molecule screening model.
[0034] The drug virtual screening module is used to acquire protein pocket data, and to screen and sort candidate small molecules corresponding to the protein pocket data based on the small molecule screening model to obtain the corresponding active compounds.
[0035] Preferably, the workflow of the historical data acquisition module includes:
[0036] Obtain historical protein pocket data with three-dimensional structural information from publicly available protein databases;
[0037] Collect diverse historical small molecule structure data from publicly available compound databases;
[0038] For each historical protein pocket data point, the corresponding historical small molecule structure data is selected to form a protein pocket-small molecule pairing dataset, thus obtaining the historical dataset.
[0039] Preferably, the workflow of the model training module includes:
[0040] A contrastive learning strategy is adopted to construct positive and negative sample pairs based on the historical dataset and jointly train the dual encoder architecture.
[0041] The parameters of the trained dual encoder architecture are locally fine-tuned using a self-supervised auxiliary task, and the model is dynamically adapted during testing using an adaptive weight allocation method.
[0042] A meta-learning-based auxiliary training framework is constructed to simulate the adaptation process during testing during training, thereby improving the main task performance of the dual encoder architecture under the guidance of the auxiliary task, completing model training, and obtaining the small molecule screening model.
[0043] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0044] This invention is the first to introduce test-time adaptation technology into virtual drug screening tasks. It achieves structure-specific dynamic adaptation of the model to unknown samples without relying on test labels, significantly improving generalization performance. By introducing multi-task assisted learning and meta-learning training strategies, this invention enhances the model's understanding of structural features and mitigates the impact of inconsistent training-test distributions on performance. Furthermore, this invention eliminates the need for precise affinity labels or conformational sampling, reducing reliance on experimental data and improving the method's practicality in unsupervised or zero-sample scenarios. This invention is applicable to various drug screening scenarios and has promising prospects for widespread application. Attached Figure Description
[0045] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of the dual encoder architecture according to an embodiment of the present invention;
[0048] Figure 3 This is a flowchart illustrating the joint training process according to an embodiment of the present invention. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0051] Example 1
[0052] In this embodiment, as Figure 1 As shown, a drug virtual screening method based on test-time adaptation includes the following steps:
[0053] S1. Collect historical datasets of protein pocket-small molecule pairings.
[0054] Methods for obtaining historical datasets include: acquiring historical protein pocket data with three-dimensional structural information from publicly available protein databases; collecting diverse historical small molecule structure data from publicly available compound databases; and for each historical protein pocket data set, selecting the corresponding historical small molecule structure data to form a protein pocket-small molecule pairing dataset, thus obtaining the historical dataset.
[0055] In this embodiment, firstly, protein pocket data with three-dimensional structural information is obtained from publicly available protein databases, while diverse small molecule structure data are collected from publicly available compound databases. For each protein pocket, possible binding small molecule pairs are screened or constructed to form a protein pocket-small molecule pairing dataset. The collected data should cover different protein families and diverse small molecule structures to ensure broad representativeness and diversity of the training data, providing a sufficient data foundation for subsequent deep model training.
[0056] S2. Construct a dual encoder architecture consisting of a protein pocket encoder and a small molecule encoder.
[0057] In this embodiment, the dual encoder structure is as follows: Figure 2 As shown, a protein pocket encoder and a small molecule encoder are designed to encode the structural features of protein pockets and small molecules. The two encoders operate in parallel, mapping their respective inputs to a unified high-dimensional feature space. In addition to the protein pocket encoder and the small molecule encoder, a main branch and auxiliary branches are included. The main branch performs the primary task of drug screening, while the auxiliary branches perform various self-supervised auxiliary tasks. Both branches share encoder parameters. The auxiliary branches enhance and adjust the predictive performance of the primary task by introducing a multi-scale feature fusion mechanism and a task-specific loss calculation module.
[0058] S3. Jointly train the dual encoder architecture based on historical datasets to obtain a small molecule screening model.
[0059] like Figure 3 As shown, the method for obtaining the small molecule screening model includes: employing a contrastive learning strategy to construct positive and negative sample pairs based on historical datasets and jointly training a dual encoder architecture; using a self-supervised auxiliary task to locally fine-tune the parameters of the trained dual encoder architecture and achieving dynamic adaptation of the model during testing through an adaptive weight allocation method; constructing a meta-learning-based auxiliary training framework to simulate the adaptation process during testing during training, thereby improving the main task performance of the dual encoder architecture under the guidance of the auxiliary task, completing model training, and obtaining the small molecule screening model.
[0060] In this embodiment, the method for local fine-tuning includes: during the model inference stage, introducing several self-supervised tasks for each test sample, calculating auxiliary loss through self-supervised tasks and driving sample-level fine-tuning of model parameters to enhance the adaptability of the dual encoder architecture to the structural features of test samples; the self-supervised tasks include atom type prediction, three-dimensional coordinate reconstruction, distance prediction, KL divergence minimization and contrastive learning, etc. These tasks help the model capture multi-dimensional structural information of protein pockets and small molecules, and strengthen the understanding of complex structural relationships.
[0061] In this embodiment, the adaptive weight allocation method includes: extracting multi-scale features from the top, middle and bottom layers of the dual encoder architecture, calculating the weight of each auxiliary task through a task-specific multilayer perceptron network, and using normalization to perform weighted fusion of the losses of each task to complete the dynamic weight adjustment of the sample features during testing.
[0062] In this embodiment, the working method of the auxiliary training framework includes: simulating the adaptation process during the training phase, first updating the sub-parameters such as the normalization layer based on the auxiliary task, and then performing gradient backpropagation optimization on the main task. The two-stage update strategy guides the model to learn to improve the performance of the main task based on the auxiliary task, while preventing the auxiliary task from interfering with or overfitting the main task, thereby improving the generalization ability and avoiding the negative impact of the auxiliary task on the main task.
[0063] The adaptation process during testing does not rely on test labels and can dynamically adjust the model according to the feature distribution of specific test samples under zero-sample conditions, significantly improving the model's performance on unknown protein targets and candidate small molecules.
[0064] S4. Obtain protein pocket data, and screen and sort candidate small molecules corresponding to the protein pocket data based on the small molecule screening model to obtain the corresponding active compounds.
[0065] The method for screening and ranking candidate small molecules includes: acquiring protein pocket data, using a small molecule screening model to calculate the similarity score between the protein pocket data and the feature representation of the small molecules; ranking all candidate small molecules according to their similarity scores with the protein pockets, and identifying molecules with similarity scores higher than a threshold as potential binding ligands to obtain the corresponding active compounds.
[0066] Example 2
[0067] In this embodiment, a drug virtual screening system based on test-time adaptation includes: a historical data acquisition module, a dual encoder construction module, a model training module, and a drug virtual screening module.
[0068] The historical data acquisition module is used to collect historical datasets of protein pocket-small molecule pairings.
[0069] The workflow of the historical data acquisition module includes: acquiring historical protein pocket data with three-dimensional structural information from publicly available protein databases; acquiring diverse historical small molecule structure data from publicly available compound databases; and for each historical protein pocket data set, selecting the corresponding historical small molecule structure data to form a protein pocket-small molecule pairing dataset, thus obtaining the historical dataset.
[0070] The dual encoder building block is used to construct a dual encoder architecture consisting of a protein pocket encoder and a small molecule encoder.
[0071] The model training module performs joint training on the dual encoder architecture based on historical datasets to obtain a small molecule screening model.
[0072] The workflow of the model training module includes: employing a contrastive learning strategy to construct positive and negative sample pairs based on historical datasets and jointly training the dual encoder architecture; using a self-supervised auxiliary task to locally fine-tune the parameters of the trained dual encoder architecture and using an adaptive weight allocation method to achieve dynamic adaptation of the model during testing; constructing a meta-learning-based auxiliary training framework to simulate the adaptation process during testing during training, thereby improving the main task performance of the dual encoder architecture under the guidance of the auxiliary task, completing model training, and obtaining the small molecule screening model.
[0073] The drug virtual screening module is used to acquire protein pocket data, and based on the small molecule screening model, it screens and sorts the candidate small molecules corresponding to the protein pocket data to obtain the corresponding active compounds.
[0074] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A drug virtual screening method based on test-time adaptation, characterized in that, Includes the following steps: Collect historical datasets of protein pocket-small molecule pairings; Construct a dual encoder architecture consisting of a protein pocket encoder and a small molecule encoder; The dual encoder architecture is jointly trained based on the historical dataset to obtain a small molecule screening model. The protein pocket data is obtained, and the candidate small molecules corresponding to the protein pocket data are screened and sorted based on the small molecule screening model to obtain the corresponding active compounds. Methods for obtaining the historical dataset include: Obtain historical protein pocket data with three-dimensional structural information from publicly available protein databases; Collect diverse historical small molecule structure data from publicly available compound databases; For each historical protein pocket data, the corresponding historical small molecule structure data is selected to form a protein pocket-small molecule pairing dataset, thus obtaining the historical dataset; The methods for obtaining the small molecule screening model include: A contrastive learning strategy is adopted to construct positive and negative sample pairs based on the historical dataset and jointly train the dual encoder architecture. The parameters of the trained dual encoder architecture are locally fine-tuned using a self-supervised auxiliary task, and the model is dynamically adapted during testing using an adaptive weight allocation method. A meta-learning-based auxiliary training framework is constructed to simulate the adaptation process during testing during training, thereby improving the main task performance of the dual encoder architecture under the guidance of the auxiliary task, completing model training, and obtaining the small molecule screening model. Methods for making local fine-tuning include: During the model inference phase, several self-supervised tasks are introduced for each test sample. The auxiliary loss is calculated through the self-supervised tasks, and the model parameters are fine-tuned at the sample level to enhance the adaptability of the dual encoder architecture to the structural features of the test samples. The self-supervised tasks include atom type prediction, 3D coordinate reconstruction, distance prediction, KL divergence minimization, and contrastive learning. The adaptive weight allocation method includes: Multi-scale features of the dual encoder architecture at the top, middle and bottom layers are extracted. The weights of each auxiliary task are calculated through a task-specific multilayer perceptron network. The loss of each task is weighted and fused using a normalization method to complete the dynamic weight adjustment of sample features during testing. The working method of the auxiliary training framework includes: During the training phase, the model adapts to the test by first updating the sub-parameters such as the normalization layer based on the auxiliary task, and then optimizing the main task through gradient backpropagation. The two-stage update strategy guides the model to learn to improve the performance of the main task based on the auxiliary task, while preventing the auxiliary task from interfering with or overfitting the main task. The method for screening and ranking the candidate small molecules includes: The protein pocket data is obtained, and the similarity score between the protein pocket data and the feature representation of the small molecule is calculated using the small molecule screening model. All candidate small molecules are sorted according to their similarity score with the protein pocket, and molecules with similarity scores higher than a threshold are selected as potential binding ligands to obtain the corresponding active compounds.
2. A test-time adaptive virtual drug screening system, wherein the system applies the method of claim 1, characterized in that, include: Historical data acquisition module, dual encoder construction module, model training module, and drug virtual screening module; The historical data acquisition module is used to collect historical datasets of protein pocket-small molecule pairings. The dual encoder building module is used to construct a dual encoder architecture consisting of a protein pocket encoder and a small molecule encoder. The model training module performs joint training on the dual encoder architecture based on the historical dataset to obtain a small molecule screening model. The drug virtual screening module is used to acquire protein pocket data, and to screen and sort candidate small molecules corresponding to the protein pocket data based on the small molecule screening model to obtain the corresponding active compounds.
3. The drug virtual screening system based on test-time adaptation according to claim 2, characterized in that, The workflow of the historical data acquisition module includes: Obtain historical protein pocket data with three-dimensional structural information from publicly available protein databases; Collect diverse historical small molecule structure data from publicly available compound databases; For each historical protein pocket data point, the corresponding historical small molecule structure data is selected to form a protein pocket-small molecule pairing dataset, thus obtaining the historical dataset.
4. The drug virtual screening system based on test-time adaptation according to claim 2, characterized in that, The workflow of the model training module includes: A contrastive learning strategy is adopted to construct positive and negative sample pairs based on the historical dataset and jointly train the dual encoder architecture. The parameters of the trained dual encoder architecture are locally fine-tuned using a self-supervised auxiliary task, and the model is dynamically adapted during testing using an adaptive weight allocation method. A meta-learning-based auxiliary training framework is constructed to simulate the adaptation process during testing during training, thereby improving the main task performance of the dual encoder architecture under the guidance of the auxiliary task, completing model training, and obtaining the small molecule screening model.
Citation Information
Patent Citations
Self-supervised graph neural network pre-training method based on comparative learning
CN114038517A
Drug virtual screening method based on adaptive meta-learning
CN115101145A
Drug virtual screening method and device based on deep learning
CN116705192A
Method and system for re-scoring after docking based on ligand similarity and DTI
CN119046700A
Network intrusion detection method based on multi-task deep learning
CN119675931A