Optimization of neural network wave function

By determining the spin metric associated with the target spin symmetry in the neural network wave function optimization, the problems of spin pollution and high computational complexity in the prior art are solved, and more accurate energy results and the effect of reducing computational costs are achieved.

CN119856182APending Publication Date: 2025-04-18BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480003527.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art is difficult to effectively ensure spin symmetry when optimizing neural network wave functions, resulting in problems of spin pollution and high computational complexity.

Method used

By obtaining the description information of the molecular system, selecting the first electron with the first spin state, and using the neural network to determine the spin metric associated with the target spin symmetry based on the exchange of description information and electron positions, the neural network is updated to optimize the wave function.

Benefits of technology

Effectively eliminates spin pollution in NNVMC, significantly reduces computational costs, and achieves more accurate energy results for multi-reference systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119856182A_ABST
    Figure CN119856182A_ABST
Patent Text Reader

Abstract

A method for optimizing a neural network wave function is presented. The method comprises: obtaining description information of a molecular system, the molecular system comprising a group of first electrons having a first spin state and a group of second electrons having a second spin state, the description information indicating corresponding positions of the group of first electrons and the group of second electrons; selecting a first electron having a first spin state from a group of first electrons; determining a spin metric associated with the target spin symmetry based on the description information and the exchange of the selected position of the first electron with the corresponding positions of the set of second electrons by using a neural network representing a wave function of the molecular system; and updating the neural network based on the loss function including the spin metric.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates generally to the field of computers, and more specifically, to methods, apparatus, and computer program products for optimizing neural network wave functions. Background Art

[0002] Accurately characterizing subtle electron-electron correlations is necessary for understanding multi-reference systems in quantum physics and chemistry, especially in areas such as chemical reactivity, catalysis, photochemistry, and superconductivity. Neural network-based variational Monte Carlo (NNVMC) methods offer an attractive alternative. These studies employ permutation isovariant neural networks with a large number of parameters to parameterize the wave function and optimize it based on the variational principle. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for optimizing a neural network wave function is provided. The method includes: obtaining description information of a molecular system, the molecular system including a group of first electrons having a first spin state and a group of second electrons having a second spin state, the description information indicating the corresponding positions of the group of first electrons and the group of second electrons; selecting a first electron having a first spin state from the group of first electrons; determining a spin metric associated with a target spin symmetry based on the description information and the exchange of the position of the selected first electron with the corresponding position of the group of second electrons by using a neural network representing the wave function of the molecular system; and updating the neural network based on a loss function including the spin metric.

[0004] In a second aspect of the present disclosure, an electronic device is provided, comprising: a computer processor coupled to a computer readable memory unit, the memory unit comprising instructions, which implement the method according to the first aspect of the present disclosure when executed by the computer processor.

[0005] In a third aspect of the present disclosure, a computer program product is provided, which includes a computer-readable storage medium having program instructions implemented therewith, and the program instructions can be executed by an electronic device to enable the electronic device to perform the method according to the first aspect of the present disclosure.

[0006] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of some embodiments of the present disclosure in the accompanying drawings, in which like reference numerals generally refer to like components in the embodiments of the present disclosure.

[0008] Figure 1 An example environment is shown in which example embodiments of the present disclosure may be implemented;

[0009] Figure 2 An example schematic diagram comparing different penalties imposed on spin symmetry according to some embodiments of the present disclosure is shown;

[0010] Figure 3 An example diagram showing the expansion of a neural network wave function on a Hamiltonian eigenstate according to some embodiments of the present disclosure;

[0011] Figure 4 An example schematic diagram showing the effects of different components in a loss function according to some embodiments of the present disclosure;

[0012] FIG. 5A to FIG. 5D shows an example graph comparing optimizations with imposed spin symmetry according to some embodiments of the present disclosure;

[0013] Figure 6 An example schematic diagram showing achieving a target state without prior calculation of a low energy state according to some embodiments of the present disclosure is shown;

[0014] Figure 7 An example flow chart showing a method of optimizing a neural network wave function according to some embodiments of the present disclosure; and

[0015] Figure 8 A block diagram of an electronic device is shown in which various embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION

[0016] The principles of the present disclosure will now be described with reference to some embodiments. It should be understood that these embodiments are described for illustrative purposes only, and help those skilled in the art to understand and implement the present disclosure, without implying any limitation on the scope of the present disclosure. The disclosure described herein can be implemented in various ways except for the following described ways.

[0017] In the following description and claims, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.

[0018] References in this disclosure to "one embodiment," "an embodiment," "an example embodiment," etc. indicate that the described embodiment may include a particular feature, structure, or characteristic, but not every embodiment necessarily includes the particular feature, structure, or characteristic. Furthermore, such phrases do not necessarily refer to the same embodiment. Furthermore, when a particular feature, structure, or characteristic is described in conjunction with an example embodiment, it is considered to be within the knowledge of those skilled in the art to combine with other embodiments to affect such feature, structure, or characteristic, whether or not explicitly described.

[0019] It should be understood that although the terms "first", "second", etc. may be used to describe various elements in this article, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the exemplary embodiments. As used herein, the term "and / or" includes any and all combinations of one or more of the listed terms.

[0020] The terms used herein are used only to describe specific embodiments and are not intended to limit the example embodiments. As used herein, the singular forms "a", "an", and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises", "including", "having", "having", "including", and / or "comprising", when used herein, specify the presence of the features, elements, and / or components, etc., but do not exclude the presence or addition of one or more other features, elements, components, and / or combinations thereof.

