Optimization of neural network wavefunction

A low-scaling penalty term in the loss function addresses the issue of spin symmetry in NNVMC, enhancing computational efficiency and accuracy for neural network wavefunctions in multi-reference systems.

WO2025245901A1PCT designated stage Publication Date: 2025-12-04BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/096901
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2025-12-04

AI Technical Summary

Technical Problem

Existing neural network variational Monte Carlo (NNVMC) methods struggle to provide quantum states with correct spin symmetry, particularly in systems with strong electron correlations, leading to computational inefficiencies and spin contamination.

Method used

A low-scaling penalty term is introduced in the loss function to enforce spin symmetry by permuting a specific first electron with each second electron, reducing computational overhead and ensuring accurate spin symmetry in neural network wavefunctions.

Benefits of technology

The proposed penalty term effectively enforces spin symmetry, reducing computational costs and achieving more accurate energy results for multi-reference systems, including ground and excited states, while avoiding spin contamination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024096901_04122025_PF_FP_ABST
    Figure CN2024096901_04122025_PF_FP_ABST
Patent Text Reader

Abstract

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

Description

OPTIMIZATION OF NEURAL NETWORK WAVEFUNCTIONFIELD

[0001] The present disclosure generally relates to the field of computer, and more specifically, to methods, devices, and computer program products for optimization of a neural network wavefunction.BACKGROUND

[0002] Accurately characterizing subtle electron-electron correlation is essential for understanding multi-reference systems in quantum physics and chemistry, especially in areas such as chemical reactivity, catalysis, photochemistry, and superconductivity. The neural network-based variational Monte Carlo (NNVMC) method offers an attractive alternative. These works employ a permutation-equivariant neural network with a large number of parameters to parametrize the wavefunction and optimize it based on the variational principle.SUMMARY

[0003] In a first aspect of the present disclosure, there is provided a method of optimization of a neural network wavefunction. The method includes: obtaining description information of a molecular system comprising a set of first electrons with a first spin state and a set of second electrons with a second spin state, the description information indicating respective positions of the sets of first electrons and second electrons; selecting a first electron with the first spin state from the set of first electrons; determining, by using a neural network representing a wavefunction of the molecular system, a spin metric associated with a target spin symmetry based on the description information and exchange of a position of the selected first electron with respective positions of the set of second electrons; and updating the neural network based on a loss function comprising the spin metric.

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

[0005] In a third aspect of the present disclosure, there is provided a computer program product, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by an electronic  device to cause the electronic device to perform a 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] Through the more detailed description of some embodiments of the present disclosure in the accompanying drawings, the above and other objects, features, and advantages of the present disclosure will become more apparent, wherein the same reference generally refers to the same components in the embodiments of the present disclosure.

[0008] FIG. 1 illustrates an example environment in which example embodiments of the present disclosure can be implemented;

[0009] FIG. 2 illustrates an example schematic diagram of comparison of different penalties to enforce spin symmetry according to some embodiments of the present disclosure;

[0010] FIG. 3 illustrate an example diagram of expansion of the neural network wavefunction over the Hamiltonian eigenstate according to some embodiments of the present disclosure;

[0011] FIG. 4 illustrates an example schematic of effects of different components in the loss function according to some embodiments of the present disclosure;

[0012] FIGS. 5A-5D illustrate example diagrams of comparison of optimization with enforced spin symmetry according to some embodiments of the present disclosure;

[0013] FIG. 6 illustrates an example schematic of achieving a target state without the need for prior calculations of lower states according to some embodiments of the present disclosure;

[0014] FIG. 7 illustrates an example flowchart of a method of optimization of a neural network wavefunction according to some embodiments of the present disclosure; and

[0015] FIG. 8 illustrates a block diagram of an electronic device in which various embodiments of the present disclosure can be implemented.DETAILED DESCRIPTION

[0016] Principle of the present disclosure will now be described with reference to some embodiments. It is to be understood that these embodiments are described only for the purpose of illustration and help those skilled in the art to understand and implement the present disclosure,  without suggesting any limitation as to the scope of the disclosure. The disclosure described herein can be implemented in various manners other than the ones described below.

