Model training method and device, equipment, medium and program product
By training the target encoder, the joint characterization of compound and gene data is achieved, and the problem of poor prediction results in multiple types of joint perturbations and out-of-distribution scenarios in the prior art is solved, and the effect of perturbations prediction and the scalability of the model is improved.
Patent Information
- Application Number
- CN202411398633.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2024-12-20
AI Technical Summary
The existing perturbation prediction model is difficult to achieve good results in multiple types of joint perturbations and external distribution scenarios, and it is difficult to realize the joint characteristic representation of compound perturbations and gene perturbations.
By obtaining compound and gene training data, initializing the encoder, feature processing and projecting the data, calculating protein-compound alignment loss values, and training the target encoder to achieve joint characterization of compound and gene data to improve the perturbation prediction effect.
The characteristic representation of compounds and gene perturbation sources is enhanced, the perturbation prediction effect in different application scenarios is improved, and the scalability and generalization of the target encoder is improved.
Smart Images

Figure CN119170110A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a model training method, device, equipment, medium and program product. Background Art
[0002] In the field of life sciences and clinical medicine, in vitro perturbation experiments are an important way to explore the effects of drug stimulation or changes in the expression state of certain genes on organisms. These experiments involve adding a certain concentration of drugs to cell lines cultured in vitro, or changing gene expression through clustered regularly interspaced shortpalindromic repeats (CRISPR) knockout technology. Then, by measuring the gene expression level and comparing it with the unperturbed control group, the effect of the perturbation source on the biological function of the target cell can be obtained.
[0003] Perturbation analysis is of great significance in the field of life sciences for exploring regulatory relationships between genes, drug target discovery, and drug action mechanisms. The perturbation response prediction algorithm models perturbation data, using endogenous perturbations (genetic perturbations) or exogenous perturbations (drug stimulation) as input to predict the impact of perturbations on the cellular level. However, the input data of current perturbation prediction models usually uses a single perturbation source characterization method, so it is difficult for the trained perturbation prediction model to achieve good results in multi-type joint perturbations and out-of-distribution scenarios.
[0004] Therefore, there is an urgent need for a method that can realize joint feature representation of multiple disturbance sources, so as to increase the application scenarios of disturbance prediction models. Summary of the invention
[0005] The embodiments of the present application provide a model training method, apparatus, device, medium and program product for jointly learning the feature representations of compound disturbance sources and gene disturbance sources, thereby enhancing the feature representations of compound disturbance sources and gene disturbance sources, and further enabling compound disturbance sources and gene disturbance sources to have better disturbance prediction effects in different application scenarios.
[0006] In view of this, the present application provides, on the one hand, a model training method, comprising: obtaining compound training data, gene training data, an initial compound encoder and an initial protein encoder; calling the initial compound encoder to perform feature processing on the compound training data to obtain compound representation data of the compound training data; calling the initial protein encoder to perform feature processing on the gene training data to obtain protein representation data of the gene training data; projecting the compound representation data to a target representation space to obtain projected compound representation data, and projecting the protein representation data to the target representation space to obtain projected protein representation data; determining a protein-compound alignment loss value based on the projected compound representation data and the projected protein representation data; training the initial compound encoder and the initial protein encoder based on the protein-compound alignment loss value to obtain a target encoder, wherein the target encoder includes a target compound encoder and a target protein encoder.
[0007] On the other hand, the present application provides a model training device, including: an acquisition module for acquiring compound training data, gene training data, an initial compound encoder, and an initial protein encoder;
[0008] A processing module is used to call the initial compound encoder to perform feature processing on the compound training data to obtain compound representation data of the compound training data; call the initial protein encoder to perform feature processing on the gene training data to obtain protein representation data of the gene training data; project the compound representation data to the target representation space to obtain projected compound representation data, and project the protein representation data to the target representation space to obtain projected protein representation data; determine a protein-compound alignment loss value based on the projected compound representation data and the projected protein representation data;
[0009] A training module is used to train the initial compound encoder and the initial protein encoder based on the protein-compound alignment loss value to obtain a target encoder, wherein the target encoder includes a target compound encoder and a target protein encoder.
[0010] In one possible design, in another implementation of another aspect of an embodiment of the present application, the processing module is used to obtain a protein graph self-supervised loss value of the initial protein encoder based on the gene training data, and the protein graph self-supervised loss value is used to train the initial protein encoder.
[0011] In one possible design, in another implementation of another aspect of an embodiment of the present application, the training module is used to train the initial compound encoder and the initial protein encoder based on the protein-compound alignment loss value and the protein graph self-supervision loss value to obtain a target encoder.
[0012] In one possible design, in another implementation of another aspect of the embodiment of the present application, the processing module is used to extract features from the gene training data to obtain sequence features of the gene training data;
[0013] constructing an initial protein graph corresponding to the gene training data based on the sequence features;
[0014] The initial protein encoder is called to perform feature processing on the initial protein graph to obtain protein characterization data of the gene training data.
[0015] In one possible design, in another implementation of another aspect of the embodiment of the present application, the processing module is used to extract features from the gene training data to obtain sequence features of the gene training data;
[0016] constructing an initial protein graph corresponding to the gene training data based on the sequence features;
[0017] Performing enhancement processing on the initial protein map to obtain a first enhanced protein map and a second enhanced protein map, wherein the first enhanced protein map is different from the second enhanced protein map;
[0018] Performing enhancement processing on the initial protein map to obtain an enhanced protein map for prediction and an enhanced protein map for self-supervised learning, wherein the enhanced protein map for prediction and the enhanced protein map for self-supervised learning are different;
[0019] Calling the initial protein encoder to perform feature extraction on the enhanced protein graph for prediction to obtain a feature representation to be predicted, wherein the feature representation to be predicted serves as the protein characterization data;
[0020] Calling a third-party encoder to perform feature extraction on the enhanced protein graph for self-supervised learning to obtain a feature representation to be learned;
[0021] Calling the prediction network to predict the feature representation to be predicted to obtain the predicted feature representation;
[0022] The protein graph self-supervision loss value is determined based on the feature representation to be learned and the predicted feature representation.
[0023] In one possible design, in another implementation of another aspect of the embodiment of the present application, the processing module is used to calculate the cosine similarity between the feature representation to be learned and the predicted feature representation to obtain the protein graph self-supervision loss value.
[0024] In one possible design, in another implementation of another aspect of the embodiment of the present application, the processing module is used to obtain a text string representation corresponding to the compound training data;
[0025] The ECFP4 feature extraction method is used to obtain the compound features corresponding to the text string representation;
[0026] The initial compound encoder is called to perform feature processing on the compound features to obtain compound characterization data of the compound training data.
[0027] In one possible design, in another implementation of another aspect of the embodiment of the present application, the acquisition module is used to acquire disturbance data, where the disturbance data is at least one of gene disturbance data and compound disturbance data;
[0028] The processing module 202 is used to call the target encoder to perform feature extraction on the disturbance data to obtain a disturbance feature representation of the disturbance data;
[0029] The disturbance prediction model is called to predict the disturbance feature representation to obtain a disturbance prediction result, and the disturbance prediction model is a trained model.
[0030] In one possible design, in another implementation of another aspect of an embodiment of the present application, when the disturbance data is gene disturbance data, the processing module is used to call the target protein encoder in the target encoder to perform feature extraction on the gene disturbance data to obtain a disturbance feature representation of the gene disturbance data.
[0031] In one possible design, in another implementation of another aspect of the embodiment of the present application, the processing module is used to obtain a target sequence feature of the gene perturbation data, wherein the target sequence feature is used as an initial feature representation of the gene perturbation data;
[0032] Obtaining edges between the target sequence feature and other nodes in the target protein encoder, so that the gene perturbation data serves as a target node of the target protein encoder;
[0033] The feature representation of the gene perturbation data is updated using a graph conduction mechanism to obtain a perturbation feature representation of the gene perturbation data.
[0034] In one possible design, in another implementation of another aspect of an embodiment of the present application, when the disturbance data is compound disturbance data, the processing module is used to call the target compound encoder in the target encoder to perform feature extraction on the compound disturbance data to obtain a disturbance feature representation of the compound disturbance data.
[0035] In one possible design, in another implementation of another aspect of the embodiment of the present application, the disturbance data is compound disturbance data and gene disturbance data; the processing module is used to call the target compound encoder in the target encoding to perform feature extraction on the compound disturbance data to obtain a compound feature representation of the compound disturbance data;
[0036] Calling a target protein encoder in the target encoder to perform feature extraction on the gene perturbation data to obtain a protein feature representation of the gene perturbation data;
[0037] The compound feature representation of the compound perturbation data and the protein feature representation of the gene perturbation data are used as the perturbation feature representation of the perturbation data.
[0038] In one possible design, in another implementation of another aspect of the embodiment of the present application, the processing module is used to call the target encoder to perform feature extraction on the first disturbance training data to obtain a first disturbance feature representation;
[0039] Training an initial first disturbance prediction model based on the first disturbance feature representation to obtain a first disturbance prediction model;
[0040] Calling the target encoder to perform feature extraction on second perturbation training data to obtain a second perturbation feature representation, wherein the second perturbation training data and the first perturbation training data are perturbation training data of different types;
[0041] The first disturbance prediction model is fine-tuned based on the second disturbance feature representation to obtain a second disturbance prediction model.
[0042] In one possible design, in another implementation of another aspect of the embodiment of the present application, the acquisition module is used to acquire the data to be processed and the data to be recalled;
[0043] Calling the target encoder to perform feature processing on the data to be processed to obtain a feature representation of the second data to be processed;
[0044] Calling the target encoder to perform feature processing on the to-be-recalled data to obtain a to-be-recalled feature representation corresponding to the to-be-recalled data;
[0045] The target data corresponding to the data to be processed is determined based on the feature representation to be processed and the feature representation to be recalled.
[0046] In one possible design, in another implementation of another aspect of the embodiment of the present application, the data to be processed is gene target data, and the data to be recalled is compound data;
[0047] The processing module is used to calculate the similarity between the feature representation to be processed and the feature representation to be recalled in the target representation space;
[0048] The compound data corresponding to the feature representation to be recalled whose similarity meets the threshold range is selected as the target data corresponding to the gene target data.
[0049] In one possible design, in another implementation of another aspect of the embodiment of the present application, the data to be processed is compound data, and the data to be recalled is gene target data;
[0050] The processing module is used to calculate the similarity between the feature representation to be processed and the feature representation to be recalled in the target representation space;
[0051] The gene target data corresponding to the feature representation to be recalled whose similarity meets the threshold range is selected as the target data corresponding to the compound data.
[0052] Another aspect of the present application provides a computer device, including: a memory, a processor, and a bus system;
[0053] Wherein, the memory is used to store programs;
[0054] The processor is used to execute the program in the memory, and the processor is used to execute the above-mentioned methods according to the instructions in the program code;
[0055] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0056] Another aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.
[0057] Another aspect of the present application provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided by the above aspects.
[0058] It can be seen from the above technical scheme that the embodiments of the present application have the following advantages: the gene data and compound data are encoded separately to obtain their respective corresponding representations, and then the representations of the gene data and the compound data are projected in the same representation space, and the loss value is calculated based on the projected representation. Finally, the protein encoder corresponding to the gene data and the compound encoder corresponding to the compound data are trained according to the loss value. In this way, the representations of the gene data and the compound data can be brought closer, so as to learn more general feature representations, so that the protein encoder and the compound encoder can extract richer feature representations for the gene data and the compound data, so that the compound disturbance source and the gene disturbance source have better disturbance prediction effects in different application scenarios, and finally the scalability and generalization of the target encoder in subsequent disturbance prediction are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 This is a schematic diagram of an application scenario architecture of the model training method in an embodiment of the present application;
[0060] Figure 2 A schematic diagram of a flow chart of a model training method in an embodiment of the present application;
[0061] Figure 3 This is a schematic diagram of an embodiment of the model training method in the embodiment of the present application;
[0062] Figure 4 This is a schematic diagram of an embodiment of the target encoder applied to disturbance prediction in an embodiment of the present application;
[0063] Figure 5 This is a schematic diagram of an embodiment of the target encoder applied to perturbation model training in an embodiment of the present application;
[0064] Figure 6 This is a schematic diagram of an embodiment of the target encoder used in the present application to match compounds with gene targets;
[0065] Figure 7 This is a schematic diagram of an embodiment of a model training device in an embodiment of the present application;
[0066] Figure 8 This is a schematic diagram of an embodiment of a server in an embodiment of the present application;
[0067] Fig. 9 This is an illustration of an embodiment of a terminal device in the embodiments of the present application. DETAILED DESCRIPTION
[0068] The embodiments of the present application provide a model training method, apparatus, device, medium and program product for jointly learning the feature representations of compound disturbance sources and gene disturbance sources, thereby enhancing the feature representations of compound disturbance sources and gene disturbance sources, and further enabling compound disturbance sources and gene disturbance sources to have better disturbance prediction effects in different application scenarios.
[0069] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0070] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0071] The prediction of gene perturbations or compound perturbations is an important direction in the fields of life sciences, clinical medicine, bioinformatics, computational biology, and drug development. It aims to predict the gene expression of cells under the influence of perturbation sources (also known as perturbation analysis) through computational methods and algorithms, protein sequence features based on gene data, or features, structures, or other related information of compounds. Perturbation analysis is of great significance in exploring the regulatory relationship between genes, drug target discovery, and drug action mechanisms in the field of life sciences. The perturbation response prediction algorithm models the perturbation data, using endogenous perturbations (genetic perturbations) or exogenous perturbations (drug stimulation) as input to predict the effects of perturbations on the cellular level. However, the input data of the current perturbation prediction model usually adopts a single perturbation source characterization method, so it is difficult for the perturbation prediction model trained to obtain good results in multi-type joint perturbations and out-of-distribution scenarios. Therefore, there is an urgent need for a method that can realize the joint feature representation of multiple perturbation sources, thereby increasing the application scenarios of the perturbation prediction model.
[0072] In order to solve the above technical problems, the present application provides the following technical solutions: obtaining compound training data, gene training data, an initial compound encoder and an initial protein encoder; calling the initial compound encoder to perform feature processing on the compound training data to obtain compound characterization data of the compound training data; calling the initial protein encoder to perform feature processing on the gene training data to obtain protein characterization data of the gene training data; projecting the compound characterization data to a target characterization space to obtain projected compound characterization data, and projecting the protein characterization data to the target characterization space to obtain projected protein characterization data; determining a protein-compound alignment loss value based on the projected compound characterization data and the projected protein characterization data; training the initial compound encoder and the initial protein encoder based on the protein-compound alignment loss value to obtain a target encoder, wherein the target encoder includes a target compound encoder and a target protein encoder. In this way, the genetic data and compound data are encoded separately to obtain their respective corresponding representations, and then the representations of the genetic data and the compound data are projected in the same representation space, and the loss value is calculated based on the projected representation. Finally, the protein encoder corresponding to the genetic data and the compound encoder corresponding to the compound data are trained according to the loss value. In this way, the representations of the genetic data and the compound data can be brought closer, thereby learning a more general feature representation, which enables the protein encoder and the compound encoder to extract richer feature representations for the genetic data and the compound data, so that the compound perturbation source and the genetic perturbation source have better perturbation prediction effects in different application scenarios, and ultimately improve the scalability and generalization of the target encoder in subsequent perturbation prediction.
[0073] Exemplarily, the target encoder trained by the model training method provided in this application can be applied to one or more of the following application scenarios, as follows:
[0074] Perturbation response prediction: By predicting the unknown omics features and phenotypic measurements of cells after perturbation, relevant associations of the biological basis of the perturbation effect are obtained. Among them, an example of predicting omics features may be predicting the RNA expression of cell types after perturbation. This phenotypic measurement is often directly relevant to drug discovery; for example, when selecting chemotherapy drugs for patients, it may be applicable to predict drug sensitivity of intratumor heterogeneity. When predicting perturbation response, the target encoder can be used to extract features of the corresponding perturbation source, and then the feature representation of the perturbation source can be predicted using the trained perturbation prediction model to obtain the prediction result. Alternatively, the target encoder can be used to extract features from the training data, train the perturbation prediction model, and finally use the perturbation prediction model to predict the perturbation response.
[0075] Target and mechanism prediction: predict the protein targets and pathways activated by the compound. It can be used to characterize new compounds, estimate side effects or reposition in drug discovery. When predicting targets and mechanisms, the target encoder can be used to extract features of the corresponding compound or gene target, and then the projected representation space during training can be used to recall compounds or gene targets that are useful for the gene target or compound.
[0076] Perturbation interaction prediction: Compounds or gene perturbations may have synergistic and antagonistic effects, which are increasingly important for the development of combined treatments. On the other hand, for gene perturbations, understanding the interactions between gene targets can clarify network effects. When predicting perturbation interactions, the target encoder can be used to extract features from the corresponding compounds and gene targets, and then the features of the compounds and gene targets are predicted based on the trained perturbation prediction model to obtain the prediction results. Alternatively, the target encoder can be used to extract features from the training data, train the perturbation prediction model, and finally use the perturbation prediction model to predict the perturbation response.
[0077] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
[0078] The embodiments of the present application can be applied to scenarios such as artificial intelligence, intelligent medical care, and prediction of gene perturbations. The following is an example of the prediction of gene perturbations. An exemplary architecture of this scenario can be found in Figure 1 The architecture includes a terminal 100, a server 200, a database 300 and a network 400. The terminal 100, the server 200 and the database 300 are connected via the network 400. The database 300 is used to store gene training data, compound training data, gene perturbation training data and compound perturbation training data. Figure 1 The number of terminals, servers, and databases in the system shown is for example only. For example, the number of terminals, servers, and databases may be multiple, and the embodiments of the present application do not limit the number of terminals, servers, and databases.
[0079] The terminal 100 communicates with the server 200 through a network, and the database 300 can be integrated on the server 200, or placed on a cloud or other server. In the above model training process, the terminal 100 and the server 200 can interact with each other. For example, the user uploads the corresponding gene training data and compound training data through the terminal 100, and the terminal 100 sends the gene training data and compound training data to the server 200.
[0080] The terminal 100 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, etc., but is not limited thereto. The server 200 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), big data and artificial intelligence platforms.
[0081] Database 300, in short, can be regarded as an electronic filing cabinet - a place to store electronic files, where users can add, query, update, delete, etc. the data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application program. Database Management System (DBMS) is a computer software system designed for managing databases, generally with basic functions such as storage, interception, security, and backup. Database management systems can be classified according to the database model it supports, such as relational, Extensible Markup Language (XML); or according to the type of computer supported, such as server clusters, mobile phones; or according to the query language used, such as Structured Query Language (SQL), XQuery; or according to the performance impulse focus, such as maximum scale, maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMS can cross categories, for example, supporting multiple query languages at the same time.
[0082] Based on the above description, Figure 2 The flowchart shown illustrates the model training in this application:
[0083] The model receives two input data, compound training data and gene training data; then calls the compound encoder to encode the compound training data to obtain compound representation data, and calls the protein encoder to encode the gene training data to obtain protein representation data; then combines the prior knowledge of establishing the compound-gene interaction graph, and maps and matches the encoded representations of the compound training data and the gene training data (i.e., compound representation data and protein representation data) in the same representation space. By synchronously training the protein encoder, compound encoder, and compound-target gene matching module, the unified representation of the compound training data and the gene training data is finally achieved for various disturbance prediction tasks.
[0084] In the process of encoding the gene training data, the self-supervised graph learning process of the protein encoder can also be added. Figure 2 As shown, protein sequence feature extraction is performed on gene training data to obtain sequence features of gene training data; then an initial protein graph is constructed based on the sequence features; then a preset proportion of node features and edge numbers are randomly discarded from the initial protein graph to obtain two added graphs; then self-supervised learning is performed based on the two added graphs to obtain a self-supervised loss value of the protein graph.
[0085] It can be understood that in the specific embodiments of the present application, related data such as gene training data, compound training data, gene perturbation training data, compound perturbation training data, perturbation data, data to be recalled and data to be processed are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0086] Combined with the above introduction, the model training method in this application will be introduced below. Please refer to Figure 3 , an embodiment of the model training method in the embodiment of the present application includes:
[0087] 301. Obtain compound training data, gene training data, initial compound encoder, and initial protein encoder.
[0088] In this embodiment, the compound training data may be drug data collected by a third party, and the gene training data may be reference gene data of humans. It should be understood that the compound training data may also include concentration data of the compound, for example, the compound training data may be set as follows: when the concentration of compound A is 10%, it may be set as one compound training data, and when the concentration of compound A is 20%, it may be set as another compound training data. Of course, the concentration data may also be used as an additional feature of compound A, that is, the compound training data may be set as follows: compound A, its concentration data includes 10% and 20%.
[0089] At the same time, the initial compound encoder and the initial protein encoder are used to convert chemical structures and biomacromolecule structures into numerical representations that can be processed by machine learning models, and their structures can adopt different types of neural network architectures, such as recurrent neural network (RNN), graph neural network (GNN) or transformer model, which are not specifically limited here.
[0090] 302. Call the initial compound encoder to perform feature processing on the compound training data to obtain compound characterization data of the compound training data.
[0091] In this embodiment, each compound in the compound training data can be represented by a text string representation (Simplified Molecular-Input Line-Entry System, SMILES), and then the ECFP4 method is used to extract the 2048-dimensional compound fingerprint binary features, and then the compound fingerprint binary features are feature processed by the initial compound encoder to obtain the compound characterization data of the compound training data. Among them, the SMILES is a text string representation method for describing chemical structures. It can represent the structure of a molecule in a concise and unique way, including information such as atoms, chemical bonds, functional groups, etc. The SMILES string can be parsed by chemical information software for storage, retrieval and visualization of chemical structures in chemical databases. Among them, the rules of the SMILES string include: 1. Each atom is represented by its element symbol. 2. A short line (-) is used between atoms to represent a single bond. 3. Double bonds are represented by an equal sign (=), and triple bonds are represented by a pound sign (#). 4. The ring structure uses a number to represent the size of the ring, for example [1] represents a six-membered ring. 5. Branches are represented by brackets (()), and numbers are added before the brackets to indicate the connection position of the branch. 6. Charges are represented by + or -, followed by numbers to indicate the number of charges. In an exemplary scheme, the SMILES of a water molecule (H2O) is represented by: O; the SMILES of methane (CH4) is represented by: C; the SMILES of ethanol (C2H6O) is represented by: CCO; the SMILES of a benzene ring (C6H6) is represented by: c1ccccc1; the SMILES of aspirin (acetylsalicylic acid) is represented by: CC(=O)OC1=CC=CC=C1C(=O)O.
[0092] In addition to the above SMILES representation, compounds can also be represented by other chemical structure representation methods. The following is an explanation of various representation methods:
[0093] 1. InChI (IUPAC International Chemical Identifier): InChI is a standardized method for representing chemical structures. It provides a more detailed and standardized way to describe molecules, including stereochemical information. For example, the InChI representation of water is: InChI = 1S / H2O / h1H2.
[0094] 2. MOL file: MOL file is a file format for storing chemical structures, commonly used in cheminformatics software. It contains detailed information such as atoms, bonds, charges, and stereochemistry of the molecule. MOL files are binary formats and usually require specific chemical software to read.
[0095] 3. MDL MOL file: It is a variant of the MOL file format and is widely used in the field of cheminformatics.
[0096] 4. CML (Chemical Markup Language): CML is an XML-based markup language used to describe chemical information, including molecular structure, reaction and spectral data. It is an extensible language that can contain rich chemical data and metadata.
[0097] 5. 2D coordinate representation: This method directly uses the two-dimensional or three-dimensional coordinates of each atom in the molecule to represent the molecular structure. This representation method is often used in molecular modeling and visualization software.
[0098] 6. Graphical representation: Directly display the molecular structure in a graphical way, such as a molecular diagram drawn using chemical drawing software. This representation method is intuitive, but not as easy to machine process as the text representation method.
[0099] 7. IUPAC naming: In addition to the structural representation method, IUPAC also provides a set of naming rules for describing molecular structures in text form. This method is widely used in the literature, but it is not as intuitive as the structural representation method.
[0100] 8. RDKit: RDKit is an open source cheminformatics software library that provides a variety of chemical structure representation and processing tools, including SMILES, InChI and other formats.
[0101] Meanwhile, the ECFP4 (Extended-Connectivity Fingerprints of radius 4) is a method for molecular feature extraction that generates circular topological fingerprints of molecules by iterating the atoms in each molecule and retrieving all possible molecular paths based on a specified radius. These fingerprints can be used for molecular similarity search, structure-activity modeling, etc. The specific implementation process is as follows: 1. Initial atom identifier assignment: First, an initial integer identifier is assigned to each non-hydrogen atom in the input molecule. This identifier captures some local information about the corresponding atom, such as atomic number, connection count, etc., through a hash function. 2. Iterative update identifier: Then, a series of iterations are performed to combine the initial atom identifier with the identifiers of neighboring atoms until the specified diameter is reached. Each iteration captures a larger and larger circular neighborhood, and then these identifiers are encoded into a single integer value using an appropriate hashing method, and these identifiers are collected into a list. 3. Configure ECFP: ECFP provides a wealth of configuration parameters that can be specified in an XML file, such as maximum diameter, fingerprint length, and identifier count. For example, ECFP4 means that the maximum diameter is set to 4. 4. Generate ECFP: ECFP can be generated using different tools, such as Chemaxon's GenerateMD command line tool or DescriptorGenerator API. For example, using the GenerateMD command line tool, the '-D' option can be used to select the identifier list output, and the '-2' option can be used to select the fixed-length bit string output. In an exemplary scheme, the ECFP4 fingerprint of a water molecule can be as follows:
[0102] smiles=“O”
[0103] ecfp=ECFP_from_smiles(smiles,R=2,L=1024)
[0104] print(ecfp)
[0105] It should be understood that in addition to ECFP4, commonly used molecular fingerprinting methods include:
[0106] 1. MACCS fingerprint: This is a substructure-based fingerprint that uses a set of predefined substructures (such as 166 or 960) to represent molecules. The presence or absence of each substructure determines whether a bit in the fingerprint is 1 or 0.
[0107] 2. PubChem Fingerprint: This is a substructure-based fingerprint containing 881 substructures for similarity search, covering a wide range of substructures and functional groups.
[0108] 3. Daylight fingerprint: This is a topology or path-based fingerprint that generates fingerprints by analyzing the paths in molecules. It is suitable for fast substructure search and molecular filtering.
[0109] 4. Circular Fingerprints: This type of fingerprint is centered on each non-hydrogen atom in the molecule and iteratively extends the molecular fragment to its neighbors according to predefined rules until a specific radius is reached.
[0110] 5. Atom Pairs and Topological Torsions: These are topological based fingerprints that are generated by analyzing the atom pairs and tetrahedral torsion in the molecule.
[0111] 6. Pharmacophore fingerprint: This type of fingerprint takes into account the 3D information of the molecule, such as hydrogen bond donors, hydrogen bond acceptors, hydrophobic centers, etc., and considers the spatial relationship between these features.
[0112] 7. Shape-based molecular fingerprints: Such as ROCS and USR, these fingerprints are based on the spatial volume and surface properties of molecules and are used for shape-based similarity assessment.
[0113] 8. Protein-ligand interaction molecular fingerprints: such as SPLIF and SIFt, these fingerprints encode information about protein-ligand interactions, such as hydrogen bonds, ionic interactions, etc.
[0114] 9. Enhanced molecular fingerprints: These are formed by modifying the classical molecular fingerprints based on the advancements in cheminformatics to improve the performance.
[0115] 10. Multiple molecular fingerprints: that is, combining multiple molecular fingerprints to capture multiple characteristics of compounds and improve prediction performance.
[0116] Each fingerprint method has its own characteristics and applicable scenarios. Choosing the right fingerprint method depends on the research purpose and available tools. For example, RDKit is an open source chemical informatics toolkit that supports a variety of fingerprint algorithms, including Topological Fingerprints, MACCS, Atom Pairs, Topological Torsions, and MorganFingerprints, which are widely used in drug design, biological activity prediction, and other fields.
[0117] 303. Call the initial protein encoder to perform feature processing on the gene training data to obtain protein representation data of the gene training data.
[0118] In this embodiment, the model training device can use a self-supervised learning graph neural network (i.e., Graphboostrap) to perform feature processing on the gene training data to obtain protein representation data of the gene training data.
[0119] In the exemplary scheme, the specific process can be as follows: extracting features from the gene training data to obtain sequence features of the gene training data; constructing an initial protein graph corresponding to the gene training data based on the sequence features; calling the initial protein encoder to perform feature processing on the initial protein graph to obtain protein characterization data of the gene training data.
[0120] It should be understood that other methods may be used to construct the initial protein map, such as building a map based on an existing Protein-Protein Interaction or GO knowledge base.
[0121] In practical applications, since the perturbation of intracellular genes will eventually be reflected in the content of proteins transcribed and translated, and proteins are the ultimate executors of functions in organisms, when encoding gene perturbations in this method, the encoding is based on the protein level corresponding to the gene. When extracting features from the gene training data, the following technical solution can be used to obtain the sequence features of the gene training data: the model training device extracts the 1280-dimensional sequence features of the protein corresponding to each gene training data based on the pre-trained protein language model ESM2, and uses it as the sequence features of each gene training data.
[0122] Among them, the pre-trained protein language model ESM2 can capture the evolutionary information and complex biological characteristics of proteins by learning a large amount of protein sequence data, so as to be used in a variety of biological tasks, such as protein structure prediction, functional annotation and variation impact analysis. The core of the ESM2 model is the Transformer architecture, which consists of multiple levels of self-attention mechanisms and feedforward neural networks. The self-attention mechanism allows the model to consider the relationship between each position in the sequence when processing the sequence, while the feedforward neural network further processes and integrates this information. ESM2 introduces the encoding of evolutionary information in the model, which enables the model to learn the conservation and variability of protein sequences during evolution, thereby improving the accuracy of prediction. In addition, ESM2 uses a multi-head attention mechanism to analyze sequence information from multiple angles and scales to obtain a more comprehensive representation of sequence features. The introduction of position encoding maintains the order information of elements in the sequence, helping the model understand the relative relationship between different positions in the sequence. The input of the ESM2 model is the amino acid sequence of the protein, which can be obtained by experimental sequencing or bioinformatics prediction. The model extracts information by encoding these sequences for use in subsequent prediction tasks. The output is a three-dimensional structure prediction of the protein, usually expressed in the form of atomic coordinates, which describe the spatial position of each atom in the protein molecule and can be used for further biophysical analysis and molecular simulation.
[0123] After obtaining the sequence features of the gene training data, the model training device constructs the initial protein graph based on the sequence features, and the construction method thereof may be as follows:
[0124] That is, each gene training data is used as a node of the initial protein graph, and the feature of each node is the sequence feature of the corresponding gene training data, and the edge between nodes is the similarity between the sequence features of each gene training data. In an exemplary scheme, based on the mmseq2 sequence alignment algorithm, the sequence similarity between all about 20,000 human reference gene-encoded proteins is calculated, and the edges between all nodes are represented as an adjacency matrix to construct an initial protein graph. That is, assuming that the initial protein graph is G = (X, A), where X is used to indicate a node (i.e., gene training data), and its node feature can be expressed as A is used to indicate the edges between nodes (also called adjacency matrix), which can be expressed as
[0125] Based on the above scheme, in this embodiment, in order to enable the protein encoder to learn more feature representations of genetic data, thereby improving the accuracy of subsequent perturbation prediction, self-supervised learning of the protein encoder can be added during the encoding process of the genetic training data, that is, the protein graph self-supervised loss value of the initial protein encoder can be obtained based on the genetic training data during the training process. The specific process can be as follows: feature extraction is performed on the gene training data to obtain sequence features of the gene training data; an initial protein graph corresponding to the gene training data is constructed based on the sequence features; the initial protein graph is enhanced to obtain a first enhanced protein graph (i.e., a protein graph used for feature extraction and then predicted to obtain a prediction result) and a second enhanced protein graph (i.e., a feature representation is obtained for feature extraction, but the feature representation is used for self-supervised learning with the prediction result of the first enhanced protein graph), wherein the first enhanced protein graph is different from the second enhanced protein graph (i.e., different nodes and edges are discarded according to a preset ratio); the initial protein encoder is called to perform feature extraction on the first enhanced protein graph to obtain a feature representation to be predicted, wherein the feature representation to be predicted is used as the protein representation data; a third-party encoder is called to perform feature extraction on the second enhanced protein graph to obtain a feature representation to be learned; a prediction network is called to predict the feature representation to be learned to obtain a predicted feature representation; and a self-supervised loss value of the protein graph is determined based on the feature representation to be learned and the predicted feature representation. In an exemplary embodiment, the model training device can generate different enhanced graphs of the initial protein graph by randomly discarding a fixed proportion of node features and edge numbers. and For example, assuming that the initial protein graph includes nodes 1 to 100, including edges 1 to 200, nodes 1, 4, 6, and edges 1, 5, 7, 9, and 10 can be discarded to obtain the enhanced graph G1; nodes 2, 4, 5, and edges 3, 6, 2, 8, and 10 can be discarded to obtain the enhanced graph G2. Then the generated new graphs are respectively passed through the initial protein encoder ε of the graph neural network structure θ and third-party encoders The initial protein encoder generates the feature representation to be predicted from the enhanced graph G1 The third-party encoder generates the second feature representation of the enhanced graph G2 Then, the feature to be predicted is represented as Through a node-level predictor p of a fully connected neural network structure θ , output prediction feature representation Finally, and The cosine similarity between them is used for self-supervised learning to obtain the protein graph self-supervised loss value, so that the predicted target representation of each node Closer to the true target representation During training, only Perform gradient accumulation and update, third-party encoder parameters Then it is updated as the exponential moving average of θ. Compared with the traditional graph self-supervised learning framework based on contrastive learning, the training framework using the third-party encoder combined with the initial protein encoder does not need to construct a large number of negative samples. While retaining the training effect, it reduces the training time and space cost by an order of magnitude, and can be efficiently expanded to large-scale protein similarity graphs. Among them, the loss function of the protein graph self-supervised loss value is It can be expressed as:
[0126]
[0127] Where N is the number of nodes in the initial protein graph, Indicates that the i-th node is The above feature representation is Similarly, θ and denote the parameters of the initial protein encoder and the third-party encoder, respectively. It is updated according to the exponential moving average of θ. i , based on the extracted sequence features, the constructed protein graph G′=(X′,A′) can be constructed by passing through the initial protein encoder ε θ , get the characterization
[0128] It should be understood that when learning the initial protein encoder, in addition to the above-mentioned self-supervised learning method, a graph comparison learning method can also be used, which is not specifically limited here.
[0129] 304 . Project the compound characterization data onto the target characterization space to obtain projected compound characterization data, and project the protein characterization data onto the target characterization space to obtain projected protein characterization data.
[0130] In this embodiment, after obtaining the compound characterization data of the compound training data and the protein characterization data of the gene training data, in order to further learn the complementary information of the two disturbance sources, the compound characterization data and the protein characterization data can be projected in the target characterization space to obtain a new characterization. That is, the compound characterization data is projected into the target characterization space to obtain the projected compound characterization data, and the protein characterization data is projected into the target characterization space to obtain the projected protein characterization data.
[0131] Among them, the process of projecting to the representation space usually involves mapping the data from its original form or high-dimensional space to a low-dimensional space, so that the representation space can capture the important features and structure of the data. The specific process of projecting to the representation space can be as follows: first, the feature representation of each data is obtained (i.e., the compound representation data and protein representation data mentioned above); then, the compound representation data and protein representation data are mapped from the high-dimensional space to the low-dimensional space through the corresponding data; then, the high-level representation of the compound representation data and protein representation data is learned through a neural network; finally, the compound representation data and protein representation data are put into a new feature space, in which similar data points are close to each other in the feature space, while dissimilar data points are far apart.
[0132] 305 . Determine a protein-compound alignment loss value based on the projected compound characterization data and the projected protein characterization data.
[0133] In this embodiment, after the compound characterization data and the protein characterization data are projected into the target projection space, self-supervised contrastive learning can be used to achieve feature learning between the projected compound characterization data and the projected protein characterization data and obtain the protein-compound alignment loss value. The protein-compound alignment loss value can be expressed as follows:
[0134]
[0135] in, and It represents the characteristic representation of compounds and genes in the same space (i.e., the projected compound representation data and the projected protein representation data) obtained by encoding and mapping the i-th compound-gene sample pair through the multimodal encoder, and N represents the number of sample pairs in each batch.
[0136] 306. Train the initial compound encoder and the initial protein encoder based on the protein-compound alignment loss value to obtain a target encoder, wherein the target encoder includes a target compound encoder and a target protein encoder.
[0137] In this embodiment, after obtaining the protein-compound alignment loss value, the parameters of the initial compound encoder and the initial protein encoder can be reversely trained according to the protein-compound alignment loss value to obtain a target compound encoder and a target protein encoder.
[0138] It should be understood that if the above-mentioned protein graph self-supervision loss value is added during the training process, during the final training, the model training device should comprehensively consider the protein-compound alignment loss value and the protein graph self-supervision loss value to reversely train the parameters of the initial compound encoder and the initial protein encoder to obtain the target compound encoder and the target protein encoder.
[0139] In this embodiment, the target compound encoder and the target protein encoder will be used as a whole encoder in subsequent practical applications.
[0140] In this embodiment, the reverse training is a standard algorithm for training models, which minimizes the loss function by calculating the gradient of the loss function with respect to the network parameters and updating these parameters. The name of reverse training comes from its calculation process: the calculation of the gradient is performed from the output end of the network to the input end (i.e., reverse). The following are the key steps of reverse training: First, forward propagation (Forward Pass): that is, the input data is fed into the neural network. It can also be understood as inputting the training data into the initial compound encoder and the initial protein encoder. The data is processed by the neurons of each layer, and the output of each layer becomes the input of the next layer. After processing all layers, the predicted output of the network is obtained. Then, the loss (Loss Calculation) is calculated: the loss function value is calculated according to the predicted output and the true label, and the loss function is an indicator for evaluating the accuracy of the model prediction. Backward propagation (Backward Pass) is then performed: that is, starting from the output layer, the gradient of the loss function with respect to the network parameters (weights and biases) is calculated. The gradient of each layer parameter is recursively calculated using the chain rule (Chain Rule). The gradient represents the slope of the loss function in the parameter space, indicating how to adjust the parameters to reduce the loss. Finally, the parameters are updated according to the back-propagated gradient value: gradient descent or its variants (such as stochastic gradient descent, Adam optimizer, etc.) are used to update the network parameters according to the calculated gradient. The magnitude of the update is usually determined by the learning rate. During the training process, it is usually necessary to update the parameters multiple times, that is, the iterative process of training. Specifically, the above process is repeated until the performance of the model on the training set no longer improves, or the predetermined number of iterations is reached.
[0141] The above describes the training process of the target encoder, and the following describes the practical application of the target encoder.
[0142] In an exemplary embodiment, Figure 4 As shown, the target encoder can be applied to disturbance prediction. The disturbance prediction is described with the server as the execution subject. The specific process can be as follows:
[0143] 401. Obtain disturbance data, where the disturbance data is at least one of gene disturbance data and compound disturbance data.
[0144] In this embodiment, the server receives disturbance data sent by a third party. In actual applications, for different disturbance prediction scenarios, the disturbance data can be different disturbance sources. For example, when applied to a single gene disturbance prediction scenario, the disturbance data is the gene disturbance data; when applied to a single compound disturbance prediction scenario, the disturbance data is the compound disturbance data; when applied to a comprehensive scenario of gene disturbance measurement and compound disturbance prediction, the disturbance data is compound disturbance data and gene disturbance data.
[0145] 402. Call the target encoder to perform feature extraction on the disturbance data to obtain a disturbance feature representation of the disturbance data.
[0146] In this embodiment, for different disturbance prediction scenarios, different encoders in the target encoder may be called to perform feature extraction on the disturbance data to obtain disturbance feature representation of the disturbance data.
[0147] In an exemplary scheme, when applied to a single gene perturbation prediction scenario, the target protein encoder in the target encoder can be called to perform feature extraction on the gene perturbation data to obtain a perturbation feature representation of the gene perturbation data.
[0148] When feature extraction is performed on the gene perturbation data based on the target protein encoder, the specific process may be as follows: obtaining a target sequence feature of the gene perturbation data, wherein the target sequence feature is used as an initial feature representation of the gene perturbation data; obtaining edges between the target sequence feature and other nodes in the target protein encoder, so that the gene perturbation data is used as a target node of the target protein encoder; and updating the feature representation of the gene perturbation data using a graph conduction mechanism to obtain a perturbation feature representation of the gene perturbation data.
[0149] In another exemplary embodiment, when applied to a single compound disturbance prediction scenario, the target compound encoder in the target encoder may be called to perform feature extraction on the compound disturbance data to obtain a disturbance feature representation of the compound disturbance data.
[0150] In another exemplary scheme, when applied to a compound and gene comprehensive perturbation prediction scenario, the target compound encoder in the target encoding is called to perform feature extraction on the compound perturbation data to obtain a compound feature representation of the compound perturbation data; the target protein encoder in the target encoder is called to perform feature extraction on the gene perturbation data to obtain a protein feature representation of the gene perturbation data; wherein the compound feature representation of the compound perturbation data and the protein feature representation of the gene perturbation data are used as the perturbation feature representation of the perturbation data.
[0151] 403. Calling a disturbance prediction model to predict the disturbance feature representation to obtain a disturbance prediction result, wherein the disturbance prediction model is a trained model.
[0152] In this embodiment, after the server obtains the disturbance feature representation of the disturbance data, the server may input the disturbance feature representation into a trained disturbance prediction model to obtain a disturbance prediction result.
[0153] In an exemplary embodiment, Figure 5 As shown, the target encoder can be applied to the training scenario of the disturbance prediction model. The disturbance prediction is explained with the server as the execution subject. The specific process can be as follows:
[0154] 501. Call the target encoder to perform feature extraction on first disturbance training data to obtain a first disturbance feature representation.
[0155] In this embodiment, the server obtains first perturbation training data, wherein the first perturbation training data may be training data with a limited amount of data. Then the server calls the target encoder to perform feature extraction on the first perturbation training data to obtain a first perturbation feature representation of the first perturbation training data.
[0156] In an exemplary embodiment, the first perturbation training data may be gene perturbation data or the first perturbation training data may be compound perturbation data.
[0157] Based on the above description, the method for the target encoder to extract features from the first disturbance training data may be as follows:
[0158] When the first perturbation training data is gene perturbation data, the server may call a target protein encoder in the target encoder to perform feature extraction on the gene perturbation data to obtain a protein perturbation feature representation of the gene perturbation data.
[0159] When feature extraction is performed on the gene perturbation data based on the target protein encoder, the specific process may be as follows: obtaining a target sequence feature of the gene perturbation data, wherein the target sequence feature is used as an initial feature representation of the gene perturbation data; obtaining edges between the target sequence feature and other nodes in the target protein encoder, so that the gene perturbation data is used as a target node of the target protein encoder; and using a graph conduction mechanism to update the feature representation of the gene perturbation data to obtain a protein perturbation feature representation of the gene perturbation data.
[0160] When the first perturbation training data is compound perturbation data, the server may call a target compound encoder in the target encoder to perform feature extraction on the compound perturbation data to obtain a compound perturbation feature representation of the compound perturbation data.
[0161] 502. Train an initial first disturbance prediction model based on the first disturbance feature representation to obtain a first disturbance prediction model.
[0162] In this embodiment, after acquiring the first disturbance feature representation, the server trains the initial first disturbance prediction model based on the first disturbance feature representation to obtain a first disturbance prediction model.
[0163] It should be understood that if the first perturbation training data is gene perturbation data, then the first perturbation prediction model is a gene perturbation prediction model; if the first perturbation training data is compound perturbation data, then the first perturbation prediction model is a compound perturbation prediction model.
[0164] 503. Call the target encoder to perform feature extraction on second perturbation training data to obtain a second perturbation feature representation, wherein the second perturbation training data and the first perturbation training data are perturbation training data of different types.
[0165] In this embodiment, the server obtains the second perturbation training data, wherein the second perturbation training data may be training data with a large amount of data. Then the server calls the target encoder to perform feature extraction on the second perturbation training data to obtain a second perturbation feature representation of the second perturbation training data.
[0166] In an exemplary embodiment, the second perturbation training data may be gene perturbation data or the second perturbation training data may be compound perturbation data, as long as the second perturbation training data is of a different type from the first perturbation training data.
[0167] Based on the above description, the method for the target encoder to extract features from the second perturbation training data may be as follows:
[0168] When the second perturbation training data is gene perturbation data, the server may call a target protein encoder in the target encoder to perform feature extraction on the gene perturbation data to obtain a protein perturbation feature representation of the gene perturbation data.
[0169] When feature extraction is performed on the gene perturbation data based on the target protein encoder, the specific process may be as follows: obtaining a target sequence feature of the gene perturbation data, wherein the target sequence feature is used as an initial feature representation of the gene perturbation data; obtaining edges between the target sequence feature and other nodes in the target protein encoder, so that the gene perturbation data is used as a target node of the target protein encoder; and using a graph conduction mechanism to update the feature representation of the gene perturbation data to obtain a protein perturbation feature representation of the gene perturbation data.
[0170] When the second perturbation training data is compound perturbation data, the server may call a target compound encoder in the target encoder to perform feature extraction on the compound perturbation data to obtain a compound perturbation feature representation of the compound perturbation data.
[0171] 504. Fine-tune the first disturbance prediction model based on the second disturbance feature representation to obtain a second disturbance prediction model.
[0172] In this embodiment, after acquiring the second disturbance feature representation, the server performs data fine-tuning on the first disturbance prediction model based on the second disturbance feature representation to obtain the second disturbance prediction model.
[0173] It should be understood that if the second perturbation training data is gene perturbation data, then the second perturbation prediction model is a gene perturbation prediction model; if the second perturbation training data is compound perturbation data, then the second perturbation prediction model is a compound perturbation prediction model.
[0174] In an exemplary embodiment, Figure 6 As shown, the target encoder can also be used in compound or gene matching scenarios.
[0175] 601. Obtain data to be processed and data to be recalled.
[0176] In this embodiment, the server receives the data to be processed sent by the third party; at the same time, the server can also use the matching data of the data to be processed as the data to be recalled. For example, when the data to be processed is gene target data, the data to be recalled can be set as compound data; when the data to be processed is compound data, the data to be recalled can be set as gene target data.
[0177] 602. Call the target encoder to perform feature processing on the data to be processed to obtain a feature representation of the data to be processed.
[0178] In this embodiment, for different matching scenarios, different encoders in the target encoder may be called to perform feature extraction on the data to be processed, so as to obtain a feature representation of the second data to be processed.
[0179] In an exemplary scenario, when applied to a scenario of recalling compound data, that is, when the data to be processed is gene target data, the target protein encoder in the target encoder can be called to perform feature extraction on the gene target data to obtain a feature representation of the gene target data to be processed.
[0180] When feature extraction is performed on the gene target data based on the target protein encoder, the specific process may be as follows: obtaining the target sequence feature of the gene target data, wherein the target sequence feature serves as the initial feature representation of the gene target data; obtaining the edge between the target sequence feature and other nodes in the target protein encoder, so that the gene target data serves as the target node of the target protein encoder; and using the graph conduction mechanism to update the feature representation of the gene target data to obtain the feature representation to be processed of the gene target data.
[0181] In another exemplary embodiment, when applied to the scenario of recalling gene target data, that is, when the data to be processed is compound data, the target compound encoder in the target encoder can be called to perform feature extraction on the compound data to obtain the feature representation to be processed of the compound data.
[0182] 603. Call the target encoder to perform feature processing on the data to be recalled to obtain feature representations of the data to be recalled corresponding to the data to be recalled.
[0183] In this embodiment, for different matching scenarios, different encoders in the target encoder may be called to perform feature extraction on the data to be recalled, so as to obtain a feature representation of the data to be recalled.
[0184] In an exemplary scheme, when applied to a scenario of recalling gene target data, that is, when the data to be recalled is gene target data, the target protein encoder in the target encoder can be called to perform feature extraction on the gene target data to obtain feature representation of the gene target data to be recalled.
[0185] When feature extraction is performed on the gene target data based on the target protein encoder, the specific process may be as follows: obtaining the target sequence feature of the gene target data, wherein the target sequence feature serves as the initial feature representation of the gene target data; obtaining the edge between the target sequence feature and other nodes in the target protein encoder, so that the gene target data serves as the target node of the target protein encoder; and using the graph conduction mechanism to update the feature representation of the gene target data to obtain the feature representation to be recalled of the gene target data.
[0186] In another exemplary embodiment, when applied to a scenario of recalling compound data, that is, when the data to be recalled is compound data, the target compound encoder in the target encoder may be called to perform feature extraction on the compound data to obtain feature representation of the compound data to be recalled.
[0187] 604. Determine target data corresponding to the data to be processed based on the second feature representation to be processed and the feature representation to be recalled.
[0188] In this embodiment, according to different matching schemes, when performing data recall, the specific process may be as follows:
[0189] In an exemplary solution, the data to be processed is gene target data, and the data to be recalled is compound data. The specific process may be as follows: the server calculates the similarity between the feature representation to be processed and the feature representation to be recalled in the target representation space; the compound data corresponding to the feature representation to be recalled whose similarity meets the threshold range is selected as the target data corresponding to the gene target data. That is, the similarity between the features of the gene target data and the compound data in the target representation space is calculated, and the compounds ranked in the top N in similarity are selected as the matching compounds of the gene target data.
[0190] In another exemplary solution, the second data to be processed is compound data, and the data to be recalled is gene target data. The specific process may be as follows: the server calculates the similarity between the feature representation to be processed and the feature representation to be recalled in the target representation space; the gene target data corresponding to the feature representation to be recalled whose similarity meets the threshold range is selected as the target data corresponding to the compound data. That is, the similarity between the features of the compound data and the gene target data in the target representation space is calculated, and the gene target data ranked in the top N in similarity is selected as the matching gene target of the compound data.
[0191] The model training device in this application is described in detail below. Figure 7 , Figure 7 This is a schematic diagram of an embodiment of a model training device in an embodiment of the present application. The model training device 20 includes:
[0192] An acquisition module 201 is used to acquire compound training data, gene training data, an initial compound encoder and an initial protein encoder;
[0193] The processing module 202 is used to call the initial compound encoder to perform feature processing on the compound training data to obtain compound representation data of the compound training data; call the initial protein encoder to perform feature processing on the gene training data to obtain protein representation data of the gene training data; project the compound representation data to the target representation space to obtain projected compound representation data, and project the protein representation data to the target representation space to obtain projected protein representation data; determine a protein-compound alignment loss value based on the projected compound representation data and the projected protein representation data;
[0194] The training module 203 is used to train the initial compound encoder and the initial protein encoder based on the protein-compound alignment loss value to obtain a target encoder, wherein the target encoder includes a target compound encoder and a target protein encoder.
[0195] In an embodiment of the present application, a model training device is provided. The above device is used to encode gene data and compound data respectively to obtain their corresponding representations, and then the representations of gene data and compound data are projected in the same representation space, and the loss value is calculated based on the representation after projection, and finally the protein encoder corresponding to the gene data and the compound encoder corresponding to the compound data are trained according to the loss value, so that the representations of gene data and compound data can be brought closer, so as to learn more general feature representations, so that the protein encoder and compound encoder can extract richer feature representations for gene data and compound data, so that the compound disturbance source and the gene disturbance source have better disturbance prediction effects in different application scenarios, and finally improve the scalability and generalization of the target encoder in subsequent disturbance prediction.
[0196] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application,
[0197] The processing module 202 is used to obtain a protein graph self-supervised loss value of the initial protein encoder based on the gene training data, and the protein graph self-supervised loss value is used to train the initial protein encoder.
[0198] In an embodiment of the present application, a model training device is provided. By using the above device, during the training process, in the encoding process of the gene training data, self-supervised learning of the protein encoder is added, so that the protein encoder can learn more feature representations of the gene data, thereby improving the accuracy of subsequent disturbance prediction.
[0199] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application, the training module 203 is used to train the initial compound encoder and the initial protein encoder based on the protein-compound alignment loss value and the protein graph self-supervision loss value to obtain a target encoder.
[0200] In an embodiment of the present application, a model training device is provided. Using the above device, two types of loss values are comprehensively considered during the training process, so that the complementary information of different modalities can promote the feature representation of each modality in joint training, thereby improving the accuracy of subsequent perturbation prediction, while increasing the versatility and generalization of protein encoders and compound encoders.
[0201] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application,
[0202] The processing module 202 is used to extract features from the gene training data to obtain sequence features of the gene training data;
[0203] constructing an initial protein graph corresponding to the gene training data based on the sequence features;
[0204] The initial protein encoder is called to perform feature processing on the initial protein graph to obtain protein characterization data of the gene training data.
[0205] In the embodiment of the present application, a model training device is provided. The above device is used to extract the features of the target protein sequence corresponding to the gene training data, and a self-supervised graph neural network is established to learn the feature representation of the target protein sequence, so that the perturbation of the gene data can be better predicted with the help of the propagation mechanism of the graph model, thereby increasing the generalization and scalability of the protein encoder.
[0206] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application,
[0207] The processing module 202 is used to extract features from the gene training data to obtain sequence features of the gene training data;
[0208] constructing an initial protein graph corresponding to the gene training data based on the sequence features;
[0209] Performing enhancement processing on the initial protein map to obtain an enhanced protein map for prediction and an enhanced protein map for self-supervised learning, wherein the enhanced protein map for prediction and the enhanced protein map for self-supervised learning are different;
[0210] Calling the initial protein encoder to perform feature extraction on the enhanced protein graph for prediction to obtain a feature representation to be predicted, wherein the feature representation to be predicted serves as the protein characterization data;
[0211] Calling a third-party encoder to perform feature extraction on the enhanced protein graph for self-supervised learning to obtain a feature representation to be learned;
[0212] Calling the prediction network to predict the feature representation to be predicted to obtain the predicted feature representation;
[0213] The protein graph self-supervision loss value is determined based on the feature representation to be learned and the predicted feature representation.
[0214] In an embodiment of the present application, a model training device is provided. The above device is used to extract the features of the target protein sequence corresponding to the gene training data, and a self-supervised graph neural network is established to learn the feature representation of the target protein sequence. In this way, the perturbation of the gene data can be better predicted with the help of the propagation mechanism of the graph model, thereby increasing the generalization and scalability of the protein encoder. The training framework that uses a third-party encoder and a protein encoder does not require the construction of a large number of negative samples, which reduces the training time and space costs by an order of magnitude while retaining the training effect, and can be efficiently expanded to large-scale protein similarity graphs.
[0215] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application, the processing module 202 is used to calculate the cosine similarity of the feature representation to be learned and the predicted feature representation to obtain the self-supervised loss value of the protein graph.
[0216] In an embodiment of the present application, a model training device is provided. By using the above device, the protein encoder is trained using a self-supervised learning framework of cosine similarity, which can improve the training efficiency of the protein encoder.
[0217] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application, the processing module 202 is used to obtain a text string representation corresponding to the compound training data;
[0218] The ECFP4 feature extraction method is used to obtain the compound features corresponding to the text string representation;
[0219] The initial compound encoder is called to perform feature processing on the compound features to obtain compound characterization data of the compound training data.
[0220] In an embodiment of the present application, a model training device is provided. Using the above device, the compound training data is represented by a text string, and the compound features represented by the text string are obtained using the ECPF4 feature extraction method, so that the feature representation of the compound data can be effectively obtained, thereby improving the accuracy of subsequent disturbance prediction.
[0221] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application,
[0222] The acquisition module 201 is used to acquire disturbance data, where the disturbance data is at least one of gene disturbance data and compound disturbance data;
[0223] The processing module 202 is used to call the target encoder to perform feature extraction on the disturbance data to obtain a disturbance feature representation of the disturbance data;
[0224] The disturbance prediction model is called to predict the disturbance feature representation to obtain a disturbance prediction result, and the disturbance prediction model is a trained model.
[0225] In an embodiment of the present application, a model training device is provided. Using the above device, the protein encoder and the compound encoder can learn more common representations through joint projection training during the training process, thereby extracting richer feature representations for gene data and compound data, and ultimately improving the scalability and generalization of the target encoder. At the same time, the protein encoder and the compound encoder learn richer feature representations for the input data, which can improve the prediction accuracy of the disturbance prediction model.
[0226] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application,
[0227] When the disturbance data is gene disturbance data, the processing module 202 is used to call the target protein encoder in the target encoder to perform feature extraction on the gene disturbance data to obtain a disturbance feature representation of the gene disturbance data.
[0228] In an embodiment of the present application, a model training device is provided. Using the above device, when the trained target encoder is applied to a gene perturbation scenario, only the target protein encoder can be used to encode the gene perturbation data, that is, the target protein encoder can be applied to a single gene perturbation or multi-gene perturbation prediction scenario.
[0229] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application,
[0230] The processing module 202 is used to obtain a target sequence feature of the gene perturbation data, wherein the target sequence feature is used as an initial feature representation of the gene perturbation data;
[0231] Obtaining edges between the target sequence feature and other nodes in the target protein encoder, so that the gene perturbation data serves as a target node of the target protein encoder;
[0232] The feature representation of the gene perturbation data is updated using a graph conduction mechanism to obtain a perturbation feature representation of the gene perturbation data.
[0233] In the embodiment of the present application, a model training device is provided. The above device is used to extract the features of the target protein sequence corresponding to the gene training data, and a self-supervised graph neural network is established to learn the feature representation of the target protein sequence, so that the perturbation of the gene data can be better predicted with the help of the propagation mechanism of the graph model, thereby increasing the generalization and scalability of the protein encoder.
[0234] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application,
[0235] When the disturbance data is compound disturbance data, the processing module 202 is used to call the target compound encoder in the target encoder to perform feature extraction on the compound disturbance data to obtain a disturbance feature representation of the compound disturbance data.
[0236] In an embodiment of the present application, a model training device is provided. Using the above device, when the trained target encoder is applied to a compound disturbance scenario, only the target compound encoder can be used to encode the compound disturbance data, that is, the target compound encoder can be applied to a single compound disturbance or a multi-compound disturbance prediction scenario.
[0237] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application,
[0238] The disturbance data is compound disturbance data and gene disturbance data; the processing module 202 is used to call the target compound encoder in the target encoding to perform feature extraction on the compound disturbance data to obtain a compound feature representation of the compound disturbance data;
[0239] Calling a target protein encoder in the target encoder to perform feature extraction on the gene perturbation data to obtain a protein feature representation of the gene perturbation data;
[0240] The compound feature representation of the compound perturbation data and the protein feature representation of the gene perturbation data are used as the perturbation feature representation of the perturbation data.
[0241] In an embodiment of the present application, a model training device is provided. Using the above device, when the trained target encoder is applied to the compound and gene perturbation scenario, the target compound encoder can be used to encode the compound perturbation data and the target protein encoder can be used to encode the gene perturbation data, that is, the target encoder can be applied to the compound and gene perturbation prediction scenario.
[0242] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application, the processing module 202 is used to call the target encoder to perform feature extraction on the first disturbance training data to obtain a first disturbance feature representation;
[0243] Training an initial first disturbance prediction model based on the first disturbance feature representation to obtain a first disturbance prediction model;
[0244] Calling the target encoder to perform feature extraction on second perturbation training data to obtain a second perturbation feature representation, wherein the second perturbation training data and the first perturbation training data are perturbation training data of different types;
[0245] The first disturbance prediction model is fine-tuned based on the second disturbance feature representation to obtain a second disturbance prediction model.
[0246] In an embodiment of the present application, a model training device is provided. Using the above device, a first disturbance prediction model is obtained by training a target encoder based on the first type of training data, and then the first disturbance prediction model is fine-tuned using the second type of disturbance training data, so that cross-modal disturbance source response pre-training and fine-tuning can be performed in a scenario where a single modality disturbance data is insufficient, thereby enhancing disturbance response prediction.
[0247] Optionally, in the above Figure 7On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application, the acquisition module 201 is used to acquire the data to be processed and the data to be recalled;
[0248] The processing module 202 is used to call the target encoder to perform feature processing on the data to be processed to obtain a feature representation of the second data to be processed;
[0249] Calling the target encoder to perform feature processing on the to-be-recalled data to obtain a to-be-recalled feature representation corresponding to the to-be-recalled data;
[0250] The target data corresponding to the data to be processed is determined based on the feature representation to be processed and the feature representation to be recalled.
[0251] In an embodiment of the present application, a model training device is provided. Using the above device, the target encoder performs comparative learning on the gene data and the compound data in the same projection space during the training process, so that the target encoder can learn the correlation between the gene data and the compound data, thereby realizing the matching function of the gene data and the compound data.
[0252] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application, the data to be processed is gene target data, and the data to be recalled is compound data;
[0253] The processing module 202 is used to calculate the similarity between the feature representation to be processed and the feature representation to be recalled in the target representation space;
[0254] The compound data corresponding to the feature representation to be recalled whose similarity meets the threshold range is selected as the target data corresponding to the gene target data.
[0255] In an embodiment of the present application, a model training device is provided. Using the above device, the target encoder performs comparative learning on the gene data and the compound data in the same projection space during the training process, so that the target encoder can learn the correlation between the gene data and the compound data, thereby realizing the matching function of the gene data and the compound data.
[0256] Optionally, in the above Figure 7 On the basis of the corresponding embodiment, in another embodiment of the model training device 20 provided in the embodiment of the present application, the data to be processed is compound data, and the data to be recalled is gene target data;
[0257] The processing module 202 is used to calculate the similarity between the feature representation to be processed and the feature representation to be recalled in the target representation space;
[0258] The gene target data corresponding to the feature representation to be recalled whose similarity meets the threshold range is selected as the target data corresponding to the compound data.
[0259] In an embodiment of the present application, a model training device is provided. Using the above device, the target encoder performs comparative learning on the gene data and the compound data in the same projection space during the training process, so that the target encoder can learn the correlation between the gene data and the compound data, thereby realizing the matching function of the gene data and the compound data.
[0260] The model training device provided in this application can be used for the server, see Figure 8 , Figure 8 : is a schematic diagram of a server structure provided in an embodiment of the present application. The server 300 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 322 (for example, one or more processors) and memory 332, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 342 or data 344. Among them, the memory 332 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 322 can be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the server 300.
[0261] The server 300 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input and output interfaces 358, and / or one or more operating systems 341, such as Windows Server 2000. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0262] The steps performed by the server in the above embodiment can be based on the Figure 8 The server structure shown.
[0263] The model training device provided in this application can be used in terminal devices. Fig. 9For the sake of convenience, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. In the embodiments of the present application, the terminal device is a smart phone as an example for explanation:
[0264] Fig. 9 The block diagram shows a partial structure of a smart phone related to the terminal device provided in the embodiment of the present application. Fig. 9 The smart phone includes: a radio frequency (RF) circuit 410, a memory 420, an input unit 430, a display unit 440, a sensor 450, an audio circuit 460, a wireless fidelity (WiFi) module 470, a processor 480, and a power supply 490. Those skilled in the art will appreciate that Fig. 9 The structure of the smartphone shown in the figure does not constitute a limitation of the smartphone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0265] Combine the following Fig. 9 A detailed introduction to the various components of a smartphone:
[0266] The RF circuit 410 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 480 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 410 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 410 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, short messaging service (SMS), etc.
[0267] The memory 420 can be used to store software programs and modules. The processor 480 executes various functional applications and data processing of the smartphone by running the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the smartphone (such as audio data, a phone book, etc.), etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0268] The input unit 430 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the smart phone. Specifically, the input unit 430 may include a touch panel 431 and other input devices 432. The touch panel 431, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 431 or near the touch panel 431 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 431 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 480, and can receive and execute commands sent by the processor 480. In addition, the touch panel 431 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 431, the input unit 430 may also include other input devices 432. Specifically, other input devices 432 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0269] The display unit 440 can be used to display information input by the user or information provided to the user and various menus of the smartphone. The display unit 440 may include a display panel 441. Optionally, the display panel 441 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 431 may cover the display panel 441. When the touch panel 431 detects a touch operation on or near it, it is transmitted to the processor 480 to determine the type of touch event. Subsequently, the processor 480 provides a corresponding visual output on the display panel 441 according to the type of touch event. Although in Fig. 9 In the embodiment, the touch panel 431 and the display panel 441 are used as two independent components to implement the input and output functions of the smartphone, but in some embodiments, the touch panel 431 and the display panel 441 can be integrated to implement the input and output functions of the smartphone.
[0270] The smartphone may also include at least one sensor 450, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 441 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 441 and / or the backlight when the smartphone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the smartphone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in smartphones, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0271] The audio circuit 460, the speaker 461, and the microphone 462 can provide an audio interface between the user and the smartphone. The audio circuit 460 can transmit the received audio data to the speaker 461 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is received by the audio circuit 460 and converted into audio data, and then the audio data is output to the processor 480 for processing, and then sent to another smartphone through the RF circuit 410, or the audio data is output to the memory 420 for further processing.
[0272] WiFi is a short-range wireless transmission technology. Smartphones can help users send and receive emails, browse web pages, and access streaming media through WiFi module 470, which provides users with wireless broadband Internet access. Fig. 9 A WiFi module 470 is shown, but it is understandable that it is not an essential component of the smartphone and can be omitted as needed without changing the essence of the invention.
[0273] Processor 480 is the control center of the smartphone, which uses various interfaces and lines to connect various parts of the entire smartphone, and executes various functions of the smartphone and processes data by running or executing software programs and / or modules stored in memory 420, and calling data stored in memory 420, thereby monitoring the smartphone as a whole. Optionally, processor 480 may include one or more processing units; optionally, processor 480 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into processor 480.
[0274] The smart phone also includes a power source 490 (such as a battery) for supplying power to various components. Optionally, the power source can be logically connected to the processor 480 through a power management system, thereby managing functions such as charging, discharging, and power consumption management through the power management system.
[0275] Although not shown, the smartphone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0276] The steps performed by the terminal device in the above embodiment can be based on the Fig. 9 The terminal device structure shown.
[0277] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the methods described in the aforementioned embodiments.
[0278] The present application also provides a computer program product including a program, which, when executed on a computer, enables the computer to execute the methods described in the aforementioned embodiments.
[0279] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0280] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0281] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0282] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0283] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0284] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A model training method, It is characterized in that include: Obtaining compound training data, gene training data, initial compound encoders, and initial protein encoders; Calling the initial compound encoder to perform feature processing on the compound training data to obtain compound characterization data of the compound training data; Calling the initial protein encoder to perform feature processing on the gene training data to obtain protein representation data of the gene training data; Projecting the compound characterization data into a target characterization space to obtain projected compound characterization data, and projecting the protein characterization data into the target characterization space to obtain projected protein characterization data; determining a protein-compound alignment loss value based on the projected compound characterization data and the projected protein characterization data; The initial compound encoder and the initial protein encoder are trained based on the protein-compound alignment loss value to obtain a target encoder, wherein the target encoder includes a target compound encoder and a target protein encoder.
2. The method according to claim 1, It is characterized in that The method further comprises: A protein graph self-supervised loss value of the initial protein encoder is obtained based on the gene training data, and the protein graph self-supervised loss value is used to train the initial protein encoder.
3. The method according to claim 2, It is characterized in that The training of the initial compound encoder and the initial protein encoder based on the protein-compound alignment loss value to obtain a target encoder comprises: The initial compound encoder and the initial protein encoder are trained based on the protein-compound alignment loss value and the protein graph self-supervision loss value to obtain a target encoder.
4. The method according to any one of claims 1 to 3, It is characterized in that Calling the initial protein encoder to perform feature processing on the gene training data to obtain protein representation data of the gene training data includes: Performing feature extraction on the gene training data to obtain sequence features of the gene training data; constructing an initial protein graph corresponding to the gene training data based on the sequence features; The initial protein encoder is called to perform feature processing on the initial protein graph to obtain protein characterization data of the gene training data.
5. The method according to claim 2, It is characterized in that The step of obtaining the protein graph self-supervision loss value of the initial protein encoder based on the gene training data comprises: Performing feature extraction on the gene training data to obtain sequence features of the gene training data; constructing an initial protein graph corresponding to the gene training data based on the sequence features; Performing enhancement processing on the initial protein map to obtain an enhanced protein map for prediction and an enhanced protein map for self-supervised learning, wherein the enhanced protein map for prediction and the enhanced protein map for self-supervised learning are different; Calling the initial protein encoder to perform feature extraction on the enhanced protein graph for prediction to obtain a feature representation to be predicted, wherein the feature representation to be predicted serves as the protein characterization data; Calling a third-party encoder to perform feature extraction on the enhanced protein graph for self-supervised learning to obtain a feature representation to be learned; Calling a prediction network to predict the feature representation to be predicted to obtain a predicted feature representation; The protein graph self-supervision loss value is determined based on the feature representation to be learned and the predicted feature representation.
6. The method according to claim 5, It is characterized in that Determining the protein graph self-supervision loss value based on the feature representation to be learned and the predicted feature representation comprises: The cosine similarity of the feature representation to be learned and the predicted feature representation is calculated to obtain the protein graph self-supervision loss value.
7. The method according to claim 1, It is characterized in that The calling of the initial compound encoder to perform feature processing on the compound training data to obtain compound characterization data of the compound training data includes: Obtaining a text string representation corresponding to the compound training data; Using ECFP4 feature extraction method to obtain the compound features corresponding to the text string representation; The initial compound encoder is called to perform feature processing on the compound features to obtain compound characterization data of the compound training data.
8. The method according to any one of claims 1 to 7, It is characterized in that The method further comprises: Acquiring disturbance data, wherein the disturbance data is at least one of gene disturbance data and compound disturbance data; Calling the target encoder to perform feature extraction on the disturbance data to obtain a disturbance feature representation of the disturbance data; The disturbance prediction model is called to predict the disturbance feature representation to obtain a disturbance prediction result, and the disturbance prediction model is a trained model.
9. The method according to claim 8, It is characterized in that When the disturbance data is gene disturbance data, calling the target encoder to perform feature extraction on the disturbance data to obtain a disturbance feature representation of the data to be processed includes: A target protein encoder in the target encoder is called to perform feature extraction on the gene perturbation data to obtain a perturbation feature representation of the gene perturbation data.
10. The method according to claim 9, It is characterized in that The calling of the target protein encoder in the target encoder to perform feature extraction on the gene perturbation data to obtain a perturbation feature representation of the gene perturbation data includes: Acquiring a target sequence feature of the gene perturbation data, wherein the target sequence feature is used as an initial feature representation of the gene perturbation data; Acquire the edge between the target sequence feature and other nodes in the target protein encoder, so that the gene perturbation data serves as the target node of the target protein encoder; The feature representation of the gene perturbation data is updated using a graph transmission mechanism to obtain a perturbation feature representation of the gene perturbation data.
11. The method according to claim 8, It is characterized in that When the disturbance data is compound disturbance data, calling the target encoder to perform feature extraction on the disturbance data to obtain a disturbance feature representation of the disturbance data includes: The target compound encoder in the target encoder is called to perform feature extraction on the compound disturbance data to obtain a disturbance feature representation of the compound disturbance data.
12. The method according to claim 8, It is characterized in that The perturbation data are compound perturbation data and gene perturbation data; Calling the target encoder to perform feature extraction on the disturbance data to obtain a disturbance feature representation of the disturbance data includes: Calling a target compound encoder in the target encoding to perform feature extraction on the compound disturbance data to obtain a compound feature representation of the compound disturbance data; Calling a target protein encoder in the target encoder to perform feature extraction on the gene perturbation data to obtain a protein feature representation of the gene perturbation data; The compound feature representation of the compound perturbation data and the protein feature representation of the gene perturbation data are used as the perturbation feature representation of the perturbation data.
13. The method according to any one of claims 1 to 7, It is characterized in that The method further comprises: Calling the target encoder to perform feature extraction on the first disturbance training data to obtain a first disturbance feature representation; Training an initial first disturbance prediction model based on the first disturbance feature representation to obtain a first disturbance prediction model; Calling the target encoder to perform feature extraction on second perturbation training data to obtain a second perturbation feature representation, wherein the second perturbation training data and the first perturbation training data are perturbation training data of different types; The first disturbance prediction model is fine-tuned based on the second disturbance feature representation to obtain a second disturbance prediction model.
14. The method according to any one of claims 1 to 7, It is characterized in that The method further comprises: Obtain data to be processed and data to be recalled; Calling the target encoder to perform feature processing on the data to be processed to obtain a feature representation of the second data to be processed; Calling the target encoder to perform feature processing on the to-be-recalled data to obtain a to-be-recalled feature representation corresponding to the to-be-recalled data; The target data corresponding to the data to be processed is determined based on the feature representation to be processed and the feature representation to be recalled.
15. The method according to claim 14, It is characterized in that The data to be processed is gene target data, and the data to be recalled is compound data; Determining the target data corresponding to the data to be processed based on the feature representation to be processed and the feature representation to be recalled includes: Calculating the similarity between the feature representation to be processed and the feature representation to be recalled in the target representation space; The compound data corresponding to the feature representation to be recalled whose similarity meets the threshold range is selected as the target data corresponding to the gene target data.
16. The method according to claim 14, It is characterized in that The data to be processed is compound data, and the data to be recalled is gene target data; Determining the target data corresponding to the data to be processed based on the feature representation to be processed and the feature representation to be recalled includes: Calculating the similarity between the feature representation to be processed and the feature representation to be recalled in the target representation space; The gene target data corresponding to the feature representation to be recalled whose similarity meets the threshold range is selected as the target data corresponding to the compound data.
17. A model training device, It is characterized in that include: An acquisition module, used for acquiring compound training data, gene training data, initial compound encoder and initial protein encoder; A processing module, used for calling the initial compound encoder to perform feature processing on the compound training data to obtain compound characterization data of the compound training data; Calling the initial protein encoder to perform feature processing on the gene training data to obtain protein representation data of the gene training data; projecting the compound representation data to the target representation space to obtain projected compound representation data, and projecting the protein representation data to the target representation space to obtain projected protein representation data; determining a protein-compound alignment loss value based on the projected compound characterization data and the projected protein characterization data; A training module is used to train the initial compound encoder and the initial protein encoder based on the protein-compound alignment loss value to obtain a target encoder, wherein the target encoder includes a target compound encoder and a target protein encoder.
18. A computer device, It is characterized in that include: Memory, processor, and bus system; Wherein, the memory is used to store programs; The processor is used to execute the program in the memory, and the processor is used to execute the method according to any one of claims 1 to 16 according to the instructions in the program code; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
19. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 16.
20. A computer program product comprising a computer program, It is characterized in that The computer program is used by a processor to execute the method according to any one of claims 1 to 16.
Citation Information
Cited By
Time series data alignment method and device, equipment and medium
CN119724346A
Time Series Data Alignment Method, Device, Equipment and Medium
CN119724346B
