Temperature adjustment program, data processing device and data processing method
Patent Information
- Application Number
- JP2023112457
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2025-01-20
AI Technical Summary
【0012】 1つの側面では、本発明は、レプリカ交換法で用いられる最低温度の調整時間の短縮が可能となる。
Smart Images

Figure 2025009448000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a temperature adjustment program, a data processing device, and a data processing method. [Background technology]
[0002] When searching for a solution to a combinatorial optimization problem, there is a method to convert the combinatorial optimization problem into an Ising model that represents the behavior of spin in magnetic materials. The Ising model is represented by an Ising-type evaluation function that evaluates the solution to the combinatorial optimization problem. An Ising-type evaluation function includes multiple state variables and multiple weight values. The state of the Ising model is represented by the values of the multiple state variables. In an Ising-type evaluation function, the state variables are binary variables that take the values of 0 or 1 (or -1 or +1). The state variables may be expressed as bits. The value of an Ising-type evaluation function can also be said to be the energy of the Ising model.
[0003] The Markov Chain Monte Carlo (MCMC) method is used to search for a solution. Hereinafter, searching for a solution using the MCMC method will be referred to as MCMC processing. In MCMC processing, a state transition is accepted with an acceptance probability for the state transition defined by, for example, the Metropolis method or the Gibbs method. At this time, state transitions that increase the value of the evaluation function are also probabilistically allowed. Note that the greater the increase in the value of the evaluation function, the lower the acceptance probability.
[0004] One type of MCMC method is the replica exchange method (also called the parallel tempering method, etc.) (see, for example, Patent Document 1). In the replica exchange method, MCMC processing using multiple temperature values is performed independently by multiple replicas of an evaluation function based on an Ising model. Then, for each trial, the values of the evaluation function obtained in each MCMC processing are compared, and the states for the two temperature values are exchanged with an appropriate exchange probability. Compared with the simulated annealing method in which the temperature value is gradually decreased, the replica exchange method reduces the possibility of being constrained to a local solution, and the entire solution space can be efficiently searched.
[0005] In addition, in the past, there was a method of determining the minimum temperature value (hereinafter sometimes referred to as the minimum temperature) and the maximum temperature value (hereinafter sometimes referred to as the maximum temperature) among multiple temperature values in the replica exchange method from information on the resolution of the evaluation function value (see, for example, Patent Document 2). [Prior art documents] [Patent documents]
[0006] [Patent Document 1] Patent Publication No. 2022-94510 [Patent Document 2] JP 2020-46718 A Summary of the Invention [Problem to be solved by the invention]
[0007] When solving combinatorial optimization problems using the replica exchange method, if the minimum temperature is not set appropriately, it may take a very long time to find a solution. For example, if the minimum temperature is too low, state transitions that increase the value of the evaluation function rarely occur, and once a local solution is reached, it may not be possible to escape from that local solution.
[0008] However, in order to determine an appropriate minimum temperature, a procedure of searching for a solution using a certain minimum temperature and then adjusting the minimum temperature based on the result must be repeated, which results in a problem that the adjustment of the minimum temperature takes time.
[0009] In one aspect, the present invention aims to provide a temperature adjustment program, a data processing device, and a data processing method that are capable of shortening the adjustment time of the minimum temperature used in the replica exchange method. [Means for solving the problem]
[0010] In one embodiment, a temperature adjustment program is provided that causes a computer to execute a process in which a search unit performs a search process for a solution to a combinatorial optimization problem by a replica exchange method using a plurality of replica circuits corresponding to a plurality of replicas of an evaluation function based on an Ising model obtained by converting a combinatorial optimization problem, and during the search process, an average value of the values of the evaluation function obtained in the search process by replica circuits having a first temperature value that is n (n is an integer equal to or greater than 1) higher than a minimum temperature value is obtained from the plurality of replica circuits having a plurality of mutually different temperature values set therein, the first temperature value is changed based on a comparison result between a first average value among the average values obtained a plurality of times and a second average value obtained before the first average value, and while fixing a maximum temperature value and the changed first temperature value among the plurality of temperature values, other temperature values including the minimum temperature value are changed based on the maximum temperature value and the changed first temperature value, thereby newly determining the plurality of temperature values, and setting the determined plurality of temperature values for the search unit.
[0011] Also provided in one embodiment is a data processing apparatus. Also provided in one embodiment is a method for processing data. Effect of the Invention
[0012] In one aspect, the present invention makes it possible to shorten the adjustment time of the minimum temperature used in the replica exchange method. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 illustrates an example of a data processing device according to a first embodiment; [Diagram 2] 10 is a flowchart showing an example of a procedure for adjusting a temperature value. [Diagram 3] FIG. 13 is a schematic diagram showing an example of adjusting T0. [Figure 4] FIG. 1 illustrates an example of a data processing device according to a second embodiment. [Diagram 5] FIG. 4 illustrates an example of a temperature adjustment unit. [Figure 6]13 is a flowchart showing a flow of an example of a procedure for adjusting a temperature value in a second embodiment. [Figure 7] FIG. 13 is a diagram illustrating an example of a calculation result of a combinatorial optimization problem. [Figure 8] FIG. 1 illustrates an example of hardware of a computer that is an example of a data processing device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, an embodiment of the invention will be described with reference to the drawings. (First embodiment) FIG. 1 illustrates an example of a data processing device according to a first embodiment.
[0015] The data processing device 10 includes a storage unit 11, a search unit 12, and a processing unit 13. The storage unit 11 is, for example, a volatile storage device that is an electronic circuit such as a dynamic random access memory (DRAM), or a non-volatile storage device that is an electronic circuit such as a hard disk drive (HDD) or a flash memory. The storage unit 11 may include an electronic circuit such as a static random access memory (SRAM) register.
[0016] The storage unit 11 stores, for example, information on the combinatorial optimization problem to be calculated, calculation conditions, etc. The storage unit 11 may also store various programs such as a temperature adjustment program. The search unit 12 can be realized by using electronic circuits such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array), etc. The search unit 12 can also be realized by software processing in which a processor, which is hardware such as a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), or a DSP (Digital Signal Processor), executes a program.
[0017] The search unit 12 searches for a solution to the combinatorial optimization problem by a replica exchange method using replica circuits 12a0, ..., 12an, ..., 12aN corresponding to N+1 replicas of an evaluation function based on an Ising model converted from the combinatorial optimization problem to be calculated.
[0018] The evaluation function based on the Ising model is defined, for example, by the following formula (1).
[0019]
number
[0020] The first term on the right-hand side is the sum of the values of the two state variables and the weighting coefficients for all combinations of two state variables that can be selected from all state variables included in the Ising model, without omissions or duplications. x i is the i-th state variable. x j is the jth state variable. W ij is a weighting coefficient indicating the weight (e.g., strength of connection) between the i-th state variable and the j-th state variable, and M is the total number of state variables.
[0021] The second term on the right-hand side is the sum of the products of the bias coefficients of all state variables and the values of the state variables. i denotes the bias coefficient for the i-th state variable. For example, a spin of -1 in the Ising model corresponds to a state variable value of 0. A spin of +1 in the Ising model corresponds to a state variable value of 1. For this reason, a state variable can also be called a bit that takes on a value of 0 or 1.
[0022] The state where E(x) is the smallest among the local minimum values is the optimal solution. By changing the sign of each term on the right side of formula (1), the search unit 12 can also search for a state where the value of E(x) is the maximum (in this case, the state where the maximum value is the optimal solution). In the following, the value of the evaluation function may also be called energy.
[0023] Each of the replica circuits 12a0-12aN, in which a plurality of mutually different temperature values are set, repeats the MCMC process. The MCMC process includes a process of determining whether or not to allow a change in a bit based on a comparison result between the amount of change in the value of the evaluation function when the value of any one of the plurality of bits is changed and the thermal noise value. Furthermore, the MCMC process includes a process of generating a state transition by changing the value of a certain bit when it is determined that the change in the value of the bit is allowed. Hereinafter, changing the value of a bit is referred to as a flip. The thermal noise value is calculated based on the temperature value and a random number value set in each of the replica circuits 12a0-12aN. The larger the temperature value, the larger the amplitude of the thermal noise value.
[0024] The search unit 12 further includes a temperature control unit 12b and an average energy calculation unit 12c. The temperature control section 12b sets the (N+1) mutually different temperature values obtained by the processing section 13 for the replica circuits 12a0 to 12aN.
[0025] In the example of FIG. 1, T0 is set as a temperature value (T) in the replica circuit 12a0, and T n is set, and T N is set. T0<… <T n <… <T N In other words, T0 is the lowest temperature, T N is the maximum temperature. Hereinafter, the replica corresponding to the replica circuit 12a0 for which the minimum temperature is set will be referred to as the minimum temperature replica.
[0026] The temperature control unit 12b controls the replica exchange in the replica circuits 21a0 to 21aN. The temperature control unit 12b controls the exchange probability (p ij ), a decision is made for each pair of replica circuits having adjacent temperature values as to whether or not to perform replica exchange.
[0027]
number
[0028] In formula (2), E i is the energy corresponding to the state of the replica (hereinafter referred to as replica i) corresponding to the i-th replica circuit among the replica circuits 12a0 to 12aN. j is the energy corresponding to the state of the replica corresponding to the j-th replica circuit (hereafter referred to as replica j). T i is the temperature value set in the i-th replica circuit. T j is the temperature value set in the j-th replica circuit. k is the Boltzmann constant. The state of replica i, j is expressed by M state variables x1 to x M It can be expressed as:
[0029] The temperature control unit 12b is ij With probability , the state of replica i is swapped with the state of replica j. Instead of exchanging the states between replicas i and j, the temperature control unit 12b ij With probability T i and T j may be replaced.
[0030] The average energy calculation unit 12c calculates the nth temperature value above the lowest temperature (T n The average value (hereinafter referred to as average energy) of the values of the evaluation function (E(x)) obtained by the search process by the replica circuit 12an in which the replica circuit 12an is set is calculated. n is an integer equal to or greater than 1. Although not particularly limited, n can be set to a value of about 10% of the number of replicas N+1, for example. T n The upper limit of T N-1 Therefore, the upper limit of n is the number of replicas minus 2.
[0031] The average energy calculation unit 12c calculates, for example, M Each time we flip the value of any of the values, we update the average energy. The processing unit 13 can be realized by software processing in which a processor, which is hardware such as a CPU, a GPU, or a DSP, executes a program such as a temperature adjustment program stored in the storage unit 11. The processing unit 13 can also be realized by using an electronic circuit such as an ASIC or an FPGA.
[0032] The processing unit 13 has a function of adjusting a plurality of different temperature values used in the solution search by the replica exchange method. FIG. 2 is a flowchart showing an example of a procedure for adjusting the temperature value.
[0033] Step S10: The processing unit 13 determines whether it is the adjustment period of the temperature value. For example, the processing unit 13 determines that it is the adjustment period of the temperature value every time a predetermined number of replica exchanges are performed in the search unit 12. Note that if the number of replica exchanges that constitute the adjustment period is increased, adjustments can be made taking into account a wider search space, but the adjustment frequency decreases. Therefore, the adjustment period can be set appropriately depending on the difficulty of the combinatorial optimization problem to be calculated, etc.
[0034] Note that the processing unit 13 may determine that it is the adjustment period for the temperature value every time the searching unit 12 performs the MCMC process a predetermined number of times. If the processing unit 13 determines that it is the period for adjusting the temperature value, it performs the process of step S11, and if it determines that it is not the period for adjusting the temperature value, it repeats the process of step S10.
[0035] Step S11: The processing unit 13 acquires the average energy from the search unit 12. The processing unit 13 holds the acquired average energy. Step S12: The processing unit 13 compares the previously acquired average energy with the currently acquired average energy.
[0036] Step S13: The processing unit 13 calculates T n For example, the processing unit 13 changes T n Change the setting. First, the processing unit 13 receives, for example, T n The range between the initial value of and the maximum temperature determined in advance is divided by a predetermined number of divisions to produce a plurality of stages of size based on the number of divisions, T n Then, when the currently acquired average energy is equal to or smaller than the previously acquired average energy, the processing unit 13 calculates a plurality of candidate values of T n Now, T n When the average energy acquired this time is greater than the average energy acquired last time, the processing unit 13 changes the candidate value to one step larger than T n Now, T n Change the candidate value to one step smaller than the
[0037] Step S14: The processing unit 13 performs N The maximum temperature value (T N ) and changed to T n While fixing and, T N Changed to T n Based on this, by changing other temperature values including T0, T0 to T N will be newly determined.
[0038] For example, to make replica exchange occur at the same frequency at all temperatures, T0 and T N can be divided by an exponential ratio. In that case, T n and T N Temperature values other than (T m ) is given by the following equation (3).
[0039]
number
[0040] In equation (3), T0 is given by the following equation (4).
[0041]
number
[0042] As shown in equation (4), T0 is N and T n The value is subject to change depending on the situation. In addition, T0 and T N The method of division between is not limited to the above example. If a more appropriate division method (such as linear division) is found based on the problem information of the combinatorial optimization problem, that division method may be applied.
[0043] Step S15: The processing unit 13 performs the process for determining T0 to T N is set for the search unit 12. This completes one temperature value adjustment process. This adjustment process is repeated until a termination condition for the solution search process is satisfied.
[0044] As described above, in the data processing device 10, the search unit 12 performs a search process for a solution to a combinatorial optimization problem by the replica exchange method using the replica circuits 12a0-12aN corresponding to multiple replicas of an evaluation function based on an Ising model into which a combinatorial optimization problem is converted. The processing unit 13 receives from the search unit 12 temperature values (T n The average energy obtained by the search process by the replica circuit 12an in which the average energy T is set is acquired multiple times. The processing unit 13 compares a first average energy among the average energies acquired multiple times with a second average energy acquired before the first average energy, and calculates T n The processing unit 13 changes T0 to T N The maximum temperature value (T N ) and changed to T n While fixing and, T N Changed to T n Based on this, by changing other temperature values including T0, T0 to T N Then, the processing unit 13 newly determines T0 to T N is set for the search unit 12.
[0045] In order to determine an appropriate T0, if a procedure of performing a solution search process using a certain T0 and adjusting T0 based on the result is repeated, it takes time to adjust T0. In contrast, in the data processing device 10 of the first embodiment, the average energy used to determine a new temperature value can be obtained during the solution search process. Therefore, a new temperature value including T0 can be determined during the solution search process based on the average energy obtained multiple times. In other words, since it is possible to adjust the temperature value including T0 during the search process without waiting for the end of the search process, the adjustment time of T0 can be shortened.
[0046] In addition, since the replica exchange prevents the solution from being constrained to a local solution, by setting the adjustment period to a predetermined number of replica exchanges, it becomes possible to appropriately adjust T0 taking into account a wide search space.
[0047] Here, T n The reason for adjusting the temperature values including T0 based on the average energy obtained in the search process by the replica circuit 12an in which T0 is set will be described below. The average energy of the lowest temperature replica changes in a similar way to the minimum energy with respect to T0. Therefore, it may be possible to adjust the optimal T0 to obtain a smaller minimum energy based on the average energy of the lowest temperature replica. However, experimental results showed that when adjusting T0 based on the average energy of the lowest temperature replica, the initial value of T0 is closer to the optimal T0 than the adjusted T0, depending on the combinatorial optimization problem.
[0048] Fig. 3 is a schematic diagram showing an example of adjusting T0. Fig. 3 shows an example of adjusting T0 by the method of the present embodiment and an example of adjusting T0 by a method of adjusting T0 based on the average energy of the lowest temperature replica (hereinafter referred to as a comparative example method).
[0049] In the example of FIG. 3, in both methods, the initial value of T0 is 0.1. The optimal value of T0 is 0.4. In the method of the comparative example, the main T0 after adjustment is 0.9. In contrast, in the method of the present embodiment, the main T n is 0.9, and the main T0 after adjustment is 0.6, which is closer to the optimal value than the comparative example method.
[0050] In this way, T n Even if T is adjusted to a value higher than the optimal T0, T n The n-1 temperature values lower than T0 are set in the n-1 replica circuits, and a search process is performed in the vicinity of the optimal T0.
[0051] The data processing device 10 described above is expected to be useful as a means for obtaining accurate solutions in a short period of time when solving various problems in modern society that can be converted into combinatorial optimization problems.
[0052] (Second embodiment) FIG. 4 illustrates an example of a data processing device according to the second embodiment. A data processing device 20 according to the second embodiment includes a search unit 21, a temperature adjustment unit 22, and an overall control unit 23. The search unit 21 is an example of the search unit 12 shown in Fig. 1, and the temperature adjustment unit 22 and the overall control unit 23 are an example of the processing unit 13 shown in Fig. 1. Elements corresponding to the storage unit 11 shown in Fig. 1 are omitted from the illustration.
[0053] The search unit 21 can be realized, for example, by using an electronic circuit such as an ASIC or an FPGA. The temperature adjustment unit 22 and the overall control unit 23 can be realized, for example, by software processing in which a processor such as a CPU executes a program. In addition, without being limited to this, each of the search unit 21, the temperature adjustment unit 22, and the overall control unit 23 may be partially or entirely realized by using the above-mentioned electronic circuit. In addition, each of the search unit 21, the temperature adjustment unit 22, and the overall control unit 23 may be partially or entirely realized by software processing.
[0054] In the data processing device 20 of the second embodiment, the search unit 21 searches for a solution to a combinatorial optimization problem by a replica exchange method in which states are exchanged between replicas. The searching unit 21 has replica circuits 21a0, 21a1, ..., 21an, ..., 21aN corresponding to N+1 replicas, as shown in Fig. 4. Furthermore, the searching unit 21 has a temperature control unit 21b.
[0055] The replica circuits 21a0 to 21aN are provided with different temperature values (T0 to T N ) is set. T0 is set in the replica circuit 21a0, T1 is set in the replica circuit 21a1, and T n is set, and T N is set. Note that T0 <T1<…<T n <… <T N Therefore, the replica corresponding to the replica circuit 21a0 is the lowest temperature replica. Hereinafter, the replica corresponding to the replica circuit 21an will be referred to as replica n.
[0056] T n As the initial value of , for example, a value input by the user can be used. The maximum temperature, T N For example, the temperature adjustment unit 22 of the data processing device 20 calculates T N can be calculated in advance.
[0057] First, from T0 to T NWith each temperature value up to 1000 kcal / s is fixed, the search unit 21 performs a predetermined number of MCMC processes using replica exchange. Then, the temperature adjustment unit 22 acquires a state (hereinafter referred to as a local solution) corresponding to the lowest energy obtained in each of the replica circuits 21a0 to 21aN. Then, the temperature adjustment unit 22 selects, for example, two local solutions in ascending order of energy from the acquired local solutions. The temperature adjustment unit 22 calculates the amount of change (ΔE) in the value of the evaluation function that occurs when one value of a plurality of bits in the bit string of one selected local solution that is different from the bit string of the other local solution is changed. This calculation process is performed sequentially for each of the plurality of bits. Furthermore, when an increase in energy occurs multiple times in succession, the temperature adjustment unit 22 calculates the total value of the energy that has increased in the multiple times. Then, based on the total value, the temperature adjustment unit 22 calculates the maximum temperature (T max ) is calculated.
[0058]
number
[0059] As described above, Dsum is the sum of the energy increases in multiple consecutive times when the energy increases. A is a parameter that indicates the transition probability of accepting the state transition that causes the maximum energy increase, and is set in advance.
[0060] Such a T max T N By using this method, even when there is a large energy peak between two local solutions that cannot be overcome without multiple consecutive increases in energy, it is possible to overcome such an energy peak with a relatively high probability.
[0061] T n and T N The initial values of the temperature values other than these can be calculated from the above-mentioned formulas (3) and (4). Each of the replica circuits 21a0 to 21aN realizes a solution search based on the evaluation function expressed by the equation (1) by, for example, a circuit as shown in FIG.
[0062] The replica circuit 21an corresponding to the replica n includes bit flip permission determining units 30a1, 30a2, . . . , 30aM, a selector unit 30b, a holding unit 30c, and an average energy calculating unit 30d.
[0063] The process of determining whether each bit included in the state of the replica n can be flipped and flipping any bit determined to be flippable corresponds to one round of MCMC processing by the replica circuit 21an. This one round of processing is repeatedly executed.
[0064] Each of the bit flip permission determining units 30a1 to 30aM is, for example, an arithmetic processing circuit that determines whether or not a flip is permitted for one bit that the unit is responsible for. The bit flip permission determining units 30a1 to 30aM can perform the above-mentioned determination process in parallel.
[0065] Bit of index=i (state variable x i ) changes to 1-x i If so, then x i The change in is δx i =(1-x i )-x i =1-2x i Therefore, x i The change in the value of the evaluation function due to the change in the value of i ) can be expressed by the following equation (6) based on equation (1).
[0066]
number
[0067] In equation (6), h i is called the local field and can be expressed by the following equation (7).
[0068]
number
[0069] Each of the bit flip permission determining units 30a1 to 30aM is i h for i Hold, and based on equation (6), x i ΔE when the value of i , h i From. In the following, the bit flip permission determining unit 30a1 will be mainly described as an example. The bit flip permission determining units 30a2 to 30aM having the same name also have the same functions.
[0070] Here, the bit handled by the bit flip permission / prohibition determining unit 30a1 is referred to as the own bit, and the bits handled by the bit flip permission / prohibition determining units 30a2 to 30aM are referred to as the other bits. The bit flip permission determining unit 30a1 determines the weighting coefficient (W 1j (j=1~N) is stored. W 1j The subscript j in indicates the index of any bit including the bit itself (bit with index=1). 11 =0.
[0071] The bit flip permission determining unit 30a1 is 1j Using this, calculate h1 based on equation (7). The bit flip permission determination unit 30a1 uses h1 to generate ΔE1 that occurs when the own bit is flipped based on equation (6). For example, the bit flip permission determination unit 30a1 may determine whether the value of the own bit changes to 0 or 1 based on the current value of the own bit supplied from the holding unit 30c. The bit flip permission determination unit 30a1 outputs the generated ΔE1 to the selector unit 30b.
[0072] Then, the bit flip permission determining unit 30a1 determines whether or not the bit of the bit to be flipped is permitted based on the result of comparing ΔE1 with the thermal noise value. n ·log(u) can be used. T nis a temperature value set in the replica circuit 21an, and u is a uniform random number that takes a value from 0 to 1. The bit flip permission determination unit 30a1 determines whether or not -ΔE1 ≧ T n ·Allow flips if log(u).
[0073] The selector unit 30b receives the flip permission / prohibition judgment results output by each of the bit flip permission / prohibition judgment units 30a1 to 30aM. When there are multiple bits judged as flip permission, the selector unit 30b selects one of them randomly or according to a predetermined rule. When there is a bit judged as flip permission, the selector unit 30b outputs the index of the selected bit, an instruction signal instructing the flip, and the amount of change (ΔE) in the value of the evaluation function when the bit is flipped. The index, the instruction signal, and ΔE are supplied to the holding unit 30c. The index is further supplied to each of the bit flip permission / prohibition judgment units 30a1 to 30aM.
[0074] The holding unit 30c has, for example, a register, and holds the state of replica n and ΔE output by the selector unit 30b. When the holding unit 30c receives an instruction signal to instruct a flip, it flips the bit specified by the index output by the selector unit 30b. The holding unit 30c also outputs the state of replica n at the time when the search process of the replica circuit 21an is completed for a predetermined number of times or for a predetermined period to the temperature adjustment unit 22 and the overall control unit 23.
[0075] The average energy calculation unit 30d calculates the average energy (E ave ) is calculated. E ave is supplied to the temperature adjustment unit 22. For example, the average energy calculation unit 30d holds the initial value of the evaluation function expressed by the formula (1), and each time the MCMC process is repeated, calculates E using ΔE output by the selector unit 30b and held by the holding unit 30c. ave If none of the bits are allowed to be flipped, ΔE=0.
[0076] Replica circuits corresponding to other replicas can also be realized with a circuit configuration similar to that of the replica circuit 21an, but these replica circuits do not need to include the average energy calculation unit 30d.
[0077] The temperature control unit 21b calculates the temperature T0 to T N The temperature control unit 21b sets the states (X0 to X N The temperature control unit 21b controls the exchange probability (p ij ), it is determined for each pair of replica circuits having adjacent temperature values whether or not to exchange states.
[0078] E in Equation (2) i Or E j To obtain ΔE, the temperature control unit 21b holds an initial value of the evaluation function of each replica, and updates the value of the evaluation function of each replica based on ΔE held in the holding unit 30c of the replica circuits 21a0-21aN. Each of the replica circuits 21a0-21aN may have an energy calculation unit that calculates the evaluation function (energy) of the replica that it is responsible for processing.
[0079] When exchanging the states of replica i and replica j, the temperature control unit 21b changes the state of replica i to X i is set to the replica circuit corresponding to replica j, and X j is set in the replica circuit corresponding to replica i.
[0080] The temperature adjustment unit 22 adjusts the average energy E ave Get E ave and the previously obtained E ave e ave,old Based on the comparison with T n An example of the temperature adjusting unit 22 will be described later.
[0081] The overall control unit 23 controls the overall operation of the data processing device 20. When the overall control unit 23 receives an input of an activation signal from outside the data processing device 20, it outputs the activation signal to the temperature control unit 21b, activates the search unit 21, and starts the search process for a solution to the combinatorial optimization problem. When the search process by the search unit 21 ends, the overall control unit 23 outputs X0 to X M and obtain a solution to the combinatorial optimization problem.
[0082] For example, the overall control unit 23 may M The state where the value of the evaluation function is the smallest among the above is regarded as the solution. The overall control unit 23 outputs an end signal indicating the end of the calculation to the outside of the data processing device 20. The end signal may include information indicating the solution obtained by the calculation. For example, the overall control unit 23 may output image information indicating the solution to a display device (not shown) connected to the data processing device 20, and display the image information indicating the solution on the display device, thereby presenting the contents of the obtained solution to the user.
[0083] The overall control unit 23 also processes the above-mentioned problem information (W ij Or b i ), initial values of the states, etc., may be received and set in each part of the search unit 21. Note that the setting of this information may be performed by a separate control unit. Furthermore, when the overall control unit 23 receives a reset signal input from outside the data processing device 20, it clears the information held by the search unit 21 and the temperature adjustment unit 22.
[0084] (Example of temperature adjustment unit 22) Fig. 5 is a diagram illustrating an example of a temperature adjustment unit, in which the configuration for calculating the maximum temperature described above is omitted.
[0085] The temperature adjustment unit 22 includes a parameter acquisition unit 40, an average energy acquisition unit 41, an average energy holding unit 42, a comparison unit 43, and T n It has an adjustment unit 44, a temperature value dividing unit 45, and a temperature value setting unit 46.
[0086] The parameter acquisition unit 40 acquires, for example, the number n of surplus replica circuits, the number of divisions a, the adjustment period b, T n The initial value of (T n,0 The redundant replica circuits are T0 to T N Of these, T n T0~T (n-1) The number of divisions a is T n To determine a candidate values of T n,0 And, T N (= maximum temperature) n The lower bound of a candidate values of T n,0 and the upper limit is T N The adjustment period b is expressed as the number of replica exchanges. In other words, every b replica exchanges, T n Adjustments will be made.
[0087] The average energy acquisition unit 41 acquires the average energy E ave The average energy acquiring unit 41 acquires information indicating whether or not replica exchange has been performed from, for example, the temperature control unit 21b.
[0088] The average energy storage unit 42 stores the E ave e ave,old Retain as. The comparison unit 43 compares the E ave and the previously acquired E ave e ave,old The comparison result is output.
[0089] T n Based on the result of the comparison, the adjustment unit 44 adjusts T n Adjust the T n At the time of initialization, the adjustment unit 44 n,0 and T N Then, the a candidate values are calculated by dividing the area between the n The adjustment unit 44 isave ≦e ave,old When T n Among the a candidate values, the current T n Change the candidate value to one step larger than T. n The adjustment unit 44 is ave >e ave,old When T n Among the a candidate values, the current T n Change the candidate value to one step smaller than the
[0090] However, T n The adjustment unit 44 is ave ≦e ave,old When the current T n But, T N If the candidate value closest to (maximum temperature), i.e., the upper limit of a candidates, T n Do not change T n The adjustment unit 44 is ave >e ave,old When the current T n But, T n,0 , i.e., if it is the lower bound of a candidate values, T n Do not change.
[0091] According to the above adjustment method, adjustment can be performed with a small number of parameters, but the adjustment method is not limited to the above. For example, T n The adjustment unit 44 is T n After changing the candidate value to one step smaller than the current candidate value, the next obtained E ave Also ave >e ave,old In the case of T n You may change the candidate value to one step higher than the current candidate value. n This is because by increasing the energy, it is possible to obtain a lower energy state.
[0092] Also, T n The adjustment unit 44 is T n The initial value of T may be set as the upper limit of the a candidate values. n If the temperature is changed, the maximum temperature value (T N ) to include T0 and TN Divide between T0 and T N The temperature value division unit 45 determines T n and T N The temperature value other than the above is calculated (changed) based on, for example, the above-mentioned formula (3) and formula (4).
[0093] The temperature value setting unit 46 determines the temperature values T0 to T N is set in the search unit 21. FIG. 6 is a flowchart showing an example of a procedure for adjusting a temperature value according to the second embodiment.
[0094] The following processing is performed, for example, under the control of the overall control unit 23. The temperature adjustment unit 22 sets the number n of redundant replica circuits, the number of divisions a, the adjustment period b, and T n,0 is obtained (step S20).
[0095] At the time of initialization, the temperature adjustment unit 22 n,0 and T N In the following, the a candidate values are denoted as T'0, T'1, ..., T' (a-1) Let us assume that.
[0096] Temperature adjustment section 22 has i=0, T n =T'0 (step S22). Furthermore, the temperature adjusting unit 22 initializes j, which indicates the number of replica exchanges, to j=1 (step S23). After that, the search unit 21 performs MCMC processing (step S24). As a result, the state of each replica is updated according to the acceptance probability of a predetermined state transition. Also, the search unit 21 performs replica exchange (step S25).
[0097] The temperature adjustment unit 22 sets j=j+1 (step S26). Then, the temperature adjustment unit 22 judges whether j≦b+1 is satisfied (step S27). If it is judged that j≦b+1 is not satisfied, the process from step S24 is repeated.
[0098] When it is determined that j≦b+1, the temperature adjustment unit 22 calculates the average energy E ave is obtained from the search unit 21 (step S28). The temperature adjustment unit 22 is connected to the average energy holding unit 42. ave,old It is determined whether or not there is (step S29).
[0099] The temperature adjustment unit 22 is connected to the average energy holding unit 42. ave,old If it is determined that there is no E ave e ave,old After the process of step S30, the process from step S23 is repeated.
[0100] The temperature adjustment unit 22 is connected to the average energy holding unit 42. ave,old If it is determined that there is ave ≦e ave,old It is determined whether or not this is the case (step S31). The temperature adjustment unit 22 is E ave ≦e ave,old If it is determined that it is not, T n T n =T' i-1 (Step S32). i-1 is the current candidate value T' among the a candidate values. i This is a candidate value that is one step smaller than T' i =T n,0 In the case of T n is unchanged.
[0101] The temperature adjustment unit 22 is E ave ≦e ave,old If it is determined that n T n =T' i+1 (Step S33). i+1 is the current candidate value T' among the a candidate values. i This is a candidate value that is one step larger than T' i If is the upper limit of the candidate value, T n is unchanged.
[0102] After the processes in steps S32 and S33, the temperature adjustment unit 22 sets T0 and T N T0 to T N In the process of step S34, the temperature adjusting unit 22 further determines the determined T0 to T N is set in the search unit 21.
[0103] The temperature adjustment unit 22 stores the obtained E ave e ave,old (step S35). After that, for example, the overall control unit 23 judges whether or not a predetermined end condition is satisfied (step S36). For example, when the number of times of MCMC processing reaches a predetermined number, the overall control unit 23 judges that the end condition is satisfied. Note that, although not shown in the figure, for example, when the overall control unit 23 judges that the end condition is satisfied, the search unit 21 returns X0 to X N Get X0~X N The state where the value of the evaluation function is the smallest is output as the solution, and the search process ends.
[0104] If overall control unit 23 determines that the predetermined end condition is not satisfied, the process from step S23 is repeated. The above processing order is an example, and the processing order may be changed as appropriate.
[0105] The data processing device 20 of the second embodiment as described above can also provide the same effects as the data processing device 10 of the first embodiment. ave By determining new temperature values including the minimum temperature based on the above, the adjustment time for the minimum temperature can be shortened. In addition, since the replica exchange prevents the solution from being constrained to a local solution, by setting the adjustment period to a predetermined number of replica exchanges, it becomes possible to appropriately adjust the minimum temperature in consideration of a wide search space.
[0106] Furthermore, the data processing device 20 of the second embodiment has T n The E obtained by the search process by the replica circuit 21an in which ave Based on T n Based on the adjustment result, the temperature value including T0 is determined. n Even if T is adjusted to a value higher than the optimal minimum temperature, n The n-1 temperature values lower than the minimum temperature are set in the n-1 replica circuits, allowing a search process to be performed in the vicinity of the optimal minimum temperature.
[0107] In the data processing device 20 according to the second embodiment, the search unit 21 exchanges states between replicas in the replica exchange, but may exchange temperature values between replicas. In this case, the temperature values set in the replica circuits 21a0 to 21aN corresponding to replicas 0 to N are no longer fixed. Therefore, the replica circuit performing the processing of replica n is not fixed to the replica circuit 21an. Therefore, the average energy (E ave The average energy calculation unit 30d that calculates the average energy ΔT may be provided in the temperature control unit 21b, not in the replica circuits 21a0 to 21aN.
[0108] By exchanging temperature values instead of states between replicas, the amount of data transferred during a replica exchange can be reduced. The average energy calculation unit 30d may be provided in the temperature control unit 21b even when states are exchanged between replicas in the replica exchange. The average energy calculation unit 30d may be provided in the overall control unit 23, or may be provided independently of the replica circuits 21a0-21aN, the temperature control unit 21b, the overall control unit 23, etc.
[0109] (Experimental Example) FIG. 7 is a diagram illustrating an example of a calculation result of a combinatorial optimization problem. FIG. 7 shows an example of calculation of the average value of five seeds of the minimum value of the evaluation function obtained when 15 instances of Gset, which is a benchmark problem of the max-cut problem, are calculated by the data processing device 20 shown in FIG. 4. The max-cut problem is an example of a combinatorial optimization problem. The calculation time is 30 minutes. The number of bits is calculated by dividing the state variables x1 to x M The number of surplus replicas n is set to 8. For comparison, the calculation results for the case where the number of surplus replicas n=0, that is, the lowest temperature is adjusted using the average energy of the lowest temperature replica as in the comparative example described above, are also shown.
[0110] As shown in Figure 7, in 14 out of 15 questions, the average value of the minimum value of the evaluation function is smaller than when n = 0. In other words, it can be seen that a better solution (a solution closer to the optimal solution) is obtained than when n = 0.
[0111] (Example of computer implementation) The above-described processing contents (eg, FIG. 2 and FIG. 6) performed by the data processing devices 10 and 20 shown in FIG. 1 and FIG. 4 can also be realized by software by causing a computer as described below to execute a program.
[0112] The program may be recorded on a computer-readable recording medium. For example, a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory may be used as the recording medium. Magnetic disks include flexible disks (FDs) and HDDs. Optical disks include compact discs (CDs), recordable CD-Rs (recordable) / rewritable RWs (rewritable), digital versatile discs (DVDs) and DVD-Rs / RWs. The program may be recorded on a portable recording medium and distributed. In that case, the program may be copied from the portable recording medium to another recording medium and executed.
[0113] FIG. 8 is a diagram illustrating an example of hardware of a computer that is an example of a data processing device. The computer 50 includes a processor 51, a RAM 52, a HDD 53, a GPU 54, an input interface 55, a media reader 56, and a communication interface 57. The above units are connected to a bus.
[0114] The processor 51 can function as, for example, the search unit 12 and the processing unit 13 in FIG. 1, and the search unit 21, the temperature adjustment unit 22, and the overall control unit 23 in FIG. 4. The processor 51 is a processor such as a GPU or a CPU including an arithmetic circuit for executing program instructions and a storage circuit such as a cache memory. The processor 51 loads at least a part of the program and data stored in the HDD 53 into the RAM 52 and executes the program. The processor 51 may include multiple processor cores in order to execute the functions of the replica circuits 21a0 to 21aN in parallel, as shown in FIG. 4. The computer 50 may include multiple processors. A set of multiple processors (multiprocessor) may be called a "processor."
[0115] 1. The RAM 52 is a volatile semiconductor memory that temporarily stores programs executed by the processor 51 and data used in calculations by the processor 51. The computer 50 may include a type of memory other than the RAM 52, or may include multiple memories.
[0116] The HDD 53 is a non-volatile storage device that stores software programs such as an OS (Operating System), middleware, and application software, as well as data. The programs include, for example, a program that causes the computer 50 to execute a process for searching for a solution to a combinatorial optimization problem as described above and a process for adjusting a temperature value. The computer 50 may be provided with other types of storage devices such as a flash memory or an SSD (Solid State Drive), or may be provided with multiple non-volatile storage devices.
[0117] The GPU 54 outputs an image (for example, an image showing a search result for a solution to a combinatorial optimization problem) to a display 54a connected to the computer 50 in accordance with an instruction from the processor 51. As the display 54a, a CRT (Cathode Ray Tube) display, a liquid crystal display (LCD: Liquid Crystal Display), a plasma display (PDP: Plasma Display Panel), an organic EL (OEL: Organic Electro-Luminescence) display, etc. can be used.
[0118] The input interface 55 acquires an input signal from an input device 55a connected to the computer 50 and outputs the signal to the processor 51. As the input device 55a, a pointing device such as a mouse, a touch panel, a touch pad, or a trackball, a keyboard, a remote controller, a button switch, etc. may be used. In addition, a plurality of types of input devices may be connected to the computer 50.
[0119] The medium reader 56 is a reading device that reads programs and data recorded on a recording medium 56a. For example, a magnetic disk, an optical disk, a magneto-optical disk (MO: Magneto-Optical disk), a semiconductor memory, etc. can be used as the recording medium 56a. Magnetic disks include FDs and HDDs. Optical disks include CDs and DVDs.
[0120] The medium reader 56 copies the program or data read from the recording medium 56a to another recording medium such as the RAM 52 or the HDD 53. The read program is executed by the processor 51, for example. The recording medium 56a may be a portable recording medium, and may be used for distributing the program or data. The recording medium 56a and the HDD 53 may also be referred to as computer-readable recording media.
[0121] The communication interface 57 is an interface that is connected to a network 57a and communicates with other information processing devices via the network 57a. The communication interface 57 may be a wired communication interface that is connected to a communication device such as a switch by a cable, or may be a wireless communication interface that is connected to a base station by a wireless link.
[0122] The computer 50 may have an accelerator card having an electronic circuit such as an FPGA or an ASIC connected to the bus, and the processing of the search units 12 and 21 may be executed by the accelerator card.
[0123] While one aspect of the temperature adjustment program, data processing device, and data processing method of the present invention has been described above based on the embodiment, these are merely examples and the present invention is not limited to the above description. [Explanation of symbols]
[0124] 10 Data Processing Device 11 Storage section 12 Exploration Department 12a0~12aN replica circuit 12b Temperature control section 12c Average Energy Calculation Section 13 Processing section
Claims
1. a search unit that performs a search process for a solution to the combinatorial optimization problem by a replica exchange method using a plurality of replica circuits corresponding to a plurality of replicas of an evaluation function based on an Ising model obtained by converting the combinatorial optimization problem, and obtains, during the search process, an average value of the values of the evaluation function obtained in the search process by a replica circuit that is set with a first temperature value that is n (n is an integer equal to or greater than 1) higher than a minimum temperature value among the plurality of replica circuits in which a plurality of mutually different temperature values are set; changing the first temperature value based on a comparison result between a first average value among the average values acquired a plurality of times and a second average value acquired prior to the first average value; determining new temperature values by fixing a maximum temperature value and the changed first temperature value among the plurality of temperature values and changing other temperature values including the minimum temperature value based on the maximum temperature value and the changed first temperature value; Setting the determined plurality of temperature values in the search unit. A temperature control program that causes a computer to execute the process.
2. The temperature adjustment program of claim 1, further comprising: causing the computer to execute a process of acquiring the average value from the search unit, changing the first temperature value, and determining and setting the multiple temperature values to the search unit each time a predetermined number of replica exchanges are performed during the search process.
3. 2. The temperature adjustment program according to claim 1, further comprising a step of causing the computer to execute a process of dividing a range between an initial value of the first temperature value and the maximum temperature value by a predetermined division number, and calculating a plurality of candidate values for the first temperature value having a plurality of stages of magnitude based on the division number.
4. When the first average value is equal to or less than the second average value, the first temperature value is changed to a candidate value that is one step larger than the current first temperature value among the plurality of candidate values; 4. The temperature adjustment program according to claim 3, further comprising: when the first average value is greater than the second average value, changing the first temperature value to a candidate value one step smaller than the current first temperature value among the plurality of candidate values.
5. a search unit that performs a search process for a solution to the combinatorial optimization problem by a replica exchange method using a plurality of replica circuits corresponding to a plurality of replicas of an evaluation function based on an Ising model obtained by converting the combinatorial optimization problem; a processing unit that acquires, from the search unit, an average value of the values of the evaluation function obtained in the search process by a replica circuit in which a first temperature value that is n (n is an integer equal to or greater than 1) higher than a minimum temperature value is set, among the plurality of replica circuits in which a plurality of mutually different temperature values are set during the search process, changes the first temperature value based on a comparison result between a first average value among the average values acquired a plurality of times and a second average value acquired before the first average value, fixes a maximum temperature value among the plurality of temperature values and the changed first temperature value, and changes other temperature values including the minimum temperature value based on the maximum temperature value and the changed first temperature value, thereby newly determining the plurality of temperature values, and sets the determined temperature values for the plurality of replicas to the search unit; A data processing device comprising:
6. a search unit performs a search process for a solution to the combinatorial optimization problem by a replica exchange method using a plurality of replica circuits corresponding to a plurality of replicas of an evaluation function based on an Ising model into which the combinatorial optimization problem is converted; The processing unit: from the search unit, during the search process, an average value of the evaluation function obtained by the search process using a replica circuit having a first temperature value that is n (n is an integer equal to or greater than 1) higher than a minimum temperature value among the plurality of replica circuits having a plurality of mutually different temperature values set therein is acquired a plurality of times; changing the first temperature value based on a comparison result between a first average value among the average values acquired a plurality of times and a second average value acquired prior to the first average value; determining new temperature values by fixing a maximum temperature value and the changed first temperature value among the plurality of temperature values and changing other temperature values including the minimum temperature value based on the maximum temperature value and the changed first temperature value; setting, in the search unit, a temperature value equal to the number of the determined replicas; Data processing methods.
Citation Information
Patent Citations
Optimization device, control method of optimization device and control program of optimization device
JP2020046718A
Optimization program, optimization method, and information processing apparatus
JP2022094510A