[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 skills in the art to which this disclosure belongs.

[0018] References in the present disclosure to “one embodiment, ” “an embodiment, ” “an example embodiment, ” and the like indicate that the embodiment described may include a particular feature, structure, or characteristic, but it is not necessary that every embodiment includes the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an example embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.

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

[0020] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms “a” , “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” , “comprising” , “has” , “having” , “includes” and / or “including” , when used herein, specify the presence of stated features, elements, and / or components etc., but do not preclude the presence or addition of one or more other features, elements, components and / or combinations thereof.

[0021] Principle of the present disclosure will now be described with reference to some embodiments. It is to be understood that these embodiments are described only for the purpose of illustration and help those skilled in the art to understand and implement the present disclosure, without suggesting any limitation as to the scope of the disclosure. The disclosure described herein can be implemented in various manners other than the ones described below. 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 skills in the art to which this disclosure belongs.

[0022] It may be understood that data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with requirements of corresponding laws and regulations and relevant rules.

[0023] It may be understood that, before using the technical solutions disclosed in various embodiment of the present disclosure, the user should be informed of the type, scope of use, and use scenario of the information involved in the present disclosure in an appropriate manner in accordance with relevant laws and regulations, and the user’s authorization should be obtained.

[0024] For example, in response to receiving an active request from the user, prompt information is sent to the user to explicitly inform the user that the requested operation will need to acquire and use the user’s information. Therefore, the user may independently choose, according to the prompt information, whether to provide the information to software or hardware such as electronic devices, applications, servers, or storage media that perform operations of the technical solutions of the present disclosure.

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

[0026] It may be understood that the above process of notifying and obtaining the user authorization is only illustrative and does not limit the implementation of the present disclosure. Other methods that satisfy relevant laws and regulations are also applicable to the implementation of the present disclosure.

[0027] As used herein, the term “model” is referred to as an association between an input and an output learned from training data, and thus a corresponding output may be generated for a given input after the training. The generation of the model may be based on a machine learning technique. In general, a machine learning model may be built, which receives input information and makes predictions based on the input information. For example, a classification model may predict a class of the input information among a predetermined set of classes. As used herein, “model” may also be referred to as “machine learning model” , “learning model” , “machine learning network” , or “learning network, ” which are used interchangeably herein.

[0028] Example environment and principle

[0029] FIG. 1 illustrates a block diagram of an example environment 100 in which various embodiments of the present disclosure can be implemented. In the environment 100 of FIG. 1, an  electronic device 120 is used to optimize a neural network wavefunction for a molecular system 101. The molecular system 101 may include any suitable number of molecules which may be the same type or different types.

[0030] The molecular system 101 may include a plurality of electrons, which includes a set of first electrons with a first spin state and a set of second electrons with a second spin state. For example, as shown in FIG. 1, the molecular system 101 may include electrons with a spin up state (which are also referred to as spin-up electrons, for example the spin-up electron 112) and electrons with a spin-down state (which are also referred to as spin-down electrons, for example the spin-up electron 111) . In the following, some embodiments are described with respect to the spin-up electrons and spin-down electrons. A spin-up electron may be denoted as α, and a spin-down electron may be denoted as β. In the example, the number of spin-up electrons is denoted as Nα  or N↑, and the number of spin-down electrons are denoted as Nβ or N↓.

[0031] The neural network 102 represents a wavefunction of the molecular system 101. Such a wavefunction is also referred to as a neural network wavefunction. The electronic device 120 may train the neural network 102 to obtain a wavefunction of the molecular system 101 with a target spin state. The target spin state may correspond to a target spin symmetry. In some embodiments, training of the neural network 102 may be based on NNVMC.

[0032] In FIG. 1, the electronic device 110 may be any system with computing power, such as various computing devices / systems, terminal devices, servers, etc. The terminal device can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptops, netbooks, tablets, media computers, multimedia tablets, or any combination of the aforementioned, including accessories and peripherals of these devices or any combination thereof. The server may include but are not limited to mainframe, edge computing nodes, computing devices in cloud environment, etc.

[0033] As mentioned above, NNVMC may be employed to optimize a neural network wavefunction. However, optimizations in NNVMC are not guaranteed to provide quantum states with correct spin symmetry, one of the fundamental intrinsic symmetries in nonrelativistic systems. Specifically, the optimized neural network Ansatz in general is not the eigen-function of the spin square operator resulting in what is known as spin contamination. This is particularly true in cases where different spin states are nearly degenerate due to strong electron correlations.

[0034] If the computation complexity into account is not taken, then it is straightforward to design a penalty term involving spin square value which can be calculated as the expectation of its local value:

[0035] where the variable X is the collection of three-dimensional coordinates of the N electrons, X≡[x1, …, xN].The permutation operator swaps the coordinates of one spin-up electron with another spin-down electron indicated by α and β, respectively and change the input of X from [x1, …, xα, …, xβ, …, xN] to [x1, …, xβ, …, xα, …, xN]. The N↑ and N↓ are denoted as the number of electrons with spin-up and spin-down respectively.

[0036] The block 210 of FIG. 2 shows a schematic diagram of permutation of each spin-up electron with each spin-down electron. However, as can be seen from FIG. 2, this calculation is unfortunately very expensive due to N↑N↓ different swaps for electron pairs with opposite spins, which is of order O (N2) when N↑ and N↓ are comparable. In other words, compared to the computational bottleneck of VMC, namely Laplacian operator, the evaluation of is even more costly by O (N) . Therefore, if is directly added in the loss function, for instance  then the computational complexity of the whole VMC process would be increased with In the following, this penalty is referred to as penalty and runtime with the penalty is illustrated by the curve 202 in FIG. 2, while the curve 201 illustrates the runtime for the standard NNVMC. As can be seen, the computation efficiency and cost for the  penalty is extremely large.

[0037] To this end, example embodiments of the present disclosure provide a solution for optimizing a neural network function. In the embodiments, description information of a molecular system is obtained as an input to a neural network representing a wavefunction of the molecular system. The molecular system comprises a set of first electrons with a first spin state and a set of second electrons with a second spin state, and the description information indicates respective positions of the sets of first electrons and second electrons. A first electron with the first spin state is selected from the set of first electrons. Then, by using the neural network, a spin metric associated with a target spin symmetry is determined based on the description information and exchange of a position of the selected first electron with respective positions of the set of second  electrons. The neural network may be updated based on a loss function comprising the spin metric. As such, the neural network wavefunction is optimized.

[0038] Such a spin metric used in the loss function is determined by permuting a specific first electron with each second electron rather than permuting each first electron with each second electron. Therefore, such a spin metric may be considered as a low scaling penalty term.

[0039] According to example embodiments of the present disclosure, the scope of NNVMC can be expanded by obtaining correct quantum states with targeted spin symmetry, including both ground state and excited states. The low-scaling penalty term may eliminate the spin contamination in NNVMC with minimal computational overhead. The computational costs can be approach significantly reduced. With this penalty term, more accurate energy results for multi-reference systems are achieved.

[0040] Example fundamental principles

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

[0042] In the embodiments of the present disclosure, a new penalty term is designed, called  penalty, eliminating the extra O (N) computational overhead while still able to enforce the spin symmetry effectively. The penalty utilizes the property that raising operator annihilates the spin state polarized to the z-axis,

[0043] where S denotes the total spin of the molecular system and Sz denotes the spin along the z-axis.

[0044] This property implies that the eigenstate of can be derived through enforcing  to 0. It can be further shown that is equivalent to the following condition (See more details below) :

[0045] Compared with the calculation of the term in equation (1) , the proposed term Rβ (X) only involves the first index in the summation and evaluates the wavefunction for N↑times, thus reducing the additional computational complexity of

[0046] The block 220 of FIG. 2 shows a schematic diagram of permutation of a spin-down electron with each spin-up electron. The runtime with the penalty is illustrated in the curve 203. As can be seen from the comparison of the curve 203 with the curve 201 and curve 202, the efficiency is improved for the penalty as compared with the penalty.

[0047] Now some example embodiments regarding the optimization process are now described with reference to FIG. 1 as an example without any limitation.

[0048] The neural network 102 may be implemented by any suitable structure and protection scope of the present disclosure is not limited in this regard. As an example without any limitation, a computational framework for NNVMC with Forward Laplacian (which is shorted as LapNet) may be used. LapNet utilizes the general attention mechanism to address the electron-electron correlation. It has demonstrated promising results across a wide range of chemical systems while keeping a feasible computational cost.

[0049] LapNet is a multi-determinant Slater-Jastrow-backflow type Ansatz, as below:

[0050] where the input X=[x1, …, xN] is composed of the spatial coordinates of N electrons. The spatial coordinates should be partitioned into spin-up part and spin-down part LapNet encodes these input features by applying a rescale transformation on the spatial coordinates and affixing the spin orientation behind the rescaled spatial vector. These features are then fed into a permutation equivariant neural network. In LapNet, this equivariant part is composed of stacked Sparse Derivative Attention (SDA) . SDA is a modified attention block that introduces more sparsity into the derivative, facilitating an efficient calculation of Laplacian. The output of the equivariant part is divided into Ndet square matrices, where each matrix contains N rows and N columns. Different from the standard Slater determinant used in quantum chemistry, each entry in the square matrix aggregates all electron information through the SDA block. This mechanism, known as backflow transformation , provides a powerful representation of the electron-electron correlation. The determinants of these matrices are summed to produce the value of the wave function. Here, the Jastrow factor is employed to satisfy the cusp condition. The combination of equivariant network and determinant makes LapNet satisfy Pauli’s Exclusion Principle, i.e., the wave function is antisymmetric under the exchange of electrons’spatial coordinates within the same spin orientation.

[0051] To optimize the neural network 102, a loss function may be adopted. For example, the loss function adopted in some embodiments may have the following form:

[0052] where Eθ denotes the energy expectation value from Hamiltonian under the Born-Oppenheimer approximation,  Pθ, i represents the penalty term with respective weights ωi.

[0053] The penalty term includes the penalty term, that is the spin metric. The optimization of the neural network wavefunction may include a plurality of rounds. In each round, a specific first electron with the first spin state may be selected from the set of first electrons. The specific first electron is selected for permutation with each second electron, and thus is also referred to as an anchor electron. For example, as shown in the block 220 of FIG. 2, a specific spin-down electron is selected for permutation with each spin-up electron. In some embodiments, the specific first electron in each round may be selected randomly.

[0054] In some embodiments, the specific first electron in each round may be selected in a way such that each and every first electron is selected evenly over the plurality of rounds. For example, the first electron selected in a first round of the plurality of rounds is different from the first electron selected in a second round of the plurality of rounds. In this way, stability of the optimization can be achieved.

[0055] Once the specific first electron is selected, the neural network 102 may be used to determine the penalty term associated with a target spin symmetry based on the description information and exchange of a position of the selected first electron with respective positions of the set of second electrons.

[0056] Some more examples are described with respect to the penalty term. In most of real-space variational Monte Carlo methods, the neural network ansatz Ψθ only represents a component of the complete state. This component can produce the correct expectation of spin-independent operator. However, the spin-dependent operator is not well-defined within this component. To handle this kind of operator, the complete state can be reconstructed by the antisymmetric property:

[0057] where |Ψθ> is the antisymmetric state and C is the normalizing factor. Sym (N) is the symmetric group with N elements.  refers to the spin state where the first N↑ electrons are spin-up electron and the last N↓ electrons are spin-down electron.  represents the permutation operators that reorder both the spatial coordinates and  the associated spins orientation. pi is the parity of the permutation. The complete state |Ψθ> is a common eigenstate of all the permutation operators Thus, as long as the operator is commuted with permutation operators, the expectation of can be computed through:

[0058] where Note that |Ψθ> is also an eigenstate of with eigenvalue of so only the na=N↑ term is non-zero. Applying this formula to will lead to:

[0059] where SL (X) is defined in Equation (1) . As discussed above, the computation cost of this term is times more than the standard local energy evaluation, preventing the penalty from practical application.

[0060] Instead of directly computing the expectation of the relation between and  may be leveraged to accelerate the calculation:

[0061] where note that the expectation of can be rewritten as:

[0062] where when the last term goes to the zero, the expectation of reaches the minimal value of  It means that |Ψθ> is an eigenstate of This property makes  aproper penalty term to enforce the spin symmetry. To numerically compute the last term, the similar trick is used in Equation (8) . Remark that increase the number of spin-up electron, so only the na=N↑+1 term is non-zero:

[0063] where is defined in Equation (2) .

[0064] Although introducing this penalty term can lead to a solution with the correct spin symmetry, the training process can be unstable due to the large variance. In some embodiments,  to determine this penalty term, the neural network 102 may be used to generate a first value of the wavefunction based on the description information. For each second electron in the set of second electrons, a second value of the wavefunction may be generated by using the neural network 102 based on exchange of the position of the 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 description information, and the neural network 102 may generate the second value of the wavefunction based on the updated description information.

[0065] Then, the penalty term may be derived based on the first value and respective second values generated for the 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.

[0066] As an example, to reduce the variance, an improved penalty is proposed:

[0067] where β=N↑+1, N↑+2, ..., N. It is obvious that is zero if  It is then show that |Ψθ> is an eigenstate of when is zero. Due to the symmetry for all the spin-down electrons,  is in fact irrelevant to β. So, it follows:

[0068] where as long as is zero, the expectation of also reaches the minimal value of  which means the state is the eigenstate of  So can be used as the penalty term.

[0069] While is irrelevant to β in the ideal case, the empirical estimator  can be influenced by the choice of β. In practice, to promote the numerical stability, the value from the collection to β for each step in the training is iteratively assigned.

[0070] In some embodiments, the number of first electrons in the set of first electrons is equal to or smaller than the number of second electrons in the set of second electrons. Continuing with the above example,  of the solution is enforced to As a result, to derive a state with spin quantum number one should set the number of spin-up electron and spin-down electron to and

[0071] In some embodiments, the loss function (for example, as shown in equation (5)) may further comprise an overlap metric indicating an orthogonality between a target state of the molecular system and at least one further state lower than the target state. Both the target state and the at least one further state correspond to the target spin symmetry. The overlap metric may be considered an overlap penalty item.

[0072] As an example, a key advantage of the penalty term is its effective integration with the overlap penalty term, particularly when targeting excited states. This combination avoids calculations of intermediate states with unnecessary spin symmetry, thereby enhancing the efficiency and accuracy of excited-state calculations.

[0073] In the present disclosure, the overlap term format is adopted, wherein the square of the pairwise overlap is directly employed as the penalty term. The overlap penalty term to target the ith excited state within its spin can be expressed as:

[0074] where Sij denotes the normalized overlap between Ψi and Ψj, wij is a free parameter which should be set to be larger than Ei-Ej to avoid state collapse.

[0075] The overlap penalty can be computed in any suitable manner. In some embodiments, at least one further wavefunction corresponding to the at least one further state of the molecular system 101 may be obtained. For example, the at least one further wavefunction may be obtained by optimizing at least one further neural network for the further state. Then, the overlap penalty  item may be determined based on the at least one further wavefunction and the neural network 101.

[0076] As an example, the overlap penalty term can be estimated through Monte Carlo method using an estimator that has been proved effective for calculating overlap in previous work:

[0077] where implies that x is sampled using the distribution |Ψ| 2. When the overlap penalty part is trained to be zero, |Ψi> is forced to be orthogonal (approximately) to its lower states.

[0078] To optimize the neural network wavefunction, the forms of the penalty gradients in the loss function are presented. For the overlap penalty part, the derivative can be evaluated directly using Monte Carlo method:

[0079] where denotes the derivative of lnΨi (x) with respect to network parameters {θ} .

[0080] Due to the non-Hermitian property of raising operator the derivative of the penalty contains the gradient of local estimator. More concretely, the gradient of the penalty can be calculated through the following rules:

[0081] Refence is now made to FIG. 3 to FIG. 5D to demonstrate the effectiveness of some embodiments of the present disclosure. As shown in FIG. 3, the initial wavefunction represented  by the neural network 102 may be expanded over the Hamiltonian eigenstates Φi. The bar height indicating overlap with each eigenstate and bar shading indicating different spin symmetries.

[0082] FIG. 4 shows effect of different components of the loss function in the proposed NNVMC process. The schematic diagram 401 corresponds to the energy term, which eliminates state components with higher energy as in standard NNVMC. The schematic diagram 401 corresponds to penalty, which retains only the states with the target spin symmetry. The schematic diagram 401 corresponds to the overlap penalty, which eliminates the component corresponding to the specified state.

[0083] FIG. 5A illustrates that standard NNVMC may results in spin contamination in ground state calculations. FIG. 5B shows that penalty helps achieve better ground state estimate without spin contamination. FIG. 5C shows how the embodiments of the present disclosure can efficiently obtain a ground state with specified spin symmetry. FIG. 5D shows how the embodiments of the present disclosure can efficiently obtain an excited state with specified spin symmetry.

[0084] With the efficient design and implementation of the penalty, the scope of NNVMC is able to be significantly expanded. The approach not only helps suppress spin contamination in ground state optimization, but also facilitates efficient and accurate calculation of excited states when combined with overlap penalty, as illustrated in FIG. 3 to FIG. 5D. More importantly, the highly efficient penalty enables the modified NNVMC process to be applied to larger and more practical systems.

[0085] Moreover, another advantage of the present disclosure is that the target state can be achieved without the need for prior calculations of lower states. FIG. 6 shows an example of targeting the 4P state of the nitrogen atom. As shown by the arrows 601, some traditional solutions require the computation of all nine lower eigenstates to isolate the 4P state. In contrast, as shown by the arrow 602, the present disclosure by setting the spin square constraint to 3, directly identifies the 4P state as the first eigenstate orthogonal to the ground state, effectively achieving our target state without the need for prior calculations of lower states.

[0086] Example use cases

[0087] Some embodiments are described above. Now some example use cases for the penalty are now described.

[0088] A first use case is symmetry improved ground state optimization. For multi-reference systems with nearly degenerate states, NNVMC often gets trapped in local minima, resulting in unsatisfactory quantum states. The challenge is reflected in a loss landscape cluttered with suboptimal local minima. By incorporating penalty into the loss function, the whole loss landscape can be significantly improved, as the states with the wrong spin symmetry are heavily penalized. Consequently, NNVMC will achieve a smoother and more robust optimization process, reaching targeted quantum states.

[0089] To illustrate this point, ethylene is taken as an example, a molecule of paramount importance in scientific research, especially in the fields of photochemistry, quantum dynamics, and organic compounds. Ehtylene is also a renowned challenging system for electronic structure studies due to the complex interplay of correlation effects and near-degeneracies, especially in its twisted configuration. Its perpendicular geometry is considered, where the N state (ground state) and the T state (the lowest triplet state) are nearly degenerate. In the NNVMC calculation, The correct singlet N state with penalty and the lowest excited triplet T state with overlap penalty is successfully obtained.

[0090] A second use case is symmetry enhanced excited state computation. In present disclosure, excited states are solved within a much smaller subspace characterized by spin symmetry. For spin square operator commutes with the Hamiltonian operator the states in different energy levels can be labelled by spin values.  penalty is utilized to constrain the Ansatz within assigned spin state and obtain the highly excited states by overlap penalty. The method reduces the number of involved states by excluding those in different spin. The lowest 10 states are calculated and can be classified into spin doublet state and quartet state  The ground and 10th states, respectively symbolized as 4S0 and 4P, belong to the latter one and are indicated as the orange steps in the plot. The remaining 8 states reside in  two intermediate energy levels referred as the five-fold degenerate 2D0 state and three-fold degenerate 2P0 state indicated as the blue steps. Compared with the adoption of sole overlap penalty, the constraint on spin quartet state to calculate 4P significantly reduces both the number of training states from 10 to 2, promoting the efficiency, and the number of overlap penalty terms from 20 to 1, achieving higher accuracy.

[0091] A third use case is the biradical system. Biradical systems are of great scientific interest due to their unique electronic properties and their critical influence on a diverse spectrum of chemical processes, from organic photovoltaics to molecular magnetism. The reactivity of biradicals is intricately linked to their singlet-triplet (S-T) energy gap, which governs their photophysical behavior and magnetic properties. Nonetheless, accurately determining the S-T gap in biradicals has historically posed a significant challenge within quantum chemistry due to their complex multireference character.

[0092] Here the S-T gap with penalty over a wide range of biradical systems is investigated. Those systems have been recently studied, where spin-projected Auxiliary-Field Quantum Monte Carlo (AFQMC) is applied for precise S-T gap calculations. The results exhibit accuracy that is comparable to, and often exceeding, that of AFQMC. Notably, the majority of the results are within chemical accuracy, i.e., 1 kcal / mol accuracy. Furthermore, an additional advantage of the method is its independence from prior chemical knowledge, such as active space or basis set selection. Consequently, these findings underscore the robustness and precision of the method for accurately determining the S-T gap in biradical systems.

[0093] Example process and device

[0094] FIG. 7 illustrates a flowchart of a method 700 of optimization of a neural network wavefunction in accordance with some example implementations of the present disclosure. The method 700 may be implemented at the electronic device 120 as illustrated in FIG. 1. At a block 710, the electronic device 120 obtains description information of a molecular system comprising a set of first electrons with a first spin state and a set of second electrons with a second spin state, the description information indicating respective positions of the sets of first electrons and second electrons. At a block 520, the electronic device 120 selects a first electron with the first spin state from the set of first electrons. At a block 530, the electronic device 120 determines, by using a  neural network representing a wavefunction of the molecular system, a spin metric associated with a target spin symmetry based on the description information and exchange of a position of the selected first electron with respective positions of the set of second electrons. At a block 540, update the neural network based on a loss function comprising the spin metric.

[0095] In some embodiments, determining the spin metric associated with the target spin symmetry comprises: generating, by using the neural network, a first value of the wavefunction based on the description information; for each second electron in the set of second electrons, generating a second value of the wavefunction by using the neural network based on exchange of the position of the selected first electron with a position of the second electron; and deriving the spin metric based on the first value and respective second values generated for the set of second electrons.

[0096] In some embodiments, generating the second value of the wavefunction by using the neural network comprises: exchanging the position of the selected first electron and the position of the second electron to update description information; and generating, by using the neural network, the second value of the wavefunction based on the updated description information.

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

[0098] 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 further state lower than the target state, both the target state and the at least one further state corresponding to the target spin symmetry.

[0099] In some embodiments, the method 700 further comprises: obtaining at least one further wavefunction corresponding to the at least one further state of the molecular system; and determining the overlap metric based on the at least one further wavefunction and the neural network.

[0100] 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 round of the plurality of rounds is different from the first electron selected in a second round of the plurality of rounds.

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

[0102] In some embodiments, a target state of the molecular system with the target spin symmetry comprises one of: a ground state of the molecular system, or an excited state of the molecular system.

[0103] In some implementations of the present disclosure, there is provided 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 implements a method of optimization of a neural network wavefunction. The method comprises: obtaining description information of a molecular system comprising a set of first electrons with a first spin state and a set of second electrons with a second spin state, the description information indicating respective positions of the sets of first electrons and second electrons; selecting a first electron with the first spin state from the set of first electrons; determining, by using a neural network representing a wavefunction of the molecular system, a spin metric associated with a target spin symmetry based on the description information and exchange of a position of the selected first electron with respective positions of the set of second electrons; and updating the neural network based on a loss function comprising the spin metric.

[0104] In some embodiments, determining the spin metric associated with the target spin symmetry comprises: generating, by using the neural network, a first value of the wavefunction based on the description information; for each second electron in the set of second electrons, generating a second value of the wavefunction by using the neural network based on exchange of the position of the selected first electron with a position of the second electron; and deriving the spin metric based on the first value and respective second values generated for the set of second electrons.

[0105] In some embodiments, generating the second value of the wavefunction by using the neural network comprises: exchanging the position of the selected first electron and the position of the second electron to update description information; and generating, by using the neural network, the second value of the wavefunction based on the updated description information.

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

[0107] 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 further state lower than the target state, both the target state and the at least one further state corresponding to the target spin symmetry.

[0108] In some embodiments, the method 700 further comprises: obtaining at least one further wavefunction corresponding to the at least one further state of the molecular system; and determining the overlap metric based on the at least one further wavefunction and the neural network.

[0109] 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 round of the plurality of rounds is different from the first electron selected in a second round of the plurality of rounds.

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

[0111] In some embodiments, a target state of the molecular system with the target spin symmetry comprises one of: a ground state of the molecular system, or an excited state of the molecular system.

[0112] FIG. 8 illustrates a block diagram of an electronic device 800 in which various embodiments of the present disclosure can be implemented. It would be appreciated that the electronic device 800 shown in FIG. 8 is merely for purpose of illustration, without suggesting any limitation to the functions and scopes of the present disclosure in any manner. The electronic device 800 may be used to implement the above method 800. As shown in FIG. 8, the electronic device 800 may be a general-purpose electronic device. The electronic device 800 may at least comprise 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.

[0113] The processing unit 810 may be a physical or virtual processor and can implement various processes based on programs 825 stored in the memory 820. In a multi-processor system, multiple processing units execute computer executable instructions in parallel so as to improve the parallel processing capability of the electronic device 800. The processing unit 810  may also be referred to as a central processing unit (CPU) , a microprocessor, a controller, or a microcontroller.

[0114] The electronic device 800 typically includes various computer storage medium. Such medium can be any medium accessible by the electronic device 800, including, but not limited to, volatile and non-volatile medium, or detachable and non-detachable medium. The memory 820 can be a volatile memory (for example, a register, cache, Random Access Memory (RAM)) , a non-volatile memory (such as a Read-Only Memory (ROM) , Electrically Erasable Programmable Read-Only Memory (EEPROM) , or a flash memory) , or any combination thereof. The storage unit 830 may be any detachable or non-detachable medium and may include a machine-readable medium such as a memory, flash memory drive, magnetic disk, or another other media, which can be used for storing information and / or data and can be accessed in the electronic device 800.

[0115] The electronic device 800 may further include additional detachable / non-detachable, volatile / non-volatile memory medium. Although not shown in FIG. 8, it is possible to provide a magnetic disk drive for reading from and / or writing into a detachable and non-volatile magnetic disk and an optical disk drive for reading from and / or writing into a detachable non-volatile optical disk. In such cases, each drive may be connected to a bus (not shown) via one or more data medium interfaces.

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

[0117] The input device 850 may be one or more of a variety of input devices, such as a mouse, keyboard, tracking ball, voice-input device, and the like. The output device 860 may be one or more of a variety of output devices, such as a display, loudspeaker, printer, and the like. By means of the communication unit 840, the electronic device 800 can further communicate with one or more external devices (not shown) such as the storage devices and display device, with one or more devices enabling the user to interact with the electronic device 800, or any devices (such as a network card, a modem, and the like) enabling the electronic device 800 to communicate with one or more other electronic devices, if required. Such communication can be performed via input / output (I / O) interfaces (not shown) .

[0118] In some embodiments, instead of being integrated in a single device, some, or all components of the electronic device 800 may also be arranged in cloud computing architecture.  In the cloud computing architecture, the components may be provided remotely and work together to implement the functionalities described in the present disclosure. In some embodiments, cloud computing provides computing, software, data access and storage service, which will not require end users to be aware of the physical locations or configurations of the systems or hardware providing these services. In various embodiments, the cloud computing provides the services via a wide area network (such as Internet) using suitable protocols. For example, a cloud computing provider provides applications over the wide area network, which can be accessed through a web browser or any other computing components. The software or components of the cloud computing architecture and corresponding data may be stored on a server at a remote position. The computing resources in the cloud computing environment may be merged or distributed at locations in a remote data center. Cloud computing infrastructures may provide the services through a shared data center, though they behave as a single access point for the users. Therefore, the cloud computing architectures may be used to provide the components and functionalities described herein from a service provider at a remote location. Alternatively, they may be provided from a conventional server or installed directly or otherwise on a client device.

[0119] The functionalities described herein can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-Programmable Gate Arrays (FPGAs) , Application-specific Integrated Circuits (ASICs) , Application-specific Standard Products (ASSPs) , System-on-a-chip systems (SOCs) , Complex Programmable Logic Devices (CPLDs) , and the like.

[0120] Program code for carrying out the methods of the subject matter described herein may be written in any combination of one or more programming languages. The program code may be provided to a processor or controller of a general-purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely or partly on a machine, executed as a stand-alone software package partly on the machine, partly on a remote machine, or entirely on the remote machine or server.

[0121] In the context of this disclosure, a machine-readable medium may be any tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include but not limited to an electronic, magnetic, optical, electromagnetic, infrared, or  semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM) , an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0122] Further, while operations are illustrated in a particular order, this should not be understood as requiring that such operations are performed in the particular order shown or in sequential order, or that all illustrated operations are performed to achieve the desired results. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are contained in the above discussions, these should not be construed as limitations on the scope of the subject matter described herein, but rather as descriptions of features that may be specific to particular embodiments. Certain features that are described in the context of separate embodiments may also be implemented in combination in a single implementation. Rather, various features described in a single implementation may also be implemented in multiple embodiments separately or in any suitable sub-combination.