[0021] The principle of the present disclosure will now be described with reference to some embodiments. It should be understood that these embodiments are described only for illustrative purposes and to help those skilled in the art understand and implement the present disclosure without implying any limitation on the scope of the present disclosure. The disclosure described herein can be implemented in a variety of ways except for the manner described below. In the following description and claims, unless otherwise defined, all technical and scientific terms used herein have the same meanings as those of ordinary skill in the art to which the present disclosure belongs.

[0022] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0023] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, scope of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0024] For example, in response to receiving a user's active request, a prompt message is sent to the user to explicitly inform the user that the operation requested to be performed will require obtaining and using the user's information, so that the user can independently choose whether to provide information to software or hardware such as electronic devices, applications, servers or storage media that execute the operations of the technical solution of the present disclosure based on the prompt message.

[0025] As an optional but non-limiting embodiment, in response to receiving an active request from the user, the method of sending the prompt information to the user may include, for example, a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide information to the electronic device.

[0026] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the embodiments of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the embodiments of the present disclosure.

[0027] As used herein, the term "model" refers to the association between input and output learned from training data, and therefore the corresponding output can be generated for a given input after training. The generation of the model can be based on machine learning techniques. Typically, a machine learning model can be constructed that receives input information and makes predictions based on the input information. For example, a classification model can predict the category of input information in a predetermined set of categories. As used herein, a "model" may also be referred to as a "machine learning model", "learning model", "machine learning network" or "learning network", which are used interchangeably herein. Example environment and principles

[0028] Figure 1 A block diagram of an example environment 100 is shown in which example embodiments of the present disclosure may be implemented. Figure 1 In the environment 100, the electronic device 120 is used to optimize the neural network wave function for the molecular system 101. The molecular system 101 can include any suitable number of molecules, which can be of the same type or different types.

[0029] The molecular system 101 may include a plurality of electrons, including a group of first electrons having a first spin state and a group of second electrons having a second spin state. Figure 1As shown, the molecular system 101 may include electrons having a spin-up state (which are also referred to as spin-up electrons, such as spin-up electron 112) and electrons having a spin-down state (which are also referred to as spin-down electrons, such as spin-up electron 111). In the following, some embodiments are described with respect to spin-up electrons and spin-down electrons. The spin-up electrons may be represented as α, and the spin-down electrons may be represented as β. In the example, the number of spin-up electrons is represented as N α or N ↑ , and the number of spin-down electrons is denoted by N β or N ↓ .

[0030] Neural network 102 represents a wave function of molecular system 101. Such a wave function is also referred to as a neural network wave function. Electronic device 120 may train neural network 102 to obtain a wave function of molecular system 101 having a target spin state. The target spin state may correspond to a target spin symmetry. In some embodiments, the training of neural network 102 may be based on NNVMC.

[0031] exist Figure 1 In the embodiment, the electronic device 110 may be any system with computing capabilities, such as various computing devices / systems, terminal devices, servers, etc. The terminal device may be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a netbook, a tablet computer, a media computer, a multimedia tablet computer, or any combination thereof, including accessories and peripheral devices of these devices or any combination thereof. The server may include, but is not limited to, a mainframe, an edge computing node, a computing device in a cloud environment, etc.

[0032] As mentioned above, NNVMC can be employed to optimize the neural network wave function. However, the optimization in NNVMC is not guaranteed to provide quantum states with the correct spin symmetry, which is one of the fundamental intrinsic symmetries in non-relativistic systems. In particular, the optimized neural network Ansatz is generally not a spin square operator. This leads to so-called spin contamination. This is especially true when the different spin states are nearly degenerate due to strong electron correlations.

[0033] If the computational complexity is not taken into account, the squared spin value can be directly designed. The penalty can be calculated as the expectation of its local value: The variable X is the set of three-dimensional coordinates of N electrons, X≡[x1,…,x N ] Permutation operator Swap the coordinates of one spin-up electron with the coordinates of another spin-down electron, indicated by α and β, respectively, and change the input of X from [x1, …, x α , …, x β , …, x N ] is changed to [x1,…,x β , …, x α , …, x N ]. ↑ and N ↓ They are represented by the number of electrons with spin up and the number of electrons with spin down, respectively.

[0034] Figure 2 Box 210 of FIG. 1 shows a schematic diagram of the displacement of each spin-up electron with each spin-down electron. Figure 2 As can be seen from the figure, the N ↑ N ↓ Different from swapping, this computation is unfortunately very expensive, and in N ↑ and N ↓ When it is equivalent, it is O(N 2 ) order of magnitude. In other words, compared to the computational bottleneck of VMC (Laplacian operator), is even more expensive to evaluate, at O(N). So if is directly added to the loss function, for example The computational complexity of the entire VMC process will increase Hereinafter, this penalty is referred to as punishment, and has The running time of the penalty is given by Figure 2 As shown by curve 202 in FIG. 2 , curve 201 shows the running time of the standard NNVMC. It can be seen that The penalty is computationally extremely efficient and expensive.

