A drug-target affinity prediction method based on text guidance and hybrid expert network
Patent Information
- Application Number
- CN202610146360.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-02
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-02-02
AI Technical Summary
class="d_n">[0008]本发明为了解决现有药物-靶标亲和力(DTA)预测方法存在的仅限于单一模态特征提取、难以捕捉药物的与蛋白质之间复杂非线性交互关系的问题
[0068]This invention proposes a drug-target interaction prediction model (PreAlignDTA) based on a hybrid cascaded contrastive learning and multi-expert fusion framework. By deeply integrating the multimodal structural representations of drug molecules with the sequence-text semantic features of target proteins, it achieves high-precision drug response prediction. On one hand, this invention constructs a dual-encoder contrastive learning architecture, designing structure-text dual-channel encoders for both drug molecules and target proteins: the drug encoder uses a graph convolutional neural network (GCN) to extract molecular topological features and combines it with a Transformer text encoder to mine PubChem descriptive semantic information; the protein encoder captures local patterns of amino acid sequences through a convolutional block network and simultaneously utilizes a Transformer to process UniProt functionally annotated text. This architecture, through joint optimization of InfoNCE loss and Barlow Twins loss, promotes alignment between different modal representations of the same entity, significantly improving the semantic consistency and discriminative ability of features.
Smart Images

