Vector generation method and device, data processing method and device, and storage medium
By performing learnable processing and neural network updating on the current position vector in the mapping table to generate a learnable position vector, the shortcomings of existing methods in accuracy and efficiency are addressed, and more efficient molecular property prediction and model accuracy improvement are achieved.
Patent Information
- Application Number
- CN202210379369.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-04-12
AI Technical Summary
Existing molecular property prediction methods have difficulty balancing accuracy and efficiency. Quantum mechanics-based methods have high computational costs, while semi-empirical methods are not very accurate. In addition, the position information representation of existing machine learning model inputs lacks versatility and generalization.
By performing learnable processing on the current position vector in the mapping table, a learnable position vector is generated, and the current position vector is updated using a neural network to form a more universal mapping table for molecular property prediction.
It improves the accuracy of molecular property predictions and the precision of machine learning models, enhances the interpretability of models and the ability to simulate complex nonlinear relationships, and reduces dependence on specific functional forms.
Smart Images

Figure CN114864013B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to a vector generation method, a data processing method, a vector generation device, a data processing device, and a non-transitory computer-readable storage medium. Background Art
[0002] For new drug development, new material design, energy and other fields, the prediction of molecular properties is a very important technical requirement. The prediction of molecular properties can discover molecules with the desired properties, which has important applications in various fields. Only by accurately and efficiently estimating the key properties of molecules can we quickly identify potential new drugs or new materials. One method for estimating molecular properties is DFT (Density functional theory) and other methods based on first principles such as quantum mechanics. Although this method can accurately predict the shape of molecules, the computational cost of this method is very high. Another method for estimating molecular properties is the semi-empirical method, which has a faster calculation speed but low accuracy. Summary of the Invention
[0003] This summary section is provided to briefly introduce concepts that will be described in detail in the detailed description section below. This summary section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] At least one embodiment of the present disclosure provides a vector generation method, comprising: performing learnable processing on N current position vectors in a mapping table to obtain N learnable position vectors, where N is a positive integer; and updating the N current position vectors using the N learnable position vectors.
[0005] At least one embodiment of the present disclosure also provides a data processing method, including: obtaining a position parameter to be processed; determining a position vector to be processed corresponding to the position parameter to be processed based on a mapping table corresponding to the position parameter to be processed, wherein the mapping table includes N current position vectors, and the N current position vectors in the mapping table are updated based on the N learnable position vectors obtained by the vector generation method described in any embodiment of the present disclosure; processing the position vector to be processed by a neural network corresponding to the mapping table to obtain a processing result.
[0006] At least one embodiment of the present disclosure further provides a vector generation device, comprising: one or more memories, which non-transitorily store computer-executable instructions; and one or more processors, which are configured to execute the computer-executable instructions, wherein the computer-executable instructions, when executed by the one or more processors, implement the vector generation method according to any embodiment of the present disclosure.
[0007] At least one embodiment of the present disclosure further provides a data processing device, comprising: one or more memories, which non-transiently store computer-executable instructions; and one or more processors, which are configured to execute the computer-executable instructions, wherein the computer-executable instructions, when executed by the one or more processors, implement the data processing method according to any embodiment of the present disclosure.
[0008] At least one embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the vector generation method according to any embodiment of the present disclosure or the data processing method according to any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0010] Figure 1A A schematic flow chart of a vector generation method provided in at least one embodiment of the present disclosure;
[0011] Figure 1B A schematic flowchart of another vector generation method provided in at least one embodiment of the present disclosure;
[0012] Figures 2A to 2D A schematic diagram of a curve formed by multiple current position vectors provided in some embodiments of the present disclosure;
[0013] Figure 3A A schematic diagram of a curve formed by multiple learnable position vectors provided in some embodiments of the present disclosure;
[0014] Figure 3B A schematic diagram of a curve formed by multiple learnable position vectors provided in some embodiments of the present disclosure;
[0015] Figure 3C for Figure 3A Schematic diagram of mapping multiple learnable position vectors into two-dimensional space;
[0016] Figure 3D for Figure 3B Schematic diagram of mapping multiple learnable position vectors into two-dimensional space;
[0017] Figure 4 A schematic flow chart of a data processing method provided for at least one embodiment of the present disclosure;
[0018] Figure 5 A schematic diagram of a vector generation device provided by at least one embodiment of the present disclosure;
[0019] Figure 6 A schematic diagram of a data processing device provided in at least one embodiment of the present disclosure;
[0020] Figure 7 A schematic diagram of a non-transitory computer-readable storage medium provided for at least one embodiment of the present disclosure;
[0021] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in at least one embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0023] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0024] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0025] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0026] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0027] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0028] Research has shown that in recent years, machine learning-based molecular property prediction models are an effective alternative solution that balances accuracy and efficiency. Positional information (e.g., interatomic distances, bond angles, etc.) is one of the most fundamental physical quantities in machine learning-based molecular property prediction models.
[0029] Currently, there are three main methods for representing molecular position information as input to machine learning models: First, directly using the raw scalar form of position information as the input of the machine learning model. However, such a raw scalar form is not conducive to the machine learning model to handle the complex physical relationships in the molecule. Many physical quantities of the molecule are nonlinear, non-monotonic, and complex with respect to the position information. Therefore, ideally, the input of the machine learning model is a variety of nonlinear transformations of the position information. Second, the position information is transformed by user-defined transformations, for example, the reciprocal of the interatomic distance. This representation of position information may be more effective than directly using the raw scalar form. However, this transformation is not very universal. For example, the reciprocal of the interatomic distance may be suitable for some polynomial potential energy relations, but not necessarily for other functional forms (such as exponentials). Moreover, this method is also very dependent on the user's choice, and its universality is limited. Third, using a set of manually selected basis functions (such as Gaussian functions or Bessel functions, etc.) to transform the position information. However, this method also has limited generalization and versatility, and its efficiency depends on the choice of basis functions.
[0030] At least one embodiment of the present disclosure provides a vector generation method. The vector generation method includes: performing learnable processing on N current position vectors in a mapping table to obtain N learnable position vectors, where N is a positive integer; and updating the N current position vectors using the N learnable position vectors.
[0031] In the vector generation method provided in the embodiments of the present disclosure, a learnable position vector is obtained through learning. The learnable position vector is not limited to a specific form determined by a certain selected or customized function, and is thus more universal. The current position vector obtained by updating the learnable position vector can better simulate the complex nonlinearity of predicting molecular properties, thereby improving the accuracy of predicting various properties of molecules.
[0032] At least one embodiment of the present disclosure further provides a data processing method, a vector generating device, a data processing device, and a non-transitory computer-readable storage medium.
[0033] The following embodiments of the present disclosure are described in detail with reference to the accompanying drawings, but the present disclosure is not limited to these specific embodiments. In order to keep the following description of the embodiments of the present disclosure clear and concise, the present disclosure omits detailed descriptions of some known functions and components.
[0034] Figure 1A A schematic flow chart of a vector generation method provided in at least one embodiment of the present disclosure is provided. Figure 1B A schematic flowchart of another vector generation method provided in at least one embodiment of the present disclosure.
[0035] like Figure 1A As shown, in some embodiments of the present disclosure, the vector generation method may include the following steps S10-S11.
[0036] In step S10, the N current position vectors in the mapping table are subjected to a learnable process to obtain N learnable position vectors. For example, N is a positive integer, and N is greater than or equal to 1. It should be noted that in the following description of this disclosure, unless otherwise specified, N is taken as an example to be greater than 1.
[0037] In step S11 , N current position vectors are updated using N learnable position vectors.
[0038] For example, in some embodiments, the vector generation method further includes: performing learnable processing on the updated N current position vectors again.
[0039] In the vector generation method provided in the embodiments of the present disclosure, the current position vector in the mapping table can be subjected to multiple learnable processing, and the current position vector in the mapping table can be updated based on the learnable position vector, and then the updated current position vector can be subjected to learnable processing again until the updated current position vector meets the preset requirements, thereby obtaining the final generated mapping table. The final generated mapping table can be used for subsequent processing, for example, in the process of predicting molecular properties.
[0040] For example, the mapping table further includes N position parameters corresponding to the N current position vectors in a one-to-one manner. The mapping table is used to indicate the mapping relationship between the position parameters and the current position vectors.
[0041] For example, the N current position vectors correspond one-to-one to the N learnable position vectors.
[0042] For example, in some embodiments, as shown in Table 1 below, the N position parameters included in the mapping table are position parameter d1, position parameter d2, position parameter d3,…, position parameter dN, and the N current position vectors included in the mapping table are current position vector iv1 corresponding to position parameter d1, current position vector iv2 corresponding to position parameter d2, current position vector iv3 corresponding to position parameter d3,…, current position vector ivN corresponding to position parameter dN.
[0043] Table 1
[0044] Positional parameters Current position vector d1 iv1 d2 iv2 d3 iv3 … … dN ivN
[0045] It should be noted that, although the mapping table is embodied in the form of a table in Table 1, the present disclosure is not limited thereto. The mapping table may be embodied in any form, and the embodiments of the present disclosure do not impose any specific limitation on this.
[0046] For example, in some embodiments, the value of N can be set according to specific circumstances. For example, N can be 10 to 1000, for example, N can be 100, 360, etc.
[0047] For example, when the final generated mapping table is applied to predict molecular properties, there is a non-monotonic relationship between the prediction error and N. If N is too large or too small, the prediction error will be large. Therefore, the value of N needs to be selected according to the actual situation.
[0048] For example, in some embodiments, the position parameter d1 may be 1 nanometer, the position parameter d2 may be 2 nanometers, the position parameter d3 may be 3 nanometers, and so on, and the difference between any two adjacent position parameters in the N position parameters may be 1 nanometer. For example, in other embodiments, the position parameter d1 may be 1 degree, the position parameter d2 may be 2 degrees, the position parameter d3 may be 3 degrees, and so on, and the difference between any two adjacent position parameters in the N position parameters may be 1 degree.
[0049] It should be noted that, in the embodiments of the present disclosure, two adjacent position parameters mean that there is no other position parameter in the mapping table between the two position parameters, that is, any position parameter among the multiple position parameters in the mapping table is not located between the two adjacent position parameters. For example, position parameter d1 and position parameter d2 are two adjacent position parameters, position parameter d2 and position parameter d3 are two adjacent position parameters, and position parameter d1 and position parameter d3 are two non-adjacent position parameters, and position parameter d2 is located between position parameter d1 and position parameter d3.
[0050] It should be noted that, in some embodiments, multiple position parameters in the mapping table may all be integers, but the present disclosure is not limited thereto, and at least some of the position parameters in the mapping table may also include an integer part and a decimal part.
[0051] For example, in the initial state, the values of the current position vectors in the mapping table are random values. That is, in the initial state, the current position vectors in the mapping table are randomly set, and then the current position vectors are subjected to learnable processing by the vector generation method provided in the embodiment of the present disclosure to learn and obtain the learnable position vectors. Since the learnable position vectors are obtained based on learning, they are not limited to a specific form and can better reflect the complex physical relationships in molecules.
[0052] For example, in some examples, in the initial state, the current position vector iv1 in Table 1 = [0.8, 0, 0.5, 0.8], the current position vector iv2 in Table 1 = [0.8, 0.8, -0.2, -0.1], the current position vector iv3 in Table 1 = [0, 0.1, 0.2, 0, 4], and the position vector ivN in Table 1 = [0, 0.5, 0.1, 0, 3].
[0053] For example, the dimension of each current position vector can be set according to actual conditions. For example, in some examples, the dimension of each current position vector can be 32 to 128. For example, in the above example, the dimension of each current position vector can be 4, that is, each current position vector includes 4 elements. For example, for current position vector iv3 = [0, 0.1, 0.2, 0, 4], the element of the first dimension of the current position vector iv3 is 0, the element of the second dimension of the current position vector iv3 is 0.1, the element of the third dimension of the current position vector iv3 is 0.2, and the element of the fourth dimension of the current position vector iv3 is 0.4.
[0054] Figures 2A to 2D A schematic diagram of a curve formed by multiple current position vectors is provided for some embodiments of the present disclosure. For example, Figures 2A to 2D In , the X direction represents the position parameter (eg, the normalized value), and the Y direction represents the value of the element in each dimension.
[0055] Figures 2A to 2D In the example shown, the dimension of each current position vector is 4, that is, each current position vector includes four elements. Figure 2A shows a curve formed based on the values of the elements of the first dimension of a plurality of current position vectors, Figure 2B shows a curve formed based on the values of the elements of the second dimension of the plurality of current position vectors, Figure 2Cshows a curve formed based on the values of the elements of the third dimension of a plurality of current position vectors, Figure 2D A curve formed based on the values of elements of the fourth dimension of a plurality of current position vectors is shown.
[0056] For example, Figures 2A to 2D As shown, the curve formed by the values of the elements of each dimension of the multiple current position vectors is a smooth curve.
[0057] For example, the dimension of each current position vector in the mapping table is fixed, that is, the dimensions corresponding to the multiple current position vectors in the mapping table are the same.
[0058] For example, in some embodiments, in step S10, as Figure 1B As shown, the learning process may include the following steps S100 to S103.
[0059] In step S100, at least one position parameter group is determined.
[0060] In step S101 , at least one position vector group corresponding to at least one position parameter group is acquired based on a mapping table.
[0061] In step S102, at least one position vector group is processed to obtain N learnable position vectors.
[0062] For example, in step S100 , each position parameter group includes at least one position parameter among the N position parameters in the mapping table.
[0063] For example, in step S100, the number of the at least one position parameter group can be determined based on actual conditions. For example, in some embodiments, the number of the at least one position parameter group can be 32, 48, 64, etc. When the number of the at least one position parameter group is greater than 1, the number of position parameters corresponding to the multiple position parameter groups can be the same or different. For example, one position parameter group in the at least one position parameter group can include 4 position parameters, while another position parameter group in the at least one position parameter group can include 5 position parameters. It should be noted that the number of position parameters corresponding to each position parameter group is the number of position parameters included in the position parameter group, and the number of position parameters included in each position parameter group is determined based on actual conditions.
[0064] For example, in some embodiments, step S100 includes: determining at least one data to be processed; and determining, based on the at least one data to be processed, at least one position parameter group corresponding one-to-one to the at least one data to be processed.
[0065] For example, each data to be processed corresponds to a molecule, which can be a small molecule, a macromolecule, or the like.
[0066] For example, when the data to be processed corresponds to a molecule, each position parameter in the mapping table includes the distance between two adjacent atoms in the molecule and / or the bond angle in the molecule.
[0067] For example, the number of position parameters in each position parameter group is determined based on the data to be processed corresponding to the position parameter group. For example, in some embodiments, the position parameter is the distance between two adjacent atoms in a molecule. For example, in one example, a molecule may include three atoms, namely a first atom, a second atom, and a third atom. The distance between the first atom and the second atom is a first distance, the distance between the first atom and the third atom is a second distance, and the distance between the second atom and the third atom is a third distance. If the first distance, the second distance, and the third distance are all equal, then the position parameter group corresponding to the molecule includes only one position parameter, which is the first distance (or the second distance or the third distance); if the first distance, the second distance, and the third distance are not equal, then the position parameter group corresponding to the molecule includes three position parameters, which are the first distance, the second distance, and the third distance.
[0068] For example, in some embodiments, step S101 may include: for each position parameter in each position parameter group (hereinafter referred to as the selected position parameter): in response to the selected position parameter being different from any position parameter among the N position parameters in the mapping table: determining a first position parameter to be interpolated and a second position parameter to be interpolated corresponding to the selected position parameter; based on the mapping table, determining a current position vector corresponding to the first position parameter to be interpolated as the first position vector to be interpolated and a current position vector corresponding to the second position parameter to be interpolated as the second position vector to be interpolated; interpolating the first position vector to be interpolated and the second position vector to be interpolated to obtain the current position vector corresponding to the selected position parameter; in response to the selected position parameter being one of the N position parameters: based on the mapping table, directly determining the current position vector corresponding to the selected position parameter.
[0069] For example, the first position parameter to be interpolated and the second position parameter to be interpolated are two position parameters among the N position parameters in the mapping table, and the selected position parameter is located between the first position parameter to be interpolated and the second position parameter to be interpolated.
[0070] For example, the interpolation method corresponding to the interpolation process includes linear interpolation and / or cubic Hermite interpolation.
[0071] For example, sometimes it's necessary to determine the derivatives of molecular properties with respect to position parameters. For example, differentiating the molecular potential energy with respect to the position parameter can reveal the forces acting on the atoms. In this case, the vector function corresponding to the current position vector must be differentiable with respect to the position parameter x, i.e., g = dh(x) / dx, where x represents the position parameter and h(x) represents the vector function corresponding to the current position vector. This vector function can be fitted based on the position parameters in the mapping table and the current position vector. This requirement influences the choice of interpolation method for the interpolation mentioned above. If the vector function corresponding to the current position vector does not need to be differentiable with respect to the position parameter x, linear interpolation can be used. However, linear interpolation causes g to not exist at multiple position parameters in the mapping table, making it unsuitable for scenarios where molecular properties must be differentiable with respect to the position parameter. If the vector function corresponding to the current position vector needs to be differentiable with respect to the position parameter x, a higher-order interpolation method, such as cubic Hermitian interpolation, can be used. For example, cubic Hermitian interpolation uses high-order polynomial coefficients to make the vector function corresponding to the current position vector differentiable with respect to the position parameter.
[0072] For example, the vector function corresponding to the current position vector is continuous and differentiable with respect to the position parameter, that is, the vector function corresponding to the current position vector is continuous and differentiable, so that infinite position information can be represented by limited learnable position parameters, which can help the neural network better handle complex intramolecular physical interactions and improve the accuracy of the model.
[0073] For example, in some embodiments, when the interpolation method corresponding to the interpolation process is linear interpolation, the current position vector corresponding to the selected position parameter is expressed as:
[0074]
[0075] Among them, h(*) represents the vector function corresponding to the current position vector, x represents the selected position parameter, and t represents the weight. Indicates the maximum position parameter among the N position parameters in the mapping table that is less than the selected position parameter x, represents the smallest position parameter among the N position parameters in the mapping table that is greater than the selected position parameter x. For example, in some embodiments, N is 100, and the N position parameters in the mapping table are 1 nanometer, 2 nanometers, 3 nanometers, ..., 100 nanometers, respectively. When d is 1.3, 1 nanometer, 2 nanometers.
[0076] For example, in some embodiments, t can be expressed as:
[0077]
[0078] It should be noted that t can be set according to actual conditions, and the embodiments of the present disclosure do not limit this.
[0079] For the mapping table shown in Table 1, the position parameter d1 can be 1 nanometer, the position parameter d2 can be 2 nanometers, the position parameter d3 can be 3 nanometers, and so on. The position parameter dN can be 100 nanometers. If the selected position parameter is the position parameter d1, the current position vector iv1 is used as the current position vector corresponding to the selected position parameter; if the selected position parameter is 1.3, at this time, the first position parameter to be interpolated and the second position parameter to be interpolated corresponding to the selected position parameter can be determined. For example, the first position parameter to be interpolated is the position parameter d1, and the second position parameter to be interpolated is the position parameter d2. Then, the current position vector iv1 is used as the first position vector to be interpolated and the current position vector iv2 is used as the second position vector to be interpolated. The current position vector iv1 and the current position vector iv2 are interpolated to determine the current position vector corresponding to the selected position parameter.
[0080] For example, in some embodiments, when the interpolation method corresponding to the interpolation processing is linear interpolation, the current position vector iv1 and the current position vector iv2 can be weightedly summed to obtain the current position vector corresponding to the selected position parameter. For example, the weight corresponding to the current position vector iv1 and the weight corresponding to the current position vector iv2 can be determined by the selected position parameter, the first position parameter to be interpolated, and the second position parameter to be interpolated. For example, in some embodiments, when the selected position parameter is 1.3, the weight corresponding to the current position vector iv1 can be 0.7, and the weight corresponding to the current position vector iv2 can be 0.3. For example, iv11 = [0.8, 0, 0.5, 0.8], iv12 = [0.7, 0.8, -0.2, -0.1]. At this time, the current position vector corresponding to the selected position parameter can be expressed as: h = 70% * iv11 + 30% * iv12 = 0.7 * [0.8, 0, 0.5, 0.8] + 0.3 * [0.7, 0.8, -0.2, -0.1].
[0081] It should be noted that the weight corresponding to the current position vector iv1 and the weight corresponding to the current position vector iv2 can be set according to actual conditions, and the embodiments of the present disclosure do not limit this. For example, the weight corresponding to the current position vector iv1 and the weight corresponding to the current position vector iv2 can be fixed values, for example, both are 0.5.
[0082] For example, in some embodiments, when the interpolation method corresponding to the interpolation process is cubic Hermite interpolation, the current position vector corresponding to the selected position parameter is expressed as:
[0083]
[0084] Among them, h(*) represents the vector function corresponding to the current position vector, g(*) represents the derivative of the vector function corresponding to the current position vector with respect to the position parameter, that is, g(x) = dh(x) / dx, x represents the selected position parameter, Indicates the maximum position parameter among the N position parameters in the mapping table that is less than the selected position parameter x, represents the minimum position parameter among the N position parameters in the mapping table that is greater than the selected position parameter x, c1 to c4 are interpolation coefficients, and are respectively expressed as: c1 = 2*t 3 -3*t 2 +1, c2=1-c1, c3=t 3 -2*t 2 +1, c4=t 3 -t 2 , where t represents the weight. In this case, h(x) is continuous and differentiable.
[0085] For example, in step S101 , each position vector group includes a current position vector corresponding to a position parameter in a position parameter group corresponding to the position vector group obtained based on a mapping table.
[0086] For example, each position vector group includes at least one current position vector. For example, at least one position parameter in each position parameter group corresponds one-to-one with at least one current position vector in the position vector group corresponding to the position parameter group.
[0087] For example, in some embodiments, step S102 may include: processing at least one position vector group separately through a neural network to obtain at least one output result corresponding to the at least one position vector group; based on the mapping table, at least one position parameter group and at least one output result, calculating at least one loss value through the loss function corresponding to the neural network; and in response to at least one loss value not satisfying a predetermined condition, correcting the N current position vectors according to the at least one loss value to obtain N learnable position vectors; in response to at least one loss value satisfying the predetermined condition, using the N current position vectors as N learnable position vectors.
[0088] In the present disclosure, learnable processing is implemented using a neural network. Specifically, the neural network performs learnable processing on the N current position vectors in the mapping table to obtain the neural network output. Based on the neural network output, the N current position vectors are then modified to obtain N learnable position vectors. These N current position vectors then serve as the neural network input. In embodiments of the present disclosure, the neural network input is modified and updated based on the learned output of the neural network, ultimately resulting in a mapping table that meets the requirements.
[0089] The learnable position vector generated by the vector generation method provided in the embodiments of the present disclosure is learned based on a machine learning model (e.g., a neural network) through continuous training, and the current position vector in the mapping table updated based on the learnable position vector is also learned based on the machine learning model, so that the current position vector is not limited to a specific form determined by a certain selected or customized function and is more versatile. Based on the current position vector, the complex nonlinearity of predicting molecular properties can be better simulated. Moreover, when a machine learning model is used to perform molecular predictions based on the current position vector, the accuracy of the machine learning model and the accuracy of the machine learning model in predicting various properties of the molecule can be improved, thereby increasing the interpretability of the machine learning model, that is, it can provide a certain degree of visualization and interpretability from a physical perspective.
[0090] For example, the vector generation method provided by the embodiment of the present disclosure does not strongly rely on the specific neural network model selection. That is, in step S102, the neural network can have various architectures, as long as the neural network uses position parameters (spacing between atoms, bond angles, etc.) as input. In practical applications, when the neural network is applied to predict molecular properties, the input of the neural network (i.e., position parameters) can be replaced with the current position vector updated based on the learnable position vector in the present disclosure, and the prediction of molecular properties can be achieved using the neural network. Such replacement can often help the neural network handle complex intramolecular physical interactions and improve the accuracy of the model.
[0091] For example, in some embodiments, the neural network may be a convolutional neural network, a graph neural network, or the like.
[0092] For example, the predetermined condition may be set according to actual conditions. For example, the predetermined condition may be that each loss value in the at least one loss value is smaller than a predetermined loss threshold.
[0093] For example, in some embodiments, in step S102, based on the mapping table, at least one position parameter group and at least one output result, calculating at least one loss value through the loss function corresponding to the neural network may include: for each position parameter group: based on the position parameter group, determining the target result corresponding to the position parameter group; obtaining N current position vectors in the mapping table; based on the N current position vectors, the target result and the output result corresponding to the position vector group corresponding to the position parameter group, calculating a loss value through the loss function corresponding to the neural network.
[0094] For example, various optimization methods may be used to correct the multiple current position vectors according to the at least one loss value. For example, the optimization method may include an Adam (adaptive moment estimation) optimization algorithm, a stochastic gradient descent (SGD) optimization algorithm, and the like.
[0095] For example, in some embodiments, each loss value may be used to perform a correction on multiple current position vectors; in other embodiments, at least one loss value may be used to perform a correction on multiple current position vectors as a whole, for example, at least one loss value may be averaged to obtain an average loss value, and then the multiple current position vectors may be corrected based on the average loss value.
[0096] For example, in some embodiments, the loss function includes an error loss function and a smoothness loss function.
[0097] Since the position parameters such as the spacing between atoms and the bond angle (chemical bond angle) are continuous, the learned multiple learnable position vectors should be smooth. In some embodiments of the present disclosure, a smoothness regularization technique can be used, that is, a smoothness loss function is set. By setting a smoothness loss function, it is equivalent to providing a certain regularization (regularization) to the model (for example, the above-mentioned neural network). Because the smoothness loss function limits the relative changes between each learnable position vector, it limits the flexibility of the model. Such regularization can prevent the overfitting of the model to a certain extent. At the same time, since the learned multiple learnable position vectors are smoother, the interpretability of the model is improved.
[0098] For example, in some embodiments, N is greater than 1, and the smoothness loss function is expressed as:
[0099]
[0100] Among them, Lsmooth represents the smoothness loss function, ||*|| represents the two norm, ∑ represents the sum, h(x i+1 ) represents the i+1th current position vector among the N current position vectors, h(x i ) represents the i-th current position vector among N current position vectors, where i is a positive integer less than or equal to (N-1).
[0101] For example, in some embodiments, the error loss function includes a root mean square error loss function or a mean absolute error loss function, etc.
[0102] For example, the root mean square error loss function is expressed as:
[0103]
[0104] Among them, LRMSE represents the root mean square error loss function, M and j are both positive integers, M represents the number of at least one position parameter group, yprej represents the output result corresponding to the j-th position parameter group in at least one position parameter group, and ylabj represents the target result corresponding to the j-th position parameter group in at least one position parameter group.
[0105] For example, the mean absolute error loss function is expressed as:
[0106]
[0107] Among them, LMAE represents the mean absolute error loss function, M and k are positive integers, M represents the number of at least one position parameter group, yprek represents the output result corresponding to the kth position parameter group in at least one position parameter group, and ylabk represents the target result corresponding to the kth position parameter group in at least one position parameter group.
[0108] For example, the loss function is expressed as:
[0109] L=L e +λ*L smooth
[0110] Among them, L represents the loss function, Le represents the error loss function, Lsmooth represents the smoothness loss function, and λ represents the hyperparameter that controls the contribution of the smoothness loss function and is a constant.
[0111] For example, Lsmooth can act as a regularization term, since the smoothness loss function reduces the flexibility of positional encodings, thereby helping the model generalize with less data.
[0112] It should be noted that, in some other embodiments, the loss function may also only include the error loss function.
[0113] Figure 3A A schematic diagram of a curve formed by multiple learnable position vectors provided in some embodiments of the present disclosure, Figure 3B This is a schematic diagram of a curve formed by multiple learnable position vectors provided in some embodiments of the present disclosure. It should be noted that, Figure 3A and Figure 3B Only 10 dimensions are shown in FIG, but each learnable position vector may also include more dimensions, which is not limited in the present disclosure.
[0114] For example, Figure 3A and Figure 3B The "normalized position parameter" in can be the normalized distance.
[0115] like Figure 3A and Figure 3B As shown, the dimension of each learnable position vector is 10, j represents the dimension, j=0 represents the first dimension of the learnable position vector, and the curve corresponding to j=0 represents the curve formed by the elements of the first dimension of each learnable position vector; j=1 represents the second dimension of the learnable position vector, and the curve corresponding to j=1 represents the curve formed by the elements of the second dimension of each learnable position vector, and so on, j=9 represents the tenth dimension of the learnable position vector, and the curve corresponding to j=9 represents the curve formed by the elements of the tenth dimension of each learnable position vector.
[0116] For example, Figure 3A The curve graph in represents the learnable position vector obtained without smoothness regularization, that is, the loss function only includes the error loss function, Figure 3B The curve graph in represents the learnable position vector obtained by smoothness regularization, that is, the loss function includes the error loss function and the smoothness loss function. Figure 3A As shown in , when the loss function only includes the error loss function, in each dimension, the value of each element of the learnable position vector changes greatly with the change of distance, and the curve corresponding to each dimension is not smooth; as shown in Figure 3B As shown in Figure 1, when the loss function includes the error loss function and the smoothness loss function, in each dimension, the value of the elements of each learnable position vector changes less with the change of distance, and the curve corresponding to each dimension is smoother.
[0117] It should be noted that, in the embodiments of the present disclosure, “smoothness regularization processing” means adding a smoothness loss function to the loss function.
[0118] Smoothness regularization can filter out unnecessary vector fluctuations of the learnable position vector, making it easier to analyze the characteristics of the learned learnable position vector. Figure 3A and Figure 3B As shown in , the following physical properties of the molecule can be observed based on the learnable position vector obtained after smoothness regularization: First, the derivative g of the learnable position vector with respect to the position parameter can reflect the dependence of the corresponding molecular properties on the scale of the position parameter (e.g., distance). For example, for the energy of the molecule, when the position parameter is large, g is close to zero, reflecting that in this data set ( Figure 3A and Figure 3BIn the learnable position vector shown (learned based on this dataset), the energy of the molecule mainly depends on the close-range interaction; second, the non-monotonicity of the learnable position vector is often related to the non-monotonicity of the corresponding molecular property with respect to the position parameter; third, if the learnable position vectors in the mapping table corresponding to multiple molecular properties are relatively similar, then the physical nature of the multiple molecular properties is also relatively similar.
[0119] For example, based on Figure 3A and Figure 3B It can be seen that if smoothness regularization is not performed, the learned position vector does not show obvious properties. The difference between the learned position vectors corresponding to the two position parameters is large. If smoothness regularization is performed, the learned position vector is smoother and shows simpler properties. Figure 3B As shown in Figure 2, learnable position vectors are typically nonlinear and non-monotonic. For learnable position vectors generated for a specific property, it can be observed that the turning points are concentrated where the normalized position parameter is small (e.g., around 0.2), and the learnable position vectors do not change much when the normalized position parameter is large (e.g., 0.4-1). For example, when the normalized position parameter is between 0.4 and 1, the learnable position vectors corresponding to the various position parameters hardly change.
[0120] Figure 3C for Figure 3A Schematic diagram of mapping multiple learnable position vectors into two-dimensional space, Figure 3D for Figure 3B Schematic diagram of mapping multiple learnable position vectors into two-dimensional space. Figure 3C and Figure 3D The horizontal and vertical axes in the figure refer to the two principal components obtained after dimensionality reduction by principal component analysis (PCA). The horizontal axis is the first principal component obtained by PCA, and the vertical axis is the second principal component obtained by PCA.
[0121] Figure 3C For Figure 3A The schematic diagram obtained by performing principal component analysis on the multiple learnable position vectors shown and visualizing them in a two-dimensional (2D) space is shown. Figure 3D For Figure 3B The schematic diagram obtained by performing principal component analysis on the multiple learnable position vectors shown and visualizing them in 2D space is as follows: Figure 3C As shown in Figure 2, the learnable position vectors obtained without smoothness regularization do not show a clear manifold, while the learnable position vectors obtained with smoothness regularization form a low-dimensional manifold, which is not a straight line and is different from the one based on Figure 3A and Figure 3B The observed nonlinearity is consistent with nonmonotonicity.
[0122] For example, in some embodiments, step S11 may include replacing the values of the N current position vectors in the mapping table with the values of the N learnable position vectors to obtain updated N current position vectors. In other words, the values of the N updated current position vectors are the values of the N learnable position vectors obtained through learning.
[0123] For example, for each current position vector in the mapping table, the value of the current position vector is replaced by the value of the learnable position vector corresponding to the current position vector among the N learnable position vectors, thereby obtaining the updated current position vector.
[0124] For example, in some embodiments, the vector generation method further includes: determining a position parameter range based on a training data set; and determining N position parameters based on the position parameter range.
[0125] For example, the training data set includes a plurality of training data.
[0126] For example, in some embodiments, determining a position parameter range based on a training data set includes: determining multiple training position parameters based on multiple training data; determining a first training position parameter and a second training position parameter among the multiple training position parameters; and determining a position parameter range based on the first training position parameter and the second training position parameter.
[0127] For example, among the multiple training position parameters, the first training position parameter is the largest and the second training position parameter is the smallest. The minimum value of the position parameter range is the second training position parameter, and the maximum value of the position parameter range is the first training position parameter.
[0128] For example, the N position parameters are evenly distributed within the position parameter range. For example, the N position parameters can be selected at equal intervals within the position parameter range to obtain the N position parameters, that is, the difference between any two adjacent position parameters in the N position parameters is fixed.
[0129] For example, in some embodiments, taking the position parameter as the distance between two atoms as an example, based on multiple training data, multiple training distances are determined, and then a first training distance and a second training distance are selected from the multiple training distances. Among the multiple training distances, the value of the first training distance is the largest, and the value of the second training distance is the smallest. Then, N segment nodes are evenly arranged between the first training distance and the second training distance, and each segment node corresponds to a distance. For example, the N segment nodes include a segment node corresponding to the first training distance and a segment node corresponding to the second training distance, that is, the N distances (i.e., the N position parameters) include the first training distance and the second training distance.
[0130] It should be noted that the N position parameters can also be unevenly distributed within the position parameter range, and can be set specifically according to actual conditions. For example, for the spacing r between atoms in a molecule, r is distributed within a spacing range [a, b]. Within a spacing range [a, b], the spacing r between atoms in most molecules is distributed within the spacing range [a, c]. Therefore, more position parameters can be set within the spacing range [a, c], and fewer position parameters can be set within the spacing range [c, b]. a, b, and c are positive real numbers, and c is less than b. The absolute value of the difference between a and c can be less than the absolute value of the difference between c and b. For example, a can be 0, b can be 100, and c can be 10.
[0131] For example, in some embodiments, determining a position parameter range based on a training data set includes: determining multiple training position parameters based on multiple training data; determining a first training position parameter and a second training position parameter among the multiple training position parameters; transforming the first training position parameter and the second training position parameter, respectively, to obtain a first transformed training position parameter and a second transformed training position parameter; and determining a position parameter range based on the first transformed training position parameter and the second transformed training position parameter.
[0132] For example, among the multiple training position parameters, the first training position parameter is the largest and the second training position parameter is the smallest. The minimum value of the position parameter range is the second transformed training position parameter, and the maximum value of the position parameter range is the first transformed training position parameter.
[0133] For example, N position parameters are transformed to obtain N transformed position parameters, and the N transformed position parameters are evenly distributed within the position parameter range.
[0134] For example, when N position parameters are unevenly distributed, the training position parameters can be transformed to obtain a position parameter range, and then values are taken at equal intervals within the position parameter range to obtain N transformed position parameters. Finally, the N transformed position parameters are converted into N position parameters. At this time, the N position parameters are unevenly distributed.
[0135] For example, in some embodiments, taking the position parameter as the distance between two atoms as an example, multiple training distances are determined based on multiple training data, and then a first training distance and a second training distance are selected from the multiple training distances. Among the multiple training distances, the first training distance has the largest value and the second training distance has the smallest value. Then, the first training distance and the second training distance are transformed to obtain a first transformed training distance and a second transformed training distance. Finally, N segment nodes are set between the first transformed training distance and the second transformed training distance, each segment node corresponding to a transformed training distance. For example, the segment node is subjected to the inverse of the above-mentioned transformation process to obtain the training distance corresponding to the segment node. The N segment nodes include the segment node corresponding to the first transformed training distance and the segment node corresponding to the second transformed training distance, that is, the N transformed distances include the first transformed training distance and the second transformed training distance.
[0136] For example, the transformation process may be a logarithmic function process. In this case, the inverse process of the logarithmic function process is an exponential function process. For example, the base of the exponential function and the base of the logarithmic function may be the same. In some embodiments, the base of the logarithmic function may be 10. In this case, the transformation process may be expressed as: ln(1+r), where r is the first training position parameter or the second training position parameter. It should be noted that the base of the logarithmic function may also be other values, and this disclosure is not limited thereto.
[0137] It should be noted that, in some embodiments, the minimum value of the position parameter range may be 0. In this case, only the first training position parameter (the first training position parameter is the largest) may be selected from multiple training position parameters. Then, based on the first training position parameter and 0, the position parameter range may be determined. In this case, the minimum value of the position parameter range is 0, and the maximum value of the position parameter range is the first training position parameter.
[0138] For example, in some embodiments, when performing a learnable process, the neural network may be a pre-trained neural network, but the present disclosure is not limited thereto. In other embodiments, the neural network may be a neural network to be trained. For example, in the vector generation method provided in the embodiments of the present disclosure, not only can the current position vector in the mapping table be updated, but the parameters of the neural network can also be modified.
[0139] For example, in some embodiments, the vector generation method further includes: modifying parameters of the neural network based on at least one loss value.
[0140] For example, in the vector generation method provided in the embodiments of the present disclosure, multiple learnable processes can be performed until at least one loss value calculated based on at least one position vector group arbitrarily selected from the mapping table meets a predetermined condition. At this time, the neural network has also been trained, and the trained neural network corresponds to the finally generated mapping table. The trained neural network can be used to predict a property of the molecule, that is, the finally generated mapping table corresponds to a property of the molecule.
[0141] For the various properties of a molecule, multiple mapping tables corresponding to the various properties can be generated based on the vector generation method provided in the embodiments of the present disclosure. In addition, multiple neural networks corresponding to the various properties can also be generated based on the vector generation method provided in the embodiments of the present disclosure, but the present disclosure is not limited thereto. The multiple neural networks can also be generated using other suitable methods, and the embodiments of the present disclosure are not limited thereto. For example, the structures of the multiple neural networks corresponding to the various properties of a molecule can be the same, while the parameters of the multiple neural networks can be different. For another example, the structures and parameters of the multiple neural networks corresponding to the various properties of a molecule can both be at least partially different.
[0142] For example, each time the learnable process is performed, only part of the current position vectors in the mapping table may be processed, or all of the current position vectors in the mapping table may be processed.
[0143] It should be noted that when the mapping table is finally generated, some current position vectors in the mapping table may not be selected for processing (training). Therefore, the test loss of these untrained current position vectors is large. However, in the present disclosure, adding a smoothness loss function helps to keep each current position vector smooth. Therefore, even if some current position vectors are not directly trained, these current position vectors will be updated due to changes from their adjacent current position vectors. That is, all current position vectors in the mapping table are updated each time an update is performed. Therefore, even if some current position vectors may not be selected, these current position vectors can also be updated. Therefore, the test loss of all current position vectors in the finally generated mapping table is small, which meets the user's requirements.
[0144] For example, each time a learnable process is performed, at least one data to be processed can be selected randomly or according to certain rules from the training data set to determine at least one position parameter group. From this, it can be seen that, for example, the position parameter group when the learnable process is performed for the first time may be at least partially different from the position parameter group when the learnable process is performed for the second time; or, the position parameter group when the learnable process is performed for the first time may be the same as the position parameter group when the learnable process is performed for the second time.
[0145] For example, in some embodiments, when a learnable process is first executed, the learnable process may include: determining A1 position parameter groups; obtaining A1 position vector groups corresponding to the A1 position parameter groups based on a mapping table (e.g., described below as a first mapping table); processing the A1 position vector groups to obtain N learnable position vectors. Processing the A1 position vector groups to obtain N learnable position vectors includes: processing the A1 position vector groups using a neural network (e.g., described below as a first neural network) to obtain A1 output results corresponding to the A1 position vector groups; calculating A1 loss values using a loss function corresponding to the first neural network based on the first mapping table, the A1 position parameter groups, and the A1 output results; and, in response to the A1 loss values not satisfying a predetermined condition, modifying the N current position vectors in the first mapping table according to the A1 loss values to obtain N learnable position vectors; and in response to the A1 loss values satisfying the predetermined condition, using the N current position vectors in the first mapping table as the N learnable position vectors. Then, the first mapping table is updated using the N learnable position vectors obtained in the first execution of the learnable process to obtain a first updated mapping table (e.g., described below as a second mapping table). In addition, the parameters of the first neural network are modified based on the A1 loss values to obtain a first modified neural network (e.g., described below as a second neural network).
[0146] For example, when executing the learnable process for the second time, the learnable process may include: determining A2 position parameter groups; obtaining A2 position vector groups corresponding to the A2 position parameter groups based on a second mapping table; encoding the A2 position vector groups to obtain N learnable position vectors. Encoding the A2 position vector groups to obtain N learnable position vectors includes: processing the A2 position vector groups respectively through a second neural network to obtain A2 output results corresponding to the A2 position vector groups; calculating A2 loss values through a loss function corresponding to the second neural network based on the second mapping table, the A2 position parameter groups, and the A2 output results; and in response to the A2 loss values not satisfying a predetermined condition, correcting the N current position vectors in the second mapping table according to the A2 loss values to obtain N learnable position vectors; and in response to the A2 loss values satisfying the predetermined condition, using the N current position vectors in the second mapping table as the N learnable position vectors. Then, the second mapping table is updated using the N learnable position vectors obtained in the second execution of the learnable process to obtain a second updated mapping table. In addition, the parameters of the second neural network are also corrected based on the A2 loss values to obtain a second corrected neural network. Similarly, the learnable process can be performed for a third time, a fourth time, and so on. Each time the learnable process is performed, the mapping table is the updated mapping table obtained after the last execution of the learnable process, and the neural network is the corrected neural network obtained after the last execution of the learnable process, until the finally generated mapping table and neural network meet the following conditions: at least one position vector group arbitrarily selected from the finally generated mapping table is processed by the finally generated neural network to obtain at least one output result, and based on the finally generated mapping table, the at least one position parameter group, and the at least one output result, at least one loss value calculated by the loss function corresponding to the finally generated neural network meets a predetermined condition.
[0147] For example, the smoothness loss function in the loss function corresponding to the first neural network is calculated using the current position vectors in the first mapping table, and the smoothness loss function in the loss function corresponding to the second neural network is calculated using the current position vectors in the second mapping table.
[0148] At least one embodiment of the present disclosure further provides a data processing method. Figure 4 A schematic flowchart of a data processing method provided for at least one embodiment of the present disclosure.
[0149] like Figure 4 As shown, the data processing method may include the following steps S20 to S22.
[0150] In step S20, the position parameters to be processed are obtained.
[0151] In step S21 , based on a mapping table corresponding to the position parameters to be processed, a position vector to be processed corresponding to the position parameters to be processed is determined.
[0152] For example, the mapping table includes N current position vectors, and the N current position vectors in the mapping table are updated based on the N learnable position vectors obtained by the vector generation method described in any embodiment of the present disclosure. For example, the mapping table can be the final mapping table generated by the vector generation method described in any embodiment of the present disclosure, that is, the mapping table in step S21 satisfies the following conditions: at least one position vector group arbitrarily selected from the mapping table is processed by a neural network corresponding to the mapping table to obtain at least one output result, and based on the mapping table, the at least one position parameter group and the at least one output result, at least one loss value calculated by a loss function corresponding to the neural network corresponding to the mapping table satisfies a predetermined condition.
[0153] For example, the mapping table further includes N position parameters corresponding one-to-one to the N current position vectors.
[0154] In step S22, the position vector to be processed is processed by a neural network corresponding to the mapping table to obtain a processing result.
[0155] The data processing method provided by the embodiments of the present disclosure can be applied to the prediction of molecular properties. The processing results (i.e., the properties of the molecules) obtained by the data processing method are more accurate. For example, in the field of new drug research and development, the properties of molecules are predicted more accurately, and better candidate drugs can be found in a faster and cheaper way, greatly accelerating the speed of drug research and development.
[0156] For example, both the mapping table and the neural network can be determined based on the properties of the molecule that need to be predicted. For example, when the dipole moment of the molecule needs to be predicted, the mapping table and neural network corresponding to the dipole moment can be selected; when the energy gap of the molecule needs to be predicted (E(LUMO (lowest unoccupied molecule orbital)) minus E(HOMO (highest occupied molecule orbital))), the mapping table and neural network corresponding to the energy gap can be selected. The mapping table corresponding to the dipole moment and the mapping table corresponding to the energy gap are different, and the structures of the neural network corresponding to the dipole moment and the neural network corresponding to the energy gap can be the same, but the parameters of the neural network corresponding to the dipole moment are at least partially different from the parameters of the neural network corresponding to the energy gap.
[0157] For example, the position parameters to be processed include the distance between two adjacent atoms in a molecule and / or the bond angle in the molecule, and the processing result may include a predicted value of a property of the molecule that needs to be predicted.
[0158] It should be noted that if the position parameter to be processed is greater than the maximum position parameter in the mapping table, the position parameter to be processed can be regarded as the same as the maximum position parameter in the mapping table. Similarly, if the position parameter to be processed is less than the minimum position parameter in the mapping table, the position parameter to be processed can be regarded as the same as the minimum position parameter in the mapping table.
[0159] For example, the number of position parameters in the mapping table is finite, while for distance or bond angle, it is an infinite and continuous value. When determining the position vector to be processed, when the position parameter to be processed is the same as a certain position parameter in the position parameters in the mapping table, the current position vector corresponding to the certain position parameter in the mapping table can be directly used as the position vector to be processed corresponding to the position parameter to be processed; when the position parameter to be processed is different from any position parameter in the mapping table, the position vector to be processed corresponding to the position parameter to be processed can be determined by interpolation, so that the position vector is continuous with respect to the position parameter.
[0160] For example, in some embodiments, in step S21, when the position parameter to be processed is different from any position parameter among the N position parameters in the mapping table corresponding to the position parameter to be processed, two position parameters to be interpolated corresponding to the position parameter to be processed are determined, and the two position parameters to be interpolated are two position parameters among the N position parameters, and the position parameter to be processed is located between the two position parameters to be interpolated; then, based on the mapping table, two current position vectors corresponding to the two position parameters to be interpolated are determined as two interpolation position vectors; finally, the two interpolation position vectors are interpolated to obtain the position vector to be processed corresponding to the position parameter to be processed; when the position parameter to be processed is one of the N position parameters in the mapping table corresponding to the position parameter to be processed, based on the mapping table, the current position vector corresponding to the position parameter to be processed is directly determined as the position vector to be processed.
[0161] For example, the interpolation method corresponding to the interpolation process includes linear interpolation and / or cubic Hermite interpolation.
[0162] Table 2 shows the test results obtained by testing different properties of molecules on two data sets.
[0163] For example, as shown in Table 2, the two datasets are the QM9 dataset (Ramakrishna et al., 2014) and the PubChemQC PM6 dataset (Nakata et al., 2020).
[0164] Table 2
[0165]
[0166] For example, the QM9 dataset has become a benchmark for molecular chemical property prediction tasks. The QM9 dataset contains DFT calculation results for 134,000 stable small organic molecules. These molecules are composed of five elements (CHONF), and each element contains an average of 18 atoms. The calculation results of the PM6 dataset are calculated using a semi-empirical method. The number of molecules in the PM6 dataset is approximately 221 million. In this test, the molecular samples in the PM6 dataset are filtered so that the molecules in the PM6 dataset contain the five elements included in the molecules in the QM9 dataset, and each molecule contains less than 100 atoms.
[0167] For example, as shown in Table 2, in this test, a total of 13 properties of the molecule (i.e., task units, task uNit) were tested, and the 13 properties were: isotropic polarizability (α), HOMO energy (εHOMO), LUMO energy (εLUMO), energy gap Δε (Δε=εHOMO-εLUMO), dipole moment (μ), heat capacity (Cv), free energy (G), enthalpy change (H), electron space range (R 2 ), internal energy at 298.15K (U), internal energy at 0K (U0), zero-point vibrational energy (ZPVE) and total energy (etot).
[0168] In Table 2, the mapping table obtained by the embodiment of the present disclosure is applied to two existing models: DimeNet++ (Dime stands for Dual Independent Map Model) and EGNN (Exploiting Edge Features for Graph Neural Networks). "+PosEnc" means that the multiple current position vectors in the mapping table generated by the vector generation method proposed in the embodiment of the present disclosure (the vector functions corresponding to the multiple current position vectors are continuous and differentiable) are used as the input of the existing model (DimeNet++ or EGNN); "+Smooth" means that in addition to "+PosEnc", the "smoothness regularization" technology proposed in the embodiment of the present disclosure is also adopted, that is, a smoothness loss function is added in the process of generating multiple current position vectors in the mapping table. It should be noted that the various properties corresponding to the separate DimeNet++ and EGNN represent the test results without using the multiple current position vectors in the mapping table generated by the present disclosure as input.
[0169] The numbers in Table 2 represent the errors of each model on the test dataset. The smaller the number, the higher the accuracy of the model. After adopting the technical solutions proposed in the embodiments of this disclosure, the accuracy of DimeNet++ and EGNN was improved, and the test error was reduced.
[0170] Based on Table 2, it can be seen that compared with existing models (for example, the NMP (Gilmer et al., 2017) model, the SchNet (Schüutt et al., 2017) model, the Cormorant (Anderson et al., 2019) model, the L1Net (Miller et al., 2020) model, the LieConv (Finzi et al., 2020) model, the DimeNet++ model and the EGNN model), when the machine learning model uses the current position vector in the mapping table obtained by the embodiment of the present disclosure as input, the error of the machine learning model on the test data set can be reduced, and the accuracy of the output results of the machine learning model can be improved.
[0171] It should be noted that in this test, the hyperparameters of each machine learning model are the same.
[0172] Figure 5 A schematic diagram of a vector generation device provided in at least one embodiment of the present disclosure.
[0173] like Figure 5As shown, some embodiments of the present disclosure further provide a vector generating device 50, which includes one or more memories 501 and one or more processors 502. It should be noted that Figure 5 The components of the vector generating device 50 shown are merely exemplary and non-limiting. The vector generating device 50 may further include other components according to actual application requirements.
[0174] For example, one or more memories 501 are configured to non-transiently store computer-executable instructions; one or more processors 502 are configured to execute the computer-executable instructions. When the computer-executable instructions are executed by the one or more processors 502, the vector generation method according to any embodiment of the present disclosure is implemented. The specific implementation and related explanations of each step of the vector generation method can be found in the aforementioned embodiments of the vector generation method, and any repetitive details are not repeated here.
[0175] For example, the processor 502 and the memory 501 may communicate with each other directly or indirectly.
[0176] For example, the processor 502 and the memory 501 can communicate via a network. The network can include a wireless network, a wired network, and / or any combination of a wireless network and a wired network. The processor 502 and the memory 501 can also communicate with each other via a system bus, which is not limited in this disclosure.
[0177] For example, the processor 502 and the memory 501 may be provided on a server side (or in the cloud).
[0178] For example, the processor 502 can control other components in the vector generation device 50 to perform desired functions. The processor 502 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc.; the processor 502 can also be other processing units with data processing capabilities and / or program execution capabilities, such as a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a tensor processing unit (TPU), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The central processing unit (CPU) can be of X86 or ARM architecture, etc.
[0179] For example, the memory 501 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, a flash memory, etc. One or more computer-readable instructions may be stored on the computer-readable storage medium, and the processor 502 may execute the computer-readable instructions to implement various functions of the vector generation device 50. The storage medium may also store various application programs and various data.
[0180] For the technical effects that can be achieved by the vector generation device, reference may be made to the relevant description in the embodiment of the above-mentioned vector generation method, and repeated details will be omitted.
[0181] Figure 6 A schematic diagram of a data processing device provided in at least one embodiment of the present disclosure.
[0182] like Figure 6 As shown, some embodiments of the present disclosure further provide a data processing device 60, which includes one or more memories 601 and one or more processors 602. It should be noted that Figure 6 The components of the data processing device 60 shown are merely exemplary and non-limiting. The data processing device 60 may also have other components according to actual application requirements.
[0183] For example, one or more memories 601 are configured to non-transiently store computer-executable instructions; one or more processors 602 are configured to execute the computer-executable instructions. When the computer-executable instructions are executed by the one or more processors 602, the data processing method according to any embodiment of the present disclosure is implemented. For the specific implementation and related explanations of each step of the data processing method, please refer to the above-mentioned embodiments of the data processing method, and any repetitive details will not be repeated here.
[0184] For example, the processor 602 and the memory 601 may communicate with each other directly or indirectly.
[0185] For example, the processor 602 and the memory 601 can communicate via a network. The network can include a wireless network, a wired network, and / or any combination of a wireless network and a wired network. The processor 602 and the memory 601 can also communicate with each other via a system bus, which is not limited in this disclosure.
[0186] For example, the processor 602 and the memory 601 may be provided on a server side (or in the cloud).
[0187] For example, the processor 602 can control other components in the data processing device 60 to perform desired functions. The processor 602 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc.; the processor 602 can also be other forms of processing units with data processing capabilities and / or program execution capabilities, such as a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a tensor processing unit (TPU), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The central processing unit (CPU) can be of X86 or ARM architecture, etc.
[0188] For example, the memory 601 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, a flash memory, etc. One or more computer-readable instructions may be stored on the computer-readable storage medium, and the processor 602 may execute the computer-readable instructions to implement various functions of the data processing device 60. Various application programs and various data may also be stored in the storage medium.
[0189] For the technical effects that can be achieved by the data processing device, reference can be made to the relevant description in the embodiment of the above-mentioned data processing method, and the repeated parts will be omitted.
[0190] Figure 7 A schematic diagram of a non-transitory computer-readable storage medium provided for at least one embodiment of the present disclosure. Figure 7 As shown, one or more computer-executable instructions 701 may be non-transitory stored on a non-transitory computer-readable storage medium 70. For example, when the computer-executable instructions 701 are executed by a processor, one or more steps in the vector generation method according to any embodiment of the present disclosure or one or more steps in the data processing method according to any embodiment of the present disclosure may be performed.
[0191] For example, the non-transitory computer-readable storage medium 70 may be applied to the vector generating device 50 or the data processing device 60. For example, the non-transitory computer-readable storage medium 70 may include the memory 501 in the vector generating device 50 or the memory 601 in the data processing device 60.
[0192] For example, for the description of the non-transitory computer-readable storage medium 70 , reference may be made to the description of the memory 501 in the embodiment of the vector generating device 50 or the description of the memory 601 in the embodiment of the data processing device 60 , and repeated details will be omitted.
[0193] Reference below Figure 8 , Figure 8 A schematic structural diagram of an electronic device 800 suitable for implementing an embodiment of the present disclosure is shown. The electronic device 800 may be a terminal device or a server, and may be used to execute the vector generation method and / or data processing method of the above-mentioned embodiment. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, and the like, as well as fixed terminals such as digital TVs, desktop computers, smart home devices, and the like. Figure 8 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0194] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 806 into a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0195] Typically, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 806 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0196] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart to perform one or more steps in the data processing method described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 806, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0197] It should be noted that in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0198] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0199] The computer program code for performing the operations of the present disclosure can be written in one or more programming languages or combinations thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network (including a local area network (LAN) or a wide area network (WAN)), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0200] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0201] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.
[0202] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0203] In a first aspect, according to one or more embodiments of the present disclosure, a vector generation method includes: performing learnable processing on N current position vectors in a mapping table to obtain N learnable position vectors, where N is a positive integer; and updating the N current position vectors using the N learnable position vectors.
[0204] According to one or more embodiments of the present disclosure, the vector generation method further includes: performing the learnable process again on the updated N current position vectors.
[0205] According to one or more embodiments of the present disclosure, updating the mapping table using the N learnable position vectors includes: replacing the values of the N current position vectors in the mapping table with the values of the N learnable position vectors, respectively.
[0206] According to one or more embodiments of the present disclosure, the mapping table represents a mapping relationship between a position parameter and a current position vector, and also includes N position parameters corresponding one-to-one to the N current position vectors. The learnable processing includes: determining at least one position parameter group, wherein each position parameter group includes at least one position parameter among the N position parameters; based on the mapping table, obtaining at least one position vector group corresponding to the at least one position parameter group, wherein each position vector group includes a current position vector corresponding to a position parameter in a position parameter group corresponding to the position vector group obtained based on the mapping table; and processing the at least one position vector group to obtain the N learnable position vectors.
[0207] According to one or more embodiments of the present disclosure, processing the at least one position vector group to obtain the N learnable position vectors includes: processing the at least one position vector group respectively through a neural network to obtain at least one output result corresponding to the at least one position vector group; calculating at least one loss value through a loss function corresponding to the neural network based on the mapping table, the at least one position parameter group and the at least one output result; and in response to the at least one loss value not satisfying a predetermined condition, correcting the N current position vectors according to the at least one loss value to obtain the N learnable position vectors; in response to the at least one loss value satisfying the predetermined condition, using the N current position vectors as the N learnable position vectors.
[0208] According to one or more embodiments of the present disclosure, based on the mapping table, the at least one position parameter group and the at least one output result, at least one loss value is calculated by the loss function corresponding to the neural network, including: for each position parameter group: based on the position parameter group, determining the target result corresponding to the position parameter group; obtaining the N current position vectors in the mapping table; based on the N current position vectors, the target result and the output result corresponding to the position vector group corresponding to the position parameter group, obtaining a loss value by the loss function corresponding to the neural network.
[0209] According to one or more embodiments of the present disclosure, the vector generation method further includes: modifying parameters of the neural network based on the at least one loss value.
[0210] According to one or more embodiments of the present disclosure, the loss function includes an error loss function and a smoothness loss function.
[0211] According to one or more embodiments of the present disclosure, N is greater than 1, and the smoothness loss function is expressed as:
[0212]
[0213] Wherein, Lsmooth represents the smoothness loss function, ||*|| represents the two-norm, ∑ represents the sum, h(x i+1 ) represents the i+1th current position vector among the N current position vectors, h(x i ) represents the i-th current position vector among the N current position vectors, where i is a positive integer and is less than or equal to (N-1).
[0214] According to one or more embodiments of the present disclosure, the error loss function includes a root mean square error loss function or a mean absolute error loss function.
[0215] According to one or more embodiments of the present disclosure, the loss function is expressed as:
[0216] L=L e +λ*L smooth
[0217] Wherein, L represents the loss function, Le represents the error loss function, Lsmooth represents the smoothness loss function, and λ represents a hyperparameter that controls the contribution of the smoothness loss function and is a constant.
[0218] According to one or more embodiments of the present disclosure, based on the mapping table, at least one position vector group corresponding to the at least one position parameter group is obtained, including: for each position parameter in each position parameter group: in response to the position parameter being different from any position parameter among the N position parameters: determining a first position parameter to be interpolated and a second position parameter to be interpolated corresponding to the position parameter, wherein the first position parameter to be interpolated and the second position parameter to be interpolated are two position parameters among the N position parameters, and the position parameters are located between the first position parameter to be interpolated and the second position parameter to be interpolated; based on the mapping table, determining a current position vector corresponding to the first position parameter to be interpolated as a first position vector to be interpolated and a current position vector corresponding to the second position parameter to be interpolated as a second position vector to be interpolated; interpolating the first position vector to be interpolated and the second position vector to be interpolated to obtain a current position vector corresponding to the position parameter; in response to the position parameter being one of the N position parameters: directly determining the current position vector corresponding to the position parameter based on the mapping table.
[0219] According to one or more embodiments of the present disclosure, the interpolation process corresponds to an interpolation method including linear interpolation and / or cubic Hermite interpolation.
[0220] According to one or more embodiments of the present disclosure, determining at least one position parameter group includes: determining at least one data to be processed; and based on the at least one data to be processed, determining the at least one position parameter group corresponding one-to-one to the at least one data to be processed.
[0221] According to one or more embodiments of the present disclosure, each piece of data to be processed corresponds to a molecule.
[0222] According to one or more embodiments of the present disclosure, the vector generation method further includes: determining a position parameter range based on a training data set, wherein the training data set includes a plurality of training data; and determining the N position parameters based on the position parameter range.
[0223] According to one or more embodiments of the present disclosure, determining a position parameter range based on a training data set includes: determining a plurality of training position parameters based on the plurality of training data; determining a first training position parameter and a second training position parameter among the plurality of training position parameters, wherein, among the plurality of training position parameters, the first training position parameter is the largest and the second training position parameter is the smallest; and determining the position parameter range based on the first training position parameter and the second training position parameter.
[0224] According to one or more embodiments of the present disclosure, the N position parameters are evenly distributed within the position parameter range.
[0225] According to one or more embodiments of the present disclosure, determining a position parameter range based on a training data set includes: determining a plurality of training position parameters based on the plurality of training data; determining a first training position parameter and a second training position parameter among the plurality of training position parameters, wherein, among the plurality of training position parameters, the first training position parameter is the largest and the second training position parameter is the smallest; transforming the first training position parameter and the second training position parameter respectively to obtain a first transformed training position parameter and a second transformed training position parameter; determining the position parameter range based on the first transformed training position parameter and the second transformed training position parameter.
[0226] According to one or more embodiments of the present disclosure, the transformation process is performed on the N position parameters to obtain N transformed position parameters, and the N transformed position parameters are uniformly distributed within the position parameter range.
[0227] According to one or more embodiments of the present disclosure, each position parameter in the mapping table includes a distance between two adjacent atoms in a molecule and / or a bond angle in the molecule.
[0228] In a second aspect, according to one or more embodiments of the present disclosure, a data processing method includes: obtaining a position parameter to be processed; determining a position vector to be processed corresponding to the position parameter to be processed based on a mapping table corresponding to the position parameter to be processed, wherein the mapping table includes N current position vectors, and the N current position vectors in the mapping table are updated based on the N learnable position vectors obtained by the vector generation method according to any embodiment of the present disclosure; processing the position vector to be processed by a neural network corresponding to the mapping table to obtain a processing result.
[0229] According to one or more embodiments of the present disclosure, the position parameters to be processed include the distance between two adjacent atoms in a molecule and / or the bond angle in the molecule, and the processing result includes a predicted value of the property of the molecule.
[0230] In a third aspect, according to one or more embodiments of the present disclosure, a vector generation device includes: one or more memories that non-transiently store computer-executable instructions; and one or more processors configured to run the computer-executable instructions, wherein the computer-executable instructions, when executed by the one or more processors, implement the vector generation method according to any embodiment of the present disclosure.
[0231] In a fourth aspect, according to one or more embodiments of the present disclosure, a data processing device includes: one or more memories that non-transiently store computer-executable instructions; and one or more processors configured to run the computer-executable instructions, wherein the computer-executable instructions, when executed by the one or more processors, implement the data processing method according to any embodiment of the present disclosure.
[0232] In a fifth aspect, according to one or more embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the vector generation method according to any embodiment of the present disclosure or the data processing method according to any embodiment of the present disclosure is implemented.
[0233] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0234] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0235] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
[0236] Regarding this disclosure, the following points need to be explained:
[0237] (1) The drawings of the embodiments of the present disclosure only relate to the structures related to the embodiments of the present disclosure. Other structures may refer to conventional designs.
[0238] (2) In the absence of conflict, the embodiments of the present disclosure and the features therein may be combined with each other to form new embodiments.
[0239] The above description is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A vector generation method, comprising: Performing learnable processing on N current position vectors in a mapping table to obtain N learnable position vectors, wherein the mapping table represents a mapping relationship between position parameters and current position vectors and further includes N position parameters corresponding one-to-one to the N current position vectors, the N current position vectors corresponding one-to-one to the N learnable position vectors, and N is a positive integer greater than 1; Updating the N current position vectors using the N learnable position vectors; Performing the learnable processing again on the updated N current position vectors; Wherein, updating the mapping table using the N learnable position vectors includes: Replacing the values of the N current position vectors in the mapping table with the values of the N learnable position vectors respectively; Each position parameter in the mapping table includes the distance between two adjacent atoms in a molecule and / or the bond angle in the molecule, and the current position vector is used to predict molecular properties using a neural network.
2. The vector generation method according to claim 1, wherein: The learnable process includes: determining at least one position parameter group, wherein each position parameter group includes at least one position parameter of the N position parameters; Based on the mapping table, obtaining at least one position vector group corresponding to the at least one position parameter group, wherein each position vector group includes a current position vector corresponding to a position parameter in the position parameter group corresponding to the position vector group obtained based on the mapping table; The at least one position vector group is processed to obtain the N learnable position vectors.
3. The vector generation method according to claim 2, wherein: Processing the at least one position vector group to obtain the N learnable position vectors includes: Processing the at least one position vector group respectively through a neural network to obtain at least one output result corresponding to the at least one position vector group respectively; Based on the mapping table, the at least one position parameter group, and the at least one output result, calculating at least one loss value using a loss function corresponding to the neural network; and In response to the at least one loss value not satisfying a predetermined condition, modifying the N current position vectors according to the at least one loss value to obtain the N learnable position vectors; In response to the at least one loss value satisfying the predetermined condition, the N current position vectors are used as the N learnable position vectors.
4. The vector generation method according to claim 3, wherein: Based on the mapping table, the at least one position parameter group, and the at least one output result, calculating at least one loss value using a loss function corresponding to the neural network includes: For each positional parameter group: Based on the position parameter group, determining a target result corresponding to the position parameter group; Obtain the N current position vectors in the mapping table; Based on the N current position vectors, the target result and the output result corresponding to the position vector group corresponding to the position parameter group, a loss value is calculated by the loss function corresponding to the neural network.
5. The vector generation method according to claim 3, further comprising: Parameters of the neural network are modified based on the at least one loss value.
6. The vector generation method according to claim 3, wherein: The loss function includes an error loss function and a smoothness loss function.
7. The vector generation method according to claim 6, wherein: N is greater than 1, and the smoothness loss function is expressed as: Wherein, Lsmooth represents the smoothness loss function, ||*|| represents the two-norm, ∑ represents the sum, h(x i+1 ) represents the i+1th current position vector among the N current position vectors, h(x i ) represents the i-th current position vector among the N current position vectors, where i is a positive integer and is less than or equal to (N-1).
8. The vector generation method according to claim 6, wherein: The error loss function includes a root mean square error loss function or a mean absolute error loss function.
9. The vector generation method according to claim 6, wherein: The loss function is expressed as: L=L e +λ*L smooth Wherein, L represents the loss function, Le represents the error loss function, Lsmooth represents the smoothness loss function, and λ represents a hyperparameter that controls the contribution of the smoothness loss function and is a constant.
10. The vector generation method according to claim 2, wherein: Acquiring, based on the mapping table, at least one position vector group corresponding to each of the at least one position parameter groups, including: For each positional parameter in each positional parameter group: In response to the position parameter being different from any of the N position parameters: Determining a first position parameter to be interpolated and a second position parameter to be interpolated corresponding to the position parameter, wherein the first position parameter to be interpolated and the second position parameter to be interpolated are two position parameters among the N position parameters, and the position parameter is located between the first position parameter to be interpolated and the second position parameter to be interpolated; Based on the mapping table, determining a current position vector corresponding to the first position parameter to be interpolated as a first position vector to be interpolated and a current position vector corresponding to the second position parameter to be interpolated as a second position vector to be interpolated; performing interpolation processing on the first position vector to be interpolated and the second position vector to be interpolated to obtain a current position vector corresponding to the position parameter; In response to the position parameter being one of the N position parameters: Based on the mapping table, a current position vector corresponding to the position parameter is directly determined.
11. The vector generation method according to claim 10, wherein: The interpolation method corresponding to the interpolation process includes linear interpolation and / or cubic Hermite interpolation.
12. The vector generation method according to claim 2, wherein: Determine at least one position parameter group, including: determining at least one piece of data to be processed; Based on the at least one data to be processed, the at least one position parameter group corresponding one-to-one to the at least one data to be processed is determined.
13. The vector generation method according to claim 12, wherein: Each data to be processed corresponds to a molecule.
14. The vector generation method according to claim 2, further comprising: Determining a position parameter range based on a training data set, wherein the training data set includes a plurality of training data; Based on the position parameter range, the N position parameters are determined.
15. The vector generation method according to claim 14, wherein: Based on the training data set, determine the range of position parameters, including: determining a plurality of training position parameters based on the plurality of training data; Determining a first training position parameter and a second training position parameter among the plurality of training position parameters, wherein, among the plurality of training position parameters, the first training position parameter is the largest and the second training position parameter is the smallest; The position parameter range is determined based on the first training position parameter and the second training position parameter.
16. The vector generation method according to claim 15, wherein: The N position parameters are evenly distributed within the position parameter range.
17. The vector generation method according to claim 14, wherein: Based on the training data set, determine the range of position parameters, including: determining a plurality of training position parameters based on the plurality of training data; Determining a first training position parameter and a second training position parameter among the plurality of training position parameters, wherein, among the plurality of training position parameters, the first training position parameter is the largest and the second training position parameter is the smallest; performing transformation processing on the first training position parameter and the second training position parameter respectively to obtain a first transformed training position parameter and a second transformed training position parameter; The position parameter range is determined based on the first transformed training position parameter and the second transformed training position parameter.
18. The vector generation method according to claim 17, wherein: The transformation process is performed on the N position parameters to obtain N transformed position parameters, and the N transformed position parameters are uniformly distributed within the position parameter range.
19. A data processing method comprising: Get the position parameters to be processed; Determining, based on a mapping table corresponding to the position parameter to be processed, a position vector to be processed corresponding to the position parameter to be processed, wherein the mapping table includes N current position vectors, and the N current position vectors in the mapping table are obtained by updating the N learnable position vectors obtained by the vector generation method according to any one of claims 1 to 18; The position vector to be processed is processed by a neural network corresponding to the mapping table to obtain a processing result.
20. The data processing method according to claim 19, wherein: The position parameters to be processed include the distance between two adjacent atoms in a molecule and / or the bond angle in the molecule. The processing results include predicted values of properties of the molecules.
21. A vector generating device, comprising: one or more memories that non-transitorily store computer-executable instructions; one or more processors configured to execute the computer-executable instructions, The computer executable instructions, when executed by the one or more processors, implement the vector generation method according to any one of claims 1 to 18.
22. A data processing device comprising: one or more memories that non-transitorily store computer-executable instructions; one or more processors configured to execute the computer-executable instructions, Wherein, when the computer executable instructions are executed by the one or more processors, the data processing method according to claim 19 or 20 is implemented.
23. A non-transitory computer-readable storage medium, wherein: The non-transitory computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the vector generation method according to any one of claims 1 to 18 or the data processing method according to claim 19 or 20.
Citation Information
Patent Citations
Drug small molecule property prediction method, device and equipment based on self-supervised learning
CN113707235A