[0035] To this end, an example embodiment of the present disclosure provides a scheme for optimizing a neural network function. In an embodiment, descriptive information of a molecular system is obtained as an input to a neural network representing a wave function of the molecular system. The molecular system includes a group of first electrons having a first spin state and a group of second electrons having a second spin state, and the descriptive information indicates corresponding positions of a group of first electrons and a group of second electrons. A first electron having a first spin state is selected from a group of first electrons. Then, by using a neural network, a spin metric associated with a target spin symmetry is determined based on the descriptive information and the exchange of the position of the selected first electron with the corresponding position of a group of second electrons. Based on a loss function including the spin metric, the neural network can be updated. Thereby, the neural network wave function is optimized.

[0036] This spin metric used in the loss function is determined by replacing a particular first electron with each second electron, rather than replacing every first electron with every second electron. Therefore, this spin metric can be considered as a low-scaling penalty term.

[0037] According to example embodiments of the present disclosure, the scope of NNVMC can be extended by acquiring the correct quantum states with target spin symmetry, including both ground and excited states. The low scaling penalty term can eliminate spin contamination in NNVMC with minimal computational overhead. The computational cost can be significantly reduced. With this penalty term, more accurate energy results for multi-reference systems are achieved. Example Rationale

[0038] To better understand the embodiments of the present disclosure, some basic principles are first described with reference to spin-up electrons and spin-down electrons.

[0039] In the embodiment of the present disclosure, a new penalty term is designed, called penalty, eliminating the additional computational overhead O(N) while still being able to effectively enforce spin symmetry. Penalty Utilization Rising Operator The properties of the spin state polarized about the z-axis are annihilated, Where S represents the total spin of the molecular system, S z represents the spin along the z-axis.

[0040] This property means The eigenstates of is obtained as 0. It can be further shown is equivalent to the following condition (see below for more details):

[0041] With the term in equation (1) Compared with the calculation of β (X) involves only the first index in the summation and evaluates the wave function N ↑ times, thereby reducing The additional computational complexity of .

[0042] Figure 2 Box 220 of FIG. 1 shows a schematic diagram of replacing one spin-down electron with each spin-up electron. The running time of the penalty is shown in curve 203. From the comparison of curve 203 with curve 201 and curve 202, it can be seen that The efficiency of punishment The punishment has been improved.

[0043] Reference now Figure 1 Some example embodiments are described regarding an optimization process, by way of example and not by way of limitation.

[0044] The neural network 102 can be implemented by any suitable structure, and the protection scope of the present disclosure is not limited in this respect. As an example without any limitation, a NNVMC computing framework with forward Laplacian (ForwardLaplacian, referred to as LapNet) can be used. LapNet uses a general attention mechanism to solve electron-electron associations. It has demonstrated promising results on a wide range of chemical systems while maintaining feasible computational costs.

[0045] LapNet is a multi-row Slaster-Jamrow-reflow type Ansatz, as shown below: Where input X = [x1, ..., x N ] consists of the spatial coordinates of N electrons. The spatial coordinates should be divided into the spin-up part and the spin-down part LapNet encodes these input features by applying a rescaling transformation to the spatial coordinates and appending the spin direction to the rescaled spatial vector. These features are then fed into a permuted equivariant neural network. In LapNet, the equivariant part consists of stacked sparse derivative attention (SDA). SDA is a modified attention block that introduces more sparsity in the derivatives, thereby facilitating efficient computation of the Laplacian. The output of the equivariant part is divided into N det square matrices, where each matrix contains N rows and N columns. Unlike the standard Slater determinant used in quantum chemistry, each entry in the square matrix aggregates all the electronic information through the SDA block. This mechanism, called backflow transformation, provides a powerful representation of electron-electron correlations. The determinants of these matrices are summed to produce the value of the wave function. Here, the Jastrow factor is adopted to satisfy the cusp condition. The combination of isovariant networks and determinants makes LapNet satisfy the Pauli exclusion principle, that is, the wave function is antisymmetric under the exchange of the spatial coordinates of electrons with the same spin direction.

[0046] In order to optimize the neural network 102, a loss function may be used. For example, in some embodiments, the loss function used may have the following form: Where E θ represents the energy expectation value from the Hamiltonian under the Born-Oppenheimer approximation, P θ,i Represents a corresponding weight ω i penalty item.

[0047] Penalties include The penalty term is the spin metric. The optimization of the neural network wave function may include multiple rounds. In each round, a specific first electron having a first spin state is selected from a set of first electrons. A specific first electron is selected for substitution with each second electron and is therefore also referred to as an anchor electron. For example, Figure 2 As shown in block 220 of , a particular spin-down electron is selected for replacement with each spin-up electron. In some embodiments, the particular first electron in each round can be randomly selected.

[0048] In some embodiments, the specific first electron in each round can be selected in a way that each first electron is uniformly selected over multiple rounds. For example, the first electron selected in the first round of multiple rounds is different from the first electron selected in the second round of multiple rounds. This can achieve optimized stability.

[0049] Once a particular first electron is selected, the neural network 102 can be used to determine a penalty term associated with a target spin symmetry based on the descriptive information and the exchange of the position of the selected first electron with the corresponding positions of a set of second electrons.

[0050] About Penalty Items Some more examples are described in . In most real-space variational Monte Carlo methods, the neural network ansatzΨ θ : represents only one component of the complete state. This component yields the correct expectation for spin-independent operators. However, spin-dependent operators are not well defined within the component. To handle such operators, the complete state can be reconstructed using the antisymmetric property: Among them, |Ψ θ > is an antisymmetric state and C is a normalization factor. Sym(N) is a symmetry group with N elements. refers to the spin state, where the first N ↑ The electrons are spin-up electrons, and the N ↓ The electrons are spin down electrons. represents a permutation operator that rearranges both the spatial coordinates and the associated spin directions. i is the parity of the permutation. θ > is all permutation operators Therefore, as long as the operator Commuting with the permutation operator, we can calculate Expected value: in Note that |Ψ θ > also has eigenvalues of eigenstates, so only n a =N ↑ The term is non-zero. Applying this formula yields: Where S L (X) is defined in Equation (1). As mentioned above, the computational cost of this term is the standard local energy evaluation times, which makes it Punishment is difficult to apply.