Figure CN122067609B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of bioinformatics technology, specifically relating to a drug-target affinity prediction method based on text guidance and hybrid expert networks. Background Technology
[0002] Drug-target affinity (DTA) prediction is crucial in drug discovery and repositioning, and more and more researchers are beginning to focus on this field. Accurate affinity prediction can not only significantly reduce the reliance on high-cost, low-throughput experimental screening in the drug development process, but also provide important basis for lead compound optimization and drug repositioning, making it one of the key tasks in computer-aided drug design.
[0003] Currently, DTA faces practical challenges such as high costs of acquiring experimental data and limited coverage. High-quality drug-protein binding affinity typically relies on in vitro biochemical experiments (such as α). d K i , 𝐼𝐶 50 These experimental procedures are complex and have limited throughput, making them difficult to conduct systematically on large-scale drug-target combinations. Therefore, existing DTA studies mainly rely on publicly available standardized databases rather than systematic measurement data at the real clinical or individual levels. In recent years, with the development of high-throughput screening and database integration technologies, a series of large-scale drug-target interaction and affinity datasets have been constructed, such as Davis, KIBA, BindingDB, and DrugBank. These datasets typically integrate the chemical structure information of drugs (such as SMILES, molecular maps), amino acid sequences or functional annotations of proteins, and corresponding quantitative or semi-quantitative affinity indices, providing a foundation for data-driven DTA models. Based on these valuable data resources, researchers can systematically explore the binding patterns between drug molecules and protein targets and develop various methods to predict drug-target affinity.
[0004] Early drug-target interaction (DTA) research primarily relied on traditional machine learning methods, employing manual design and similarity modeling of drug and protein features to predict affinity. For example, Yamanishi et al. used Support Vector Machines (SVM) and kernel methods based on drug chemical structure similarity and protein sequence similarity, laying the foundation for subsequent DTA research. Pahikkala et al. further employed the Kronecker Regularized Least Squares (KronRLS) method to tensor-combine the drug and protein feature spaces. He et al. and Wang et al. explored DTA models based on Random Forest and Support Vector Regression (SVR), respectively, utilizing molecular fingerprints and protein sequence statistical features for modeling. While these models are relatively simple in structure and possess a degree of interpretability, they struggle to fully characterize the complex nonlinear relationships in drug-target interactions when dealing with high-dimensional, heterogeneous, and multimodal data, leaving room for the development of deeper learning and multimodal modeling methods.
[0005] With the rise of deep learning methods, the ability of models to automatically learn features and model nonlinear relationships has been significantly improved, driving the rapid development of drug-target affinity prediction (DTA) research. For example, the DeepDTA model proposed by Öztürk et al. pioneered modeling the DTA task as an end-to-end regression problem, using convolutional neural networks (CNNs) to model the SMILES sequences of drugs and the amino acid sequences of proteins, respectively. In terms of molecular structure modeling, Nguyen et al. proposed the GraphDTA series of models, using graph neural networks (GNNs) to learn representations of drug molecular graphs, while combining CNNs or other sequence models to encode protein sequences, more realistically reflecting the influence of molecular topology on binding affinity. Furthermore, the MolTrans model proposed by Huang et al. introduced the Transformer architecture, explicitly modeling the interaction between drug substructures and protein residues through a self-attention mechanism, achieving significant performance improvements on multiple DTA benchmark datasets. Overall, deep learning methods, by introducing structures such as CNNs, GNNs, and Transformers, have significantly improved the ability of DTA models to model complex nonlinear interactions. However, existing methods still generally face problems such as modal heterogeneity, insufficient semantic alignment, and limited generalization ability, which provides further research space for DTA models driven by multimodal fusion.
[0006] On the other hand, some studies have focused on using structurally relevant features of proteins as input to improve DTA prediction. For example, DGraphDTA uses contact maps predicted from protein sequences as input to the protein encoder, thereby improving DTA prediction performance. Since protein structural information is not always available, they use contact maps predicted from sequences, which allows the model to accept various types of proteins as input. Meanwhile, some studies have also incorporated pre-trained language models (LMs) to enhance their DTA prediction capabilities. For instance, BERT (Transformer-based bidirectional encoder representation) proposed by Devlin et al. brought about a paradigm shift in natural language processing tasks, and its influence has extended to other fields, such as ESM, ProtBERT, and ProteinBERT for protein feature extraction. Similarly, in the drug-related field, models such as ChemBERTa, ChemGPT, and MoLFormer have played a crucial role in drug feature extraction.
[0007] Despite significant progress in deep learning models in recent years, existing methods still have limitations in multimodal information fusion and cross-modal representation learning. Specifically, heterogeneous data such as molecular graph structures, protein sequences, their corresponding text descriptions, and chemical fingerprints are often processed independently, making it difficult to capture deep correlations. Secondly, drug-target binding is determined by multiple mechanisms, including chemical complementarity, spatial conformation matching, and functional domain identification, making it difficult for a single predictor to model these complex mechanisms simultaneously. Furthermore, existing methods rely solely on structural information, neglecting the textual semantic knowledge in biomedical literature, which limits their generalization ability to new drugs and targets. Summary of the Invention
[0008] This invention addresses the problems of existing drug-target affinity (DTA) prediction methods, which are limited to single-modal feature extraction and struggle to capture the complex nonlinear interactions between drugs and proteins.
[0009] A drug-target affinity prediction method based on text guidance and hybrid expert networks is proposed, which performs prediction based on a hybrid expert network cascade prediction model, the model comprising:
[0010] Data extraction and preprocessing module: used to obtain drug molecule maps. The amino acid sequence of the target protein ;
[0011] Multimodal encoder: Performs multimodal encoding of features for drugs and proteins, including:
[0012] Step b1: Map the drug molecules The input is processed by a densely connected graph convolutional neural network encoder, and then a compact representation of the drug structure is obtained through linear mapping. ;
[0013] Step b3: Analyze the amino acid sequence. Encoding is performed to obtain protein sequence features;
[0014] Step b4: For protein sequence features, a multi-scale convolutional neural network architecture is used for processing. The outputs of all branches are concatenated and linearly fused to obtain the protein sequence structure representation. ;
[0015] Projector module: and The data are fed into their respective projectors and normalized to generate features. , ;
[0016] Hybrid expert network module: Based on expert networks, fused features are obtained, including:
[0017] Step d1, and Joint features are obtained by concatenating features along the feature dimension, and an expert-assigned weight vector is obtained through a gating network. Weighting of experts By introducing a learnable temperature parameter to scale and adjust the gated logits, the following is obtained: , ;
[0018] Step d2: Represent the drug Protein representation Obtained through linear projection layers respectively and ;
[0019] Subsequently, based on the multi-head cross-attention mechanism, the attention from drug to protein was calculated. Reverse attention from proteins to drugs And pieced together Then, the collaborative attention expert output is obtained through nonlinear transformation and layer normalization. ;
[0020] Step d3: Processing is performed by Morgan fingerprint experts through two branches. The first branch is a fully connected network for the Morgan fingerprint branch. Mapping and feature extraction are performed to obtain The second path uses a single-layer linear projection to... Mapping to obtain The two processing paths are concatenated along the feature dimension, and then obtained through nonlinear transformation and layer normalization. ;
[0021] Step d4, the third expert network, and the fourth expert network employ perceptron structures with different numbers of layers, targeting... Features were obtained using third-party expert networks and fourth-party expert networks, respectively. and ;
[0022] Step d5: Stack the four outputs along the expert dimension to form a tensor. Then, the outputs of the four experts are gated, weighted, and summed to obtain the final fusion feature. ;
[0023] Drug-target regression prediction module: based on fusion features Perform affinity prediction.
[0024] Furthermore, the specific processing steps of the data extraction and preprocessing module include:
[0025] Step a2: Obtain the SMILES string of the drug molecule, parse the SMILES string into a molecule object, represent the drug molecule as a graph structure to obtain an initial drug molecule graph, extract the atomic feature vector for each atomic node, and construct an atomic feature matrix; obtain the drug... Chemical fingerprint vector ;
[0026] Step a3: Obtain the amino acid sequence of each target protein. ;
[0027] Step a4: Perform standardization preprocessing on the initial drug molecule diagram structure data generated in step a2 to obtain the standardized drug molecule diagram. Drug molecular diagram It includes the atomic feature matrix, the edge index matrix, and the edge feature matrix.
[0028] Furthermore, the densely connected graph convolutional neural network encoder includes a DenseBlock module and a Transition Layer module, as well as a graph neural network encoder;
[0029] DenseBlock internally configures multiple graph convolutional layers. Each graph convolutional layer receives the outputs of all preceding graph convolutional layers as input, performs non-linear transformation and neighborhood aggregation on node features, and configures a Transition Layer after each DenseBlock to perform feature dimensionality reduction through a linear projection layer.
[0030] Let the first The output of layer graph convolution is The node-level feature propagation calculation for the l-th layer is as follows:
[0031]
[0032] in Indicates feature splicing, Graph neural network encoder, Indicates the first Layer nodes The hidden representation, This represents the initial atomic feature vector of node i, i.e., the normalized atomic feature vector.
[0033] After completing the multi-layer Dense Block and Transition Layer, global average pooling is performed on the node-level features to obtain the graph-level feature aggregation result.
[0034] Further, step b3 describes the amino acid sequence... The encoding process includes:
[0035] Obtain the corresponding amino acid sequence ,in Indicates the first Each protein sequence consists of 10 amino acid residues. Based on a predefined amino acid vocabulary, the sequence is mapped to an integer index representation. The length of all protein sequences is standardized to obtain an integer-coded sequence, i.e., the protein sequence feature. .
[0036] Furthermore, the hybrid expert network cascaded prediction model is pre-trained, and the training process includes:
[0037] Data extraction and preprocessing module: Obtaining drug molecule maps Drug text token ID sequence The amino acid sequence of the target protein Functional text of the target protein ;
[0038] Multimodal encoder: This method involves multimodal encoding of features from drugs and proteins to obtain... and In addition, it is also used for the following modal encoding:
[0039] For drug text token ID sequences The sequence representation is obtained based on a multi-layer Transformer encoder, and the text-level representation is obtained by average pooling at non-padding positions. ;
[0040] Functional text features of proteins The encoded sequence representation is obtained using a multi-layer Transformer encoder. Average pooling is performed on non-padding positions to obtain the corresponding text-level representation. ;
[0041] Projector module: for , and , Projection is performed using four independent projectors, and the contrastive learning loss is calculated through structure-text contrastive learning. ,include:
[0042] Step c1, targeting , and , Features are obtained through their respective projectors , , , ;
[0043] Step c2: In a training batch of size N, for the i-th drug sample, construct cross-modal feature pairs, where the positive sample pairs are... Negative sample pairs are ; , The feature corresponding to sample i , Similarly, the subscript j indicates the feature corresponding to sample j;
[0044] Calculate the contrastive learning loss from structure to text in the drug modality based on contrastive learning. Contrastive learning loss from text to structure Then, the total InfoNCE loss on the drug side was calculated. ;
[0045] The protein side was obtained using the same method. The contrastive learning loss is used to obtain the final InfoNCE loss. ;
[0046] Step c3: For the drug modality, analyze the structural features of N drug samples. Stacked as normalized embedding matrices Text features of N drug samples Stacked as normalized embedding matrices The cross-modal correlation matrix between structural modalities and textual modalities is: The correlation matrix elements in The degree of linear correlation between the m-th embedding dimension of the structural modality and the n-th embedding dimension of the text modality; Barlow Twins decorrelation loss. Where m and n represent the feature dimension indices in the embedding space. This indicates the correlation between structural modality and textual modality on the m-th feature dimension. Indicates the correlation between different feature dimensions; This represents the penalty coefficient for off-diagonal terms;
[0047] For protein modes, the Barlow Twin decorrelation loss was obtained using the same method. ; and thus obtain the total Barlow Twins dereferenced loss. ;
[0048] Step c4: Calculate the contrastive learning loss = + α α is an adjustable parameter;
[0049] Hybrid expert network module: Obtains fused features based on expert networks; calculates the loss function during the process of obtaining fused features based on expert networks, including:
[0050] For a training batch of size B, the expert assignment weights are calculated based on each sample within the batch. corresponding Let the gating weight assigned to the b-th sample by the k-th expert be denoted as . For k=1,2,3,4, the average activation intensity of the k-th expert across the entire batch is: ,according to The mean square error between the average weight of each expert and the ideal uniform distribution is calculated as the load balancing loss. ;
[0051] Drug-target regression prediction module: based on fusion features Affinity prediction is performed, and the total loss is calculated. The total loss is then used to train a hybrid expert network cascaded prediction model.
[0052] Calculate total loss ,in To calculate the drug-target affinity regression loss based on predicted values and true labels, To compare learning loss, For load balancing losses; These are the weighting coefficients.
[0053] Furthermore, during the training of the hybrid expert network cascaded prediction model, the specific processing steps of the data extraction and preprocessing module include:
[0054] Step a1: Obtain multimodal data on drug-target interactions, including drug molecular structure data, protein sequence data, and affinity tag data;
[0055] Step a2: Obtain the SMILES string of the drug molecule, parse the SMILES string into a molecule object, represent the drug molecule as a graph structure to obtain an initial drug molecule graph, extract the atomic feature vector for each atomic node, and construct an atomic feature matrix; obtain the drug... Chemical fingerprint vector ;
[0056] For each drug SMILES molecular formula string Obtain the corresponding PubChem compound identifier (CID), and retrieve the functional description text of the compound based on the CID. ;
[0057] Step a3: Obtain the amino acid sequence of each target protein. and its functional description text ;
[0058] Step a4: Perform standardization preprocessing on the initial drug molecule diagram structure data generated in step a2 to obtain the standardized drug molecule diagram. Drug molecular diagram Includes atomic feature matrix, edge index matrix, and edge feature matrix;
[0059] Independent word segmenters are constructed for the drug text descriptions obtained in step a2 and the protein text descriptions obtained in step a3, respectively. Each word segmenter determines tokens based on the text description and determines the mapping relationship between all tokens and integer IDs. The drug word segmenter encodes the drug text into a sequence of drug text token IDs. The protein segmenter encodes protein text into a sequence of protein text token IDs. This refers to the functional text of proteins.
[0060] Furthermore, regarding the functional text of proteins The multi-layer Transformer encoder is used for processing drug text token ID sequences. The multi-layer Transformer encoders used in the processing employ the same Transformer architecture.
[0061] Furthermore, the contrastive learning loss from structure to text in the drug modality. Contrastive learning loss from text to structure They are as follows:
[0062]
[0063]
[0064] in This represents the cross-modal contrastive learning loss from the structural modality to the textual modality in the drug modality. Let represent the back-contrast learning loss from text modality to structural modality, N represent the number of samples in a training batch, i represent the index of the current query sample in the batch, j represent the index of the current query sample in the batch, and represent the indices of all candidate samples in the batch, where j=i corresponds to positive sample pairs, and the rest are negative sample pairs. The cosine similarity function represents the similarity between two normalized feature vectors; This indicates the temperature parameter.
[0065] Furthermore, the regression loss of drug-target affinity was calculated based on the predicted values and the actual label. Where N represents the batch size. Representing the Drug-target affinity predicted for each sample. Indicates the first Authentic affinity labels for each sample.
[0066] Furthermore, load balancing losses ,in = 4.
[0067] The beneficial effects of this invention are:
[0068] This invention proposes a drug-target interaction prediction model (PreAlignDTA) based on a hybrid cascaded contrastive learning and multi-expert fusion framework. By deeply integrating the multimodal structural representations of drug molecules with the sequence-text semantic features of target proteins, it achieves high-precision drug response prediction. On one hand, this invention constructs a dual-encoder contrastive learning architecture, designing structure-text dual-channel encoders for both drug molecules and target proteins: the drug encoder uses a graph convolutional neural network (GCN) to extract molecular topological features and combines it with a Transformer text encoder to mine PubChem descriptive semantic information; the protein encoder captures local patterns of amino acid sequences through a convolutional block network and simultaneously utilizes a Transformer to process UniProt functionally annotated text. This architecture, through joint optimization of InfoNCE loss and Barlow Twins loss, promotes alignment between different modal representations of the same entity, significantly improving the semantic consistency and discriminative ability of features.
[0069] On the other hand, this invention designs an expert hybrid cascade network (MoE) as the core of interaction modeling, including: a collaborative attention expert, which uses a multi-head cross-attention mechanism to model fine-grained interdependencies between drugs and proteins; a Morgan fingerprint expert, which integrates contrastive learning features with traditional Morgan molecular fingerprints to compensate for the shortcomings of deep learning models in terms of chemical prior knowledge; and a domain-general expert, which learns high-order nonlinear interaction patterns and provides fast response paths through fully connected networks to balance model complexity. All expert outputs are dynamically weighted and fused through an adaptive gating network. The gating network learns the expert weight distribution based on the joint features of drugs and proteins and introduces a temperature scaling mechanism to stabilize the training process, while applying load balancing constraints to ensure the uniformity of expert activation. This invention achieves significantly better performance than existing methods on the Davis and KIBA datasets, outperforming existing methods in multiple metrics such as Concordance Index (CI), Mean Squared Error (MSE), and Pearson correlation coefficient, demonstrating the effectiveness of multimodal contrastive learning and expert hybrid architecture in drug-target interaction prediction, and possessing significant scientific research value and clinical application prospects. Attached Figure Description
[0070] Figure 1 This is a schematic diagram of the overall process of the method of the present invention.
[0071] Figure 2 This is a comparison of CI box plots between the method of this invention and other comparative methods in the Davis dataset experimental environment.
[0072] Figure 3 This is a comparison of MSE box plots between the method of this invention and other comparative methods in the Davis dataset experimental environment.
[0073] Figure 4 This invention's method, compared with other methods, was tested in the Davis dataset experimental environment. Box line comparison diagram.
[0074] Figure 5 This is a comparison of CI boxlines between the method of this invention and other comparative methods in the experimental environment of the KIBA dataset.
[0075] Figure 6 This is a comparison of MSE box plots between the method of this invention and other comparative methods in the experimental environment of the KIBA dataset.
[0076] Figure 7 This invention's method is compared with other methods in the KIBA dataset experimental environment. Box line comparison diagram.
[0077] Figure 8 The bar chart shows the comparison results of the method of the present invention with other comparative methods under an independent testing environment. Detailed Implementation
[0078] To address the limitations of existing drug-target affinity prediction methods, which are limited to feature extraction based on a single structural modality and struggle to capture the complex nonlinear synergistic relationships between drugs and proteins, and whose structural modeling remains at the level of structural extraction without fully utilizing the textual semantic knowledge and deep-seated nonlinear interactions between drugs and targets, this invention proposes a text-guided drug-target affinity prediction method based on a hybrid expert network. This method employs a contrastive learning model and a hybrid expert network fusion architecture to improve the accuracy, robustness, and personalized adaptability of drug-target affinity prediction. The implementation details are described below.
[0079] Specific implementation method one: Combining Figure 1 This implementation method is described below.
[0080] This embodiment is a drug-target affinity prediction method based on text guidance and hybrid expert networks. It is based on a prediction model that integrates structure-text contrastive learning training and hybrid expert network cascade prediction. The model includes a data extraction and preprocessing module, a projector module obtained based on the structure-text contrastive learning mechanism, a hybrid expert network module, and a drug-target regression prediction module.
[0081] The data extraction and preprocessing module specifically performs the following steps:
[0082] Step a1: Collect publicly available datasets for DTA prediction. Obtain multimodal data on drug-target interactions from the Davis and KIBA public databases, including drug molecule structure data, protein sequence data, and affinity tag data. The Davis dataset contains 30,056 drug-target pairs (68 drug molecules and 379 target proteins), with affinity values expressed in pKd format. The KIBA dataset contains 118,545 drug-target pairs (2,111 drug molecules and 229 target proteins), with affinity values expressed in KIBA scores. Drug molecule data is stored as SMILES strings, and protein data is stored as amino acid sequences. Each drug-target pair corresponds to a continuous affinity value as the regression target, specifically defined as: Let... Let m represent the set of all m drugs. This represents the set of all n proteins that are targets.
[0083] Step a2: Download the SMILES strings of drug molecules and their corresponding text description information from the PubChem database. This serves as the basic data source for the multimodal features of drug molecules and is used for subsequent molecular graph construction, chemical fingerprint extraction, and text semantic encoding.
[0084] The SMILES string was parsed into molecular objects using the RDKit toolkit, representing the drug molecule as a graph structure (i.e., a drug molecule graph). Nodes in the graph represent atoms in the molecule, and edges represent chemical bonds between atoms. A 22-dimensional feature vector was extracted from each atomic node, including atom type (H, C, N, O, F, Cl, S, Br, I), atomic number, hydrogen bond acceptor / donor identifier, aromaticity, hybridization type (SP, SP2, SP3), total number of hydrogen atoms, explicit valence, formal charge, implicit valence, number of explicit hydrogen atoms, and number of free radical electrons. This vector was used for subsequent graph convolutional neural network encoding.
[0085] To capture the local topological substructure features of drug molecules, the Morgan fingerprint algorithm from RDKit is used for drug fingerprinting. Dynamically generate a 2048-bit chemical fingerprint vector, denoted as... The specific generation process is as follows:
[0086] Molecular Object Construction: The `Chem.MolFromSmiles(SMILES)` method of RDKit is called to parse the `SMILES` string into a molecular object. This object is a structured representation of the `SMILES` string, containing complete molecular structure information such as atoms, chemical bonds, and stereochemistry. The `GetMorganFingerprintAsBitVect(mol, radius=2, nBits=2048)` function is called to generate the Morgan fingerprint, where `radius=2` represents the substructure search radius extending outward from each atom by 2 chemical bonds, and `nBits=2048` represents the number of bits in the fingerprint vector. This algorithm starts from each atom in the molecule, extends outward along the chemical bonds to all atoms and their connections within a specified radius, forming a local substructure pattern. These substructures are mapped to a 2048-dimensional binary bit vector using a hash function. Each bit represents the presence (1) or absence (0) of a specific topological substructure. After data type conversion, the binary fingerprint vector is transformed. Converted to a floating-point tensor, i.e., the Morgan molecular fingerprint, this fingerprint vector is used as an additional input feature during model training (Morgan expert network in step d);
[0087] Drug text description data was obtained from the PubChem public database, focusing on the molecular formula string of each drug SMILES in the dataset. By using the compound identifier conversion interface of the PubChem REST API, the corresponding PubChem compound identifier (CID) can be obtained. Then, the functional description text of the compound can be obtained through the description query interface using the obtained CID. This interface returns a list of descriptive information from multiple authoritative data sources (such as DrugBank, ChEBI, and PubChem Compound Summary). All text data, along with SMILES, CID, text type, and data source, are stored as a CSV file, enabling the structured organization of drug multimodal data.
[0088] Step a3: Collect the amino acid sequence of each target protein from the UniProt protein database. and its functional description text To construct a multimodal feature representation of proteins. Protein function description text is extracted from the function annotation field of the UniProt database. Gene abbreviations are extracted from protein names in the dataset (e.g., "PKAC-alpha", "EGFR(T790M)"). Regular expression parsing removes subtype or mutation information within parentheses, and the base gene name before hyphens is separated (e.g., "PKAC-alpha" → "PKAC"). Non-human protein identifiers are filtered out to obtain a standardized set of human gene names. For each gene name, a query statement is constructed using the UniProt REST API search interface, and protein entries are manually reviewed. Detailed protein annotation information in JSON format is returned. From the JSON data returned by UniProt, the following dimensions of text information are systematically extracted: biological function, functional description, subcellular location, and other semantic information. This multi-dimensional information is organized into a coherent natural language description according to a fixed template, with fields separated by periods and spaces. For genes for which no matching entry is found in UniProt, the amino acid sequence is retained, but the text description field is left blank, to be automatically filled with default text by the subsequent dataset loading module. Finally, the gene name and UniProt data are combined. The ID, protein name, generated descriptive text, and amino acid sequence are stored together as a CSV file;
[0089] Step a4: Standardize the drug molecule graph structure data generated in step a2. Use the Min-Max Normalization method to scale the atomic feature matrix (i.e., the set of 22-dimensional atomic feature vectors) of each molecule graph to the [0,1] interval. This standardization preprocessing improves the numerical stability of model training. Encapsulate the preprocessed drug molecule graph data in the Data object format of the PyTorch Geometric library. Each Data object contains an atomic feature matrix (x), an edge index matrix (edge_index), and an edge feature matrix (edge_attr), and save it as a pt file.
[0090] Independent tokenizers were constructed for the drug text descriptions obtained in step a2 and the protein text descriptions obtained in step a3. Each tokenizer used the same simple tokenization algorithm: after converting the text to lowercase, it was divided into tokens by spaces, and tokens were added before and after the token sequence. <cls>(Classification markers) and <sep>(Separator) Special markers, used to build an independent vocabulary by traversing the corresponding text samples, recording the contents of... <pad>(filling), <unk>The mapping relationship between all lexical units, including (unknown words), and integer IDs is defined. The drug segmenter encodes drug text into a fixed-length 256-character token ID sequence, and the protein segmenter encodes protein text into a fixed-length 512-character token ID sequence, using padding or truncation strategies to unify the length. The two segmenters maintain independent vocabularies, which are then uniformly saved as a tokenizers.pkl file.
[0091] Step a5: Integrate all the preprocessed multimodal data obtained in steps a2 to a4 to form a standardized input dataset required for model training and testing. Each drug-target sample contains data in the following five modalities:
[0092] (1) Drug molecular map The molecular graph structure obtained from parsing the SMILES string in step a2 is then normalized in step a4 to obtain a standardized drug molecule graph. It includes an atomic feature matrix (a set of 22-dimensional atomic feature vectors), an edge index matrix (an adjacency list representing chemical bond connections), and an edge feature matrix (representing chemical bond types and conjugation).
[0093] (2) Drug text token ID sequence Drug function description obtained from the PubChem database in step a2 The token ID tensor of fixed length 256 is obtained by the tokenizer in step a4. Each element is an integer index from the vocabulary;
[0094] (3) Amino acid sequence of the target protein: the amino acid sequence obtained in step a3 ;
[0095] (4) Functional text of the target protein Protein function annotations obtained from the UniProt database in step a3 The token ID is encoded into a fixed-length 512-bit token ID tensor by the tokenizer in step a4. ;
[0096] (5) Affinity label : The continuous value labels obtained in step a1;
[0097] In addition, to support the subsequent Morgan fingerprint expert network, a 2048-dimensional Morgan chemical fingerprint vector is dynamically generated based on the SMILES string of each sample during the data loading stage. All data is encapsulated through the MultiModalDataset class, providing a unified data access interface for the subsequent training of multimodal encoders and hybrid cascaded MoE models.
[0098] The processing procedure of the multimodal encoder specifically executes the following steps:
[0099] Step b1: Extraction and characterization of drug molecules:
[0100] make Represents the set of all m drugs, for each drug To obtain its drug molecular structure map , Represents a node. Represents an edge;
[0101] drug molecular map The input is processed by a densely connected graph convolutional neural network (Dense-GCN) encoder. This encoder borrows the dense connection concept from the traditional DenseNet in image processing and applies it to irregular molecular graph structures: Traditional DenseNet uses a dense connection strategy to concatenate the outputs of all preceding layers into the input of each layer, thereby enhancing feature reuse and gradient propagation; this invention combines this strategy with graph convolution operations to design a Dense-GCN encoder suitable for molecular graphs, where graph convolution operations can handle irregular graph structure data and propagate node (atom) features along chemical bonds, while the dense connection strategy ensures that deep networks can utilize the chemical structure information extracted from shallow layers.
[0102] Specifically, the Dense-GCN encoder includes a DenseBlock module and a Transition Layer module: Each DenseBlock contains multiple graph convolutional layers, each receiving the concatenated outputs of all preceding graph convolutional layers as input to perform nonlinear transformations and neighborhood aggregation on node features. A Transition Layer is configured after each DenseBlock to perform feature dimensionality reduction through a linear projection layer, controlling the network's parameter scale. Let the... The output of layer graph convolution is The node-level feature propagation calculation for the l-th layer is as follows:
[0103]
[0104] in This indicates feature concatenation. Graph neural network encoder, Indicates the first Layer nodes The hidden representation, This represents the initial atomic feature vector of node i (i.e., the atomic feature vector after normalization in step a4, derived from the molecular graph). The atomic characteristic matrix x)
[0105] After completing the multi-layered Dense Block and Transition Layer, global average pooling is performed on the node-level features to achieve graph-level feature aggregation output:
[0106]
[0107] in, Indicates drug The graph-level structure represents vectors. Indicates drug The corresponding set of nodes in the molecular graph. This indicates the number of nodes (atoms) in the molecular diagram. This represents the final hidden representation vector of node 𝑣 in the last layer L, where L represents the total number of layers in the Dense-GCN encoder.
[0108] In an embodiment of the present invention, the number of DenseBlocks is set to 4, each DenseBlock contains 3 graph convolutional layers, and feature dimensionality reduction is performed between each DenseBlock through a Transition Layer to achieve global structure encoding of drug molecules.
[0109] A compact representation of the drug structure is then obtained through linear mapping.
[0110]
[0111] in , This represents the parameters of a learnable linear mapping. Representation of the structural-level characteristics of a drug;
[0112] Step b2: Drug text feature encoding, processed using a Transformer-based text encoder:
[0113] For the i-th drug Obtain the drug text token ID sequence generated in step a5 (denoted as...). First, the token ID sequence is mapped to a dense vector representation through an embedding layer, where each token ID is mapped to a 128-dimensional learnable vector. Then, positional encoding is introduced to preserve the positional information of each token in the sequence. The two are added together to obtain the input representation of the encoder.
[0114]
[0115] in This represents the embedded sequence representation. This represents the word embedding layer; PositionalEncoding represents the position encoding vector.
[0116] Then The input is a multi-layer Transformer encoder, with each layer employing four attention heads and two encoder layers. A multi-head self-attention mechanism is used to capture long-range dependencies in the text. Input multi-layer Transformer encoder:
[0117]
[0118] in This represents the encoded sequence representation, and the matrix represents the encoded sequence representation. Each row of the matrix corresponds to a contextualized representation vector of a token. This indicates a multi-layer Transformer encoder;
[0119] Then, average pooling is performed on the non-padding positions to obtain the text-level representation:
[0120]
[0121] in This represents the set of indices for valid tokens, where valid tokens refer to the tokens that actually carry textual semantic information; that is, the set of token positions that actually carry textual semantic information after excluding padding tags. Indicates the token's location index. Feature vectors representing drug text;
[0122] Step b3: Next, the multimodal features of the target protein are encoded:
[0123] Represents the set of all n proteins that are targets, targeting the set of n proteins. Obtain its corresponding amino acid sequence. ,in Indicates the first Each protein sequence consists of 1200 amino acid residues. Based on the predefined amino acid vocabulary VOCAB_PROTEIN, sequences are mapped to integer indices. This vocabulary contains 25 amino acid letter mappings, covering 20 standard amino acids (such as A, C, D, E, etc.) and 5 special cases (including rare amino acids B, O, U, Z and unknown amino acid X). Each character is mapped to an integer index from 1 to 25. The specific mapping rules are: A→1, C→2, B→3, E→4, D→5, G→6, F→7, I→8, H→9, K→10, M→11, L→12, O→13, N→14, Q→15, P→16, S→17, R→18, U→19, T→20, W→21, V→22, Y→23, X→24, Z→25; each mapped to an integer index from 1 to 25. To accommodate the fixed input dimension requirement of the model, the length of all protein sequences is uniformly set to 1200. For sequences shorter than 1200 characters, zero-padding is used to pad them; for sequences longer than 1200 characters, truncation is performed to obtain the integer encoded sequence. This refers to protein sequence characteristics.
[0124] Step b4: Protein sequence feature encoding is processed using a multi-scale convolutional neural network architecture. This encoder employs a parallel branch design, containing K=3 convolutional branches of different depths. Each branch has a different number of network layers to capture sequence patterns at different scales. The calculation process for the k-th branch is as follows:
[0125]
[0126] in Indicates the first This model has several convolutional subnetworks, where layer_num ∈ {1, 2, 3} convolutional layers. Indicates ReLU activation. This represents adaptive max pooling, which compresses a variable-length sequence into a fixed-dimensional vector.
[0127] Then, the outputs of all branches are concatenated and linearly merged:
[0128]
[0129] in This represents the sequence structure of a protein. , This represents the parameters of a learnable linear mapping. Indicates feature concatenation;
[0130] Step b5: The textual features of the target protein are encoded using the same Transformer architecture as the drug text encoder.
[0131] Functional text features of proteins First, the token is mapped to a dense vector representation through an embedding layer, and then positional encoding is introduced to preserve sequence order information.
[0132]
[0133] in The symbol represents the embedded sequence representation, and TransformerEncoder(⋅) represents a multi-layer Transformer encoder;
[0134] The embedded sequence is then input into a multi-layer Transformer encoder, employing four attention heads and two encoder layers. A multi-head self-attention mechanism is used to capture long-range dependencies in the text, which are then input into the multi-layer Transformer encoder.
[0135]
[0136] in It is a multi-layer Transformer encoder. This represents the encoded sequence.
[0137] Then, average pooling is performed on the non-padding positions to obtain the text-level representation:
[0138]
[0139] in This represents the set of indices for valid tokens, where valid tokens refer to the tokens that actually carry textual semantic information; that is, the set of token positions that actually carry textual semantic information after excluding padding tags. Indicates the token's location index. Feature vectors representing protein text;
[0140] Next, the encoded features are processed (training process) so that they can be input into the structure-text contrast learning model for training to obtain the projector in the projector module. The specific process of the structure-text contrast learning includes:
[0141] Step c1: To achieve multimodal feature alignment in contrastive learning, drug structure features and text features are mapped to a unified contrastive learning space using projectors. This invention designs four independent projection layers, with the drug structure projector defined as follows: = Projector_drug_struct( The `Projector_struct` is a two-layer multilayer perceptron containing ReLU activation functions and linear transformations; the drug text projector is defined as... = Projector_drug_text( Simultaneously, protein sequence projectors Projector_protein_sep and Projector_protein_text are created in the same manner.
[0142] Similarly, according to , Obtain the projection features of protein sequences onto text. , ;
[0143] The projected features are then subjected to L2 normalization, as follows:
[0144]
[0145] Normalized modal features This is used for subsequent comparison loss calculations and as input for the hybrid expert system;
[0146] Step c2: In the contrastive learning pre-training phase, the training objective of the model is to ensure that the representation of the same entity in different modalities remains highly consistent within a unified embedding space through cross-modal contrastive constraints. It should be noted that in actual training, data is processed using a mini-batch approach, with each training batch containing N samples. To distinguish different samples within a batch, a sample index i (i ∈ {1, 2, ..., N}) is introduced, and the normalized feature of the i-th sample is represented as... , Subscript form, etc.
[0147] In a training batch of size N, for the i-th drug sample, a cross-modal feature pair is constructed, and the positive sample pair is defined as... This indicates that the structural features and textual features of the same drug should have high similarity; negative sample pairs are defined as... This indicates that different drugs should have distinguishable semantic representations at the structural or textual level. The similarity function between structural and textual modalities is defined as cosine similarity. The cross-entropy loss in both the structure-to-text and text-to-structure directions is calculated. The contrastive learning loss from structure to text in the drug modality is defined as follows:
[0148]
[0149] The contrastive learning loss from text to structure is defined as follows:
[0150]
[0151] in This represents the cross-modal contrastive learning loss from the structural modality to the textual modality in the drug modality. Let represent the back-contrast learning loss from text modality to structural modality, N represent the number of samples in a training batch, i represent the index of the current query sample in the batch, j represent the index of the current query sample in the batch, and represent the indices of all candidate samples in the batch, where j=i corresponds to positive sample pairs and the rest are negative sample pairs. sim(⋅,⋅) represents the cosine similarity function between two normalized feature vectors, defined as: ; This represents the temperature parameter, which is set to 0.07 by default and is used to adjust the smoothness of the similarity distribution.
[0152] The total InfoNCE loss on the drug side was then calculated by summing and averaging.
[0153]
[0154] Simultaneously, the protein side was obtained using the same method. The contrastive learning loss is used, and the final InfoNCE loss is the sum of the losses in both directions, as shown below.
[0155]
[0156] Step c3: To avoid the dimensionality collapse problem common in contrastive learning, the Barlow Twins mechanism is introduced to explicitly promote feature decorrelation. It should be noted that the Barlow Twins loss calculation described in step c3 is only performed during the pre-training phase of contrastive learning to optimize the projector parameters; in the actual drug-target affinity prediction phase based on text guidance and hybrid expert networks, features are generated using only the trained projector and normalization operations. , Therefore, the contrastive learning loss is no longer calculated, and there is no need to construct a mini-batch.
[0157] Taking the drug structure-text modality as an example, in a mini-batch, the normalized feature vectors of all samples within the batch are stacked row-wise into a matrix. Taking the drug modality as an example, the structural features of N drug samples are... Stacked as normalized embedding matrices Similarly, the text features of N drug samples Stacked as normalized embedding matrices , where N is the batch size and D is the contrastive learning embedding dimension.
[0158] The cross-modal correlation matrix between structural modalities and textual modalities is defined as follows:
[0159]
[0160] The correlation matrix elements in The degree of linear correlation between the m-th embedding dimension of the object structure modality and the n-th embedding dimension of the text modality.
[0161] The Barlow Twins decorrelation loss definition mainly aligns the same dimensions and decorrelates different dimensions, with the aim of making the cross-modal correlation matrix C close to the identity matrix I. The corresponding loss function is defined as follows:
[0162]
[0163] Where m and n represent the feature dimension indices in the embedding space. The correlation between structural modalities and textual modalities on the m-th feature dimension should be constrained to be close to 1. (m≠n) represents the correlation between different feature dimensions, which should be constrained to be close to 0. This represents the penalty coefficient for off-diagonal terms, used to control the strength of feature decorrelation constraints.
[0164] protein side The calculations are similar to those for drug calculations, thus yielding the total... = ;
[0165] Step c4, the total loss function of the structure-text contrast learning model is defined as follows:
[0166] = + α
[0167] Where α is an adjustable parameter, α = 0.1;
[0168] InfoNCE loss provides the primary contrastive learning signal, learning discriminative feature representations by bringing positive sample pairs closer together and pushing negative sample pairs further apart. Barlow Twins loss serves as an auxiliary regularization term, preventing dimensionality collapse through feature decorrelation constraints and ensuring that different feature dimensions express complementary information. After training the structure-text contrastive learning model, drug and protein features achieve cross-modal alignment and feature redundancy removal. In the subsequent drug-target affinity prediction stage based on text guidance and a hybrid expert network, for a given drug-target pair, contrastive learning-optimized features need to be generated as input to the hybrid expert system. Specifically, the drug structure features extracted in step b1 are used... The projector (Projector_drug_struct) trained through contrastive learning is mapped to a unified embedding space, and the projected features are then L2 normalized to obtain the final drug contrastive learning optimized features. Similarly, the protein sequence features extracted in step b4 will be... Protein contrastive learning optimized features are obtained by mapping and normalizing using the Projector_protein_seq algorithm. Specifically, during the pre-training phase, four projectors (Projector_drug_struct, Projector_drug_text, Projector_protein_seq, and Projector_protein_text) were trained simultaneously. However, during the prediction phase, only Projector_drug_struct and Projector_protein_seq were used to generate the prediction function. and The text modality projector plays a cross-modal supervision role during the pre-training phase. Compared to the original features extracted in step b, this refers to the feature vectors directly output by each encoder in step b. , In comparison, the features optimized through contrastive learning , It possesses cross-modal semantic consistency, which is obtained through explicit learning of the contrastive constraints of InfoNCE loss. These normalized high-quality features will be directly input into the subsequent hybrid expert system for drug-target affinity prediction based on text guidance and hybrid expert networks, providing a multimodal feature foundation with consistent semantic representation and good generalization ability for the prediction task.
[0169] The specific implementation plan for the hybrid expert network module is as follows:
[0170] Step d1: After completing the cross-modal contrastive learning pre-training, the model obtains semantically aligned drug and protein representations. , (Step c4). The normalized drug features and protein features are concatenated along the feature dimension to obtain the joint features:
[0171]
[0172] in This joint feature simultaneously encodes drug structure semantics and protein sequence semantics;
[0173] To achieve dynamic selection and weighted fusion of experts, an adaptive gating network is designed to assign weights to the four experts. The gating network adopts a two-layer, multi-layer perceptron structure. This is used to assign weights to each expert. Input to adaptive network First, the joint features are mapped to a 128-dimensional hidden space through a first-layer linear transformation and the ReLU activation function. Then, a Dropout regularization layer is applied to prevent overfitting, followed by a second-layer linear transformation to map to a 4-dimensional output space, resulting in a gating mechanism used to assign weights to each expert, as follows:
[0174]
[0175] A learnable temperature parameter T > 0 is introduced to scale the gated logits, and the calculation formula is as follows:
[0176]
[0177] in The gating weight of the k-th expert reflects the degree of contribution of that expert to the current drug-target prediction, and T is a learnable temperature parameter that adjusts the smoothness of the weight distribution.
[0178] Finally, the gating weights corresponding to the four experts were obtained. , , , ], each weight This indicates the degree of contribution of the k-th expert to the prediction of the current sample.
[0179] Step d2: Design four expert networks with different structures to capture different types of drug-protein interaction patterns. The first expert is a collaborative attention expert, employing a multi-head cross-attention mechanism to model fine-grained interactions between drugs and proteins, simulating the mutual recognition mechanism between drugs and targets during molecular docking. First, the drug is represented... Protein representation Each layer is mapped to a 256-dimensional hidden space through a linear projection layer, and the calculation formula is as follows:
[0180]
[0181] in , Let be the projection weight matrix. , For bias vectors, , The projected drug / protein characteristics;
[0182] To adapt to the input format requirements of the multi-head attention mechanism, the projected features are expanded along the sequence dimension. Then, a multi-head cross-attention mechanism is employed, with dropout set to 0.1 to prevent overfitting. In this cross-attention mechanism, the query comes from one modality, while the key and value come from another. First, the attention from the drug to the protein is calculated:
[0183]
[0184] This operation allows drug characterization to focus on important regions within proteins;
[0185] The reverse attention from protein to drug was then calculated:
[0186]
[0187] This operation enables protein features to focus on key substructures in the drug, and the bidirectional attention results are then concatenated along the feature dimension as follows:
[0188]
[0189] The concatenated features are fed into a two-layer fusion MLP for nonlinear transformation, and finally the collaborative attention expert output is obtained after layer normalization (LayerNorm(64)). ,
[0190]
[0191] Step d3: The second expert is the Morgan fingerprint expert (MorganExpert), who combines traditional chemical information with deep semantic features to compensate for the shortcomings of deep learning models in terms of prior chemical knowledge. The expert's input features are divided into two paths: the first path is the Morgan molecular fingerprint. The second path involves concatenating vectors. The feature is processed to include high-level semantic information that has been aligned across modalities;
[0192] For the Morgan fingerprint branch, the 2048-dimensional binary vector is first mapped to a 256-dimensional hidden space through a first-layer fully connected network. The calculation formula is as follows.
[0193]
[0194] Following Dropout(0.1) regularization, the second fully connected network further extracts features, calculated using the following formula:
[0195]
[0196] in , This represents the weight matrix of a two-layer fully connected layer. , This represents the bias vector. This represents the intermediate representation after projection of chemical topological features;
[0197] For the contrastive learning feature branch, the concatenated features are mapped to a hidden space of the same dimension through a single-layer linear projection. The calculation formula is as follows:
[0198]
[0199] in Represents the hidden vector after projection of deep semantic features; and The weight matrix and thus the bias vector;
[0200] The two branches are concatenated along the feature dimension, and then subjected to nonlinear transformation and layer normalization through a two-layer fusion network to obtain the final result.
[0201]
[0202]
[0203]
[0204]
[0205] in , This represents the weights of the two layers of the fusion network. , Indicates bias. , This represents the hidden representation in the fusion network. This indicates the final expert output from Morgan. (⋅) indicates normalization along the feature dimension, which improves training stability;
[0206] Step d4, the third and fourth experts are domain-specific experts, mainly employing perceptron structures with different depths to process high-order abstract features and low-order detailed features respectively. These two experts complement each other, simultaneously supplementing the task-specific expert and providing feature abstraction capabilities at different depths. This expert receives joint features. As input, the transformations of the three-layer perceptron and the two-layer perceptron are performed as follows:
[0207]
[0208]
[0209]
[0210] in , , This represents the weight matrix of a three-layer fully connected layer. , , This represents the bias vector. , , This indicates a three-layer intermediate representation. The activation function provides nonlinear modeling capabilities; the three-layer network structure enables the expert to learn complex nonlinear mapping relationships, capture higher-order patterns in drug-protein interactions, and finally obtain the results after layer normalization.
[0211]
[0212] The fourth expert's processing complements that of the third expert, involving only two layers of perceptron transformation, as follows.
[0213]
[0214]
[0215] in , This represents the weights of two fully connected layers. , Indicates bias. , Indicates the middle representation;
[0216] Compared to deep expert networks, shallow expert networks have a smaller network depth, which preserves more low-level feature information, avoids the loss of details due to over-abstraction, and is also more computationally efficient. Layer normalization is then performed afterward.
[0217]
[0218] The output dimensions of the four experts were all unified at 64, capturing the feature representation of drug-protein interaction from four different perspectives: cross-attention interaction, chemical fingerprint fusion, deep abstraction, and shallow details. Through adaptive weighted fusion of gating networks, the complementary integration of diverse features was achieved.
[0219] Step d5: To ensure that all experts in the hybrid expert system can effectively participate in training and avoid model degradation caused by some experts being completely inactive, an expert load balance loss is introduced during the model training phase. This loss function is based on the average activation intensity of each expert by the gating network in the training batch, and only prompts the gating network to learn a relatively balanced expert weight allocation strategy during the training phase.
[0220] For a training batch (mini-batch) of size B, the gating network calculates expert weights for each sample within the batch (step d1). Let the gating weight assigned to the b-th sample (b=1,2,...,B) by the k-th expert (k=1,2,3,4) be . Then the average activation intensity of the k-th expert across the entire batch is:
[0221]
[0222] in This represents the average gating weight of the k-th expert in the current batch, reflecting the frequency of use of that expert, and can be represented as a vector.
[0223]
[0224] Load balancing loss is defined as the mean square error between the average weight of each expert and the ideal uniform distribution (1 / E, E=4):
[0225]
[0226] in = 4, This represents the load balancing loss, which encourages the gating network to assign relatively balanced weights to all experts, preventing some experts from being completely inactive and causing model degradation. The load balancing loss... This loss is calculated only during the model training phase and participates in backpropagation and parameter optimization as part of the total loss function (step e2). During the actual prediction phase (model inference), this loss does not need to be calculated; the gating network directly calculates expert weights for the input samples and performs weighted fusion.
[0227] Then, a dynamic weighted fusion of the expert outputs is performed, analyzing the output features of the four experts. And expert weights in gating network computation = [ , , , After that, the expert output is dynamically integrated through a weighted summation method.
[0228] For a single sample (or each sample in a batch), the four outputs are first stacked along the expert dimension to form a tensor.
[0229]
[0230] Then, the outputs of the four experts are weighted and summed using gating weights to obtain the final fused features:
[0231]
[0232] in, This represents the unified feature vector after fusion. This represents the gating weight of the k-th expert. This represents the output vector of the k-th expert.
[0233] Through this dynamic weighted fusion mechanism, the model can adaptively adjust the contribution levels of each expert based on different drug-target pairs: for some samples, the collaborative attention expert may receive higher weights (capturing key interactions); for other samples, the Morgan fingerprint expert may be more important (chemical structure matching). This adaptive fusion integrates diverse feature representations captured by the four experts from different perspectives, forming a comprehensive representation of drug-protein interactions. This provides high-quality input features for subsequent affinity regression prediction (step e).
[0234] Meanwhile, during the model training phase, for a batch of size B (e.g., B=256), it is necessary to simultaneously calculate the fusion features of each sample within the batch and the load balancing loss of all samples within the batch; in the model prediction phase and in practical applications, for the drug-target pair to be predicted, single-sample prediction or batch prediction can be performed, and the following process is executed: Step b extracts multimodal original features ( , (etc.), and obtain contrastive learning optimized features through the projector trained in step c1 and L2 normalization operation. (The loss calculations in steps c2 and c3 are not performed, as they are only used for parameter optimization during the pre-training phase.) Step d1 calculates the gating weights. Steps d2-d4 obtain the four expert outputs. Step d5 fuses the outputs to obtain the fused features. No need to calculate load balancing losses And it does not involve parameter optimization.
[0235] The processing steps of the drug-target regression prediction module include:
[0236] Step e1: Fuse features The final affinity prediction is performed by inputting a two-layer MLP regressor, and the calculation formula is as follows:
[0237]
[0238] in It consists of two fully connected layers. The first layer maps 64-dimensional features to 128-dimensional features and performs ReLU activation and Dropout (0.1) regularization. The second layer maps the 128-dimensional features to a 1-dimensional output to obtain the predicted drug-protein affinity value. The affinity prediction process in step e1 needs to be performed in both the model training and prediction phases. The training phase is used to calculate the loss between the predicted value and the true label, while the prediction phase directly outputs the predicted value ŷ as the final result.
[0239] Step e2: During the model training phase, calculate the drug-target affinity regression loss (Task Loss) based on the predicted value ŷ and the true label y. For training batches of size N, the main task regression loss is defined as the mean squared error (MSE):
[0240]
[0241] Where N represents the batch size. Representing the Drug-target affinity predicted for each sample. Indicates the first Authentic affinity labels for each sample;
[0242] The model's total loss function consists of three parts, which are jointly optimized using a weighted summation method:
[0243]
[0244] in The DTA main task regression loss (MSE) directly optimizes the accuracy of drug-target affinity prediction based on text guidance and hybrid expert networks. The structure-text contrastive learning loss optimizes the parameters of drug and protein encoders through cross-modal contrastive constraints, enabling different modal representations of the same entity to align in the embedding space while maintaining the discriminativeness and deredundancy of features. This represents the expert load balancing regularization term, which prompts the gating network to assign relatively balanced weights to all experts, preventing some experts from degenerating. These are the weighting coefficients.
[0245] During the training phase, training batches of size N contain N drug-target pairs and their true affinity labels. The process involves steps a (data preprocessing) → b (multimodal feature extraction) → c (contrastive learning feature alignment) → d (hybrid expert system) → e1 (affinity prediction). Simultaneously, loss calculation is performed, calculating L_task (step e2), L_contrastive (step c4), and L_balance (step d5), and then weighted summing to obtain the total loss L_total. Backpropagation is then performed, updating all network parameters (encoder, projector, expert network, gating network, regressor) through the gradient of L_total. This process is repeated until convergence or the maximum number of training epochs is reached.
[0246] In the prediction phase, i.e. model inference, the drug-target pair to be predicted is input (which can be a single sample or a batch of samples).
[0247] Forward propagation is performed as follows: Step a (data preprocessing) → Step b (multimodal feature extraction) → Step c1 (projection and normalization, using trained projector parameters) → Step d (hybrid expert system, using trained expert and gating network parameters) → Step e (affinity prediction, using trained regressor parameters); the predicted affinity value ŷ is then obtained. During the prediction phase, no loss (L_task, L_contrastive, L_balance) needs to be calculated; all network parameters are fixed, and only forward propagation is performed.
[0248] The proposed method was tested and evaluated on the Davis and KIBA datasets through various experiments, including five-fold cross-validation, warm start, cell line cold start, and drug cold start.
[0249] To verify and evaluate the performance of this application, it was evaluated on a dataset, and the mean squared error (MSE), concordance index (CI), and corrected coefficient of determination (COP) were used as the metrics. The specific calculation formula is as follows:
[0250]
[0251]
[0252] in Calculate the ordinary coefficient of determination:
[0253]
[0254] Forced regression through the origin:
[0255]
[0256] Correction indicators:
[0257]
[0258] To verify the robustness and generalization ability of the proposed method under different experimental environments, we conducted comparative experiments on the Davis and KIBA datasets. The proposed method was systematically compared with existing state-of-the-art methods (including KronRLS, SimBoost, DeepDTA, GraphDTA, AttentionDTA, TF-DTA, LLMDTA, GDilatedDTA, and CASTER-DTA). Experimental environments included five-fold cross-validation and ablation experiments. Detailed experimental results are shown in Tables 1-3 and [Table 4]. Figures 2-8 .
[0259] Table 1. Performance comparison results of five-fold cross-validation on the Davis dataset.
[0260]
[0261] Table 2. Performance comparison results of five-fold cross-validation on the KIBA dataset.
[0262]
[0263] Table 3 Ablation Experiment Results
[0264]
[0265] The results show that the method of the present invention exhibits excellent performance on various evaluation indicators, especially in core indicators such as CI and MSE, which are significantly better than other methods, further verifying the prediction performance of the present invention in multiple environmental scenarios.
[0266] To further explore the contributions of each module and feature to the overall architecture, this invention conducted ablation experiments, sequentially removing the structure-text contrast learning module, cross-attention expert, Morgan fingerprint expert, domain-general expert, and hybrid expert network module. The experimental results are detailed in Table 3. The comparison results show that the complete model outperforms the model with any component removed in all evaluation metrics, demonstrating the necessity and effectiveness of multimodal features, hybrid expert network design, and structure-text semantic feature learning in improving performance.
[0267] The above examples of the present invention are merely illustrative of the computational model and process of the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is impossible to exhaustively list all possible implementations here. Any obvious variations or modifications derived from the technical solutions of the present invention are still within the scope of protection of the present invention.< / unk> < / pad> < / sep> < / cls>
Claims
1. A drug-target affinity prediction method based on text guidance and hybrid expert networks, characterized in that, Prediction is performed based on a hybrid expert network cascaded prediction model, the model comprising: Data extraction and preprocessing module: used to obtain drug molecule maps. The amino acid sequence of the target protein ; Multimodal encoder: Performs multimodal encoding of features for drugs and proteins, including: Step b1: Map the drug molecules The input is processed by a densely connected graph convolutional neural network encoder, and then a compact representation of the drug structure is obtained through linear mapping. ; Step b3: Analyze the amino acid sequence. Encoding is performed to obtain protein sequence features; Step b4: For protein sequence features, a multi-scale convolutional neural network architecture is used for processing. The outputs of all branches are concatenated and linearly fused to obtain the protein sequence structure representation. ; Projector module: and The data are fed into their respective projectors and normalized to generate features. , ; Hybrid expert network module: Based on expert networks, fused features are obtained, including: Step d1, and Joint features are obtained by concatenating features along the feature dimension, and an expert-assigned weight vector is obtained through a gating network. Weighting of experts By introducing a learnable temperature parameter to scale and adjust the gated logits, the following is obtained: , ; Step d2, and Obtained through linear projection layers respectively and ; Subsequently, based on the multi-head cross-attention mechanism, the attention from drug to protein was calculated. Reverse attention from proteins to drugs And pieced together Then, the collaborative attention expert output is obtained through nonlinear transformation and layer normalization. ; Step d3: Processing is performed by Morgan fingerprint experts through a two-way branch. The first path, a fully connected network, processes the chemical fingerprint vector. Mapping and feature extraction are performed to obtain The second path uses a single-layer linear projection to... Mapping to obtain The two processing paths are concatenated along the feature dimension, and then obtained through nonlinear transformation and layer normalization. ; Step d4, the third expert network, and the fourth expert network employ perceptron structures with different numbers of layers, targeting... Features were obtained using third-party expert networks and fourth-party expert networks, respectively. and ; Step d5: Stack the four outputs along the expert dimension to form a tensor. Then, the outputs of the four experts are gated, weighted, and summed to obtain the final fusion feature. ; Drug-target regression prediction module: based on fusion features Perform affinity prediction.
2. The drug-target affinity prediction method based on text guidance and hybrid expert networks according to claim 1, characterized in that, The specific processing steps of the data extraction and preprocessing module include: Step a2: Obtain the SMILES string of the drug molecule, parse the SMILES string into a molecule object, represent the drug molecule as a graph structure to obtain an initial drug molecule graph, extract the atomic feature vector for each atomic node, and construct an atomic feature matrix; obtain the drug... Chemical fingerprint vector ; Step a3: Obtain the amino acid sequence of each target protein. ; Step a4: Perform standardization preprocessing on the initial drug molecule diagram structure data generated in step a2 to obtain the standardized drug molecule diagram. Drug molecular diagram It includes the atomic feature matrix, the edge index matrix, and the edge feature matrix.
3. The drug-target affinity prediction method based on text guidance and hybrid expert networks according to claim 1, characterized in that, The densely connected graph convolutional neural network encoder includes a DenseBlock module, a Transition Layer module, and a graph neural network encoder; DenseBlock internally configures multiple graph convolutional layers. Each graph convolutional layer receives the outputs of all preceding graph convolutional layers as input, performs non-linear transformation and neighborhood aggregation on node features, and configures a Transition Layer after each DenseBlock to perform feature dimensionality reduction through a linear projection layer. Let the first The output of layer graph convolution is The node-level feature propagation calculation for the l-th layer is as follows: in Indicates feature splicing, Graph neural network encoder, Indicates the first Layer nodes The hidden representation, This represents the initial atomic feature vector of node i, i.e., the normalized atomic feature vector. After completing the multi-layer Dense Block and Transition Layer, global average pooling is performed on the node-level features to obtain the graph-level feature aggregation result.
4. The drug-target affinity prediction method based on text guidance and hybrid expert networks according to claim 1, characterized in that, Step b3 describes the amino acid sequence... The encoding process includes: Obtain the corresponding amino acid sequence ,in Indicates the first Each protein sequence consists of 10 amino acid residues. Based on a predefined amino acid vocabulary, the sequence is mapped to an integer index representation. The length of all protein sequences is standardized to obtain an integer-coded sequence, i.e., the protein sequence feature. .
5. A drug-target affinity prediction method based on text guidance and hybrid expert networks according to any one of claims 1 to 4, characterized in that, The hybrid expert network cascaded prediction model is pre-trained, and the training process includes: Data extraction and preprocessing module: Obtaining drug molecule maps Drug text token ID sequence The amino acid sequence of the target protein Functional text of the target protein ; Multimodal encoder: This method involves multimodal encoding of features from drugs and proteins to obtain... and In addition, it is also used for the following modal encoding: For drug text token ID sequences The sequence representation is obtained based on a multi-layer Transformer encoder, and the text-level representation is obtained by average pooling at non-padding positions. ; Functional text features of proteins The encoded sequence representation is obtained using a multi-layer Transformer encoder. Average pooling is performed on non-padding positions to obtain the corresponding text-level representation. ; Projector module: for , and , Projection is performed using four independent projectors, and the contrastive learning loss is calculated through structure-text contrastive learning. ,include: Step c1, targeting , and , Features are obtained through their respective projectors , , , ; Step c2: In a training batch of size N, for the i-th drug sample, construct cross-modal feature pairs, where the positive sample pairs are... Negative sample pairs are ; , The feature corresponding to sample i , Similarly, the subscript j indicates the feature corresponding to sample j; Calculate the contrastive learning loss from structure to text in the drug modality based on contrastive learning. Contrastive learning loss from text to structure Then, the total InfoNCE loss on the drug side was calculated. ; The protein side was obtained using the same method. The contrastive learning loss is used to obtain the final InfoNCE loss. ; Step c3: For the drug modality, analyze the structural features of N drug samples. Stacked as normalized embedding matrices Text features of N drug samples Stacked as normalized embedding matrices The cross-modal correlation matrix between structural modalities and textual modalities is: The correlation matrix elements in The degree of linear correlation between the m-th embedding dimension of the structural modality and the n-th embedding dimension of the text modality; Barlow Twins decorrelation loss. Where m and n represent the feature dimension indices in the embedding space. This indicates the correlation between structural modality and textual modality on the m-th feature dimension. Indicates the correlation between different feature dimensions; This represents the penalty coefficient for off-diagonal terms; For protein modes, the Barlow Twin decorrelation loss was obtained using the same method. ; and thus obtain the total Barlow Twins dereferenced loss. ; Step c4: Calculate the contrastive learning loss = + α α is an adjustable parameter; Hybrid expert network module: Obtains fused features based on expert networks; calculates the loss function during the process of obtaining fused features based on expert networks, including: For a training batch of size B, the expert assignment weights are calculated based on each sample within the batch. corresponding Let the gating weight assigned to the b-th sample by the k-th expert be denoted as . For k=1,2,3,4, the average activation intensity of the k-th expert across the entire batch is: ,according to The mean square error between the average weight of each expert and the ideal uniform distribution is calculated as the load balancing loss. ; Drug-target regression prediction module: based on fusion features Affinity prediction is performed, and the total loss is calculated. The total loss is then used to train a hybrid expert network cascaded prediction model. Calculate total loss ,in To calculate the drug-target affinity regression loss based on predicted values and true labels, To compare learning loss, For load balancing losses; These are the weighting coefficients.
6. The drug-target affinity prediction method based on text guidance and hybrid expert networks according to claim 5, characterized in that, During the training of the hybrid expert network cascaded prediction model, the specific processing steps of the data extraction and preprocessing module include: Step a1: Obtain multimodal data on drug-target interactions, including drug molecular structure data, protein sequence data, and affinity tag data; Step a2: Obtain the SMILES string of the drug molecule, parse the SMILES string into a molecule object, represent the drug molecule as a graph structure to obtain an initial drug molecule graph, extract the atomic feature vector for each atomic node, and construct an atomic feature matrix; obtain the drug... Chemical fingerprint vector ; For each drug SMILES molecular formula string Obtain the corresponding PubChem compound identifier (CID), and retrieve the functional description text of the compound based on the CID. ; Step a3: Obtain the amino acid sequence of each target protein. and its functional description text ; Step a4: Perform standardization preprocessing on the initial drug molecule diagram structure data generated in step a2 to obtain the standardized drug molecule diagram. Drug molecular diagram Includes atomic feature matrix, edge index matrix, and edge feature matrix; Independent word segmenters are constructed for the drug text descriptions obtained in step a2 and the protein text descriptions obtained in step a3, respectively. Each word segmenter determines tokens based on the text description and determines the mapping relationship between all tokens and integer IDs. The drug word segmenter encodes the drug text into a sequence of drug text token IDs. The protein segmenter encodes protein text into a sequence of protein text token IDs. This refers to the functional text of proteins.
7. The drug-target affinity prediction method based on text guidance and hybrid expert networks according to claim 5, characterized in that, Functional text for proteins The multi-layer Transformer encoder is used for processing drug text token ID sequences. The multi-layer Transformer encoders used in the processing employ the same Transformer architecture.
8. The drug-target affinity prediction method based on text guidance and hybrid expert networks according to claim 5, characterized in that, Contrastive learning loss from structure to text in drug modality Contrastive learning loss from text to structure They are as follows: in This represents the cross-modal contrastive learning loss from the structural modality to the textual modality in the drug modality. Let represent the back-contrast learning loss from text modality to structural modality, N represent the number of samples in a training batch, i represent the index of the current query sample in the batch, j represent the index of the current query sample in the batch, and represent the indices of all candidate samples in the batch, where j=i corresponds to positive sample pairs, and the rest are negative sample pairs. The cosine similarity function represents the similarity between two normalized feature vectors; This indicates the temperature parameter.
9. The drug-target affinity prediction method based on text guidance and hybrid expert networks according to claim 5, characterized in that, Drug-target affinity regression loss was calculated based on predicted values and the actual label. Where N represents the batch size. Representing the Drug-target affinity predicted for each sample. Indicates the first Authentic affinity labels for each sample.
10. The drug-target affinity prediction method based on text guidance and hybrid expert networks according to claim 5, characterized in that, Load balancing losses ,in = 4.