Information processing device, information processing method, and program
The information processing apparatus and method utilize an iterative process with automatic differentiation to reduce computational costs in derivative coefficient calculations, ensuring high accuracy in high-dimensional parameter spaces.
Patent Information
- Application Number
- JP2024002073
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-23
- Estimated Expiration
- 2044-01-10
AI Technical Summary
Existing methods for automatic differentiation are computationally costly, necessitating a technique to reduce calculation costs while maintaining accuracy.
An information processing apparatus and method that incorporates an iterative process for calculating derivative coefficients, combining a first iterative process with a second process involving automatic differentiation, and a third process using reverse-mode or forward-mode automatic differentiation to reduce computational overhead.
The method effectively suppresses calculation costs while maintaining high accuracy in derivative coefficient calculations, particularly for high-dimensional parameter spaces.
Smart Images

Figure 2025108260000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an information processing apparatus, an information processing method, and a program.
Background Art
[0002] Techniques for performing analysis such as optimization of parameters for describing a system targeted for a material system or the like are known. For example, Patent Document 1 discloses a technique for designing a material based on quantum mechanical calculations.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] As one of the above-described analysis methods, a method using automatic differentiation is also known. By using automatic differentiation, it is possible to improve the accuracy of analysis, while it is desirable to be able to execute automatic differentiation at a lower computational cost. One aspect of the present invention aims to realize a technique capable of suppressing computational cost in a calculation method using automatic differentiation.
Means for Solving the Problems
[0005] In order to solve the above problems, an information processing apparatus according to an aspect of the present invention includes an acquisition unit that acquires an initial value related to the calculation of the value of a target function that directly or indirectly includes one or more parameters as arguments, and a calculation unit that calculates a differential coefficient of the target function. The calculation process of the differential coefficient by the calculation unit includes a first process and a second process. The calculation process of the differential coefficient by the calculation unit includes an iterative process. The first process includes a part of the iterative process, and the second process includes a part other than the part of the iterative process. The calculation process of the differential coefficient by the calculation unit includes a third process that includes a calculation process of automatic differentiation for a process that does not include the first process and includes the second process.
[0006] In order to solve the above problems, an information processing method according to an aspect of the present invention includes an acquisition step of acquiring an initial value related to the calculation of the value of a target function that directly or indirectly includes one or more parameters as arguments, and a calculation step of calculating a differential coefficient of the target function. The calculation process of the differential coefficient by the calculation step includes a first process and a second process. The calculation process of the differential coefficient by the calculation step includes an iterative process. The first process includes a part of the iterative process, and the second process includes a part other than the part of the iterative process. The calculation process of the differential coefficient by the calculation step includes a third process that includes a calculation process of automatic differentiation for a process that does not include the first process and includes the second process.
[0007] The information processing apparatus according to each aspect of the present invention may be realized by a computer. In this case, a program for realizing the information processing apparatus by operating the computer as each part (software element) included in the information processing apparatus, and a computer-readable recording medium on which the program is recorded also fall within the scope of the present invention.
Effects of the Invention
[0008] According to an aspect of the present invention, in a calculation method using automatic differentiation, the calculation cost can be suppressed.
Brief Description of the Drawings
[0009]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Embodiments for Carrying Out the Invention
[0010] (Outline of Information Processing According to Each Embodiment) First, an overview of the information processing according to each embodiment described in this specification will be explained. The information processing apparatus and information processing method according to each embodiment described in this specification can be used, for example, to design (also referred to as inverse design) a system or substance having desired performance and physical properties. In normal simulations, for example, as parameters p, the arrangement of atoms, the impurity distribution of semiconductors, manufacturing conditions, etc. are set, and an objective function related to performance or physical properties such as the superconducting transition temperature, voltage-current characteristics, defect density, etc. determined according to the parameters is calculated. However, the information processing apparatus and information processing method according to each embodiment described in this specification can be suitably used for the problem of designing (inverse design) parameters p such as the arrangement of atoms, the impurity distribution of semiconductors, manufacturing conditions, etc. so as to have a desired superconducting transition temperature, desired voltage-current characteristics, desired defect density, etc. Also, in another example, it can be used to estimate parameters that describe the target system from limited measurement results regarding the target system.
[0011] In other words, the information processing apparatus and information processing method according to each embodiment described in this specification can be suitably applied to the problem of finding parameters p that maximize or minimize an objective function related to performance or physical properties in inverse design or the like as described above. To solve such a problem, it is useful to know the derivative of the objective function with respect to p. However, when p is high-dimensional, there is a problem that it requires computational cost to obtain all the derivatives of the objective function with respect to p. In the information processing apparatus and information processing method according to each embodiment described in this specification, the computational cost can be reduced when calculating the derivative of the objective function with respect to p by an iterative method.
[0012] In the information processing apparatus and information processing method of the present disclosure, more specifically, · At least one parameter p a (a is an index enumerating the at least one parameter) in a set P, and · Q which is a subset of the set P, and · At least one state variable x ba state variable X which is a set of (b is an index for enumerating the at least one parameter), and · a function F(Q, X) and are considered. Hereinafter, P or Q may also be simply referred to as a parameter. Also, X may be simply referred to as a state variable. Further, consider X ANS (P), which is the value of the state variable X determined based on the value of the parameter P. Hereinafter, X ANS (P) may also be simply written as X(P). When the set Q is not an empty set, the function F corresponds to the case where it positively depends on any of the parameters p a included in the set P. Such a function F may also be expressed as a target function (F) that directly includes one or more parameters (p a ) as arguments. On the other hand, when the set Q is an empty set, the function F corresponds to the case where it does not positively depend on any of the parameters p a included in the set P. Such a function F may also be expressed as a target function (F) that indirectly includes one or more parameters (p a ) as arguments. Also, F(Q, X) only needs to depend on at least any of x b . For example, F may itself be any of x b .
[0013] Thus, the target function (F) can be expressed as a function that takes a subset (Q) of the one or more parameters and one or more state variables (X(P)) that take the one or more parameters as arguments. Note that the state variable x b described above does not have to be related to a physical state.
[0014] In the information processing apparatus and information processing method according to this specification, as an example, the derivative ∂F(Q, X ANS (P)) / ∂p a with respect to each p ANS of F(Q, X a (P)) is numerically obtained. The specific form of F(Q, X ANS (P)) depends on the object of the information processing apparatus and information processing method.
[0015] X ANS (P) may also depend on parameters not included in P, but hereinafter, for the sake of brevity of notation, the dependence of X on parameters not included in P may not be explicitly written. Also, the function F may depend on parameters not included in P, but hereinafter, for the sake of brevity of notation, the dependence of the function F on parameters not included in P may not be explicitly written. ANS
[0016] X ANS (P) is determined based on the object of the information processing apparatus and the information processing method. X ANS (P) may be the inverse function of P, and X ANS it is sufficient to know an iterative calculation method for obtaining the numerical solution of (P). For example, starting from a certain appropriate initial condition X0, X i = φ(P, X i-1 ) is repeatedly calculated to obtain X i as the convergence value of X ANS it is sufficient to know a function φ such that the numerical solution of (P) is expected to be obtained. Also, the function φ may not be fixed and may be a function that changes according to the iteration, and X i i = φ i (P, X i-1 ) is repeatedly calculated to obtain X i as the convergence value of X ANS it may be a function such that the numerical solution of (P) is expected to be obtained. Also, the value of each state variable x i included in the value of the state variable X b is written as x (i,b) .
[0017] φ does not necessarily have to be such that the numerical solution of X ANS (P) is obtained. For example, for a certain initial condition X0, the numerical solution of (P) may not be obtained by the repeated calculation. For example, φ may be such that X = φ(P, X) has multiple solutions, and X ANS (P) is one of the multiple solutions, and when starting from a certain initial condition X0 and performing the repeated calculation, among the multiple solutions of X = φ(P, X), X ANS ANS It may be the case that a numerical solution corresponding to a solution different from (P) is obtained. In that case, for example, by starting calculations from a plurality of initial values, X ANS a numerical solution of (P) is obtained.
[0018] [Embodiment 1] Next, an embodiment of the present invention will be described in detail.
[0019] (Configuration of information processing apparatus 1) FIG. 1 is a block diagram showing the configuration of the information processing apparatus 1 according to the present embodiment. As shown in FIG. 1, the information processing apparatus 1 includes a control unit 2, a storage unit 3, and an input / output unit 4.
[0020] (Storage unit 3) The storage unit 3 stores various data and information referred to by the control unit 2, and various data and information derived by the control unit 2. As an example, as shown in FIG. 1, the storage unit 3 stores a parameter P, calculation process information CP, a threshold value Cth, and the number of repetitions m.
[0021] Here, the parameter P refers to, as an example, a set P of at least one parameter p a (where a is an index attached to the at least one parameter). The calculation process information CP is, as an example, information regarding various calculation processes executed by the control unit 2, and includes information used in automatic differentiation described later as an example. The threshold value Cth is, as an example, a threshold value referred to in a determination process for determining whether a convergence condition is satisfied. The number of repetitions m is, as an example, a value that defines the number of repetitions of the calculation of the target by the control unit 2. A more specific description of the various data and information stored in the storage unit 3 will be given later.
[0022] (Input / output unit 4) The input / output unit 4 is configured to include at least one of input / output devices such as a keyboard, a mouse, a display, a printer, and a touch panel, for example. Alternatively, the input / output unit 4 may be configured such that input / output devices such as a keyboard, a mouse, a display, a printer, and a touch panel are connected thereto. In the case of such a configuration, the input / output unit 4 receives input of various types of information to the information processing apparatus 1 from the connected input devices. Further, the input / output unit 4 outputs various types of information to the connected output devices under the control of the control unit 2. Examples of the input / output unit 4 include interfaces such as USB (Universal Serial Bus).
[0023] (Control unit 2) As shown in FIG. 1, the control unit 2 includes an initial value determination unit 21, a state update unit 22, an end determination unit 23, a function value calculation unit 24, a differential value calculation unit 26, and an end determination unit 28.
[0024] The initial value determination unit 21 determines the initial value X0 of the state variable X. The initial value determination unit 21 may, for example, set the initial value X0 to a predetermined value in advance, or may determine the initial value X0 using a random number. The initial value determination unit 21 may set the initial value X0 to a value input from the outside via the input / output unit 4. The initial value determination unit 21 may be expressed as an acquisition unit that acquires an initial value (for example, the initial value X0 of X which is an argument of the target function F) related to the calculation of the value of the target function (F) that directly or indirectly includes one or more parameters (p a ) as an argument.
[0025] The state update unit 22 updates the state variable X. As an example, the state update unit 22 obtains X i = φ(P, X i-1 ), which is the value of the new state variable X, namely X i . Details of the processing by the state update unit 22 will be described later.
[0026] The end determination unit 23 determines whether to end the iteration of the target calculation. Details of the processing by the end determination unit 23 will be described later.
[0027] The function value calculation unit 24 calculates the value of the target function. As an example, the function value calculation unit 24 calculates the value F(Q, X n+m ) of the function F. Details of the processing by the function value calculation unit 24 will be described later.
[0028] The derivative value calculation unit 26 functions as a calculation unit that calculates the derivative coefficient of the target function (F). As an example, as shown in FIG. 1, the derivative value calculation unit 26 includes a backpropagation calculation unit 252 and a calculation process recording unit 253. Details of the processing by the derivative value calculation unit 26 will be described later.
[0029] The end determination unit 28 determines whether the target process has been executed a predetermined number of times. Details of the processing by the end determination unit 28 will be described later.
[0030] <Flow of processing by the information processing apparatus 1> Hereinafter, the flow of processing by the information processing apparatus 1 will be described. Generally speaking, the information processing apparatus 1 · Convergence solution calculation step (also referred to as step S1) · Derivative coefficient calculation step (also referred to as step S2) executes. Note that the entire steps S1 and S2 may also be referred to as the derivative coefficient calculation process. Here, the derivative coefficient calculation process includes an iterative process as an example. Step S1 is also referred to as the first process and, as will be described later, includes a part of the iterative process as an example. On the other hand, steps S211 and S212, which will be described later in step S2, are also referred to as the second process and, as will be described later, include the part other than the above-mentioned part of the iterative process. Step S213, which will be described later in step S2, may be included in the second process. Also, as will be described later, the derivative coefficient calculation process includes an automatic differentiation calculation process for a process that does not include the first process but includes the second process. The "automatic differentiation calculation process for a process that does not include the first process but includes the second process" is also referred to as the third process.
[0031] Also, as described later, the iterative process includes an update process of one or more state variables (X), and the third process includes a process of calculating a derivative coefficient of a target function (F) using automatic differentiation. Further, in the process according to the present embodiment, the third process includes a process of calculating a derivative coefficient of a target function (F) using reverse-mode automatic differentiation, as described later.
[0032] (Step S1) The convergence solution calculation step (Step S1) includes steps S11 to S13 as shown in FIG. 3 as an example.
[0033] (Step S11) In step S11, the initial value determination unit 21 determines an initial value X0 of the state variable X. The initial value X0 may be input from the outside via the input / output unit 4.
[0034] (Step S12) Next, in step S12, the state update unit 22 updates the state variable X. That is, X i = φ(P, X i-1 ) is used to obtain a new value of the state variable X, which is X i . Here, i corresponds to how many times step S12 has been executed. For example, when step S12 is executed for the first time, the state update unit 22 obtains X1 by X1 = φ(P, X0).
[0035] (Step S13) Next, in step S13, the end determination unit 23 determines whether to end the iteration of the calculation in step S12. In the present embodiment, the end determination unit 23 determines whether the X i obtained in the immediately preceding step S12 satisfies the convergence condition. In other words, the end determination unit 23 executes a convergence determination process regarding at least any one of the one or more state variables. If the X i does not satisfy the convergence condition, step S12 is executed again. If the X iWhen the convergence condition is satisfied, step S1 ends and step S2 is executed. The convergence condition used in step S13 will be described later.
[0036] Hereafter, X i When it is determined that X satisfies the convergence condition, i is also written as n.
[0037] (Supplementary Note: Convergence Judgment in Step S13) X i The method by which the end determination unit 23 determines whether X satisfies the convergence condition is not particularly limited and may be a method according to the purpose of the information processing method. For example, the end determination unit 23, for example, X i-1 and X i Based on the value C(X i-1 , X i ) of the function C that depends on and the threshold value Cth, when C(X i-1 , X i ) < Cth is satisfied, it is determined that X i satisfies the convergence condition, and otherwise it is determined that X i does not satisfy the convergence condition. The function C may depend on any one or more of X0, X1, ···, X i-2 . The function C may depend only on X i and not depend on X0, X1, ···, X i-1 . The values of these state variables are added to the calculation process information CP stored in the storage unit 3 during the calculation process as necessary.
[0038] For example, the end determination unit 23 uses the newly obtained X i in step S12 and the X i-1 obtained in the execution of the previous step S12 to determine convergence. For example, the end determination unit 23 uses a predetermined threshold value Cth to determine that |X i - X i-1 | < Cth, then it is determined that X i satisfies the convergence condition, and otherwise it is determined that X i does not satisfy the convergence condition. Here, |X i - X i-1|=(Σ b (x (i,b) -x (i-1,b) ) 2 ) 0.5 is as follows.
[0039] When the function C does not depend on X0, X1, ···, X i-1 , the end determination unit 23 determines that X i satisfies the convergence condition when C(X i ) < Cth is satisfied, and determines that X i does not satisfy the convergence condition otherwise. For example, when obtaining the state variable X such that the value of C(X) becomes 0 by an iterative method, such convergence determination may be performed.
[0040] (Step S2) As described above, Step S1 is executed, and after the end of Step S1, Step S2 (differential coefficient calculation step) is performed. FIG. 4 is a flowchart showing Step S2. As shown in FIG. 4, Step S2 includes Step S211, Step S212, Step S213, and Step S214. Note that all or part of these Steps S211 to S213 constitute an example of the second process described above. Also, Step S214 can be regarded as an example of the third process described above.
[0041] (Step S211) In Step S211, the state update unit 22 obtains X n+k = φ(P, X n+k-1 ). Here, k corresponds to how many times Step S211 has been executed. For example, when Step S211 is executed for the first time, the state update unit 22 obtains X n+k = φ(P, X n+1 ). However, X n is X n+1 obtained in Step S1. n is X n obtained in Step S1.
[0042] In step S211, the calculation process recording unit 253 of the differential value calculation unit 26 adds information necessary for performing automatic differentiation in reverse mode to the calculation process information CP regarding the calculation performed by the state update unit 22 in step S211. The information necessary for performing automatic differentiation in reverse mode may be recorded, for example, in the form of a computational graph, or each X n+k is recorded as checkpoint information, and when performing the calculation of backpropagation in step S214 described later, the computational graph may be constructed using X n+k as needed. In other words, in the third process described above, the information on the calculation process of the second process recorded at the checkpoint is used. As an example, among the information included in the calculation process information CP, the information on the calculation process of the second process recorded at the checkpoint may be used in the third process described above. In each embodiment of the present application, "performing automatic differentiation in reverse mode" refers to performing the calculation of backpropagation of the differential value, and does not include the recording of the calculation process necessary for the original forward calculation and the calculation of backpropagation of the differential value.
[0043] (Step S212) In step S212, the end determination unit 28 determines whether step S211 has been executed a predetermined number of times. If step S211 has been executed the predetermined number of times, step S213 is executed. If step S211 has not been executed the predetermined number of times, step S211 is executed again. Let the predetermined number of times that step S211 is executed be m. By executing step S211 m times, X n+m is obtained. The method for determining m is as follows, for example.
[0044] The number of iterations m may be determined, for example, based on consideration of the object of the information processing method before the execution of step S1. For example, if the way of convergence of X i by φ in the vicinity of the converged solution is known, m may be determined based on the way of convergence. For example, X iIf it is known that the convergence is faster than first-order convergence, for example, if it is known that the convergence is second-order, m may be 1.
[0045] Also, the number of iterations m may be determined based on a test calculation, for example, before the execution of step S1. For example, for each p included in P a When obtaining the derivative coefficient of F with respect to p at a plurality of values of P, a preferable value of the number of iterations m in step S2 is obtained at a representative value of P, and the preferable value of the number of iterations m may be used in the calculations at the plurality of values of P.
[0046] Also, the number of iterations m may be determined based on the way of convergence of X obtained in step S1, for example. i For example, when using a parameter λ whose value is less than 1 in step S1, |X i -X i -X i-1 |<λ|X i-1 -X i-2 | and the convergence is such that, when λ m (the m-th power of λ) becomes sufficiently small, or λ m becomes smaller than the target value, m may be determined. In this case, for example, the control unit 2 includes an iteration number determination unit (not shown), and the iteration number determination unit determines the iteration number m. When using a λ whose value is less than 1 in step S1, |X i -X i -X i-1 |<λ|X i-1 -X i-2 | and the convergence is such that, when i is close to n, the behavior of X i may be determined from the behavior.
[0047] (Step S213) In step S213, the function value calculation unit 24 calculates the value F(Q, X of the function F n+mCalculate (). In step S213, the calculation process recording unit 253 of the differential value calculation unit 26 records information necessary for performing automatic differentiation in reverse mode regarding the calculation performed by the function value calculation unit 24 in step S213. The said information is included in the calculation process information CP recorded by the storage unit 3.
[0048] In step S214, the backpropagation calculation unit 252 of the differential value calculation unit 26, based on the calculation process information CP recorded in the storage unit 3, obtains X from X by the iterative method n to X n+m and further performs the calculation of the backpropagation of the differential value corresponding to the calculation of obtaining the value F(Q, X n+m ). Thereby, ∂F(Q, Y (n,m) (P)) / ∂p a is obtained. Here, in order to clarify the dependency on P, Y (n,m) (P) is newly introduced. Y (i,0) (P) is a constant that does not depend on P such that Y (i,0) = X i (P). Also 、 Y (i,k) (P) is a state variable obtained by applying φ k times starting from Y (i,0) . For example, Y (i,1) (P) = φ(P, Y (i,0) ). For a value P' of a parameter different from P, Y (i,1) (P') = φ(P', Y (i,0) ), but in this case too, the Y (i,0) on the right side is Y (i,0) = X i (P). Y (i,k) (P) = X i+k (P), but generally Y (i,k) (P') ≠ X i+k (P') for a value P' of a parameter different from P and k > 0.
[0049] Thus, in step S2, from step S211 to step S213, X is obtained from X by the iterative method, and further the value F(Q, X of the function F n to X n+m is obtained, and n+mFor the calculation to obtain (), reverse-mode automatic differentiation is applied. As a result, for each p included in P a with respect to, ∂F(Q, X ANS (P)) / ∂p a as a numerical value of, ∂F(Q, Y (n,m) (P)) / ∂p a is obtained.
[0050] In the present embodiment, by performing the calculation of step S1 before step S2, for example, the number of iterations m in step S2 can be reduced, and the calculation cost of automatic differentiation for obtaining the derivative coefficient of each p a with respect to F can be reduced. This effect is significant when the ratio n / m of the number of iterations n in step S1 to the number of iterations m in step S2 is large.
[0051] By using reverse-mode automatic differentiation in step S2, even when the number of p a is large, it is possible to calculate ∂F(Q, Y (n,m) (P)) / ∂p a while suppressing the calculation cost.
[0052] As described above, in the information processing apparatus 1 and the information processing method according to the present embodiment, · An initial value regarding the calculation of the value of the target function (F) that directly or indirectly includes one or more parameters (p a ) as an argument is acquired, · The derivative coefficient of the target function (F) is calculated, · The calculation process of the derivative coefficient includes a first process (for example, step S1), and a second process (for example, steps S211, S212), and . Also, · The calculation process of the derivative coefficient includes an iterative process, the first process includes a part of the iterative process, the second process includes the part other than the part of the iterative process, The calculation process of the differential coefficient includes a third process which is an automatic differentiation calculation process for a process that includes the second process and does not include the first process. Such a configuration is adopted. Therefore, according to the above configuration, in the calculation for obtaining the differential coefficient with respect to each parameter (p a ) of the target function (F), by using automatic differentiation, it is possible to maintain high accuracy of the differential calculation while reducing the calculation cost.
[0053] Also, as described above, the second iterative process includes a process of calculating the differential coefficient of the target function (F) using automatic differentiation of backpropagation. Therefore, the calculation cost can be more suitably reduced. (Supplementary Notes of Embodiment 1) Each process described in Embodiment 1 and each process described in each of the following embodiments can also be regarded as a process based on the comparative example described below. FIG. 5 is a flowchart showing the information processing method according to the comparative example.
[0054] The information processing method according to the comparative example has step S1010, step S1020, and step S1030.
[0055] (Step S1010) First, step S1010 is performed. FIG. 6 is a flowchart showing the flow of each process included in step S1010. As shown in FIG. 6, step S1010 has steps S1011 to S1013.
[0056] (Step S1011) In step S1011, the initial value X0 of the state variable X is determined.
[0057] (Step S1012) Next, in step S1012, X i = φ(P, X i-1 ) is used to obtain a new value X of the state variable iis required. Here, i corresponds to how many times step S1012 is executed. For example, when step S1012 is executed for the first time, X1 is obtained by X1 = φ(P, X0).
[0058] (Step S1013) Next, in step S1013, it is determined whether X i satisfies the convergence condition. If it is determined that X i does not satisfy the convergence condition, step S1013 is executed again. If it is determined that X i satisfies the convergence condition, step S1012 is executed.
[0059] The convergence condition in step S1013 is, for example, related to how different X i is from X i-1 , and is the same as that described in other embodiments, for example.
[0060] In step S1013, if it is determined that X i satisfies the convergence condition, X ANS (P) is obtained as the numerical solution of X n . However, here, n is i when it is determined that X i satisfies the convergence condition. Since X obtained by applying φ n times starting from X0 depends on P, to clarify the dependence on P, it is also written as X n (P). n
[0061] (Step S1020) X i If it is determined that satisfies the convergence condition, next, in step S1020, F(Q, X n ) is calculated.
[0062] (Step S1030) Next, in step S1030, the calculation of the backpropagation of the value of the derivative of F corresponding to the calculations in step S1010 and step S1020 is performed. Thereby, ∂F(Q, Xn (P)) / ∂p a is obtained.
[0063] In this way, by applying automatic differentiation to the calculations in steps S1010 and S1020, for each p included in P a with respect to F(Q,X ANS (P)), the derivative coefficient ∂F(Q,X ANS (P)) / ∂p a is obtained as a numerical solution of ∂F(Q,X n (P)) / ∂p a In the above description, ∂F(Q,X n (P)) / ∂p a is obtained by automatic differentiation in reverse mode, but automatic differentiation in forward mode may also be used.
[0064] When automatic differentiation in forward mode is used, for example, by performing the calculations of steps S1010 and S1020 once using an extended double number having a plurality of non-real parts, the derivative coefficient ∂F(Q,X a with respect to each p ANS (P)) / ∂p a may be calculated.
[0065] When using automatic differentiation in reverse mode, by performing the calculation of backpropagation of the derivative coefficient, for each p a with respect to the derivative coefficient ∂F(Q,X ANS (P)) / ∂p a can be calculated collectively.
[0066] 〔Embodiment 2〕 Subsequently, Embodiment 2, which is another embodiment of the present invention, will be described in detail. For the sake of convenience of explanation, members having the same functions as those described in the above embodiment are denoted by the same reference numerals, and the description thereof will not be repeated.
[0067] The information processing apparatus according to this embodiment includes a differential value calculation unit 25 instead of the differential value calculation unit 26 included in the information processing apparatus 1 according to the above-described Embodiment 1. Other configurations of the information processing apparatus according to this embodiment are the same as those of the information processing apparatus 1 according to the above-described Embodiment 1.
[0068] (Differential value calculation unit 25) The differential value calculation unit 25 includes, as an example, a forward propagation calculation unit 251. The forward propagation calculation unit 251 of the differential value calculation unit 25 performs a forward propagation calculation of the differential value corresponding to the calculation performed by the state update unit 22. Details of the processing by the differential value calculation unit 25 will be described later.
[0069] (Flow of processing by the information processing apparatus according to this embodiment) Hereinafter, the flow of processing by the information processing apparatus according to this embodiment will be described. Generally speaking, the information processing apparatus according to this embodiment is the same as the information processing apparatus 1 according to Embodiment 1 in that · Convergence solution calculation step (Step S1, also referred to as the first processing) · Differential coefficient calculation step (Step S2b) is executed.
[0070] Step S2b includes Step S201, Step S202, and Step S203 as described later. A part of the processing performed in Step S201 and Step S202 is also referred to as the second processing. The processing performed by the forward propagation calculation unit 251 in Step S201 and Step S203 is an example of the processing included in the third processing.
[0071] (Step S1) Since Step S1 according to this embodiment is the same as Step S1 executed by the information processing apparatus 1 according to Embodiment 1, the description thereof will be omitted.
[0072] (Step S2b) After the end of Step S1, Step S2b is performed. Step S2b according to this embodiment includes, as an example, Step S201, Step S202, and Step S203 described below.
[0073] (Step S201) In step S201, the state update unit 22 obtains X n+k = φ(P, X n+k-1 ) to obtain X n+k . Here, k corresponds to how many times step S201 has been executed. For example, when step S201 is executed for the first time, the state update unit 22 obtains X n+1 = φ(P, X n ) to obtain X n+1 . However, X n is the X n obtained in step S1.
[0074] In step S201, the forward propagation calculation unit 251 of the differential value calculation unit 25 performs a forward propagation (forward mode) calculation of the differential value corresponding to the calculation performed by the state update unit 22 in step S201.
[0075] (Step S202) Subsequently, in step S202, the end determination unit 28 determines whether step S201 has been executed the predetermined number of times. If step S201 has been executed the predetermined number of times, step S203 is executed. If step S201 has not been executed the predetermined number of times, step S201 is executed again. Let the predetermined number of times that step S201 is executed be m. By executing step S201 m times, X n+m is obtained.
[0076] (Step S203) Subsequently, in step S203, the function value calculation unit 24 calculates the value F(Q, X n+m ) of the function F.
[0077] In step S203, the forward propagation calculation unit 251 of the differential value calculation unit 25 performs a forward propagation calculation of the differential value corresponding to the calculation performed by the function value calculation unit 24 in step S203.
[0078] The X obtained by the iterative method performed in step S2b n from X n+m is obtained, and for the calculation of obtaining the value F(Q, X n+m ), by applying forward-mode automatic differentiation, for each p a included in P, the derivative coefficient ∂F(Q, X a (P)) / ∂p ANS is obtained as a numerical value of ∂F(Q, Y a (P)) / ∂p (n,m) . Here, Y a (P) is the same as Y (n,m) (P) introduced in Embodiment 1. (n,m)
[0079] After the end of step S2b, the information processing apparatus according to the present embodiment outputs, for example, via the input / output unit 4, ∂F(Q, Y a (P)) / ∂p (n,m) for each p a to the outside.
[0080] When using forward-mode automatic differentiation as in the present embodiment, in order to obtain the derivative coefficient of F with respect to each p a , for example, the calculation cost is approximately proportional to the number of p a . In the present embodiment, the automatic differentiation for obtaining the derivative coefficient of F with respect to each p a is not applied to step S1. By performing step S1, for example, the number of iterations m in step S2b can be reduced, and the calculation cost of the automatic differentiation for obtaining the derivative coefficient of F with respect to each p a can be reduced compared to the comparative example. This effect is greater when the ratio n / m of the number of iterations n in step S1 to the number of iterations m in step S2b is large. Note that the method of setting the number of iterations m is the same as the process described in Embodiment 1 as an example, so the description is omitted here.
[0081] Also, by the information processing apparatus and the information processing method according to the present embodiment, for each parameter (p aIn the calculation for obtaining the derivative with respect to [[ID=]], by using automatic differentiation, it is possible to reduce the calculation cost while maintaining high accuracy of the derivative calculation.
[0082] [Embodiment 3] Subsequently, Embodiment 3, which is another embodiment of the present invention, will be described in detail. For convenience of explanation, members having the same functions as those described in the above embodiments are denoted by the same reference numerals, and the description thereof will not be repeated.
[0083] The information processing apparatus according to the present embodiment includes an end determination unit 29 instead of the end determination unit 28 included in the information processing apparatus according to the above-described Embodiment 2. Further, the storage unit 3 of the information processing apparatus according to the present embodiment stores a threshold value Cth2 instead of the number of iterations m in Embodiment 2. Other configurations of the information processing apparatus according to the present embodiment are the same as those of the information processing apparatus according to the above-described Embodiment 2.
[0084] (End determination unit 29) The end determination unit 29 determines whether the target process satisfies the convergence condition. Details of the process by the end determination unit 29 will be described later.
[0085] <Flow of processing by the information processing apparatus according to the present embodiment> Hereinafter, the flow of processing by the information processing apparatus according to the present embodiment will be described. Generally speaking, the information processing apparatus according to the present embodiment is similar to the information processing apparatus 2 according to Embodiment 2 in that · Convergent solution calculation step (also called step S1 and the first process) · Derivative calculation step (also called step S2c) is executed. Step S2c includes steps S201, S203, and S205 as described later. A part of the process performed in step S2c is also called the second process. The processes performed by the forward propagation calculation unit 251 in steps S201 and S203 are examples of the processes included in the third process.
[0086] (Step S1) Regarding step S1 according to this embodiment, since it is the same as step S1 executed by the information processing apparatus 1 according to Embodiment 1, the description thereof will be omitted.
[0087] (Step S2c) After the end of step S1, step S2c is performed. Step S2c according to this embodiment has, as an example, step S201, step S203, and step S205 described below.
[0088] (Step S201) In step S201, the state update unit 22 obtains X n+k = φ(P, X n+k-1 ). Here, k corresponds to how many times step S201 has been executed. For example, when step S201 is executed for the first time, the state update unit 22 obtains X n+k = φ(P, X n+1 ). However, X n is X n+1 obtained in step S1. In step S201, the forward propagation calculation unit 251 of the differential value calculation unit 25 performs forward propagation calculation of the differential value corresponding to the calculation performed by the state update unit 22 in step S201. n is X n obtained in step S1. In step S201, the forward propagation calculation unit 251 of the differential value calculation unit 25 performs forward propagation calculation of the differential value corresponding to the calculation performed by the state update unit 22 in step S201.
[0089] (Step S203) Subsequently, in step S203, the function value calculation unit 24 calculates the value F(Q, X n+k ) of the function F.
[0090] In step S203, the forward propagation calculation unit 251 of the differential value calculation unit 25 performs forward propagation calculation of the differential value corresponding to the calculation performed by the function value calculation unit 24 in step S203.
[0091] Repeat step S201 to obtain X n and based on it, obtain X n+k , and in step S203, calculate the value F(Q, X n+kBy applying forward-mode automatic differentiation to the calculation of calculating (), the derivative coefficient ∂F(Q, Y a with respect to each of p (n,k) (P)) / ∂p a is obtained. Here, Y (n,k) is the same as the Y introduced in Embodiment 1.
[0092] (Step S205) Next, in step S205, the end determination unit 29 determines whether ∂F(Q, Y (n,k) (P)) / ∂p a satisfies the convergence condition. In other words, the end determination unit 29 executes convergence determination processing regarding the derivative coefficient of the target function (F). If it is determined that ∂F(Q, Y (n,k) (P)) / ∂p a satisfies the convergence condition, step S2c ends. In this case, ∂F(Q, Y (n,k) (P)) / ∂p a determined to satisfy the convergence condition is the numerical solution of ∂F(Q, X ANS (P)) / ∂p a . If it is determined that ∂F(Q, Y (n,k) (P)) / ∂p a does not satisfy the convergence condition, step S201 is executed again.
[0093] In step S205, the method by which the end determination unit 29 determines whether ∂F(Q, Y (n,k) (P)) / ∂p a has converged may be appropriately determined according to the purpose. For example, if g (k,a) = ∂F(Q, Y (n,k) (P)) / ∂p a is set, when (Σ a (g (k,a) - g (k-1,a) ) 2 ) 0.5 < Cth2 is satisfied, it is determined that ∂F(Q, Y (n,k) (P)) / ∂p a has converged, and in other cases, ∂F(Q, Y (n,k) (P)) / ∂p aIt is determined that the process has not converged.
[0094] In the calculation for obtaining the derivative coefficient with respect to each parameter (p a ) of the target function (F) according to the information processing apparatus and the information processing method according to the present embodiment, by using automatic differentiation, it is possible to maintain high accuracy of the differential calculation while reducing the calculation cost.
[0095] [Embodiment 4] Subsequently, Embodiment 4, which is another embodiment of the present invention, will be described in detail. For the sake of convenience of explanation, members having the same functions as the members described in the above embodiment are denoted by the same reference numerals, and the description thereof will not be repeated.
[0096] The information processing apparatus according to the present embodiment includes an end determination unit 29 instead of the end determination unit 28 provided in the information processing apparatus 1 according to the above-described Embodiment 1. Further, the storage unit 3 of the information processing apparatus according to the present embodiment stores a threshold value Cth2 instead of the number of iterations m in Embodiment 1. Other configurations of the information processing apparatus according to the present embodiment are the same as those of the information processing apparatus 1 according to the above-described Embodiment 1.
[0097] (End determination unit 29) The end determination unit 29 determines whether the target process satisfies the convergence condition. Details of the process by the end determination unit 29 will be described later.
[0098] <Flow of processing by the information processing apparatus according to the present embodiment> Hereinafter, the flow of processing by the information processing apparatus according to the present embodiment will be described. Generally speaking, the information processing apparatus according to the present embodiment is the same as the information processing apparatus 1 according to Embodiment 1 in that · Convergence solution calculation step (step S1, also referred to as the first process) · Derivative coefficient calculation step (step S2d) is executed.
[0099] Step S2d includes steps S211, S213, S214, and S205, as described below. S211 and S213 are also called the second process. Steps S214 and S205 are an example of processes included in the third process.
[0100] (Step S1) Step S1 according to this embodiment is similar to step S1 executed by the information processing device 1 according to the first embodiment, and therefore a description thereof will be omitted.
[0101] (Step S2d) After step S1 is completed, step S2d is performed. Step S2d according to the present embodiment includes, as an example, steps S211, S213, S214, and S205, which will be described below.
[0102] (Step S211) In step S211, the state update unit 22 n+k =φ(P,X n+k-1 ) X n+k In step S211, the calculation process recording unit 253 of the differential value calculation unit 26 adds, to the calculation process information CP, information required for automatic differentiation in the reverse mode with respect to the calculation performed by the state update unit 22 in step S211.
[0103] (Step S213) Next, in step S213, the function value calculation unit 24 calculates the value F(Q,X n+k In step S213, the calculation process recording unit 253 of the differential value calculation unit 26 adds information required for automatic differentiation in the reverse mode regarding the calculation performed by the function value calculation unit 24 in step S213 to the calculation process information CP.
[0104] (Step S214) Next, in step S214, the backpropagation calculation unit 252 of the differential value calculation unit 26 performs backpropagation calculation based on the calculation process information CP recorded in the storage unit 3. As a result, ∂F(Q, Y (n,k) (P)) / ∂p a is obtained. For example, every time step S214 is performed, the backpropagation calculation unit 252 performs backpropagation calculation corresponding to the entire calculation of starting from X n and obtaining X n+k by iterative calculation and then obtaining F(Q, X n+k ).
[0105] (Step S205) Next, in step S205, the end determination unit 29 determines whether ∂F(Q, Y (n,k) (P)) / ∂p a satisfies the convergence condition. In other words, the end determination unit 29 executes convergence determination processing regarding the differential coefficient of the target function (F). If it is determined that ∂F(Q, Y (n,k) (P)) / ∂p a satisfies the convergence condition, step S2d ends. In this case, the determined ∂F(Q, Y (n,k) (P)) / ∂p a that satisfies the convergence condition is the numerical solution of ∂F(Q, X ANS (P)) / ∂p a . If it is determined that ∂F(Q, Y (n,k) (P)) / ∂p a does not satisfy the convergence condition, step S211 is executed again. In step S205, the method by which the end determination unit 29 determines whether ∂F(Q, Y (n,k) (P)) / ∂p a satisfies the convergence condition is the same as the method described in, for example, Embodiment 3.
[0106] Also, in the calculation for obtaining the differential coefficient regarding each parameter (p a ) of the target function (F) by the information processing apparatus and the information processing method according to the present embodiment, by using automatic differentiation, it is possible to maintain high accuracy of differential calculation while reducing the calculation cost.
[0107] Also, as described above, the third process includes a process of calculating a derivative coefficient of the target function (F) using automatic differentiation in reverse mode. Therefore, the calculation cost can be more suitably reduced.
[0108] 〔Embodiment 5〕 Subsequently, Embodiment 5, which is another embodiment of the present invention, will be described in detail. For convenience of explanation, members having the same functions as those described in the above embodiments are denoted by the same reference numerals, and the description thereof will not be repeated.
[0109] The information processing apparatus according to the present embodiment is the same as the information processing apparatus according to Embodiment 2 described above.
[0110] <Flow of processing by the information processing apparatus according to the present embodiment> Hereinafter, the flow of processing by the information processing apparatus according to the present embodiment will be described. Generally speaking, the information processing apparatus according to the present embodiment is the same as the information processing apparatus 2 according to Embodiment 2 in that · Convergence solution calculation step (also referred to as step S1) · Derivative coefficient calculation step (also referred to as step S2e) are executed.
[0111] (Step S1) Since step S1 according to the present embodiment is the same as step S1 executed by the information processing apparatus 1 according to Embodiment 1, the description thereof will be omitted.
[0112] (Step S2e) After the end of step S1, step S2e is performed. Step S2e according to the present embodiment has, as an example, step S201e, step S202, and step S203 described below.
[0113] (Step S201e) In step S201e, the state update unit 22 calculates X n-m+k = φ(P, X n-m+k-1 ) to obtain X n-m+kFind it. Here, k corresponds to how many times step S201e has been executed. For example, when step S201e is executed for the first time, the state update unit 22 sets X n-m+1 = φ(P, X n-m ) to find X n-m+1 . However, X n-m is the X n-m obtained in step S1, and is the X i when i = n - m. Also, m is the number of iterations m stored in the storage unit 3.
[0114] Until step S1 ends, the value of n is unknown, and the value of n - m is also unknown. Therefore, for example, in step S1, each X i obtained each time step S12 is executed is added to the calculation process information CP, and in step S201e, the X n-m stored in the calculation process information CP is used. Or, before executing step S2e, step S1 can be re-executed from the beginning to the middle to recalculate X n-m . In this case, the storage unit 3 does not have to store each X i .
[0115] In step S201e, the forward propagation calculation unit 251 of the differential value calculation unit 25 performs a forward propagation calculation of the differential value corresponding to the calculation performed by the state update unit 22 in step S201e.
[0116] (Step S202) Subsequently, in step S202, the end determination unit 28 determines whether step S201e has been executed a predetermined number of times. If step S201e has been executed the predetermined number of times, step S203 is executed. If step S201e has not been executed the predetermined number of times, step S201e is executed again. Assuming that the predetermined number of times step S201e is executed is m, by executing step S201e m times, X n is obtained again.
[0117] (Step S203) Next, in step S203, the function value calculation unit 24 calculates the value F(Q, X n ). In step S203, the forward propagation calculation unit 251 of the differential value calculation unit 25 performs forward propagation calculation of the differential value corresponding to the calculation performed by the function value calculation unit 24 in step S203.
[0118] As described above, for each p included in P a , the partial derivative ∂F(Q, X a (P)) / ∂p ANS of F with respect to p a is obtained as the numerical value of ∂F(Q, Y (n-m,m) (P)) / ∂p a . Note that the number of iterations m in step S2e is determined in the same manner as in the case of the first embodiment, for example. Also, the number of iterations m is determined so as to satisfy m < n. As a result, compared with the case of the comparative example, the cost for obtaining ∂F(Q, Y (n-m,m) (P)) / ∂p a by automatic differentiation can be reduced. Among the processes performed in step S1, the process from starting from X0 and repeatedly applying φ to obtain X n-m is also called the first process. Among the processes performed in step S1, the process from X n-m to obtaining X n , or a part of the process in step S201e is also called the second process. The process performed by the forward propagation calculation unit 251 in step S201e is an example of the process included in the third process.
[0119] Also, in the calculation for obtaining the partial derivative of the target function (F) with respect to each parameter (p a ) by the information processing apparatus and the information processing method according to the present embodiment, by using automatic differentiation, it is possible to maintain high accuracy of the differential calculation while reducing the calculation cost.
[0120] 〔Embodiment 6〕 Next, Embodiment 6, which is another embodiment of the present invention, will be described in detail. For convenience of explanation, members having the same functions as the members described in the above embodiment are denoted by the same reference numerals, and the description thereof will not be repeated.
[0121] The information processing apparatus according to this embodiment is the same as the information processing apparatus 1 according to Embodiment 1 described above.
[0122] <Flow of processing by the information processing apparatus according to this embodiment> Hereinafter, the flow of processing by the information processing apparatus according to this embodiment will be described. Generally speaking, the information processing apparatus according to this embodiment, similar to the information processing apparatus 1 according to Embodiment 1, · Convergence solution calculation step (also called step S3) · Differential coefficient calculation step (also called step S4) executes.
[0123] (Step S3) Step S3, as an example, has step S31, step S32, and step S33 as shown in FIG. 7.
[0124] (Step S31) In step S31, the initial value determination unit 21 determines the initial value X0 of the state variable X.
[0125] (Step S32) Next, in step S32, the state update unit 22 updates the state variable X. That is, X i = φ(P, X i-1 ) is used to obtain the value of the new state variable X i . Here, i corresponds to how many times step S32 is executed. For example, when step S32 is executed for the first time, the state update unit 22 obtains X1 by X1 = φ(P, X0).
[0126] In step S32, the calculation process recording unit 253 records the information necessary for performing automatic differentiation in reverse mode regarding the calculation performed by the state update unit 22 in step S32. The information necessary for performing automatic differentiation in reverse mode may be recorded, for example, in the form of a computational graph, or each X iis recorded as checkpoint information, and when performing the backpropagation calculation in step S414 described below, X is used as needed to construct the computational graph if necessary. i may be used.
[0127] (Step S33) Next, in step S33, the end determination unit 23 determines whether to end the iteration of the calculation in step S32. The method for the end determination unit 23 to determine whether to end the iteration of the calculation in step S33 may be the same as in the case of Embodiment 1.
[0128] (Step S4) Step S4 according to this embodiment has, as an example, step S413 and step S414 described below.
[0129] (Step S413) In step S413, the function value calculation unit 24 calculates the value F(Q, X n ). In step S413, the calculation process recording unit 253 of the differential value calculation unit 26 adds information necessary for performing automatic differentiation in reverse mode to the calculation process information CP regarding the calculation performed by the function value calculation unit 24 in step S213.
[0130] (Step S414) Subsequently, in step S414, the backpropagation calculation unit 252 of the differential value calculation unit 26 performs the backpropagation calculation corresponding to the calculations in steps S32 and S413 from the (n - m + 1)-th time to the n-th time based on the calculation process information CP recorded in the storage unit 3. As a result, ∂F(Q, Y (n-m,m) (P)) / ∂p a is obtained.
[0131] The m in step S4 is determined in the same way as, for example, m in step S2e of Embodiment 5. Also, the number of iterations m is determined so as to satisfy m < n. As a result, compared with the case of the comparative example, ∂F(Q, Y (n-m,m) (P)) / ∂p aThe cost for obtaining can be reduced. Also, by using reverse-mode automatic differentiation, even when the number of p a is large, the cost can be suppressed and for each p a ∂F(Q, Y (n-m,m) (P)) / ∂p a can be obtained. Among the processes performed in step S3, the process from starting from X0 and repeatedly applying φ until X n-m is obtained is also called the first process. Among the processes performed in step S3, the process from X n-m to obtaining X n is also called the second process. Step S413 may be included in the second process. Step S414 is also called the third process.
[0132] Also, in the calculation for obtaining the derivative coefficient regarding each parameter (p a ) of the target function (F) by the information processing apparatus and the information processing method according to the present embodiment, by using automatic differentiation, while maintaining high accuracy of the differential calculation, the calculation cost can be reduced.
[0133] Further, as described above, the third process includes a process of calculating the derivative coefficient of the target function (F) using reverse-mode automatic differentiation. Therefore, the calculation cost can be more suitably reduced.
[0134] 〔Embodiment 7〕 Subsequently, Embodiment 7, which is another embodiment of the present invention, will be described in detail. For convenience of explanation, members having the same functions as the members described in the above embodiment are denoted by the same reference numerals, and the description thereof will not be repeated.
[0135] The information processing apparatus according to the present embodiment further includes an end determination unit 29 in addition to each configuration included in the information processing apparatus of Embodiment 2. Further, the storage unit 3 of the information processing apparatus according to the present embodiment stores a threshold value Cth2 instead of the number of iterations m. Other configurations of the information processing apparatus according to the present embodiment are the same as those of the information processing apparatus according to Embodiment 2.
[0136] <Processing Flow by the Information Processing Apparatus According to the Present Embodiment> Hereinafter, the processing flow by the information processing apparatus according to the present embodiment will be described. Generally speaking, the information processing apparatus according to the present embodiment is the same as the information processing apparatus according to Embodiment 2, and · Convergence solution calculation step (also referred to as step S1) · Differential coefficient calculation step (also referred to as step S2g) executes.
[0137] (Step S1) Since step S1 according to the present embodiment is the same as step S1 executed by the information processing apparatus 1 according to Embodiment 1, the description thereof will be omitted.
[0138] (Step S2g) After the end of step S1, step S2g is performed. Step S2g according to the present embodiment includes step S200g, step S201g, step S202, step S203, and step S205g, which will be described below.
[0139] (Step S200g) In step S200g, an initial state for the calculation of the differential coefficient is set. When step S200g is executed for the k-th time, X n-k is set as the initial state for the calculation of the differential coefficient.
[0140] (Step S201g) In step S201g, the state update unit 22 obtains X n-k+s = φ(P, X n-k+s-1 ) as the new value of the state variable X, which is X n-k+s . Here, s corresponds to how many times step S201g has been executed after the last execution of step S200g.
[0141] In step S201g, the forward propagation calculation unit 251 performs the forward propagation calculation of the differential value corresponding to the calculation performed by the state update unit 22 in step S201g.
[0142] (Step S202) Subsequently, in step S202, the end determination unit 28 determines whether step S201g has been executed k times after step S200g. If step S201g has been executed k times after step S200g, step S203 is executed. If step S201g has not been executed k times after step S200g, step S201g is executed again. By executing step S201g k times after step S200g, X n-k from X n is obtained again, and the corresponding forward propagation calculation is performed.
[0143] (Step S203) Subsequently, in step S203, the function value calculation unit 24 calculates the value F(Q, X n ) of the function F. In step S203, the forward propagation calculation unit 251 performs a forward propagation calculation of the differential value corresponding to the calculation performed by the function value calculation unit 24 in step S203. As a result, as candidates for the numerical values of the partial derivative coefficients ∂F(Q, X a (P)) / ∂p ANS with respect to each p of F, ∂F(Q, Y a (P)) / ∂p (n-k,k) is obtained. a
[0144] (Step S205g) Next, in step S205g, the end determination unit 29 determines whether ∂F(Q, Y (n-k,k) (P)) / ∂p a satisfies the convergence condition. In other words, the end determination unit 29 executes a convergence determination process regarding the derivative of the target function (F). If it is determined that ∂F(Q, Y (n-k,k) (P)) / ∂p a satisfies the convergence condition, step S2g ends. In this case, the determined ∂F(Q, Y (n-k,k) (P)) / ∂p a that satisfies the convergence condition is the numerical solution of ∂F(Q, X ANS (P)) / ∂p a . ∂F(Q, Y (n-k,k) (P)) / ∂pa If it is determined that the convergence condition is not satisfied, step S200g is executed again.
[0145] In step S205g, ∂F(Q, Y (n-k,k) (P)) / ∂p a The method for determining whether it satisfies the convergence condition may be appropriately determined according to the purpose. For example, g (n-k,a) = ∂F(Q, Y (n-k,k) (P)) / ∂p a is set, and when (Σ a (g (n-k,k) - g (n-k+1,k+1) ) 2 ) 0.5 <Cth2 is satisfied, it is determined that ∂F(Q, Y (n-k,k) (P)) / ∂p a has converged, and in other cases, it is determined that ∂F(Q, Y (n-k,k) (P)) / ∂p a has not converged.
[0146] In step S205g, when it is determined that ∂F(Q, Y (n-k,k) (P)) / ∂p a satisfies the convergence condition, let k at that time be m. It is expected that m is smaller than n. When m is smaller than n, compared with the case of the comparative example, the computational cost can be suppressed, and the numerical solution of ∂F(Q, X ANS (P)) / ∂p a can be obtained. Among the processes performed in step S1, the process from starting from X0 and repeatedly applying φ until X n-m is obtained is also called the first process. Among the processes performed in step S1, the process from X n-m to obtaining X n , or a part of the process of step S2g is also called the second process. The process performed by the forward propagation calculation unit 251 in step S2g is an example of the process included in the third process.
[0147] Also, by the information processing apparatus and the information processing method according to the present embodiment, each parameter (p aIn the calculation for obtaining the derivative with respect to [[ID=]], by using automatic differentiation, it is possible to reduce the calculation cost while maintaining high accuracy of the derivative calculation.
[0148] 〔Embodiment 8〕 Subsequently, Embodiment 8, which is another embodiment of the present invention, will be described in detail. For the sake of convenience of explanation, members having the same functions as those described in the above embodiments are denoted by the same reference numerals, and the description thereof will not be repeated.
[0149] FIG. 8 is a block diagram showing the configuration of the information processing apparatus 1h according to the present embodiment. The configuration of the information processing apparatus 1h is the same as that of the information processing apparatus according to Embodiment 4.
[0150] <Flow of processing by the information processing apparatus according to the present embodiment> Hereinafter, the flow of processing by the information processing apparatus according to the present embodiment will be described. FIG. 9 is a flowchart showing the information processing method according to the present embodiment. Generally speaking, the information processing apparatus according to the present embodiment, as shown in FIG. 9, is the same as the information processing apparatus according to Embodiment 1 in that · Converged solution calculation step (also referred to as step S3) · Derivative calculation step (also referred to as step S4h) are executed.
[0151] (Step S3) Since step S3 is the same as step S3 of Embodiment 6, the description thereof will be omitted here.
[0152] (Step S4h) As shown in FIG. 10, step S4h includes step S413, step S414h, and step S415.
[0153] (Step S413) Step S413 is the same as step S413 of Embodiment 6.
[0154] (Step S414h) Next, in step S414h, the backpropagation calculation unit 252 performs a backpropagation calculation regarding the value of the derivative. The backpropagation calculation is performed based on the calculation process information added to the calculation process information CP in steps S3 and S413.
[0155] When step S414h is executed for the k-th time, starting from X n-k and applying φ k times, X n is obtained, and a backpropagation calculation regarding the calculation of F(Q, X n ) is performed, so that as a candidate for the numerical value of ∂F(Q, X ANS (P)) / ∂p a , ∂F(Q, Y (n-k,k) (P)) / ∂p a is obtained. Note that the calculation of obtaining X n-k by applying φ k times starting from X n is a part of the calculation performed in step S3.
[0156] When step S414h is executed for the k-th time, the calculation result when step S414f was executed for the (k - 1)-th time can be used. For example, calculation may be performed only for the parts that require additional calculation from the calculation when step S414f was executed for the (k - 1)-th time.
[0157] (Step S415) Next, in step S415, the end determination unit 29 determines whether ∂F(Q, Y (n-k,k) (P)) / ∂p a satisfies the convergence condition. In other words, the end determination unit 29 executes a convergence determination process regarding the derivative of the target function (F). The method of determining whether the convergence condition is satisfied in step S415 is the same as, for example, step S205g in Embodiment 7.
[0158] In step S415, if it is determined that ∂F(Q, Y (n-k,k) (P)) / ∂p a satisfies the convergence condition, step S4h ends. In step S415, if ∂F(Q, Y (n-k,k)(P)) / ∂p a When it is determined that the convergence condition is not satisfied, S414h is executed again.
[0159] In step S415, ∂F(Q, Y (n-k,k) (P)) / ∂p a When it is determined that the convergence condition is satisfied, let k at that time be m. It is expected that m is smaller than n. When m is smaller than n, compared with the case of the comparative example, the calculation cost is suppressed, and the numerical solution of ∂F(Q, X ANS (P)) / ∂p a can be obtained. Among the processes performed in step S3, the process from starting from X0 and repeatedly applying φ to obtain X n-m is also called the first process. Among the processes performed in step S3, the process from X n-m to obtaining X n is also called the second process. Step S413 may be included in the second process. Steps S414h and S415 are also called the third process. Thus, in the present embodiment, the third process includes an automatic differentiation calculation process for the process including the second process and a convergence determination process regarding the differential coefficient of the target function F.
[0160] Also, in the information processing apparatus and information processing method according to the present embodiment, in the calculation for obtaining the differential coefficient regarding each parameter (p a ) of the target function (F), by using automatic differentiation, the accuracy of the differential calculation can be kept high while reducing the calculation cost.
[0161] Further, as described above, the third process includes a process of calculating the differential coefficient of the target function (F) using reverse-mode automatic differentiation. Therefore, the calculation cost can be more suitably reduced. 〔Embodiment 9〕 In Embodiments 1 to 8, X i = φ(P, X i-1 ) to obtain X i-1 from X iwas obtained. For the purpose of accelerating or improving convergence, etc., known methods may be adopted. For example, mixing may be used to obtain new state variables.
[0162] For example, when simple mixing is used, it is as follows. X i ’ = φ(P, X i-1 ) and, when each state variable included in X i ’ is denoted as x’ b , for each b, using a predetermined α, x (i,b) = αx’ (i,b) + (1 - α)x (i-1,b) , each state variable x i included in X (i,b) is determined. Here, α is, for example, a weight coefficient between 0 and 1. In other words, in the information processing method described in each embodiment, · From state variable X i-1 , a new state variable is derived by X i ’ = φ(P, X i-1 ), and · State variable X i ’ and the (original) state variable X i-1 may be used to derive state variable X i by taking the average or weighted average. Note that in this embodiment, instead of simple mixing, Anderson mixing, Broyden mixing, etc. may be used.
[0163] 〔Embodiment 10〕 In Embodiments 1 to 9, the information processing apparatus obtained the value of the first derivative of F with respect to p a , but the value of the second or higher derivative may be further obtained. In other words, the second iterative process described in each embodiment may include a process of calculating the value of the second or higher derivative of the objective function (F) using automatic differentiation. For example, ∂ 2 F / ∂p a0 ∂p a1 may be obtained for each a0 and each a1. Here, a0 and a1 are indices that enumerate the parameters included in P.
[0164] [Embodiment 11] In Embodiments 1 to 9, the information processing apparatus obtained the value of the derivative of F with respect to p a However, In this embodiment, the application targets of the information processing methods of Embodiments 1 to 10 will be described.
[0165] [Application Target 1] The information processing methods of Embodiments 1 to 10 are applied to, for example, first-principles electronic state calculations. In first-principles electronic state calculations, the electronic state is calculated based on the Hamiltonian represented by the following formula. [Equation] In the above (Equation 1), H is the first-principles Hamiltonian, Ψ is the wave function, T is the kinetic energy, V is the potential between atoms and electrons, U is the electron-electron interaction, and E represents energy. r i , r j are the electron positions. The dependence of the Hamiltonian on the atomic positions is included in the functional form of V(r i ).
[0166] In first-principles electronic state calculations, for example, the Hartree-Fock approximation method or the density functional method is used to iteratively update the electronic state to calculate the ground state or the electronic state at finite temperature. In this case, the state variable X is, for example, a set of variables that specify the electronic state. The state variable X may include variables that specify the atomic positions. φ is a function that updates the electronic state in order to obtain the ground state or the electronic state at finite temperature in the Hartree-Fock approximation method or the density functional method.
[0167] The formula shown in (Equation 1) does not show a term corresponding to an external field, but for example, one or more of a magnetic field, an electric field, an electromagnetic wave, a sound wave, and a pressure may be applied as the external field. p a is, for example, a parameter that describes the applied external field. p a may be, for example, temperature. Also, the atomic positions may be positioned as parameters instead of the state variable X.
[0168] The function F corresponds to, for example, any one of the superconducting transition temperature, the superconducting gap, the thermoelectric efficiency, the photovoltaic efficiency, and the linear or non-linear response (e.g., the Hall coefficient) to an external field (e.g., a magnetic field, an electric field, an electromagnetic wave, a sound wave, pressure). The storage unit 3 stores an equation for calculating the value of the function F based on the electronic state.
[0169] <Applicable Object 2> Instead of the first-principles Hamiltonian shown in the above (Equation 1), for example, the Hamiltonian of the tight-binding model shown below may be considered.
Number
[0170] To calculate the ground state or the finite-temperature state in the Hamiltonian shown in (Equation 2), for example, the Hartree approximation or the Hartree-Fock approximation method is used to iteratively update the electronic state and calculate the electronic state at the ground state or finite temperature. In this case, the state variable X is, for example, a set of variables specifying the electronic state. φ is a function for updating the electronic state based on the Hartree approximation or the Hartree-Fock approximation method.
[0171] To calculate the ground state or the finite-temperature state in the Hamiltonian shown in (Equation 2), for example, the Lanczos method is used to iteratively update the electronic state and calculate the electronic state at the ground state or finite temperature. In this case, the state variable X is, for example, a set of variables specifying the electronic state. φ is, for example, a function for updating the electronic state based on the Lanczos method.
[0172] For example, each or some of t, V, ω, and g (subscripts omitted) in the formula shown in (Formula 2) corresponds to p a The example of the function F is the same as that described in <Application Target 1>.
[0173] When performing calculations at finite temperature based on the Lanczos method, starting from a certain initial condition, multiple Xs are obtained through iterative calculations n This is done for multiple initial conditions, and the average of the physical quantities calculated based on each X n is taken to calculate the expected value of the physical quantity of the physical system under consideration. The function F may thus be calculated based on multiple Xs each obtained through iterative calculations n as well.
[0174] <Application Target 3> The following formula represents the Hamiltonian showing the interaction between classical spins.
Equation
[0175] <Application Target 4> φ may be, for example, for solving the self-collision-free equation in weak coupling analysis that analyzes a plurality of systems interacting with each other. Further, the plurality of systems targeted in the weak coupling analysis may be systems representing physically different objects from each other, or may be those representing different properties of the same physical object.
[0176] The weak coupling analysis is, for example, an analysis that combines the analysis of a structure and the analysis of a fluid. Fluid analysis is performed under the given state of the structure to obtain a new fluid state, and a new structure state is obtained under the new fluid state. In this way, the function for obtaining the new fluid state and the new structure state corresponds to φ. By repeating this, the states of the structure and the fluid interacting with each other are obtained. Parameter p a is a parameter representing, for example, the properties of the structure, such as strength. State variable x b is a variable representing the state of the structure and the state of the fluid. Function F corresponds to, for example, the displacement amount of the structure.
[0177] 〔Embodiment 12〕 Subsequently, Embodiment 12, which is another embodiment of the present invention, will be described in detail. For convenience of explanation, members having the same functions as those described in the above embodiments are denoted by the same reference numerals, and their descriptions will not be repeated.
[0178] FIG. 11 is a diagram showing the information processing apparatus 100 of the present embodiment. As shown in FIG. 11, the information processing apparatus 100 includes an information processing apparatus 1, a control unit 5, a storage unit 6, and an input / output unit 7.
[0179] (Control Unit 5) The control unit 5 includes an initial value setting unit 51, a parameter updating unit 52, and an end determination unit 53. Here, as an example, the initial value setting unit 51 sets the initial value of the parameter P. As an example, the parameter updating unit 52 updates the parameter P. As an example, the end determination unit 53 determines whether to end the update of the parameter P. Specific processes performed by each unit included in the control unit 5 will be described later.
[0180] (Memory unit 6, input / output unit 7) In the memory unit 6, as an example, the same data and information as those in the memory unit 3 of the information processing apparatus 1 are stored. The input / output unit 7 has, as an example, the same configuration as that of the input / output unit 4 of the information processing apparatus 1.
[0181] Note that the information processing apparatus 100 may include the information processing apparatus described in any of Embodiments 2 to 10 instead of the information processing apparatus 1.
[0182] <The flow of processing by the information processing apparatus according to the present embodiment> In Embodiments 1 to 11, the value of the derivative of the function F with respect to each p a was calculated. In the present embodiment, the optimization of the parameter P is performed using the value of the derivative of the function F with respect to each p a . For example, a parameter P that maximizes (or maximizes) or minimizes (or minimizes) the function F is obtained. FIG. 12 is a flowchart showing the information processing method of the present embodiment. As shown in FIG. 12, the information processing method according to the present embodiment has steps S5 to S8.
[0183] (Step S5) First, in step S5, the initial value setting unit 51 sets an initial value P0 of the parameter P. The parameter P0 may be given randomly, for example, or may be input from the outside via the input / output unit.
[0184] (Step S6) Next, in step S6, the information processing apparatus 1 calculates the value of the derivative of the function F with respect to each p a .
[0185] (Step S7) Next, in step S7, the parameter update unit 52 updates the parameter P based on the value of the derivative of the function F with respect to each p a calculated in step S6. The parameter update unit 52 updates the parameter P by, for example, the steepest descent method. In step S6, when the information processing apparatus 1 calculates each pa Calculate the Hessian of the function F related to a , and in step S7, the parameter update unit 52 may update the parameter P by the Newton method. The value of the parameter P obtained when step S7 is executed for the i-th time is hereinafter referred to as P i as written. Also, P i The values of the parameters included in i are written as p (i,a) as written. Note that in step S7, a quasi-Newton method or a conjugate gradient method may be used.
[0186] (Step S8) Next, in step S8, the end determination unit 53 determines whether to end the update of the parameter P. The conditions for determining whether to end the update of the parameter P are, for example, whether a predetermined number of times of step S7 have been performed, or whether the parameter P i satisfies the convergence condition. For example, when (Σ a (p (i,a) -p (i-1,a) ) 2 ) 0.5 <Cth3 (where Cth3 is a threshold value) is satisfied, it is determined that the parameter P i satisfies the convergence condition, and in other cases, it is determined that the parameter P i does not satisfy the convergence condition. When the parameter P i satisfies the convergence condition, the process ends, and otherwise, the process returns to step S6. In step S8, instead of determining whether the parameter P i satisfies the convergence condition, for example, it may be determined whether the norm of the value of the derivative of the function F obtained in step S6 is smaller than a predetermined threshold value.
[0187] As described above, the information processing apparatus according to the present embodiment uses the derivative coefficient of the target function to calculate the 1 or more parameters (p aIt includes a parameter update unit 52 that updates (parameters). Then, the information processing apparatus according to the present embodiment optimizes the one or more parameters so as to maximize (or maximize) or minimize (or minimize) the value of the target function F through the processing by the parameter update unit 52 and the end determination unit 53. The information processing apparatus according to the present embodiment may, for example, optimize the one or more parameters so that the value of the target function F becomes the target value. Further, the information processing apparatus according to the present embodiment may, for example, use the derivative coefficient of the target function to maximize (or maximize) or minimize (or minimize) the value of a function G different from the target function, or optimize the one or more parameters so that the value of the function G becomes the target value. The value of the derivative of the function G is calculated, for example, using the value of the derivative of the function F calculated by the method described in any of Embodiments 1 to 11. The function G is, for example, the sum of a function H different from the function F and the function F. In that case, the value of the derivative of the function G is calculated as the sum of the value of the derivative of the function F and the value of the derivative of the function H. The derivative of the function H may be calculated by the method described in any of Embodiments 1 to 11, or may be calculated by another method.
[0188] 〔Example of Realization by Software〕 The functions of the information processing apparatus (hereinafter referred to as "apparatus") according to each embodiment can be realized by a program for causing a computer to function as the apparatus, and by a program for causing a computer to function as each control block (especially each part included in the control unit) of the apparatus.
[0189] In this case, the above apparatus includes a computer having at least one control device (for example, a processor) and at least one storage device (for example, a memory) as the hardware for executing the above program. By executing the above program by this control device and storage device, each function described in the above embodiments is realized.
[0190] The above program may be recorded on one or more computer-readable recording media, rather than temporarily. This recording medium may or may not be provided in the above device. In the latter case, the above program may be supplied to the above device via any wired or wireless transmission medium.
[0191] Also, part or all of the functions of each of the above control blocks can also be realized by a logic circuit. For example, an integrated circuit in which a logic circuit functioning as each of the above control blocks is formed is also included in the scope of the present invention. In addition to this, for example, it is also possible to realize the functions of each of the above control blocks by a quantum computer.
[0192] The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims. Embodiments obtained by appropriately combining the technical means disclosed in different embodiments are also included in the technical scope of the present invention.
Explanation of Reference Numerals
[0193] 1, 1h, 100 ··· Information processing device 2, 2d, 5 ··· Control unit 21 ··· Initial state determination unit (acquisition unit) 22 ··· State update unit 23 ··· End determination unit 24 ··· Function value calculation unit 26 ··· Differential value calculation unit (calculation unit) 28 ··· End determination unit
Claims
1. An acquisition unit that acquires an initial value related to the calculation of the value of a target function that directly or indirectly includes one or more parameters as arguments; A calculation unit that calculates the derivative coefficient of the target function; Comprising: In the calculation process of the derivative coefficient by the calculation unit, A first process; A second process; Is included, The calculation process of the derivative coefficient by the calculation unit includes an iterative process, The first process includes a part of the iterative process, The second process includes the part other than the part of the iterative process, The calculation process of the derivative coefficient by the calculation unit includes a third process that includes a calculation process of automatic differentiation for a process that does not include the first process and includes the second process An information processing apparatus.
2. The target function is A subset of the one or more parameters; One or more state variables that take the one or more parameters as arguments As arguments, The iterative process is Including an update process of the one or more state variables, The third process is Including a process of calculating the derivative coefficient of the target function using automatic differentiation The information processing apparatus according to claim 1.
3. The third process is Including a process of calculating the derivative coefficient of the target function using automatic differentiation in reverse mode The information processing apparatus according to claim 2.
4. In at least any one of the first process, the second process, and the third process, A convergence determination process for at least any one of the one or more state variables, and A convergence determination process for the derivative coefficient of the target function At least any one of them is included The information processing apparatus according to claim 3.
5. In the third process, use the information on the calculation process of the second process recorded at the checkpoint The information processing apparatus according to claim 3.
6. Further comprising a parameter update unit that updates the one or more parameters using the derivative coefficient of the target function The information processing apparatus according to any one of claims 1 to 5.
7. An acquisition step of acquiring an initial value related to the calculation of the value of a target function that directly or indirectly includes one or more parameters as arguments; A calculation step of calculating the derivative coefficient of the target function; Including, In the calculation process of the derivative coefficient by the calculation step, A first process; A second process; Is included, The calculation process of the derivative coefficient by the calculation step includes an iterative process, The first process includes a part of the iterative process, The second process includes parts other than the part of the iterative process, The calculation process of the differential coefficient by the calculation step includes a third process including a calculation process of automatic differentiation for a process including the second process and not including the first process. An information processing method. Claim 8 A program for causing a computer to function as the information processing apparatus according to claim 1, the program for causing a computer to function as the acquisition unit and the calculation unit.
Citation Information
Patent Citations
Computation method of external field, designing method of substance, program, and recording medium
JP2016069302A