[0051] Instead of direct calculation expectations, and The relationship between can be exploited to speed up the calculation: in Notice The expectation can be rewritten as: When the last term is zero, The expectation reaches the minimum This means that |Ψ θ >Yes This property makes becomes an appropriate penalty term to enforce spin symmetry. To numerically compute the last term, a similar technique is used in equation (8). Note that Increase the number of spin-up electrons, so only n a =N ↑ +1 non-zero entry: in It is defined in equation (2).

[0052] Although introducing the penalty term may result in a solution with the correct spin symmetry, the training process may be unstable due to the large variance. In some embodiments, to determine the penalty term, the neural network 102 may be used to generate a first value of the wave function based on the description information. For each second electron in a set of second electrons, a second value of the wave function may be generated by using the neural network 102 based on an exchange of a position of a selected first electron with a position of the second electron. In some embodiments, the position of the selected first electron may be exchanged with the position of the second electron to update the description information, and the neural network 102 may generate a second value of the wave function based on the updated description information.

[0053] Then, a penalty term may be derived based on the first value and the corresponding second value generated for a set of second electrons: In some embodiments, for each second electron in the set of second electrons, a ratio of the second value to the first value is determined. The penalty term may be determined based on a difference between a predetermined value and a sum of the ratios determined for the set of second electrons.

[0054] As an example, to reduce variance, an improved penalty is proposed Where β = N ↑ +1, N ↑ +2, ..., N. Obviously if is zero. This shows that when When |Ψ is zero, θ >Yes Due to the symmetry of all spin-down electrons, Independent of β. Therefore, it is as follows: Among them, only is zero, The expected value of This means that the state is Therefore Can be used as a penalty term.

[0055] Although ideally Independent of β, but an empirical estimator may be affected by the choice of β. In practice, to improve the numerical stability of β, values ​​from the set of β are iteratively assigned for each step in training.

[0056] In some embodiments, the number of first electrons in the set of first electrons is equal to or less than the number of second electrons in the set of second electrons. imposed as Therefore, to obtain a state with spin quantum number S, the number of electrons with spin up should be set to The number of spin-down electrons is set to

[0057] In some embodiments, the loss function (e.g., as shown in Equation (5)) may also include an overlap metric indicating the orthogonality between a target state of the molecular system and at least one additional state below the target state, both of which correspond to a target spin symmetry. The overlap metric may be considered an overlap penalty term.

[0058] As an example, the penalty term The key advantage of is its efficient integration with the overlap penalty term, especially when the target is an excited state. This combination avoids the calculation of intermediate states with unnecessary spin symmetries, thus improving the efficiency and accuracy of excited state calculations.

[0059] In the present disclosure, the form of an overlap term is adopted, in which the square of the pairwise overlap is directly used as a penalty term. The overlap penalty term targeting the i-th excited state within the spin can be expressed as: Where S ij Indicated in Ψ i and j The normalized overlap between ij is a free parameter, which should be set larger than E i -E j To avoid state collapse.

[0060] The overlap penalty may be calculated in any suitable manner. In some embodiments, at least one additional wave function corresponding to at least one additional state of the molecular system 101 may be obtained. For example, the at least one additional wave function may be obtained by optimizing at least one additional neural network for the additional state. The overlap penalty term may then be determined based on the at least one additional wave function and the neural network 101.

[0061] As an example, we can use an estimator that has been shown in previous studies to be effective in calculating overlaps to estimate the overlap penalty via a Monte Carlo method: where <>|Ψ2| means x uses the distribution |Ψ| 2 When the overlap penalty part is trained to be zero, |Ψi >It is orthogonal (approximately) to its lower energy state.

[0062] In order to optimize the neural network wave function, the form of the penalty gradient in the loss function is given. For the overlapping penalty part, its derivative can be directly evaluated using the Monte Carlo method: in represents lnΨ i (x) The derivative with respect to the network parameters {θ}.

[0063] Because the raising operator The non-Hermitian property of The derivative of contains the gradient of the local estimator. More specifically, the penalty The gradient of can be calculated by the following rule:

[0064] Reference now Figures 3 to 5D To demonstrate the effectiveness of some embodiments of the present disclosure. Figure 3 As shown, the initial wave function represented by the neural network 102 can be expressed in the Hamiltonian eigenstate Φ i The height of the bars indicates the overlap with each eigenstate, and the shading of the bars indicates different spin symmetries.

[0065] Figure 4 The effect of different components of the loss function in the proposed NNVMC process is shown. Schematic diagram 401 corresponds to the energy term, which eliminates the state components with higher energy as in standard NNVMC. The penalty corresponds to retaining only states with the target spin symmetry. Schematic 401 corresponds to an overlap penalty, which eliminates the component corresponding to the specified state.