[0123] 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.

[0124] From the foregoing, it will be appreciated that specific embodiments of the presently disclosed technology have been described herein for purposes of illustration, but that various modifications may be made without deviating from the scope of the disclosure. Accordingly, the presently disclosed technology is not limited except as by the appended claims.

[0125] Embodiments of the subject matter and the functional operations described in the present disclosure can be implemented in various systems, digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a tangible and non-transitory computer readable medium for execution by, or to control the operation of, data processing apparatus. The computer readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition  of matter effecting a machine-readable propagated signal, or a combination of one or more of them. The term “data processing unit” or “data processing apparatus” encompasses all apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

[0126] A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion 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, sub programs, or portions of code) . A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.

[0127] Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read only memory or a random access memory or both. The essential elements of a computer are a processor for performing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks. However, a computer need not have such devices. Computer readable media suitable for storing computer program instructions and data include all forms of nonvolatile memory, media, and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

[0128] It is intended that the specification, together with the drawings, be considered exemplary only, where exemplary means an example. As used herein, the use of “or” is intended to include “and / or” , unless the context clearly indicates otherwise.

[0129] While the present disclosure contains many specifics, these should not be construed as limitations on the scope of any disclosure or of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular disclosures. Certain features that are described in the present disclosure in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple embodiments separately or in any suitable sub-combination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a sub-combination or variation of a sub-combination. Similarly, while operations are illustrated in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Moreover, the separation of various system components in the embodiments described in the present disclosure should not be understood as requiring such separation in all embodiments. Only a few embodiments and examples are described and other embodiments, enhancements and variations can be made based on what is described and illustrated in the present disclosure.

