Computer-readable recording medium storing temperature adjustment program, data processing apparatus, and temperature adjustment method
By calculating and adjusting the average energy of the evaluation function value of multiple replica circuits in the replica exchange method, the problem of too long minimum temperature adjustment time in the replica exchange method is solved, and a more efficient solution search process is achieved.
Patent Information
- Application Number
- CN202410791472.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-07-07
- Filing Date
- 2024-06-19
- Publication Date
- 2025-01-07
AI Technical Summary
In the replica exchange method, if the minimum temperature is not properly set, the solution search time may be too long and it is difficult to escape from the local solution.
Through the temperature adjustment program stored in the computer-readable recording medium, the average value of the evaluation function value of multiple replica circuits is obtained and the minimum temperature value is adjusted to shorten the adjustment time of the minimum temperature. The program includes obtaining the average energy of the replica circuit multiple times during the search process, comparing the average value for different time periods, redetermining the temperature value, and ensuring the appropriate setting of the temperature value.
It effectively shortens the minimum temperature adjustment time in the replica exchange method, reduces the constraints on local solutions, and improves the efficiency of understanding search.
Smart Images

Figure CN119271014A_ABST
Abstract
Description
Technical Field
[0001] The embodiments discussed herein relate to a temperature regulation program, a data processing device, and a data processing method. Background Art
[0002] When searching for a solution to a combinatorial optimization problem, there is a method of converting the combinatorial optimization problem into an Ising model representing the spin behavior of a magnetic material. The Ising model is represented by an Ising-type evaluation function for evaluating the solution to the combinatorial optimization problem. The Ising-type evaluation function includes a plurality of state variables and a plurality of weight values. The state of the Ising model is represented by the values of the plurality of state variables. In the Ising-type evaluation function, the state variable is a binary variable taking a value of 0 or 1 (or -1 or +1). The state variable can be represented by a bit. The value of the Ising-type evaluation function can also be referred to as the energy of the Ising model.
[0003] The Markov Chain Monte Carlo (MCMC) method is used to search for solutions. Hereinafter, the search for solutions by the MCMC method is referred to as MCMC processing. For example, in the MCMC processing, state transitions are accepted with the acceptance probability of the state transitions defined by the Metropolis method or the Gibbs method. At this time, state transitions that increase the value of the evaluation function are also randomly allowed. The greater the increase in the value of the evaluation function, the lower the acceptance probability.
[0004] As one type of MCMC method, there is a replica exchange method (also called a parallel annealing method, etc.). According to the replica exchange method, multiple replicas of the evaluation function based on the Ising model perform MCMC processing using multiple temperature values independently of each other. For each certain number of trials, the values of the evaluation function obtained in each MCMC processing are compared with each other, and the states of the two temperature values are exchanged with an appropriate exchange probability. Compared with the simulated annealing method in which the temperature value is gradually reduced, the replica exchange method reduces the possibility of being trapped in a local solution and enables efficient search of the entire solution space.
[0005] Hitherto, there has been a method in which, in a replica exchange method, a minimum temperature value (hereinafter, may also be referred to as minimum temperature) and a maximum temperature value (hereinafter, may also be referred to as maximum temperature) among multiple temperature values are determined based on information about the resolution of the value of an evaluation function.
[0006] Japanese Patent Application Publication No. 2022-94510 and Japanese Patent Application Publication No. 2020-46718 are disclosed as related technologies. Summary of the invention
[0007] question
[0008] When solving a combinatorial optimization problem by using the replica exchange method, the time until a solution is obtained may be very long without setting the minimum temperature appropriately. This is because, for example, when the minimum temperature is too low, a state transition accompanying an increase in the value of the evaluation function hardly occurs, and once a local solution is obtained, there is a possibility that it may not be possible to escape from the local solution.
[0009] However, in order to determine the appropriate minimum temperature, a process of performing a solution search process using a specific minimum temperature and adjusting the minimum temperature based on the result of the solution search process is repeated. Therefore, there is a problem that it takes time to adjust the minimum temperature.
[0010] In one aspect, an object of the present disclosure is to provide a temperature adjustment program, a data processing device, and a data processing method capable of shortening the adjustment time of the minimum temperature used in the replica exchange method.
[0011] According to an aspect of the present embodiment, a computer-readable recording medium stores a temperature adjustment program that causes a computer to perform processing. The processing includes: obtaining an average value of a value of an evaluation function obtained in a search process by a replica circuit among a plurality of replica circuits during a search process multiple times from a search unit: setting a first temperature value n higher than a minimum temperature value in the replica circuit, n being an integer of 1 or more, and setting a plurality of temperature values different from each other in the plurality of replica circuits, the search unit performing 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 the combinatorial optimization problem; changing a first temperature value based on a comparison result between a first average value among the average values obtained multiple times and a second average value obtained before the first average value; re-determining the plurality of temperature values by the following operations: while fixing a maximum temperature value among the plurality of temperature values and the changed first temperature value, changing other temperature values including a minimum temperature value based on the maximum temperature value and the changed first temperature value; and setting the determined plurality of temperature values for the search unit.
[0012] [Effects of the Invention]
[0013] In one aspect of the present disclosure, the adjustment time of the minimum temperature used in the replica exchange method can be shortened. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a diagram showing an example of a data processing apparatus according to the first embodiment;
[0015] Figure 2 is a flow chart illustrating an example of a process for adjusting a temperature value;
[0016] Figure 3 is a schematic diagram showing an example of adjustment of T0;
[0017] Figure 4 is a diagram showing an example of a data processing apparatus according to a second embodiment;
[0018] Figure 5 is a diagram showing an example of a temperature adjustment unit;
[0019] Figure 6 is a flowchart showing the flow of an example of a process for adjusting a temperature value according to the second embodiment;
[0020] Figure 7 is a diagram showing an example of calculation results of a combinatorial optimization problem; and
[0021] Figure 8 is a diagram illustrating an example of hardware of a computer as an example of a data processing device. DETAILED DESCRIPTION
[0022] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings.
[0023] (First Embodiment)
[0024] Figure 1 is a diagram showing an example of a data processing apparatus according to the first embodiment.
[0025] The data processing device 10 includes a storage unit 11 , a search unit 12 , and a processing unit 13 .
[0026] For example, the storage unit 11 is a volatile storage device as an electronic circuit such as a dynamic random access memory (DRAM), or a nonvolatile storage device as 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.
[0027] For example, the storage unit 11 stores information on a combinatorial optimization problem to be calculated, calculation conditions, etc. Various programs such as a temperature adjustment program may be stored in the storage unit 11 .
[0028] For example, the search unit 12 may be implemented by using an electronic circuit such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA). The search unit 12 may be implemented by software processing in which a processor as hardware such as a central processing unit (CPU), a graphics processing unit (GPU), or a digital signal processor (DSP) executes a program.
[0029] The search unit 12 uses replica circuits 12a0, ..., 12an, ..., and 12aN corresponding to (N+1) replicas of the evaluation function based on the Ising model obtained by converting the combinatorial optimization problem to be calculated, and searches for a solution to the combinatorial optimization problem by a replica exchange method.
[0030] For example, the evaluation function based on the Ising model is defined by the following equation (1).
[0031]
[0032] The first term on the right side is the sum obtained by adding the product of the values of the two state variables and the weight coefficients for all combinations of two state variables that can be selected from all state variables included in the Ising model without missing and overlapping. i is the i-th state variable. j is the jth state variable. ij is a weight coefficient indicating the weight (eg, coupling strength) between the ith state variable and the jth state variable. M is the total number of state variables.
[0033] The second term on the right hand side is the sum of the products of the bias coefficients for each of all state variables and the value of the state variable. i Indicates the coefficient of deviation of the ith state variable.
[0034] For example, spin "-1" in the Ising model corresponds to the value "0" of the state variable. Spin "+1" in the Ising model corresponds to the value "1" of the state variable. Therefore, the state variable can also be called a bit that takes a value of 0 or 1.
[0035] The state when the minimum value among the local minimum values of E(x) is obtained is the optimal solution. By changing the sign of each term on the right side of equation (1), the search unit 12 can search for the state where the value of E(x) is locally maximized (in this case, the state where the value of E(x) is the maximum value is the optimal solution). Hereinafter, the value of the evaluation function may also be referred to as energy.
[0036] Each replica circuit 12a0 to 12aN in which multiple temperature values different from each other are set repeats the MCMC process. For example, the MCMC process includes the following process: based on the comparison result between the change amount of the value of the evaluation function when the value of the bit changes and the thermal noise value, it is determined whether to allow the change of any one of the multiple bits. The MCMC process includes the following process: in the case of determining that the change of the value of a specific bit is allowed, a state transition is caused by changing the value of the bit. In the following, changing the value of a bit is referred to as flipping. The thermal noise value is obtained based on the temperature value and the random value value set for each replica circuit in the replica circuits 12a0 to 12aN. As the temperature value increases, the size of the thermal noise value increases.
[0037] The search unit 12 includes a temperature control unit 12b and an average energy calculation unit 12c.
[0038] The temperature control unit 12 b sets (N+1) temperature values different from each other, obtained by the processing unit 13 , for the replica circuits 12 a0 to 12 aN.
[0039] exist Figure 1 In the example shown, T0 is set in the replica circuit 12a0, and T is set in the replica circuit 12an. n , and T is set in the replica circuit 12aN N As temperature value (T). T0<...... <T n <…… <T N For example, T0 is the minimum temperature, and T N Hereinafter, the replica corresponding to the replica circuit 12a0 for which the minimum temperature is set is referred to as a minimum temperature replica.
[0040] The temperature control unit 12b controls the replica switching in the replica circuits 12a0 to 12aN. Based on the switching probability (p ij ), the temperature control unit 12b determines whether to perform replica swapping for each pair of replica circuits having adjacent temperature values.
[0041]
[0042] In formula (2), E i is the energy corresponding to the state of the replica corresponding to the i-th replica circuit among the replica circuits 12a0 to 12aN (hereinafter, referred to as replica i). j is the energy corresponding to the state of the replica corresponding to the jth replica circuit (hereinafter, referred to as replica j). i is the temperature value set for the i-th replica circuit. jis the temperature value set for the jth replica circuit. k is the Boltzmann constant. The states of replicas i and j are represented by M state variables x1 to x M express.
[0043] In the above described probability p ij In this case, the temperature control unit 12b exchanges the state of the replica i with the state of the replica j.
[0044] Instead of exchanging states between replica i and replica j, the temperature control unit 12b may exchange states with the probability p described above. ij To exchange T i With T j .
[0045] The average energy calculation unit 12c calculates the average value (hereinafter, referred to as average energy) of the values of the above-mentioned evaluation function (E(x)) obtained in the search process performed by the replica circuit 12an, in which a temperature value n higher than the minimum temperature (T n ). n is an integer equal to or greater than 1. Although not particularly limited, for example, n may be a value of about 10% of the number of copies N+1. n The upper limit is T N-1 . Therefore, the upper limit of n is the number of replicas minus 2.
[0046] For example, whenever replica circuit 12an flips x1 to x M When any value of is reached, the average energy calculation unit 12c updates the average energy.
[0047] For example, the processing unit 13 may be implemented by software processing in which a processor as hardware such as a CPU, GPU, or DSP executes a program such as a temperature adjustment program stored in the storage unit 11. The processing unit 13 may be implemented by using an electronic circuit such as an ASIC or an FPGA.
[0048] The processing unit 13 has a function of adjusting a plurality of temperature values different from each other for solution search by a replica exchange method.
[0049] Figure 2 is a flow chart illustrating an example of a process for adjusting a temperature value.
[0050] Step S10: The processing unit 13 determines whether this is an adjustment cycle of the temperature value. For example, whenever a predetermined number of replica exchanges are performed in the search unit 12, the processing unit 13 determines that this is an adjustment cycle of the temperature value. By increasing the number of replica exchanges used as the adjustment cycle, a wider search space can be considered to perform adjustment, but the adjustment frequency is reduced. Therefore, the adjustment cycle can be appropriately set according to the difficulty level of the combinatorial optimization problem to be calculated, etc.
[0051] Every time the MCMC process is performed a predetermined number of times in the search unit 12 , the processing unit 13 may determine that this is an adjustment cycle of the temperature value.
[0052] When processing unit 13 determines that this is the adjustment period of the temperature value, processing unit 13 performs the processing in step S11. When processing unit 13 determines that this is not the adjustment period of the temperature value, processing unit 13 repeats the processing in step S10.
[0053] Step S11: the processing unit 13 obtains average energy from the searching unit 12. The processing unit 13 stores the obtained average energy.
[0054] Step S12: the processing unit 13 compares the average energy obtained last time with the average energy obtained this time.
[0055] Step S13: Based on the comparison result obtained in the process of step S12, the processing unit 13 changes T n For example, processing unit 13 changes T as follows n .
[0056] First, for example, the processing unit 13 receives the T input by the user. n The range between the initial value of and the predetermined maximum temperature is divided into a predetermined number of divisions, and T is calculated based on the number of divisions. n When the average energy obtained this time is equal to or less than the average energy obtained last time, the processing unit 13 sets T n Change to a value greater than the current T n When the average energy obtained this time is greater than the average energy obtained last time, the processing unit 13 sets T n Change to a value greater than the current T n A candidate value that is one step smaller.
[0057] Step S14: The processing unit 13 fixes T0 to T n The maximum temperature value (T N ) and the changed T n At the same time, based on T N and the changed T n To change other temperature values including T0, thereby re-determining T0 to T N .
[0058] For example, in order to make replica exchange occur with the same frequency at any temperature value, T0 and T can be divided by the ratio of the exponential function N In this case, in addition to T n and T N Temperature values other than (Tm ) is given by the following formula (3).
[0059]
[0060] In equation (3), T0 is given by the following equation (4).
[0061]
[0062] As in formula (4), T0 is calculated according to T N and T n And change.
[0063] Divide T0 and T N The method of the range between is not limited to the above example. When there is a more appropriate partitioning method (for example, linear partitioning, etc.) according to the problem information of the combinatorial optimization problem, the partitioning method can be applied.
[0064] Step S15: The processing unit 13 sets the determined T0 to T for the search unit 12. N .
[0065] Thus, the single adjustment process of the temperature value ends. Such adjustment process is repeated until the end condition of the solution search process is satisfied.
[0066] As described above, in the data processing device 10, the search unit 12 uses the replica circuits 12a0 to 12aN corresponding to the plurality of replicas of the evaluation function based on the Ising model obtained by converting the combinatorial optimization problem, and performs a search process for a solution to the combinatorial optimization problem by the replica exchange method. During the search process, the processing unit 13 acquires, from the search unit 12 a plurality of times, the average energy obtained in the search process by the replica circuit 12an among the replica circuits 12a0 to 12aN in which a temperature value (T0) higher by n (n is an integer of 1 or more) than T0 is set. n ). The processing unit 13 changes T based on the comparison result between the first average energy among the average energies obtained multiple times and the second average energy obtained before the first average energy. n The processing unit 13 re-determines T0 to T by the following operation: N : At a fixed T0 to T N The maximum temperature value (T N ) and the changed T n At the same time, based on T N and the changed T n The processing unit 13 sets the determined temperature range from T0 to T1 for the search unit 12. N .
[0067] In order to determine a suitable T0, in the case of repeatedly performing a solution search process using a certain T0 and adjusting T0 based on the result of the search process, it takes time to adjust T0. In contrast, in the data processing device 10 according to the first embodiment, the average energy to be 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. For example, since the temperature value including T0 can be adjusted during the search process without waiting for the end of the search process, the adjustment time of T0 can be shortened.
[0068] The constraint of the replica exchange on the solution of the local solution is suppressed. Therefore, by setting the adjustment period to a predetermined number of replica exchanges, T0 can be appropriately adjusted in consideration of a wide search space.
[0069] The description is based on the T n The replica circuit 12an obtains the average energy in the search process to adjust the temperature value including T0.
[0070] The way in which the average energy of the minimum temperature replica changes relative to T0 is similar to the way in which the minimum energy changes relative to T0. Therefore, the adjustment for obtaining the optimal T0 with a smaller minimum energy can be performed based on the average energy of the minimum temperature replica. However, as a result of experiments, it has been found that in the case of a method of adjusting T0 based on the average energy of the minimum temperature replica, according to the combinatorial optimization problem, the initial value of T0 takes a value closer to the optimal T0 than the adjusted T0.
[0071] Figure 3 is a schematic diagram showing an example of adjustment of T0. Figure 3 An adjustment example of T0 by a method of performing adjustment of T0 based on the average energy of the minimum temperature replica (hereinafter, referred to as a method of a comparative example) and an adjustment example of T0 in the method of the present embodiment are shown.
[0072] exist Figure 3 In the example shown, in both methods, the initial value of T0 is 0.1. The optimal value of T0 is 0.4. According to the method of the comparative example, the adjusted main T0 is 0.9. In contrast, in the method according to the present embodiment, the adjusted main T0 is 0.9. n is 0.9, and the main T0 after adjustment is 0.6, and T0 closer to the optimal value is obtained compared with the method of the comparative example.
[0073] As mentioned above, even when T n When the value is adjusted to be higher than the optimal T0, the value of T is also set in the (n-1) replica circuits. n (n-1) temperature values on the lower temperature side, and perform a search process near the optimal T0.
[0074] It is expected that the data processing device 10 as described above can be used as a means of obtaining an accurate solution in a short period of time when solving various problems in modern society that can be converted into combinatorial optimization problems.
[0075] (Second Embodiment)
[0076] Figure 4 is a diagram showing an example of a data processing apparatus according to the second embodiment.
[0077] The 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 Figure 1 The example of the search unit 12 shown in FIG. 1 , and the temperature adjustment unit 22 and the overall control unit 23 are Figure 1 An example of a processing unit 13 is shown in FIG. Figure 1 The storage unit 11 shown in FIG.
[0078] For example, the search unit 21 may be implemented by using an electronic circuit such as an ASIC or an FPGA. For example, the temperature adjustment unit 22 and the overall control unit 23 may be implemented by software processing in which a processor such as a CPU executes a program. The implementation is not limited thereto, and a part or all of each of the search unit 21, the temperature adjustment unit 22, and the overall control unit 23 may be implemented by using an electronic circuit as described above. A part or all of each of the search unit 21, the temperature adjustment unit 22, and the overall control unit 23 may be implemented by software processing.
[0079] In the data processing device 20 according to the second embodiment, the search unit 21 searches for a solution to the combinatorial optimization problem by a replica exchange method in which states are exchanged between replicas.
[0080] For example, Figure 4 As shown, the search unit 21 includes replica circuits 21a0, 21a1, ..., 21an, ..., and 21aN corresponding to (N+1) replicas. The search unit 21 includes a temperature control unit 21b.
[0081] Different temperature values (T0 to T1) are set for the replica circuits 21a0 to 21aN. N ). T0 is set for the replica circuit 21a0, T1 is set for the replica circuit 21a1, and T is set for the replica circuit 21an. n , set T for the replica circuit 21aN N . T0 <T1<……<T n <…… <T NTherefore, the replica corresponding to the replica circuit 21a0 is the minimum temperature replica. Hereinafter, the replica corresponding to the replica circuit 21an is referred to as replica n.
[0082] As T n The initial value of may be, for example, a value input by the user.
[0083] Precalculate T as the maximum temperature N For example, the temperature adjustment unit 22 of the data processing device 20 can pre-calculate T by the following method: N .
[0084] First, from T0 to T N In a state where each temperature value is fixed, the search unit 21 performs MCMC processing using replica exchange a predetermined number of times. The temperature adjustment unit 22 obtains a state corresponding to the minimum energy obtained in each replica circuit of the replica circuits 21a0 to 21aN (hereinafter referred to as a local solution). For example, based on the multiple local solutions obtained, the temperature adjustment unit 22 selects two local solutions in ascending order of energy. The temperature adjustment unit 22 calculates the amount of change (ΔE) in the value of the evaluation function caused by a change in a value of multiple bits in a bit string of a selected local solution that is different from a bit string of another local solution. This calculation process is performed sequentially for each of the multiple bits. In the case where energy increases occur multiple times in succession, the temperature adjustment unit 22 calculates the total value of the multiple increases in energy. Based on the total value, the temperature adjustment unit 22 calculates the maximum temperature (T max ).
[0085]
[0086] As described above, in the case where energy increase occurs multiple times in succession, Dsum is the total value of the energy increased multiple times. A is a parameter indicating the transition probability of accepting the state transition that causes the maximum energy increase, and is set in advance.
[0087] Even in the case where it is impossible to cross a large energy peak unless multiple consecutive energy increases occur between two local solutions, the above T N Described by T max The use of allows crossing such energy peaks with relatively high probability.
[0088] From the above described equations (3) and (4), we can obtain n and T N Initial value for temperature values other than .
[0089] Each of the replica circuits 21a0 to 21aN is implemented by, for example, Figure 4The circuit shown implements a solution search based on the evaluation function represented by equation (1).
[0090] The replica circuit 21an corresponding to the replica n includes: bit flip availability determination units 30a1, 30a2, . . . , and 30aM; a selector unit 30b; a holding unit 30c; and an average energy calculation unit 30d.
[0091] The process of determining the availability of flipping each bit included in the state of replica n and flipping any bit determined to be flippable corresponds to a single process of the MCMC process performed by the replica circuit 21an. The single process is repeatedly performed.
[0092] Each of the bit flipping availability determination units 30a1 to 30aM is, for example, an arithmetic processing circuit that determines availability of flipping associated with one bit processed thereby. The bit flipping availability determination units 30a1 to 30aM may perform the above-mentioned determination processing in parallel.
[0093] When the bit with index = i (state variable x i ) becomes 1-x i When x i The change in i =(1-x i )-x i =1-2x i Therefore, with x i The change in the value of the evaluation function (ΔE i ) can be expressed by the following formula (6) based on formula (1).
[0094]
[0095] In formula (6), h i is called a local domain and can be expressed by the following equation (7).
[0096]
[0097] Each of the bit flip availability determination units 30a1 to 30aM stores the bit flip availability determination unit for x i h i , and at x i When the value of changes, based on formula (6) according to h i Obtain ΔE i .
[0098] Hereinafter, as an example, the bit flip availability determination unit 30a1 will be mainly described. The bit flip availability determination units 30a2 to 30aM configured with the same name have the same function.
[0099] The bit processed by the bit flipping availability determination unit 30a1 is referred to as a self bit, and the bits processed by the bit flipping availability determination units 30a2 to 30aM are referred to as other bits.
[0100] The bit flip availability determination unit 30a1 stores the weight coefficients (W 1j (j=1 to N)). 1j The subscript "j" of indicates the index of one of the bits including the self bit (the bit with index = 1). 11 =0.
[0101] The bit flip availability determination unit 30a1 uses W based on equation (7) 1j to calculate h1.
[0102] By using h1, the bit flip availability determination unit 30a1 generates ΔE1 caused in the case of self-bit flipping based on equation (6). For example, the bit flip availability determination unit 30a1 can determine whether the value of the self bit is changed to 0 or 1 according to the current value of the self bit supplied from the storage unit 30c. The bit flip availability determination unit 30a1 outputs the generated ΔE1 to the selector unit 30b.
[0103] The bit flipping availability determination unit 30a1 determines the availability of flipping the own bit based on the comparison result between ΔE1 and the thermal noise value. As the thermal noise value, for example, T n ·log(u). T n is a temperature value set for the replica circuit 21an, and u is a uniform random number taking a value from 0 to 1. In the case of -ΔE1≥T n In the case of log(u), the bit flipping availability determination unit 30a1 allows flipping.
[0104] The selector unit 30b receives the determination result of the flip availability output by each of the bit flip availability determination units 30a1 to 30aM. When there are multiple bits determined to be flippable, the selector unit 30b selects one of the multiple bits randomly or according to a predetermined rule. When there is a bit determined to be flippable, the selector unit 30b outputs the index of the selected bit, the instruction signal for indicating the flip, and the 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 storage unit 30c. The index is also supplied to each of the bit flip availability determination units 30a1 to 30aM.
[0105] For example, the saving unit 30c has a register, and saves the state of the replica n output by the selector unit 30b and ΔE. In the case where the saving unit 30c receives an instruction signal for instructing flipping, the saving unit 30c flips the bit specified by the index output by the selector unit 30b. When the search process in the replica circuit 21an is completed a predetermined number of times or for a predetermined period of time, the saving unit 30c outputs the state of the replica n to the temperature adjustment unit 22 and the overall control unit 23.
[0106] The average energy calculation unit 30d calculates the average energy (E ave ). ave is supplied to the temperature adjustment unit 22. For example, each time the MCMC process is repeated, the average energy calculation unit 30d saves the initial value of the evaluation function represented by equation (1), and updates E by using ΔE output by the selector unit 30b and saved by the saving unit 30c. ave In the case where no bit is determined to be flippable, ΔE=0.
[0107] Although the replica circuits corresponding to the other replicas may also be implemented by a circuit configuration similar to that of the replica circuit 21an, those replica circuits may not include the average energy calculation unit 30d.
[0108] The temperature control unit 21b sets T0 to T1 obtained by the temperature adjustment unit 22 in the bit flip availability determination units 30a1 to 30aM included in each of the replica circuits 21a0 to 21aN. N The temperature control unit 21b controls the state (X0 to X1) of each of the replicas in the replica circuits 21a0 to 21aN. N ) exchange. Based on the exchange probability (p ij ), the temperature control unit 21b determines whether to exchange states on a pair-by-pair basis for a pair of replica circuits having adjacent temperature values.
[0109] In order to obtain E of formula (2) i and E j For example, the temperature control unit 21b saves the initial value of the evaluation function of each replica, and updates the value of the evaluation function of each replica based on the ΔE saved in the saving unit 30c of the replica circuits 21a0 to 21aN. Each of the replica circuits 21a0 to 21aN may have an energy calculation unit that calculates the evaluation function (energy) of the replica that the replica circuit itself is responsible for processing.
[0110] When the state of replica i and the state of replica j are exchanged, the temperature control unit 21 b sets X as the state of replica i in the replica circuit corresponding to replica j. i , and set X as the state of replica j in the replica circuit corresponding to replica i j .
[0111] Whenever b replica exchanges are performed, the temperature adjustment unit 22 obtains E as the average energy of replica n. ave , and based on E ave With E as the last acquisition ave E ave,old The comparison result between them is used to adjust T n An example of the temperature adjustment unit 22 will be described later.
[0112] The overall control unit 23 controls the overall operation of the data processing device 20. When receiving an activation signal input from the outside of the data processing device 20, the overall control unit 23 outputs the activation signal to the temperature control unit 21b, activates the search unit 21, and starts the search process for the solution of the combinatorial optimization problem. When the search process performed by the search unit 21 ends, the overall control unit 23 obtains X0 to X1 from the search unit 21. M , and obtain the solution to the combinatorial optimization problem.
[0113] For example, the overall control unit 23 converts the acquired X0 to X M The state in which the value of the evaluation function in is the smallest is set as the solution. The overall control unit 23 outputs an end signal indicating the end of the arithmetic operation to the outside of the data processing device 20. The end signal may include information indicating the solution obtained by the arithmetic operation. For example, the overall control unit 23 may output image information indicating the solution to a display device (not shown) coupled to the data processing device 20, and cause the display device to display the image information indicating the solution to present the details of the obtained solution to the user.
[0114] The overall control unit 23 may receive the above-mentioned problem information (W ij or bi ), the initial value of the state, etc., and they can be set in each unit in the search unit 21. The setting of these information can be performed by another control unit. When receiving the input of the reset signal from the outside of the data processing device 20, the overall control unit 23 clears the information saved by the search unit 21 and the temperature adjustment unit 22.
[0115] (Example of Temperature Adjustment Unit 22)
[0116] Figure 5 is a diagram showing an example of a temperature adjustment unit. Figure 5 The configuration for calculating the above-mentioned maximum temperature is not shown.
[0117] The temperature adjustment unit 22 includes a parameter acquisition unit 40, an average energy acquisition unit 41, an average energy storage unit 42, a comparison unit 43, a T n An adjusting unit 44 , a temperature value dividing unit 45 and a temperature value setting unit 46 .
[0118] For example, the parameter acquisition unit 40 acquires the number n of redundant replica circuits, the number of divisions a, the adjustment period b, and T input from the user. n The initial value (T n,0 The redundant replica circuit is n replica circuits, in which T0 to T N Medium T n Temperature values T0 to T on the lower temperature side (n-1) The number of divisions a is used to determine T n The "a" candidate values of T n,0 With T N (=maximum temperature) T n The lower limit of the number of candidate values of "a" is T n,0 , and the upper limit is immediately above T N The following is a candidate value for the partition point. The adjustment period b is represented by the number of replica exchanges. For example, whenever b replica exchanges are performed, T n of adjustment.
[0119] Whenever b replica exchanges are performed, the average energy acquisition unit 41 acquires E as the average energy of replica n. ave For example, the average energy acquisition unit 41 acquires information indicating whether the replica exchange has been performed from the temperature control unit 21 b .
[0120] The average energy storage unit 42 stores the E obtained by the average energy acquisition unit 41. ave As e ave,o ld.
[0121] The comparison unit 43 outputs the E obtained this time. ave The E obtained last time is stored in the average energy storage unit 42. ave E ave,old The comparison results between .
[0122] Based on the above comparison results, T n The adjustment unit 44 adjusts T n . During initialization, T n The adjustment unit 44 divides T n,0 With T N to calculate the "a" candidate values described above. ave ≤e ave,old When T n The adjustment unit 44 adjusts T n Change to one of the "a" candidate values that is smaller than the current T n A candidate value with a larger step size. ave >e ave,old When T n The adjustment unit 44 adjusts T n Change to one of the "a" candidate values that is smaller than the current T n A candidate value that is one step smaller.
[0123] However, when E ave ≤e ave,old At the current T n is closest to T N In the case of a candidate value of (maximum temperature) (for example, the upper limit of "a" candidate values), T n The adjustment unit 44 does not change T n . When E ave >e ave,old At the current T n It is T n,0 (e.g., the lower limit of “a” candidate values), T n The adjustment unit 44 does not change T n .
[0124] According to the above adjustment method, the adjustment can be performed using a small number of parameters, but the adjustment method is not limited to the above adjustment method. n The adjustment unit 44 adjusts T n After changing to a candidate value that is one step smaller than the current candidate value, in E ave >e ave,old For the next E ave If this is also true, T n The adjustment unit 44 can adjust T n Change to a candidate value that is one step larger than the current candidate value. This is because by increasing T nto achieve a lower energy state.
[0125] T n The adjustment unit 44 can adjust T n The initial value of is set to the upper limit among the "a" candidate values.
[0126] When T n When the temperature value is changed, the temperature value dividing unit 45 divides T0 and T N The range between includes the maximum temperature value (T N ) to determine T0 to T N The temperature value dividing unit 45 calculates (changes) the temperature value except T based on, for example, the above-described equations (3) and (4). n and T N Temperature values other than .
[0127] The temperature value setting unit 46 sets the determined T0 to T N .
[0128] Figure 6 is a flowchart showing the flow of an example of a process for adjusting a temperature value according to the second embodiment.
[0129] For example, the following processing is performed under the control of the overall control unit 23 .
[0130] As parameters for adjusting the temperature value, the temperature adjustment unit 22 obtains the number n of redundant replica circuits, the number of divisions a, the adjustment period b, and T n,0 (Step S20).
[0131] During initialization, the temperature adjustment unit 22 divides T n,0 With T N to calculate the "a" candidate values described above (step S21). In the following, the "a" candidate values are assumed to be T'0, T'1, ..., and T' (a-1) .
[0132] The temperature adjustment unit 22 sets i=0 and T n =T'0 (step S22). The temperature adjustment unit 22 initializes j indicating the number of replica exchanges to j=1 (step S23).
[0133] Thereafter, MCMC processing is performed in the search unit 21 (step S24). Thus, the state of each replica is updated according to the acceptance probability of a predetermined state transition. Replica exchange is performed in the search unit 21 (step S25).
[0134] The temperature adjustment unit 22 sets j=j+1 (step S26). The temperature adjustment unit 22 determines whether j≤b+1 holds (step S27). When it is determined that j≤b+1 does not hold, the processing from step S24 is repeated.
[0135] When it is determined that j≤b+1 holds, the temperature adjustment unit 22 acquires E which is the average energy of the replica n from the search unit 21. ave (Step S28).
[0136] The temperature regulating unit 22 determines whether there is e in the average energy storage unit 42. ave,old (Step S29).
[0137] When it is determined that there is no e in the average energy storage unit 42 ave,old When the temperature adjustment unit 22 causes the average energy storage unit 42 to store the currently acquired E ave As e ave,old (Step S30) After the process of step S30, the process starting from step S23 is repeated.
[0138] When it is determined that there is e in the average energy storage unit 42 ave,old When the temperature adjustment unit 22 determines E ave ≤e ave,old Is it established (step S31).
[0139] When determining E ave ≤e ave,old If it is not true, the temperature adjustment unit 22 will set T n Change to T n =T' i-1 (Step S32). T' i-1 is the ratio of the "a" candidate values as the current candidate value T' i A candidate value with a smaller step size. When T' i =T n,0 When T n No change.
[0140] When determining E ave ≤e ave,old When the temperature is established, the temperature adjustment unit 22 will n Change to T n =T' i+1 (Step S33). T' i+1 is the ratio of the "a" candidate values as the current candidate value T' i A candidate value with a larger step size. When T' i is the upper limit of the candidate value, T n No change.
[0141] After the processing of steps S32 and S33 described above, the temperature adjustment unit 22 determines the temperature by dividing T0 and T N The range between T0 and T N (Step S34). In the process of step S34, the temperature adjustment unit 22 sets the determined T0 to T1 in the search unit 21. N .
[0142] The temperature adjustment unit 22 causes the average energy storage unit 42 to store the E obtained this time. ave As e ave,old (Step S35).
[0143] Thereafter, for example, the overall control unit 23 determines whether a predetermined end condition is satisfied (step S36). For example, when the number of MCMC processing times reaches a predetermined number of times, the overall control unit 23 determines that the end condition is satisfied. Although not shown, for example, in the case where it is determined that the end condition is satisfied, the overall control unit 23 obtains X0 to X1 from the search unit 21. N , output X0 to X N The state in which the value of the evaluation function is the smallest is regarded as the solution, and the search process is ended.
[0144] When the overall control unit 23 determines that the predetermined end condition is not satisfied, the processing starting from step S23 is repeated.
[0145] The order of the processes described above is an example, and the order may be changed appropriately.
[0146] The data processing device 20 according to the second embodiment described above also provides effects similar to those of the data processing device 10 according to the first embodiment. For example, by ave By determining a new temperature value including the minimum temperature, the adjustment time of the minimum temperature can be shortened. The constraint of the replica exchange on the solution of the local solution is suppressed. Therefore, by setting the adjustment cycle to a predetermined number of replica exchanges, the minimum temperature can be appropriately adjusted while considering a wide search space.
[0147] The data processing device 20 according to the second embodiment is based on the T n The replica circuit 21an obtains E in the search process ave To adjust T n , and determine the temperature value including T0 based on the adjustment result. Therefore, even when T n When the temperature is adjusted to a value higher than the optimum minimum temperature, the (n-1) replica circuits can also be set to a value higher than T n (n-1) temperature values on the lower temperature side, and a search process around the optimal minimum temperature can be performed.
[0148] Although the search unit 21 exchanges states between replicas in the replica exchange in the data processing device 20 according to the second embodiment described above, the temperature value may be exchanged between replicas. In this case, the temperature values set for the replica circuits 21a0 to 21aN corresponding to the replicas 0 to N are not fixed. Therefore, the replica circuit that performs the processing of the replica n is not fixed to the replica circuit 21an. Therefore, instead of the replica circuits 21a0 to 21aN, a temperature value for calculating the average energy (E ) of the replica n may be set in the temperature control unit 21b. ave )'s average energy calculation unit 30d.
[0149] Instead of exchanging states between replicas, by exchanging temperature values between replicas, the amount of data to be moved when replicas are swapped can be reduced.
[0150] Even in the case where the states are exchanged between replicas in replica exchange, the average energy calculation unit 30d as described above may be provided in the temperature control unit 21b. 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 to 21aN, the temperature control unit 21b, the overall control unit 23, and the like.
[0151] (Experimental example)
[0152] Figure 7 is a diagram showing an example of calculation results of a combinatorial optimization problem.
[0153] Figure 7 Shown in Figure 4 The data processing device 20 shown is a calculation example of calculating the average value of 5 seeds of the minimum value of the evaluation function obtained in the case of 15 instances of Gset as a benchmark problem of the maximum cut problem. The maximum cut problem is an example of a combinatorial optimization problem. The calculation time is 30 minutes. The number of bits is the state variables x1 to x2 included in the evaluation function. M The number of redundant copies n is set to 8. For comparison, the calculation results in the case where the number of redundant copies n=0 are also shown, for example, the minimum temperature is adjusted by using the average energy of the minimum temperature copy as in the above comparative example.
[0154] like Figure 7 As shown, in 14 of the 15 problems, the average value of the minimum value of the evaluation function is smaller than that in the case of n = 0. For example, it can be seen that a better solution (a solution close to the optimal solution) is obtained than in the case of n = 0.
[0155] (Computer-implemented example)
[0156] Depend on Figure 1or Figure 4 The above-mentioned processing (for example, Figure 2 or Figure 6 ) can be implemented by software by causing a computer to execute a program as described below.
[0157] The program can be recorded on a computer-readable recording medium. For example, a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. can be used as a recording medium. Examples of magnetic disks include a floppy disk (FD) and an HDD. Examples of optical disks include a compact disk (CD), a CD recordable (R) / rewritable (RW), a digital versatile disk (DVD), and a DVD-R / RW. The program can be recorded on a portable recording medium and distributed. In this case, the program can be copied from the portable recording medium to another recording medium and executed.
[0158] Figure 8 is a diagram illustrating an example of hardware of a computer as an example of a data processing device.
[0159] The computer 50 includes a processor 51, a RAM 52, an HDD 53, a GPU 54, an input interface 55, a medium reader 56, and a communication interface 57. The units described above are coupled to a bus.
[0160] For example, the processor 51 may be used as Figure 1 The search unit 12 and the processing unit 13 in the embodiment of the present invention can be used as Figure 4 The search unit 21, the temperature adjustment unit 22, and the overall control unit 23 in the HDD 53 are shown in FIG. The processor 51 is a processor such as a GPU or a CPU, which includes an arithmetic circuit for executing instructions of a program 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. For example, in order to Figure 4 As shown, the functions of the replica circuits 21a0 to 21aN are executed in parallel, and the processor 51 may include multiple processor cores. The computer 50 may include multiple processors. A collection of multiple processors (multiprocessors) may be referred to as a "processor".
[0161] For example, RAM 52 is used as Figure 1 The storage unit 11 shown in FIG. 5 is a volatile semiconductor memory that temporarily stores programs to be executed by the processor 51 and data to be used for arithmetic operations of the processor 51. The computer 50 may include a memory other than the RAM 52, and may include a plurality of memories.
[0162] The HDD 53 is a non-volatile storage device that stores software programs such as an operating system (OS), middleware or application software, and data. Examples of the program include a program for causing the computer 50 to perform the process of searching for a solution to the combinatorial optimization problem and the process of adjusting the temperature value as described above. The computer 50 may include other types of storage devices such as a flash memory or a solid-state drive (SSD), and may include a plurality of non-volatile storage devices.
[0163] According to the instruction from the processor 51, the GPU 54 outputs an image (e.g., an image representing a search result of a solution to the combinatorial optimization problem, etc.) to a display 54a coupled to the computer 50. As the display 54a, a cathode ray tube (CRT) display, a liquid crystal display (LCD), a plasma display panel (PDP), an organic electroluminescent (OEL) display, etc. can be used.
[0164] The input interface 55 obtains an input signal from an input device 55a coupled to the computer 50, and outputs the input signal to the processor 51. 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. can be used as the input device 55a. Various types of input devices can be coupled to the computer 50.
[0165] The medium reader 56 is a reading device that reads a program or data recorded on the recording medium 56a. For example, a magnetic disk, an optical disk, a magneto-optical (MO) disk, a semiconductor memory, etc. can be used as the recording medium 56a. Examples of magnetic disks include FD and HDD. Examples of optical disks include CD and DVD.
[0166] For example, 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. For example, the read program is executed by the processor 51. The recording medium 56a may be a portable recording medium and may be used to distribute the program or data. The recording medium 56a or the HDD 53 may be referred to as a computer-readable recording medium.
[0167] The communication interface 57 is an interface coupled to the network 57a and communicates with another information processing device via the network 57a. The communication interface 57 may be a wired communication interface coupled to a communication device (e.g., a switch) via a cable, or may be a wireless communication interface coupled to a base station via a wireless link.
[0168] An accelerator card having an electronic circuit such as an FPGA or an ASIC may be coupled to the bus of the computer 50. The processing of the search units 12 and 21 may be performed by the accelerator card.
[0169] Although aspects of the temperature adjustment program, the data processing apparatus, and the data processing method of the present disclosure are described above based on the embodiments, these are merely examples, and the present disclosure is not limited to the above descriptions.
Claims
1. A computer-readable recording medium storing a temperature adjustment program, the temperature adjustment program causing a computer to execute a process, the process comprising: acquiring, multiple times during the search process, from a search unit an average value of the value of the evaluation function obtained in the search process by a replica circuit among a plurality of replica circuits in which a first temperature value n higher than a minimum temperature value is set, n being an integer of 1 or more, and in which a plurality of temperature values different from each other are set, the search unit performing 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 the evaluation function based on the Ising model obtained by converting the combinatorial optimization problem; changing the first temperature value 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; The plurality of temperature values are re-determined by: while fixing the maximum temperature value and the changed first temperature value among the plurality of temperature values, changing other temperature values including the minimum temperature value based on the maximum temperature value and the changed first temperature value; as well as The determined plurality of temperature values are set for the search unit.
2. The computer-readable recording medium according to claim 1, further causing the computer to execute the following processing: During the search process, each time a predetermined number of replica exchanges are performed, the average value is acquired from the search unit, the first temperature value is changed, the plurality of temperature values are re-determined, and the plurality of temperature values are set for the search unit.
3. The computer-readable recording medium according to claim 1 , further causing the computer to execute the following processing: A range between an initial value of the first temperature value and the maximum temperature value is divided into a predetermined number of divisions, and a plurality of candidate values of the first temperature value having a plurality of magnitude steps are calculated based on the number of divisions.
4. The computer-readable recording medium according to claim 3, further causing the computer to execute the following processing: When the first average value is equal to or less than the second average value, changing the first temperature value to a candidate value among the plurality of candidate values that is one step larger than the current first temperature value; and When the first average value is greater than the second average value, the first temperature value is changed to a candidate value among the plurality of candidate values that is one step smaller than the current first temperature value.
5. A data processing device comprising: a search unit configured to perform a search process for a solution to the combinatorial optimization problem by a replica exchange method by 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; as well as A processing unit, the processing unit being configured to: acquiring, from the search unit a plurality of times during the search process, an average value of the value of the evaluation function obtained in the search process by the replica circuit of the plurality of replica circuits in which a first temperature value n higher than a minimum temperature value is set, n being an integer of 1 or more, and a plurality of temperature values different from each other are set; changing the first temperature value 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; The plurality of temperature values are re-determined by: while fixing the maximum temperature value and the changed first temperature value among the plurality of temperature values, changing other temperature values including the minimum temperature value based on the maximum temperature value and the changed first temperature value; as well as The determined plurality of temperature values are set for the search unit.
6. A temperature regulation method, comprising: acquiring, multiple times during the search process, from a search unit an average value of values of the evaluation function obtained in the search process by a replica circuit among a plurality of replica circuits in which a first temperature value n higher than a minimum temperature value is set, n being an integer of 1 or more, a plurality of temperature values different from each other are set, the search unit performing 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 the evaluation function based on the Ising model obtained by converting the combinatorial optimization problem; changing the first temperature value 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; The plurality of temperature values are re-determined by: while fixing the maximum temperature value and the changed first temperature value among the plurality of temperature values, changing other temperature values including the minimum temperature value based on the maximum temperature value and the changed first temperature value; as well as The determined plurality of temperature values are set for the search unit.