[0066] Figure 5A It is shown that standard NNVMC may lead to spin contamination in ground state calculations. Figure 5B Shows the punishment Helps achieve better ground state estimates in the absence of spin contamination. Figure 5C It is shown how embodiments of the present disclosure can efficiently obtain a ground state with a specified spin symmetry. Figure 5D It is shown how embodiments of the present disclosure can efficiently obtain excited states with specified spin symmetry.

[0067] Through punishment With the effective design and implementation of , the scope of NNVMC can be significantly extended. This method not only helps to suppress spin contamination in ground state optimization, but also helps to efficiently and accurately calculate excited states when combined with overlap penalty, such as Figures 3 to 5D More importantly, efficient The penalty enables the modified NNVMC process to be applied to larger and more practical systems.

[0068] Furthermore, another advantage of the present disclosure is that a target state can be achieved without prior calculation of a low energy state. Figure 6 The nitrogen atom 4 As shown by arrow 601, some conventional solutions require calculating all nine low eigenstates to isolate 4 In contrast, as shown by arrow 602, the present disclosure sets the spin square constraint to 3, directly 4 The P state identifies the first eigenstate that is orthogonal to the ground state, effectively achieving the target state without prior calculation of lower energy states. Example Use Case

[0069] Some embodiments are described above. Now, Some example use cases for penalties.

[0070] The first use case is symmetry-improving ground state optimization. For multi-reference systems with nearly degenerate energy states, NNVMC often gets stuck in local minima, leading to unsatisfactory quantum states. This challenge is reflected in loss scenarios with suboptimal local minima. By The penalty is incorporated into the loss function, which can significantly improve the overall loss scenario, because states with wrong spin symmetry are heavily penalized. Therefore, NNVMC will achieve a smoother and more robust optimization process to reach the target quantum state.

[0071] To illustrate this, let's take ethylene, a molecule of great importance in scientific research, especially in the fields of photochemistry, quantum dynamics, and organic compounds. Ethylene is a notoriously challenging system for electronic structure studies due to complex interactions of correlation effects and near-degenerate states, especially in distorted configurations. Consider its vertical geometry, where the N state (ground state) and the T state (lowest triplet state) are nearly degenerate. In NNVMC calculations, with The correct singlet N state with penalty and the lowest excited triplet T state with overlap penalty are successfully obtained.

[0072] The second use case is symmetry-enhanced excited state calculations. In this disclosure, excited states are solved in a smaller subspace characterized by spin symmetry. The spin square operator The states in different energy levels can be labeled by their spin values. Penalties are used to constrain the Ansatz to the assigned spin states and to obtain highly excited states through overlap penalties. This method reduces the number of states involved by excluding states in different spins. The lowest 10 states are calculated and can be classified as spin doublets. and spin quartet The ground state and the 10th state are represented by the symbols 4 S0 and 4 The remaining eight states reside at two intermediate energy levels and are called quintuple degenerate states. 2 D 0 and the triply degenerate state 2 P 0 , indicated by the blue steps in the figure. Compared with using only the overlap penalty, by constraining to the spin quartet to calculate 4 P, significantly reducing the number of training states from 10 to 2, thereby improving efficiency, and reducing the number of overlap penalty terms from 20 to 1, thereby achieving higher accuracy.

[0073] The third use case is diradical systems. Diradical systems have attracted much scientific attention due to their unique electronic properties and critical impact on a variety of chemical processes ranging from organic photovoltaics to molecular magnetism. The reactivity of diradicals is closely related to their singlet-triplet (ST) energy gap, which determines their photophysical behavior and magnetic properties. However, due to the complex multi-referenced nature of diradicals, the accurate determination of their ST gap has been a significant challenge in quantum chemistry.

[0074] Here, there is The penalized ST gap has been studied on a wide range of diradical systems. Those systems have recently been studied, where spin-projected assisted field quantum Monte Carlo (AFQMC) was applied for accurate ST gap calculations. The results showed that its accuracy is comparable to that of AFQMC, or even better than that of AFQMC in many cases. It is worth noting that most of the results are within chemical accuracy, i.e., an accuracy of 1 kcal / mol. In addition, another advantage of this method is that it is independent of prior chemical knowledge, such as active space or basis set selection. Therefore, these findings highlight the robustness and accuracy of this method in accurately determining the ST gap of diradical systems. Example Process and Apparatus

[0075] Figure 7 FIG. 7 is a flowchart of a method 700 for optimizing a neural network wave function according to some example embodiments of the present disclosure. The method 700 may be performed as follows: Figure 1The electronic device 120 shown is implemented. At box 710, the electronic device 120 obtains description information of the molecular system, the molecular system including a group of first electrons having a first spin state and a group of second electrons having a second spin state, and the description information indicates the corresponding positions of the group of first electrons and the group of second electrons. At box 520, the electronic device 120 selects a first electron having a first spin state from the group of first electrons. At box 530, the electronic device 120 determines a spin metric associated with a target spin symmetry based on the description information and the exchange of the position of the selected first electron with the corresponding position of the group of second electrons by using a neural network representing the wave function of the molecular system. At box 540, the neural network is updated based on the loss function including the spin metric.

[0076] In some embodiments, determining a spin metric associated with a target spin symmetry includes: generating a first value of a wave function based on descriptive information by using a neural network; generating a second value of the wave function based on an exchange of a position of a selected first electron with a position of the second electron for each second electron in a group of second electrons by using the neural network; and deriving a spin metric based on the first value and the corresponding second values ​​generated for the group of second electrons.

[0077] In some embodiments, generating the second value of the wave function by using a neural network includes: exchanging the position of the selected first electron with the position of the second electron to update the description information; and generating the second value of the wave function based on the updated description information by using the neural network.