Claims

1.A method of optimization of a neural network wavefunction, comprising:obtaining description information of a molecular system comprising a set of first electrons with a first spin state and a set of second electrons with a second spin state, the description information indicating respective positions of the sets of first electrons and second electrons;selecting a first electron with the first spin state from the set of first electrons;determining, by using a neural network representing a wavefunction of the molecular system, a spin metric associated with a target spin symmetry based on the description information and exchange of a position of the selected first electron with respective positions of the set of second electrons; andupdating the neural network based on a loss function comprising the spin metric.2.The method of claim 1, wherein determining the spin metric associated with the target spin symmetry comprises:generating, by using the neural network, a first value of the wavefunction based on the description information;for each second electron in the set of second electrons, generating a second value of the wavefunction by using the neural network based on exchange of the position of the selected first electron with a position of the second electron; andderiving the spin metric based on the first value and respective second values generated for the set of second electrons.3.The method of claim 2, wherein generating the second value of the wavefunction by using the neural network comprises:exchanging the position of the selected first electron and the position of the second electron to update description information; andgenerating, by using the neural network, the second value of the wavefunction based on the updated description information.4.The method of claim 2, wherein deriving the spin metric based on the first value and respective second values generated for the set of second electrons comprises:for each second electron in the set of second electrons, determining a ratio of the second value to the first value; anddetermining the spin metric based on a difference between a predetermined value and a sum of the ratios determined for the set of second electrons.5.The method of claim 1, 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 lower than the target state, both the target state and the at least one further state corresponding to the target spin symmetry.6.The method of claim 5, further comprising:obtaining at least one further wavefunction corresponding to the at least one further state of the molecular system; anddetermining the overlap metric based on the at least one further wavefunction and the neural network.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, andthe first electron selected in a first round of the plurality of rounds is different from the first electron selected in a second round of the plurality of rounds.8.The method of claim 1, wherein the number of first electrons in the set of first electrons is equal to or smaller than the number of second electrons in the set of second electrons.9.The method of claim 1, wherein a target state of the molecular system with the target spin symmetry comprises one of:a ground state of the molecular system, oran 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 implements a method of optimization of a neural network wavefunction, the method comprising:obtaining description information of a molecular system comprising a set of first electrons with a first spin state and a set of second electrons with a second spin state, the description information indicating respective positions of the sets of first electrons and second electrons;selecting a first electron with the first spin state from the set of first electrons;determining, by using a neural network representing a wavefunction of the molecular system, a spin metric associated with a target spin symmetry based on the description information and exchange of a position of the selected first electron with respective positions of the set of second electrons; andupdating the neural network based on a loss function comprising the spin metric.11.The device of claim 10, wherein determining the spin metric associated with the target spin symmetry comprises:generating, by using the neural network, a first value of the wavefunction based on the description information;for each second electron in the set of second electrons, generating a second value of the wavefunction by using the neural network based on exchange of the position of the selected first electron with a position of the second electron; andderiving the spin metric based on the first value and respective second values generated for the set of second electrons.12.The device of claim 11, wherein generating the second value of the wavefunction by using the neural network comprises:exchanging the position of the selected first electron and the position of the second electron to update description information; andgenerating, by using the neural network, the second value of the wavefunction based on the updated description information.13.The device of claim 11, wherein deriving the spin metric based on the first value and respective second values generated for the set of second electrons comprises:for each second electron in the set of second electrons, determining a ratio of the second value to the first value; anddetermining the spin metric based on a difference between a predetermined value and a sum of the ratios determined for the set of second electrons.14.The device 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 further state lower than the target state, both the target state and the at least one further state corresponding to the target spin symmetry.15.The device of claim 14, further comprising:obtaining at least one further wavefunction corresponding to the at least one further state of the molecular system; anddetermining the overlap metric based on the at least one further wavefunction and the neural network.16.The device of claim 10, wherein selecting the first electron, determining the spin metric, and updating the neural network are performed for a plurality of rounds, andthe first electron selected in a first round of the plurality of rounds is different from the first electron selected in a second round of the plurality of rounds.17.The device of claim 10, wherein the number of first electrons in the set of first electrons is equal to or smaller than the number of second electrons in the set of second electrons.18.The device of claim 10, wherein a target state of the molecular system with the target spin symmetry comprises one of:a ground state of the molecular system, oran excited state of the molecular system.19.A computer program product, the computer program product comprising a non-transitory computer readable storage medium having program instructions embodied therewith, the program instructions executable by an electronic device to cause the electronic device to perform a method of optimization of a neural network wavefunction of any of claims 1 to 9.

Citation Information

Patent Citations

  • Anti-symmetric neural network

    CN114258546A

  • Distributed system deployment

    CN114341809A

  • Method and apparatus for transform skip coefficient coding

    CN114586367A

  • Predicting exchange related energy for atomic systems using neural networks

    CN116783656A

  • Systems and methods of processing diverse data sets with a neural network to generate synthesized data sets for predicting a target metric

    US20200226468A1