[0078] In some embodiments, deriving a spin metric based on a first value and a corresponding second value generated for a group of second electrons includes: determining a ratio of the second value to the first value for each second electron in the group of second electrons; and determining the spin metric based on a difference between a predetermined value and a sum of the ratios determined for the group of second electrons.

[0079] In some embodiments, wherein the loss function further comprises an overlap metric indicating an orthogonality between a target state of the molecular system and at least one further state below the target state, the target state and the at least one further state both corresponding to a target spin symmetry.

[0080] In some embodiments, method 700 further includes: obtaining at least one additional wave function corresponding to at least one additional state of the molecular system; and determining an overlap metric based on the at least one additional wave function and the neural network.

[0081] In some embodiments, selecting the first electron, determining the spin metric, and updating the neural network are performed for a plurality of rounds, and the first electron selected in a first of the plurality of rounds is different from the first electron selected in a second of the plurality of rounds.

[0082] In some embodiments, the number of first electrons in the set of first electrons is equal to or less than the number of second electrons in the set of second electrons.

[0083] In some embodiments, the target state of the molecular system having the target spin symmetry includes one of: a ground state of the molecular system, or an excited state of the molecular system.

[0084] In some embodiments of the present disclosure, an electronic device is provided, comprising a computer processor coupled to a computer-readable memory unit, the memory unit comprising instructions, which, when executed by the computer processor, implement a method for optimizing a neural network wave function, the method comprising: obtaining description information of a molecular system, the molecular system comprising a group of first electrons having a first spin state and a group of second electrons having a second spin state, the description information indicating corresponding positions of the group of first electrons and the group of second electrons; obtaining description information of the molecular system, the molecular system comprising a group of first electrons having a first spin state and a group of second electrons having a second spin state, determining a spin metric associated with a target spin symmetry based on the description information and an exchange of a position of a selected first electron with a corresponding position of a group of second electrons by using a neural network representing the wave function of the molecular system; and updating the neural network based on a loss function including the spin metric.

[0085] In some embodiments, determining a spin metric associated with a target spin symmetry includes: generating a first value of a wave function based on descriptive information by using a neural network; generating a second value of the wave function based on an exchange of a position of a selected first electron with a position of the second electron for each second electron in a group of second electrons by using the neural network; and deriving a spin metric based on the first value and the corresponding second values ​​generated for the group of second electrons.

[0086] In some embodiments, generating the second value of the wave function by using a neural network includes: exchanging the position of the selected first electron with the position of the second electron to update the description information; and generating the second value of the wave function based on the updated description information by using the neural network.

[0087] In some embodiments, deriving a spin metric based on a first value and a corresponding second value generated for a group of second electrons includes: determining a ratio of the second value to the first value for each second electron in the group of second electrons; and determining the spin metric based on a difference between a predetermined value and the sum of the ratios determined for the group of second electrons.

[0088] In some embodiments, the loss function further comprises an overlap metric indicating an orthogonality between a target state of the molecular system and at least one additional state below the target state, both the target state and the at least one additional state corresponding to a target spin symmetry.

[0089] In some embodiments, method 700 further includes: obtaining at least one additional wave function corresponding to at least one additional state of the molecular system; and determining an overlap metric based on the at least one additional wave function and the neural network.

[0090] In some embodiments, selecting the first electron, determining the spin metric, and updating the neural network are performed for a plurality of rounds, and the first electron selected in a first of the plurality of rounds is different from the first electron selected in a second of the plurality of rounds.

[0091] In some embodiments, the number of first electrons in the set of first electrons is equal to or less than the number of second electrons in the set of second electrons.

[0092] In some embodiments, the target state of the molecular system having the target spin symmetry includes one of the following: a ground state of the molecular system, or an excited state of the molecular system.

[0093] Figure 8 800 in which various implementations of the present disclosure may be implemented. Figure 8 The computing device 800 shown in the figure is for illustration purposes only and does not imply any limitation on the functionality and scope of the present disclosure in any way. The computing device 800 can be used to implement the above-mentioned methods in the implementation of the present disclosure. Figure 8 As shown, computing device 800 may be a general computing device and may include at least one or more processors or processing units 810 , a memory 820 , a storage unit 830 , one or more communication units 840 , one or more input devices 850 , and one or more output devices 860 .

[0094] Processing unit 810 may be a physical or virtual processor and may implement various processes based on programs stored in memory 820. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to increase the parallel processing capabilities of computing device 800. Processing unit 810 may also be referred to as a central processing unit (CPU), a microprocessor, a controller, or a microcontroller.

[0095] The electronic device 800 typically includes various computer storage media. Such media can be any media accessible by the electronic device 800, including but not limited to volatile and non-volatile media, or removable and non-removable media. The memory 820 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (such as a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM) or flash memory) or any combination thereof. The storage unit 830 can be any removable or non-removable medium, and can include a machine-readable medium, such as a memory, a flash drive, a disk or other medium, which can be used to store information and / or data and can be accessed in the electronic device 800.

[0096] The electronic device 800 may also include additional removable / non-removable, volatile / non-volatile memory media. Figure 8 Not shown, but a disk drive for reading from and / or writing to a removable non-volatile disk and an optical drive for reading from and / or writing to a removable non-volatile optical disk may be provided. In this case, each drive may be connected to a bus (not shown) via one or more data medium interfaces.

[0097] The communication unit 840 communicates with another computing device via a communication medium. In addition, the functions of the components in the electronic device 800 can be implemented by a single computing cluster or multiple computers communicating via a communication connection. Therefore, the electronic device 800 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs) or other general network nodes.

[0098] Input device 850 may be one or more of a variety of input devices, such as a mouse, keyboard, trackball, voice input device, etc. Output device 860 may be one or more of a variety of output devices, such as a display, speaker, printer, etc. With the aid of communication unit 840, computing device 800 may also communicate with one or more external devices (not shown), such as storage devices and display devices, one or more of which enable a user to interact with computing device 800, or any device (such as a network card, modem, etc.) that enables computing device 800 to communicate with one or more other computing devices if desired. Such communication may be performed via an input / output (I / O) interface (not shown).

[0099] In some implementations, instead of being integrated in a single device, some or all components of the computing device 800 may also be arranged in a cloud computing architecture. In a cloud computing architecture, components may be provided remotely and work together to implement the functions described in the present disclosure. In some implementations, cloud computing provides computing, software, data access, and storage services without requiring the end user to know the physical location or configuration of the system or hardware that provides these services. In various implementations, cloud computing provides services via a wide area network (such as the Internet) using a suitable protocol. For example, a cloud computing provider provides an application across a wide area network that can be accessed through a web browser or any other computing component. The software or components of the cloud computing architecture and the corresponding data may be stored on a server at a remote location. The computing resources in a cloud computing environment may be merged or distributed at locations in a remote data center. Cloud computing infrastructure may provide services through a shared data center, although they appear as a single access point for users. Therefore, a cloud computing architecture may be used to provide the components and functions described herein from a service provider at a remote location. Alternatively, these components and functions may also be provided by a traditional server, or installed directly on a client device, or deployed on a client device in other ways.

[0100] The functionality described herein may be performed at least in part by one or more hardware logic components. For example, but not limited to, illustrative 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 chips (SOCs), complex programmable logic devices (CPLDs), etc.

[0101] The program code for executing the method of the subject matter described herein can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely or partially on the machine, partially on the machine as a stand-alone software package, partially on a remote machine, or entirely on a remote machine or server.

[0102] In the context of the present disclosure, a machine-readable medium may be any tangible medium that may contain or store a program used by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include 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 of the foregoing.

[0103] In addition, although operations are shown in a particular order, this should not be understood as requiring such operations to be performed in the particular order shown or in sequence, or performing all the operations shown to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be interpreted as limitations on the scope of the subject matter described herein, but should be interpreted as descriptions of the specific features of specific implementations. Certain features described in a separate implementation may also be implemented in combination in a single implementation. On the contrary, the various features described in a single implementation may also be implemented in multiple implementations individually or in any suitable sub-combination.

[0104] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter specified 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 disclosed as example forms of implementing the claims.

[0105] From the foregoing, it should be understood that the specific implementation of the technology disclosed herein has been described for illustrative purposes, but various modifications may be made without departing from the scope of the present disclosure. Therefore, the technology disclosed herein is not limited except as set forth in the appended claims.

[0106] The implementation of the subject matter and functional operations described in this disclosure can be implemented in various systems, digital electronic circuit systems or computer software, firmware or hardware (including the structures disclosed in this specification and their structural equivalents) or a combination of one or more of them. The implementation of the subject matter described in this specification can be implemented as one or more computer program products, that is, one or more modules of computer program instructions encoded on a tangible and non-temporary computer-readable medium for execution by a data processing device or control of the operation of the data processing device. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a material combination that affects a machine-readable propagation signal, or a combination of one or more of them. The term "data processing unit" or "data processing device" covers all devices, equipment and machines for processing data, including, for example, a programmable processor, a computer or multiple processors or computers. In addition to hardware, the device can also include code that creates an execution environment for the computer program in question, for example, code that constitutes a processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

[0107] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language, including compiled or interpreted languages, and it may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored as part of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, subroutines, or portions of code). A computer program may be deployed to execute on a single computer, on multiple computers located at the same location, or on multiple computers distributed across multiple locations and interconnected by a communications network.

[0108] For example, processors suitable for executing computer programs include general and special microprocessors, and any one or more processors of any type of digital computer. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include or be operably coupled to receive data from or transmit data to or both of one or more large-capacity storage devices (e.g., magnetic disks, magneto-optical disks, or optical disks) for storing data. However, a computer does not necessarily need to have such a device. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, for example, semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices. The processor and memory can be supplemented by a dedicated logic circuit or incorporated into a dedicated logic circuit system.

[0109] The specification, together with the drawings, are intended to be considered exemplary only, where exemplary means example.As used herein, the use of "or" is intended to include "and / or" unless the context clearly dictates otherwise.

[0110] Although the present disclosure contains many details, these details should not be interpreted as limitations on the scope of any disclosure or content that can be claimed, but as descriptions of features that can be specific to a specific disclosed implementation. Certain features described in the present disclosure in the context of a separate implementation can also be implemented in combination in a single implementation. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination. In addition, although the features can be described above as working in certain combinations and even initially claimed, in some cases, one or more features from the claimed combination can be removed from the combination, and the claimed combination can involve a sub-combination or a variation of the sub-combination. Similarly, although operations are shown in a particular order in the accompanying drawings, this should not be understood as requiring such operations to be performed in the particular order shown or in sequence, or performing all the operations shown, to achieve the desired result. In addition, the separation of various system components in the implementation described in the present disclosure should not be understood as requiring such separation in all implementations. Only some implementations and examples are described, and other implementations, enhancements and changes can be made based on the content described and shown in the present disclosure.

Claims

1. A method for optimizing a neural network wave function, comprising: Acquiring description information of a molecular system, the molecular system comprising a group of first electrons having a first spin state and a group of second electrons having a second spin state, the description information indicating respective positions of the group of first electrons and the group of second electrons; selecting a first electron having the first spin state from the group of first electrons; determining a spin metric associated with a target spin symmetry based on the descriptive information and the exchange of the selected positions of the first electrons with corresponding positions of the set of second electrons using a neural network representing a wave function of the molecular system; as well as The neural network is updated based on a loss function that includes the spin metric.

2. The method of claim 1 , wherein determining the spin metric associated with the target spin symmetry comprises: generating a first value of the wave function based on the description information by using the neural network; generating, for each second electron in the set of second electrons, a second value of the wave function by using the neural network based on an exchange of the position of the selected first electron with the position of the second electron; and The spin metric is derived based on the first value and corresponding second values ​​generated for the set of second electrons.

3. The method of claim 2, wherein generating the second value of the wave function by using the neural network comprises: exchanging the selected position of the first electron and the selected position of the second electron to update description information; as well as The second value of the wave function is generated based on the updated description information by using the neural network.

4. The method of claim 2, wherein deriving the spin metric based on the first value and corresponding second values ​​generated for the set of second electrons comprises: determining, for each second electron in the set of second electrons, a ratio of the second value to the first value; as well as The spin metric is determined based on a difference between a predetermined value and a sum of the ratios determined for the set of second electrons.

5. A method according to claim 1, wherein the loss function also includes an overlap metric, which indicates the orthogonality between a target state of the molecular system and at least one additional state below the target state, and both the target state and the at least one additional state correspond to the target spin symmetry.

6. The method according to claim 5, further comprising: obtaining at least one further wave function corresponding to the at least one further state of the molecular system; as well as Based on the at least one further wave function and the neural network, the overlap measure is determined.

7. The method of claim 1 , wherein selecting the first electron, determining the spin metric, and updating the neural network are performed for a plurality of rounds, and The first electron selected in a first of the plurality of rounds is different from the first electron selected in a second of the plurality of rounds. 8 . The method of claim 1 , wherein the number of first electrons in the group of first electrons is equal to or less than the number of second electrons in the group of second electrons.

9. The method of claim 1 , wherein the target state of the molecular system having the target spin symmetry comprises one of: the ground state of the molecular system, or An excited state of the molecular system.

10. An electronic device comprising a computer processor coupled to a computer readable memory unit, the memory unit comprising instructions that when executed by the computer processor implement a method of optimizing a neural network wave function, the method comprising: Acquiring description information of a molecular system, the molecular system comprising a group of first electrons having a first spin state and a group of second electrons having a second spin state, the description information indicating respective positions of the group of first electrons and the group of second electrons; selecting a first electron having the first spin state from the group of first electrons; determining a spin metric associated with a target spin symmetry based on the descriptive information and the exchange of the selected positions of the first electrons with corresponding positions of the set of second electrons using a neural network representing a wave function of the molecular system; as well as The neural network is updated based on a loss function that includes the spin metric.

11. The apparatus of claim 10, wherein determining the spin metric associated with the target spin symmetry comprises: generating a first value of the wave function based on the description information by using the neural network; generating, for each second electron in the set of second electrons, a second value of the wave function by using the neural network based on an exchange of the position of the selected first electron with the position of the second electron; and The spin metric is derived based on the first value and corresponding second values ​​generated for the set of second electrons.

12. The apparatus of claim 11 , wherein generating the second value of the wave function by using the neural network comprises: exchanging the selected position of the first electron and the selected position of the second electron to update description information; as well as The second value of the wave function is generated based on the updated description information by using the neural network.

13. The apparatus of claim 11 , wherein deriving the spin metric based on the first value and corresponding second values ​​generated for the set of second electrons comprises: determining, for each second electron in the set of second electrons, a ratio of the second value to the first value; as well as The spin metric is determined based on a difference between a predetermined value and a sum of the ratios determined for the set of second electrons.

14. The apparatus of claim 10, wherein the loss function further comprises an overlap metric indicating an orthogonality between a target state of the molecular system and at least one additional state below the target state, both the target state and the at least one additional state corresponding to the target spin symmetry.

15. The apparatus according to claim 14, further comprising: obtaining at least one further wave function corresponding to the at least one further state of the molecular system; as well as Based on the at least one further wave function and the neural network, the overlap measure is determined.

16. The apparatus of claim 10, wherein selecting the first electron, determining the spin metric, and updating the neural network are performed for a plurality of rounds, and The first electron selected in a first of the plurality of rounds is different from the first electron selected in a second of the plurality of rounds.

17. The apparatus of claim 10, wherein the number of first electrons in the set of first electrons is equal to or less than the number of second electrons in the set of second electrons.

18. The apparatus of claim 10, wherein the target state of the molecular system having a target spin symmetry comprises one of: The ground state of the molecular system, or An excited state of the molecular system.

19. A computer program product, comprising a non-transitory computer-readable storage medium having program instructions implemented therewith, wherein the program instructions can be executed by an electronic device to enable the electronic device to perform the method for optimizing a neural network wave function as described in any one of claims 1 to 9.