Program, data processing method, and data processing method
The method enhances solution search performance in the MCMC method by selecting replicas with small temperature differences and generating new states based on evaluation function comparisons, thereby efficiently escaping local solutions and improving solution quality.
Patent Information
- Application Number
- JP2023189546
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-11-06
- Publication Date
- 2025-05-19
AI Technical Summary
In solution search based on the MCMC method, it may take time to obtain a better solution because state transitions are not continuously adopted or only specific states are adopted.
A program is provided that causes a computer to execute a processing method where, in a solution search based on an evaluation function with multiple state variables, replicas corresponding to different temperature values are used. When a specific state appears excessively within a predetermined time in one replica, a number of replicas with small temperature differences are selected, and a new state is generated by changing values of state variables based on a comparison of evaluation function values between the initial and new states.
This approach improves solution performance by efficiently escaping local solutions and obtaining better solutions more quickly in the solution search process.
Smart Images

Figure 2025077388000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a program, a data processing method, and a data processing apparatus.
Background Art
[0002] An information processing apparatus may be used to solve a combinatorial optimization problem. The combinatorial optimization problem is converted into an evaluation function representing the energy of an Ising model, which is a model representing the behavior of spins of a magnetic substance. The information processing apparatus searches for a combination that minimizes or maximizes the evaluation function among combinations of values of state variables included in the evaluation function. The combination of values of state variables that minimizes or maximizes the evaluation function corresponds to the ground state or the optimal solution represented by the set of state variables. As a method for obtaining an approximate solution to the combinatorial optimization problem in practical time, there is a method that combines a simulated annealing (SA) method, a replica exchange method, etc. based on the Markov-chain Monte Carlo (MCMC) method.
[0003] For example, there is a proposal for an optimization apparatus that performs solution search by the replica exchange method using a plurality of replicas that are copies of state variables of a problem to be solved. Also, there is a proposal for an apparatus that searches for a solution to a large-scale combinatorial optimization problem by the population annealing method using a plurality of replicas of a Boltzmann machine.
[0004] In addition, there is also a proposal for a method of obtaining a solution to a problem converted into an objective function by a hybrid computing system including a quantum processor that executes quantum annealing or adiabatic quantum computing and a digital processor. There is also a proposal for an apparatus that uses quantum annealing to identify an appropriate schedule capable of executing tasks and jobs defined in association with workers and objects.
Prior Art Documents
Patent Documents
[0005] Patent Document 1 Japanese Unexamined Patent Application Publication No. 2022-52222 Patent Document 2 Japanese Unexamined Patent Application Publication No. 2023-56471 Patent Document 3 U.S. Patent Application Publication No. 2017 / 0116159 Patent Document 4 U.S. Patent Application Publication No. 2017 / 0083873 SUMMARY OF THE INVENTION PROBLEMS TO BE SOLVED BY THE INVENTION
[0006] In solution search based on the MCMC method, it may take time to obtain a better solution because state transitions are not continuously adopted or only specific states are adopted. In one aspect, the present invention aims to improve solution performance. MEANS FOR SOLVING THE PROBLEMS
[0007] In one aspect, a program is provided. This program causes a computer to execute the following processing. In a solution search based on an evaluation function including a plurality of state variables, each of which indicates values of the plurality of state variables and is performed using a plurality of replicas corresponding to a plurality of temperature values, when the number of times the first state indicated by the values of the plurality of state variables appears within a predetermined time in the first replica among the plurality of replicas exceeds a predetermined number, a predetermined number of replicas are preferentially selected from the plurality of replicas based on those having a small difference in temperature value from the first temperature value corresponding to the first replica. The computer acquires a second state to be compared with the first state based on the state obtained by the solution search in each of the predetermined number of replicas. The computer determines the number of state variables whose values are to be changed among the plurality of state variables in the first state according to a comparison between a first value of the evaluation function corresponding to the first state and a second value of the evaluation function corresponding to the second state. The computer generates a third state in which the values of the number of state variables among the plurality of state variables in the first state are changed. The computer continues the solution search in the first replica using the third state.
[0008] Also, in one aspect, a data processing method executed by a computer is provided. Also, in one aspect, a data processing apparatus having a storage unit and a processing unit is provided.
Advantages of the Invention
[0009] In one aspect, the solution performance can be improved.
Brief Description of the Drawings
[0010]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Best Mode for Carrying Out the Invention
[0011] Hereinafter, this embodiment will be described with reference to the drawings. [First Embodiment] The first embodiment will be described.
[0012] FIG. 1 is a diagram for explaining a data processing apparatus according to the first embodiment. The data processing apparatus 10 is used for solving a combinatorial optimization problem based on the MCMC method. The replica exchange method is used for solving the combinatorial optimization problem. The replica exchange method is also called the exchange Monte Carlo method, the parallel tempering method, etc. The data processing apparatus 10 includes a storage unit 11 and a processing unit 12.
[0013] The memory unit 11 may be a volatile semiconductor memory such as a RAM (Random Access Memory), or a non-volatile storage such as an HDD (Hard Disk Drive) or a flash memory. The processing unit 12 is, for example, a processor such as a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), or a DSP (Digital Signal Processor). The processing unit 12 may include an application-specific electronic circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array). The processing unit 12 may also be a processor that executes a program stored in a memory such as a RAM (which may also be the memory unit 11). A collection of multiple processors may be referred to as a "multiprocessor" or simply a "processor".
[0014] In the following description, an example in which the processing unit 12 performs a solution search is shown. However, a search unit implemented by an FPGA, a GPU, etc. may perform a solution search in response to an instruction from the processing unit 12 and respond with the search result to the processing unit 12. In that case, the search unit may be included in the data processing device 10 or in another device that communicates with the data processing device 10.
[0015] The combinatorial optimization problem is formulated by a predetermined evaluation function and is replaced, for example, by a problem of minimizing the value of the evaluation function, i.e., the evaluation value. The evaluation function may also be referred to as an objective function or an energy function. The evaluation function includes a plurality of state variables. The state variable is, for example, a binary variable that takes a value of 0 or 1. The possible values of the state variable may be {1, -1} or other real numbers. Also, the state variable may be referred to as a bit or a spin.
[0016] The solution of the combinatorial optimization problem is represented by the values of a plurality of state variables. The value of the evaluation function indicates the energy of the Ising model. The solution that minimizes the value of the evaluation function represents the ground state of the Ising model and corresponds to the optimal solution of the combinatorial optimization problem.
[0017] The Ising-type evaluation function is represented by, for example, Equation (1).
[0018]
Equation
[0019] The state vector s consists of a plurality of state variables as elements and represents the state of the Ising model. Equation (1) is an evaluation function formulated in the QUBO (Quadratic Unconstrained Binary Optimization) format. In the case of the problem of maximizing the energy, the sign of the evaluation function may be reversed. However, the evaluation function does not have to be in quadratic form and may be in a cubic or higher form.
[0020] The first term on the right side of Equation (1) is the sum of the products of the values of two state variables and the weight coefficients for all combinations of two state variables that can be selected from all state variables without omission or duplication. The subscripts i and j are the indices of the state variables. s i is the i-th state variable. s j is the j-th state variable. N is the total number of state variables. W ij is the weight between the i-th state variable and the j-th state variable, or the coupling coefficient indicating the strength of the coupling. W ij = W ji and W ii = 0.
[0021] The second term on the right side of Equation (1) is the sum of the products of the bias of each state variable and the value of the state variable. i b indicates the bias for the i-th state variable. The problem information including the weight coefficients and biases included in the evaluation function is stored in the storage unit 11.
[0022] When the value of the state variable s i changes to 1 - s i , the increase in the state variable s i is Δs i = (1 - s i ) - s i = 1 - 2si can be expressed as follows. Therefore, for the evaluation function H(s), the state variable s i the amount of change in energy ΔH associated with the change in i is represented by Equation (2).
[0023]
Number
[0024] h i is called the local field and is represented by Equation (3). The local field may also be called the Local Field (LF).
[0025]
Number
[0026] According to Equation (2), if the signs of Δs i and (ΣW ij s j +b i ) match, the energy decreases. The processing unit 12 calculates, for example, the amount of change in energy caused by a change in the value of one of the plurality of state variables for each of the plurality of state variables, and probabilistically accepts the change that reduces the energy with priority.
[0027] At this time, in the steepest descent method, it becomes impossible to escape when falling into a local solution. Therefore, the processing unit 12 uses the Metropolis method or the Gibbs method to determine the transition probability from one state to the next state by changing a certain state variable. That is, the processing unit 12 also probabilistically allows a change that increases the value of the evaluation function according to the comparison between the amount of change in the value of the evaluation function and the thermal noise value even for a change that increases the value of the evaluation function. The thermal noise value is obtained based on the temperature value and random numbers. The larger the temperature value, the larger the amplitude of the thermal noise value. The larger the amplitude of the thermal noise value, the easier it is to allow a state transition with a large increase in the value of the evaluation function.
[0028] For example, in the case of the Metropolis method, the energy change ΔH iThe probability A of accepting the change in the value of the state variable i is A i = min[1, exp(-β·ΔH i )]. β is the reciprocal of the temperature value T (T > 0) (β = 1 / T) and is called the inverse temperature. The min operator indicates taking the minimum value among the arguments.
[0029] The processing unit 12 compares a uniform random number u where 0 < u < 1 with A i for a certain index i, and if u < A i , it accepts the change in the value of the state variable s i and changes the value of the state variable s i . If u < A i is not satisfied, the processing unit 12 does not accept the change in the value of the state variable si and does not change the value of the state variable s i . According to the formula for the probability A i , the larger the value of ΔH i , the smaller A i becomes. Also, the smaller β is, that is, the larger T is, the more easily state transitions with a large ΔH i are allowed.
[0030] For example, when the Metropolis method is used, the processing unit 12 may perform the transition determination using the determination formula of ln(u)*T ≦ -ΔH i . ln(u)*T corresponds to the thermal noise value. The processing unit 12 allows the change in the value of the corresponding state variable when the energy change ΔH i satisfies the determination formula for a uniform random number u. The processing unit 12 does not allow the change in the value of the corresponding state variable when the energy change ΔH i does not satisfy the determination formula for a uniform random number u.
[0031] In the replica exchange method, the processing unit 12 independently executes MCMC for each of a plurality of temperature values, exchanges the states obtained at each temperature value at a predetermined timing, and repeats the procedure of continuing MCMC with the state after the exchange as the initial solution, and extracts good solutions obtained in the process. A set of a plurality of state variables corresponding to one temperature value is called a replica. However, a replica may indicate a single unit of arithmetic resources that handle a plurality of state variables corresponding to one temperature value. In the replica exchange method, a plurality of replicas corresponding to a plurality of temperature values are used. The exchange of states at a predetermined timing is performed probabilistically for pairs of replicas of adjacent temperature values.
[0032] In the following description, the number of a plurality of replicas is assumed to be m. m can be, for example, an integer of 3 or more. In the first embodiment, the plurality of replicas are represented as, for example, replicas R(1), …, R(k−1), R(k), R(k+1), …, R(m). The numbers “1, …, k, …, m” in the parentheses after “R” are indices for identifying the replicas. The temperature values corresponding to the replicas R(1), …, R(k−1), R(k), R(k+1), …, R(m) are temperature values T(1), …, T(k−1), T(k), T(k+1), …, T(m). The temperature values T(1), …, T(k−1), T(k), T(k+1), …, T(m) are determined in advance. For example, the numbers “1, …, k, …, m” in the parentheses after “T” are indices for identifying the temperature values. The temperature value may be larger as the index is larger, or the temperature value may be smaller as the index is larger.
[0033] The processing unit 12 stores, in the storage unit 11, the history of the states and energies acquired in the process of solution search for each of the plurality of replicas. For example, the processing unit 12 may store, in the storage unit 11, the state with the lowest energy among the states obtained from the start point to the current point of the solution search for each of the plurality of replicas.
[0034] Here, in the solution search by the processing unit 12, when a local solution is reached in a certain replica, the state transition in that replica may be stalled, and it may take time to obtain an optimal solution or an approximate solution close to the optimal solution for the entire plurality of replicas. Therefore, the processing unit 12 performs the following processing in the solution search by the replica exchange method.
[0035] The processing unit 12 detects that the number of times the first state indicated by the values of a plurality of state variables has appeared within a predetermined time in the first replica exceeds a predetermined number. The predetermined time is determined in advance. Detecting that the number of times the first state has appeared within the predetermined time exceeds the predetermined number can also be said to be detecting that the appearance frequency, that is, the number of times the first state appears per unit time, exceeds a predetermined value. Also, the first state appearing once means that the state after one trial of the state transition in the solution search is the first state. At this time, the state before this one trial may be the first state or a state different from the first state.
[0036] For example, the processing unit 12 may count the number of times the state transition has not been continuously adopted, that is, the number of consecutive rejections, and detect that the number of times the first state has appeared within a predetermined time exceeds a predetermined number based on whether the number of consecutive rejections exceeds a predetermined number. In this case, the first state has appeared for the number of trials corresponding to the number of consecutive rejections. Also, the time required for the number of trials corresponding to the predetermined number corresponds to the predetermined time.
[0037] Alternatively, in a certain replica, when the processing unit 12 transitions to the first state and the first state appears again within a predetermined time from that timing, the processing unit 12 may detect that the number of times of appearance exceeds a predetermined number by counting the number of times of appearance.
[0038] In the solution search, when the number of times the first state appears within a predetermined time in a certain replica exceeds a predetermined number, the first state is presumed to be a local solution. Therefore, the processing unit 12 can detect that the first replica has fallen into a local solution by detecting that the number of times the first state appears within a predetermined time exceeds the predetermined number.
[0039] When the processing unit 12 detects that the number of times the first state appears within a predetermined time in the first replica exceeds the predetermined number, the following processing is performed. The processing unit 12 preferentially selects a predetermined number of replicas from among the plurality of replicas, giving priority to those with a small temperature difference from the first temperature value corresponding to the first replica.
[0040] Here, assume that the replica R(k) is an example of the first replica. Also, assume that the state s1 in the replica R(k) is an example of the first state. In this case, the temperature value T(k) corresponding to the replica R(k) is an example of the first temperature value. Assume that the processing unit 12 has detected that the number of times the state s1 appears within a predetermined time in the replica R(k) exceeds the predetermined number. Then, the processing unit 12 preferentially selects a predetermined number of replicas from among the replicas R(1), …, R(k−1), R(k), R(k+1), …, R(m), giving priority to those with a small temperature difference from the temperature value T(k). At this time, the processing unit 12 may exclude the replica R(k) that has fallen into a local solution from the selection candidates. That is, the processing unit 12 can select a predetermined number of replicas from among the replicas other than the first replica among the plurality of replicas. Also, the predetermined number, that is, the number of replicas to be selected, is determined in advance. The predetermined number can be 2 or more. In the example of the first embodiment, assume that the predetermined number is 3. Also, when two replicas with the same temperature difference from the temperature value T(k) are included in the selection candidates, the processing unit 12 may select a replica according to a predetermined selection criterion of giving priority to the one with the smaller index or the one with the larger index.
[0041] For example, the processing unit 12 selects three replicas R(k−2), R(k−1), and R(k+1) corresponding to the temperature values T(k−2), T(k−1), and T(k+1) in the vicinity of the temperature value T(k).
[0042] Based on the states obtained by the solution search up to the current time for each of the selected predetermined number of replicas, the processing unit 12 acquires a second state to be compared with the first state. Examples of the method for acquiring the second state include the following methods.
[0043] As a first example, the processing unit 12 may acquire, as the second state, the state with the lowest value of the evaluation function among the current states of the selected predetermined number of replicas. As a second example, the processing unit 12 may acquire, as the second state, the state with the lowest value of the evaluation function among the states acquired from the start of the solution search to the current time in the selected predetermined number of replicas.
[0044] As a third example, the processing unit 12 may generate the second state by setting, as the value of the state variable at the corresponding index in the second state, the value obtained by taking the majority vote of the values of the state variables corresponding to the same index in the current states of the selected predetermined number of replicas. In this case, the processing unit 12 sets the number of the predetermined number of replicas selected from the plurality of replicas to an odd number.
[0045] Note that in the third example, the processing unit 12 may acquire, for each of the selected predetermined number of replicas, the state with the lowest value of the evaluation function among the states acquired from the start of the solution search to the current time for each replica. Then, the processing unit 12 may generate the second state by setting, as the value of the state variable at the corresponding index in the second state, the value obtained by taking the majority vote of the values of the state variables corresponding to the same index for the states acquired for each of the predetermined number of replicas.
[0046] For example, based on the states acquired by the three selected replicas R(k - 2), R(k - 1), and R(k + 1), the processing unit 12 acquires the state s2 as the second state by any one of the above first to third examples.
[0047] The processing unit 12 determines the number of state variables whose values are to be changed among the plurality of state variables in the first state according to a comparison between the first value of the evaluation function corresponding to the first state and the second value of the evaluation function corresponding to the second state. The processing unit 12 generates a third state in which the values of the determined number of state variables among the plurality of state variables in the first state are changed.
[0048] For example, when the first state is state s1, the first value is H(s1). When the second state is state s2, the second value is H(s2). For example, the processing unit 12 determines whether the first value H(s1) is smaller than the second value H(s2). When the first value H(s1) is smaller than the second value H(s2), the processing unit 12 determines that the number of state variables whose values are to be changed is the first number p. On the other hand, when the first value H(s1) is greater than or equal to the second value H(s2), the processing unit 12 determines that the number of state variables whose values are to be changed is the second number q, which is smaller than the first number p. p is an integer of 2 or more. q is a natural number smaller than p.
[0049] In one example, when the number M of state variables whose values are different between the first state (s1) and the second state (s2) is equal to or greater than half N / 2 of the number N of the plurality of state variables, the processing unit 12 sets the first number p = N / 2, and when M is smaller than N / 2, the processing unit 12 sets the first number p = M. At this time, M is expected to be a number greater than 2. For example, when M≧N / 2, the processing unit 12 randomly selects p = N / 2 of the state variables whose values are different between the first state and the second state, and in the first state, by inverting the values of the selected state variables, a third state is generated. On the other hand, when M<N / 2, all M state variables whose values are different between the first state and the second state are selected, and in the first state, by inverting the values of the selected state variables, a third state is generated.
[0050] In contrast, the processing unit 12 sets the second number q to a fixed value of "2". When q = 2 is adopted, the processing unit 12 randomly selects two of the state variables whose values are different between the first state and the second state, and in the first state, by inverting the values of the selected state variables, a third state is generated.
[0051] Note that the generation example of the above third state is just an example, and other methods may be used. As another example, when H(s1) < H(s2), the processing unit 12 may randomly select p predetermined state variables from the first state (s1) and generate the third state by inverting the values of the p state variables. Also, when H(s1) ≥ H(s2), the processing unit 12 may randomly select q predetermined state variables from the first state (s1) and generate the third state by inverting the values of the q state variables.
[0052] Here, the graph 20 shows the relationship between the state and the value of the evaluation function. The horizontal axis of the graph 20 is the state represented by a plurality of state variables. The vertical axis of the graph 20 is the value of the evaluation function. Although the state is represented multidimensionally by the values of a plurality of state variables, in the graph 20, the horizontal axis is conveniently associated with the state.
[0053] When H(s1) < H(s2), it is estimated that the energy hill around the state s1 is relatively large, and it is highly likely that it is impossible to escape from the state s1 unless moving to a state farther away from the state s1. Therefore, when H(s1) < H(s2), the processing unit 12 changes the values of p state variables larger than q among the plurality of state variables in the state s1 to obtain the third state. Note that the distance between the state s1 and another state can be evaluated, for example, by the number of state variables with different values between the two states, that is, the Hamming distance.
[0054] On the one hand, when H(s1) ≥ H(s2), it is estimated that the energy peak around state s1 is relatively small, and it is highly likely that by simply moving a little from state s1, it is possible to escape from state s1 and reach a better state. Therefore, when H(s1) ≥ H(s2), the processing unit 12 changes the values of q state variables smaller than p among the plurality of state variables in state s1 to obtain a third state. For example, when H(s1) ≥ H(s2), the processing unit 12 can reduce the possibility of missing a better state in the vicinity of state s1 by changing the values of q state variables smaller than p.
[0055] Then, the processing unit 12 continues the solution search in the first replica using the third state. For example, in replica R(k), the processing unit 12 generates a third state by forcibly updating the values of p or q state variables among the plurality of state variables included in the currently estimated local state s1. The processing unit 12 resumes the solution search in replica R(k) from the third state. Note that even when it is detected that the processing unit 12 has fallen into a local solution in replica R(k), the solution search in other replicas can be continuously performed.
[0056] When the processing unit 12 performs the solution search using a plurality of replicas by the replica exchange method for a certain period of time, the processing unit 12 outputs, as the final solution, the state with the lowest value of the evaluation function among the states obtained in the solution search, that is, the state with the lowest energy. The processing unit 12 may preferentially output a predetermined number of states with low evaluation function values among the states obtained in the solution search as the final solution.
[0057] Thus, according to the data processing device 10, a solution search is performed based on an evaluation function including a plurality of state variables, each of which represents the values of the plurality of state variables, and the solution search is performed using a plurality of replicas corresponding to a plurality of temperature values. In the solution search, it is detected that the number of times the first state indicated by the values of the plurality of state variables has appeared within a predetermined time in the first replica has exceeded a predetermined number. Then, a predetermined number of replicas are preferentially selected from the plurality of replicas based on those with a small temperature difference from the first temperature value corresponding to the first replica. Based on the states obtained by the solution search in each of the predetermined number of replicas, a second state to be compared with the first state is obtained. According to the comparison between the first value of the evaluation function corresponding to the first state and the second value of the evaluation function corresponding to the second state, the number of state variables whose values are to be changed among the plurality of state variables in the first state is determined. A third state is generated by changing the values of the corresponding number of state variables among the plurality of state variables in the first state. The solution search in the first replica is continued using the third state.
[0058] Thereby, the data processing device 10 can improve the solution performance. The data processing device 10 can appropriately obtain the second state by preferentially selecting a predetermined number of replicas from the plurality of replicas based on those with a small temperature difference from the first temperature value corresponding to the first replica.
[0059] Here, if the temperature difference between the first replica and other replicas is too large, the divergence of the values of the evaluation functions of the states that can be taken by both replicas is likely to increase. For this reason, when obtaining the second state using a replica with a relatively large temperature difference from the first replica, there is a possibility that the magnitude of the mountain of the evaluation function around the first state cannot be appropriately evaluated by comparing the first value and the second value.
[0060] Therefore, the data processing device 10 preferentially selects a replica with a small temperature difference from the temperature value corresponding to the first replica. As a result, the data processing device 10 can select, as the acquisition source of the second state, another replica that takes a state in which the deviation of the value of the evaluation function is relatively small with respect to the first state in the first replica. As a result, the data processing device 10 can appropriately evaluate the magnitude of the mountain of the evaluation function around the first state by comparing the first value and the second value. For this reason, the data processing device 10 can appropriately determine the number of state variables to be updated in order to escape from the first state, that is, the local solution, in the first replica by comparing the first value and the second value, and generate a third state.
[0061] By continuing to search for a solution for the first replica using the third state thus obtained, the data processing device 10 can efficiently escape from the first state, that is, the local solution, in the first replica. As a result, the data processing device 10 can quickly obtain a better solution as a whole for a plurality of replicas.
[0062] [Second Embodiment] Next, a second embodiment will be described. FIG. 2 is a diagram showing a hardware example of the data processing device according to the second embodiment.
[0063] The data processing device 100 includes a processor 101, a RAM 102, an HDD 103, a GPU 104, an input interface 105, a media reader 106, a communication interface 107, and an accelerator card 108. These units included in the data processing device 100 are connected to each other by a bus inside the data processing device 100.
[0064] Processor 101 is an arithmetic unit that executes program instructions. Processor 101 is, for example, a CPU. Processor 101 loads at least a part of the program and data stored in HDD 103 into RAM 102 and executes the program. Note that Processor 101 may include a plurality of processor cores. Also, data processing device 100 may have a plurality of processors. The processing described below may be executed in parallel using a plurality of processors or processor cores. Also, a collection of a plurality of processors may be referred to as a "multiprocessor" or simply a "processor". A processor may also be called a "processor circuitry".
[0065] RAM 102 is a volatile semiconductor memory that temporarily stores programs executed by Processor 101 and data used by Processor 101 for calculations. Note that data processing device 100 may include types of memory other than RAM, and may include a plurality of memories.
[0066] HDD 103 is a non-volatile storage device that stores software programs such as an OS (Operating System), middleware, and application software, and data. Note that data processing device 100 may include other types of storage devices such as flash memory and SSD (Solid State Drive), and may include a plurality of non-volatile storage devices.
[0067] GPU 104 outputs an image to display 111 connected to data processing device 100 according to instructions from Processor 101. As display 111, any type of display such as a CRT (Cathode Ray Tube) display, a liquid crystal display (LCD: Liquid Crystal Display), a plasma display, or an organic EL (OEL: Organic Electro-Luminescence) display can be used.
[0068] The input interface 105 acquires an input signal from an input device 112 connected to the data processing device 100 and outputs it to the processor 101. As the input device 112, a pointing device such as a mouse, a touch panel, a touch pad, a trackball, a keyboard, a remote controller, a button switch, etc. can be used. Also, a plurality of types of input devices may be connected to the data processing device 100.
[0069] The medium reader 106 is a reading device that reads programs and data recorded on the recording medium 113. As the recording medium 113, for example, a magnetic disk, an optical disk, a magneto-optical disk (MO: Magneto-Optical disk), a semiconductor memory, etc. can be used. The magnetic disk includes a flexible disk (FD: Flexible Disk) and an HDD. The optical disk includes a CD (Compact Disc) and a DVD (Digital Versatile Disc).
[0070] The medium reader 106 copies, for example, programs and data read from the recording medium 113 to other recording media such as the RAM 102 and the HDD 103. The read program is executed, for example, by the processor 101. Note that the recording medium 113 may be a portable recording medium and may be used for distribution of programs and data. Also, the recording medium 113 and the HDD 103 may be referred to as computer-readable recording media.
[0071] The communication interface 107 is connected to the network 114 and communicates with other information processing devices via the network 114. The communication interface 107 may be a wired communication interface connected to a wired communication device such as a switch or a router, or a wireless communication interface connected to a wireless communication device such as a base station or an access point.
[0072] The accelerator card 108 is a hardware accelerator that searches for a solution to a problem represented by the annealing-type energy function of Equation (1) using the MCMC method. The accelerator card 108 can be used as a sampler that samples a state conforming to the Boltzmann distribution at a corresponding temperature by performing the MCMC method at a constant temperature or the replica exchange method that exchanges states of the Ising model between a plurality of temperatures. The accelerator card 108 uses the replica exchange method to solve the combinatorial optimization problem. The replica exchange method is also referred to as the exchange Monte Carlo method or the parallel tempering method.
[0073] The replica exchange method is a technique that independently executes the MCMC method using a plurality of temperature values. An independent computing resource that executes the MCMC method is called a replica. In the replica exchange method, states obtained by a plurality of replicas corresponding to a plurality of temperature values are appropriately exchanged in terms of state or temperature value. In the replica exchange method, a narrow range of the state space is explored by MCMC at a low temperature, and a wide range of the state space is explored by MCMC at a high temperature, so that a good solution can be efficiently found. When using the replica exchange method, the accelerator card 108 performs trials of state transitions in a plurality of replicas in parallel, and every time a certain number of trials are performed, the accelerator card 108 repeats an operation of exchanging a state or a temperature value with a predetermined exchange probability for a pair of replicas whose temperature values are adjacent.
[0074] The accelerator card 108 has a processor 108a and a RAM 108b. The processor 108a realizes a solution search function in the accelerator card 108. The processor 108a is a dedicated processor for solution search such as a GPU, an FPGA, or an ASIC, for example. The RAM 108b holds data used for solution search by the processor 108a and solutions searched by the processor 108a. The data processing device 100 may have a plurality of accelerator cards.
[0075] Here, RAM102 and RAM108b may each be a DRAM (Dynamic RAM), an SRAM (Static RAM), or may include both. The processor 101 or the processor 108a corresponds to the processing unit 12 in the first embodiment. When the processor 101 is taken as an example of the processing unit 12, the processor 108a may be considered as an example of the search unit. The RAM102 or the RAM108b corresponds to the storage unit 11 in the first embodiment. The HDD103 may also correspond to the storage unit 11.
[0076] Hardware that searches for a solution to an Ising-form problem, such as the data processing device 100 or the accelerator card 108, may be called an Ising machine, a Boltzmann machine, or the like.
[0077] FIG. 3 is a diagram showing an example of the relationship between states and energy. The graph 30 shows an example of the relationship between the state represented by a plurality of bits and the energy calculated by the energy function. The horizontal axis of the graph 30 represents the state. The vertical axis of the graph 30 represents the energy. Although the state is represented in multiple dimensions by a plurality of bits, for the sake of convenience, each state is plotted on the horizontal axis. The amount of change in the energy function may be relatively small or relatively large in the vicinity of a certain state.
[0078] In the solution search of the data processing device 100, for example, the Metropolis method is used to determine the transition probability from a certain state to the next state by changing a certain state variable. That is, even for a transition in which the energy increases, it is probabilistically allowed according to the comparison between the amount of change in energy and the thermal noise value. The thermal noise value is obtained based on the temperature value and random numbers. The larger the temperature value, the larger the amplitude of the thermal noise value. The larger the amplitude of the thermal noise value, the easier it is to allow a state transition with a large increase in energy. On the other hand, the smaller the amplitude of the thermal noise value, the more difficult it is to allow a state transition with a large increase in energy.
[0079] In the data processing apparatus 100, if a certain replica falls into a local solution, the state transition in that replica may be delayed and the solution seeking performance may deteriorate. Therefore, when a certain replica falls into a local solution, the data processing apparatus 100 enables efficient escape from the local solution based on the states of other replicas.
[0080] FIG. 4 is a diagram showing a functional example of the data processing apparatus. The data processing apparatus 100 includes replica processing units 120, 120a, …, 120n, an exchange control unit 140, and a reference determination unit 150. The replica processing units 120, 120a, …, 120n and the exchange control unit 140 are realized by the processor 108a. The replica processing units 120, 120a, …, 120n and the exchange control unit 140 may also be realized by the program stored in the RAM 102 being executed by the processor 101.
[0081] The replica processing units 120, 120a, …, 120n are search units that execute MCMC at different temperature values respectively in solving the combinatorial optimization problem. Different temperature values are set for each of the replica processing units 120, 120a, …, 120n. For example, the highest temperature value is set for the replica processing unit 120, lower temperature values are set in order for the replica processing units 120a, …, 120n, and the lowest temperature value is set for the replica processing unit 120n. The replica processing units 120, 120a, …, 120n execute MCMC independently and in parallel with each other. The replica processing unit may simply be referred to as a replica.
[0082] The exchange control unit 140 controls the exchange of states in pairs of replica processing units with adjacent temperature values at a predetermined timing. When the state exchange is performed in a pair of certain replica processing units, the replica processing units resume the solution search starting from the exchanged state, that is, the trial of state transition by MCMC. Note that the exchange control unit 140 may exchange the temperature values instead of the states for pairs of replica processing units with adjacent temperature values.
[0083] For example, the data processing apparatus 100 performs a solution search for a certain period of time using the replica processing units 120, 120a, …, 120n and the switching control unit 140, and outputs the solution (state) with the lowest energy obtained by the solution search as the final solution.
[0084] When a certain replica processing unit falls into a local solution, the reference determination unit 150 determines the state sr of a reference to be compared with the state of the replica processing unit. The state sr of the reference is used for a process of determining the number of bits to be forcibly inverted in order to escape from the local solution in the corresponding replica processing unit.
[0085] Specifically, when a certain replica processing unit falls into a local solution, the reference determination unit 150 selects a predetermined number of replica processing units with a small difference in temperature value from the replica processing unit. At this time, the reference determination unit 150 may exclude the replica processing unit that has fallen into the local solution from the selection candidates. Also, there may be a case where two replicas with the same difference in temperature value from the replica processing unit that has fallen into the local solution are included in the selection candidates. In that case, the reference determination unit 150 can select a replica processing unit according to a predetermined selection criterion of giving priority to the one with the smaller index or the one with the larger index.
[0086] The reference determination unit 150 determines the state sr of the reference based on the states of the selected predetermined number of replica processing units. For example, the reference determination unit 150 sets the state with the lowest energy among the current states of each of the selected predetermined number of replica processing units as the state sr of the reference.
[0087] Alternatively, the reference determination unit 150 may set the state with the lowest energy among the states with the lowest energy obtained so far in each of the selected predetermined number of replica processing units as the state sr of the reference.
[0088] Alternatively, the reference determination unit 150 may use, as the reference state sr, the state in which a majority vote is taken on the values of the corresponding bits in the current states of each of the selected predetermined number of replica processing units.
[0089] Then, the reference determination unit 150 supplies the corresponding replica processing unit that has fallen into a local solution with the reference state sr and the energy Hr = H(sr) corresponding to sr. H(sr) is calculated based on Equation (1).
[0090] FIG. 5 is a diagram showing a functional example of the replica processing unit. The replica processing unit 120 includes an s holding unit 121, an s storage unit 122, an H holding unit 123, an H storage unit 124, an s i flip processing unit 125, a Δs i calculation unit 126, a ΔH i calculation unit 127, an acceptance / rejection determination unit 128, an addition unit 129, a consecutive rejection counting unit 130, and an s' determination unit 131.
[0091] The s storage unit 122 and the H storage unit 124 use the storage area of the RAM 108b. The s holding unit 121, the H holding unit 123, the s i flip processing unit 125, a Δs i calculation unit 126, a ΔH i calculation unit 127, an acceptance / rejection determination unit 128, an addition unit 129, a consecutive rejection counting unit 130, and an s' determination unit 131 are realized by the processor 108a.
[0092] The s holding unit 121 acquires the initial value of the state s input by the user and stores it in the s storage unit 122. When the s holding unit 121 receives a determination result from the acceptance / rejection determination unit 128 that the flip of the target bit is adopted, the s holding unit 121 updates the state s by flipping the target bit stored in the s storage unit 122. Here, in the example of FIG. 5, the state s indicates the state of the replica processing unit 120. The states of each replica processing unit are distinguished by the replica number m as s(m), but here the state of the replica processing unit 120 is simply denoted as s. Also, the s holding unit 121 is the s i flip processing unit 125, a Δs iSupply the current state s stored in the s storage unit 122 to the calculation unit 126 and the s' determination unit 131.
[0093] The s storage unit 122 stores the state s. The H holding unit 123 acquires the initial value of the energy H corresponding to the state s input by the user and stores it in the H storage unit 124. When the H holding unit 123 receives a determination result from the adoption / rejection determination unit 128 indicating that the flip of the target bit is adopted, the H holding unit 123 obtains the calculation result of H+ΔH by the addition unit 129, and updates the energy H stored in the H storage unit 124 to H = H+ΔH. Further, the H holding unit 123 supplies the current energy H stored in the H storage unit 124 to the addition unit 129 and the s' determination unit 131. i The calculation result of i is obtained, and the energy H stored in the H storage unit 124 is updated to H = H+ΔH. Further, the H holding unit 123 supplies the current energy H stored in the H storage unit 124 to the addition unit 129 and the s' determination unit 131.
[0094] The H storage unit 124 stores the energy H corresponding to the state s. Note that the energy H is a value calculated based on Equation (1). s i The flip processing unit 125 obtains a candidate state s' obtained by flipping the i-th bit s in the state s, and supplies the candidate state s' to the Δs i calculation unit 126. Here, the candidate state s' is a state of a transition destination candidate with respect to the state s. i may be selected in index order or randomly. i The calculation unit 126 supplies the difference Δs
[0095] Δs i between the state s and the candidate state s' to the calculation unit 126. When a plurality of bits are flip candidates, the calculation unit 126 may calculate Δs i for each index i of the flip candidates. i The calculation unit 126 supplies the difference Δs i between the state s and the candidate state s' to the calculation unit 126. When a plurality of bits are flip candidates, the calculation unit 126 may calculate Δs i for each index i of the flip candidates.
[0096] ΔH i The calculation unit 127 calculates ΔH i based on Equation (2) and supplies it to the adoption / rejection determination unit 128 and the addition unit 129. When a plurality of bits are flip candidates, ΔH iBased on equations (2) and (3), the calculation unit 127 calculates ΔH for each index i i and calculates ΔH i when the plurality of bits are flipped, and supplies the results to the acceptance / rejection determination unit 128 and the addition unit 129.
[0097] The acceptance / rejection determination unit 128 performs acceptance / rejection determination of state transition by the Metropolis method based on ΔH i . As described above, in the Metropolis method, the probability A i of accepting a change in the value of the state variable with an energy change ΔH i is represented by A i =min[1,exp(-β·ΔH i )]. The acceptance / rejection determination unit 128 supplies the acceptance / rejection determination result to the s holding unit 121, the H holding unit 123, and the consecutive rejection counting unit 130.
[0098] Note that when a plurality of bits are candidates for flipping, the acceptance / rejection determination unit 128 performs acceptance / rejection determination of state transition by the Metropolis method based on ΔH when the plurality of bits are flipped. However, when a plurality of bits are candidates for flipping, the acceptance / rejection determination unit 128 may determine to adopt the state transition by flipping the plurality of bits regardless of the acceptance / rejection determination.
[0099] The addition unit 129 adds ΔH i calculated by the calculation unit 127 and H supplied from the H holding unit 123 to obtain the updated energy H’ = H + ΔH i , and supplies H’ to the H holding unit 123. Note that when flipping a plurality of bits, the addition unit 129 obtains the updated energy H’ by adding ΔH when the plurality of bits are flipped to H. i The consecutive rejection counting unit 130 counts the number of times the state transition has been consecutively rejected, that is, the consecutive rejection count θnum, based on the acceptance / rejection determination result of the state transition by the acceptance / rejection determination unit 128.
[0100] The consecutive rejection counting unit 130 counts the number of times the state transition has been consecutively rejected, that is, the consecutive rejection count θnum, based on the acceptance / rejection determination result of the state transition by the acceptance / rejection determination unit 128.
[0101] When the number of consecutive rejections θnum reaches the threshold θstep, the s' determination unit 131 obtains the reference state sr and the energy Hr corresponding to sr from the reference determination unit 150, and determines the number of bits to be flipped next by comparing sr with the current state s. The s' determination unit 131 generates a candidate state s' by inverting the values of the determined number of bits among the plurality of bits in the current state s.
[0102] Specifically, the s' determination unit 131 compares the energy H(s) of the current state s with the reference energy Hr. When H(s) < Hr, the s' determination unit 131 randomly selects x bits from among the bits in the current state s whose values are different from those of sr. x is an integer of 3 or more. On the other hand, when H(s) ≥ Hr, the s' determination unit 131 randomly selects y bits from among the bits in which the values of s and sr are different. y is an integer of 2 or more and less than x. The s' determination unit 131 generates s' by applying the value of the corresponding bit in sr to the selected number (x bits or y bits) of bits.
[0103] In one example, when the total number of bits representing the state is N and the number of bits in the current state s whose values are different from those of sr is M, the s' determination unit 131 sets x = N / 2 when M ≥ N / 2, and sets x = M when M < N / 2. Also, the s' determination unit 131 sets y = 2.
[0104] Here, when the number of consecutive rejections θnum reaches the threshold θstep, the current state s is presumed to be a local solution. Therefore, the s' determination unit 131 can identify that the solution search of the corresponding replica processing unit has fallen into a local solution by detecting that the number of consecutive rejections θnum has reached the threshold θstep.
[0105] Next, the processing procedure of the data processing apparatus 100 will be described. FIG. 6 is a flowchart showing an example of solution search by the replica processing unit. Hereinafter, the processing of the replica processing unit 120 will be exemplified. The replica processing units 120a, …, 120n also execute the same procedures as the replica processing unit 120.
[0106] (S10) The s holding unit 121 sets the initial value of the state s. For example, the s holding unit 121 acquires the initial value of the state s input by the user and stores it in the s storage unit 122. The H holding unit 123 sets the initial value of the energy H. The initial value of the energy H is the value of Expression (1) corresponding to the initial value of the state s. For example, the H holding unit 123 acquires the initial value of the energy H input by the user and stores it in the H storage unit 124. Note that a temperature value corresponding to the replica processing unit 120 is also set in the acceptance / rejection determination unit 128.
[0107] (S11)s i The flip processing unit 125 acquires the current state s from the s holding unit 121, and sets a candidate state s’ in which the i-th bit of the state s is randomly flipped as Δs i and supplies it to the calculation unit 126. Δs i The calculation unit 126 calculates Δs i which is the difference between the state s and the candidate state s’, and supplies it to the ΔH i calculation unit 127.
[0108] (S12) ΔH i The calculation unit 127 calculates ΔH i of Expression (2) using Δs i . (S13) The acceptance / rejection determination unit 128 makes a transition determination to the candidate state s’ based on ΔH i . For the transition determination, for example, the Metropolis method is used. When the transition to the candidate state s’ is adopted, the process proceeds to step S20. When the transition to the candidate state s’ is not adopted, that is, when it is rejected, the process proceeds to step S14.
[0109] (S14) The continuous rejection counter 130 counts the number of continuous rejections θnum, which is the number of times continuously rejected in step S13. When step S14 is executed, the candidate state s’ created in step S11 is discarded.
[0110] (S15) The s’ determination unit 131 determines whether θnum > θstep. If θnum > θstep, the process proceeds to step S16. If θnum ≤ θstep, the process proceeds to step S11.
[0111] (S16) The s’ determination unit 131 acquires the reference state sr and the energy Hr from the reference determination unit 150. (S17) The s’ determination unit 131 determines whether the energy H of the current state of the replica processing unit 120 is less than the reference energy Hr, that is, whether H < Hr. If H < Hr, the process proceeds to step S18. If H ≥ Hr, the process proceeds to step S19.
[0112] (S18) The s’ determination unit 131 generates the candidate state s’ by flipping x bits. x is an integer greater than 2. At this time, the s’ determination unit 131 identifies, for example, the bits in the current state s that have different values from the reference state sr, randomly selects x bits from them, and inverts the values. Then, the process proceeds to step S20.
[0113] (S19) The s’ determination unit 131 generates the candidate state s’ by flipping 2 bits. At this time, the s’ determination unit 131 identifies, for example, the bits in the current state s that have different values from the reference state sr, randomly selects 2 bits from them, and inverts the values.
[0114] When step S18 or step S19 is executed, Δs i via the calculation unit 126, the Δs corresponding to the candidate state s’ created by the s’ determination unit 131 i for each index i is ΔH iIt is supplied to the calculation unit 127. ΔH i The calculation unit 127 can calculate the energy difference ΔH between the state s and the candidate state s' based on each Δs i
[0115] (S20) If the result of the acceptance / rejection determination by the acceptance / rejection determination unit 128 is acceptance, the s holding unit 121 updates the current state s to the candidate state s'. That is, the s holding unit 121 stores the candidate state s' as the new state s in the s storage unit 122. Also, if the result of the acceptance / rejection determination is acceptance, the H holding unit 123 updates the current energy H to the energy H' corresponding to s'. That is, the H holding unit 123 stores the energy H' as the new energy H in the H storage unit 124.
[0116] Note that even when step S18 or step S19 is performed, the acceptance / rejection determination unit 128 can perform acceptance / rejection determination based on the metropolis method or the like using ΔH. At this time, if the candidate state s' is rejected by the acceptance / rejection determination unit 128, step S18 or step S19 may be repeatedly executed until the candidate state s' is accepted. Alternatively, when step S18 or step S19 is performed, the acceptance / rejection determination unit 128 may determine to accept the candidate state s' regardless of the acceptance / rejection determination.
[0117] (S21)s i The flip processing unit 125 determines whether or not the end condition is satisfied. If the end condition is satisfied, the processing of the replica processing unit 120 ends. If the end condition is not satisfied, the processing proceeds to step S11. The end condition is, for example, that a certain number of flip trials have been performed by the replica processing unit 120, or that a certain time has elapsed since the start of the first trial.
[0118] Note that in step S19, more generally, the s' determination unit 131 flips y (x > y ≧ 2) bits. A method different from the methods exemplified in steps S18 and S19 may be used to select the x or y bits to be flipped.
[0119] For example, in step S18, the s' determination unit 131 may identify bits in the current state s that have different values from the reference state sr, and select x bits that are as far apart from each other as possible from among them. The greater the difference in the indices between one bit and another bit, the farther apart the two bits are. Further, the s' determination unit 131 may identify bits in the current state s that have different values from the reference state sr, and arbitrarily select x non-adjacent bits from among them.
[0120] FIG. 7 is a flowchart showing an example of exchange control. The exchange control unit 140 executes the following processing at a predetermined timing among the repeated procedures of FIG. 6 by each replica processing unit. The following processing is executed, for example, for each pair of replica processing units whose temperature values are adjacent in the order of replica numbers for identifying each replica processing unit. For example, pairs of replica processing units to be subject to exchange control, such as the pair of replica numbers (1, 2), the pair of replica numbers (2, 3),... are selected in order.
[0121] (S30) The exchange control unit 140 acquires information on two replica processing units that are exchange candidates. Let one of the two replica processing units be replica R1 and the other be replica R2. In this case, the information on replica R1 includes information J1 associated with the state of replica R1, such as the state of replica R1, energy H1, temperature value T1, and local solution. Further, the information on replica R2 includes information J2 associated with the state of replica R2, such as the state of replica R2, energy H2, temperature value T2, and local solution.
[0122] (S31) The exchange control unit 140 determines whether or not the determination formula rand < exp((1 / T1 - 1 / T2)*(H1 - H2)) is satisfied. rand is a random number value in the interval [0, 1]. When the determination formula is satisfied, the process proceeds to step S32. When the determination formula is not satisfied, the exchange control for the corresponding two replica processing units ends.
[0123] (S32) The exchange control unit 140 exchanges information other than the temperature value among the information obtained in step S30 for the two corresponding replica processing units. As a result, the information on the state s and the energy H held by the two corresponding replica processing units is exchanged. Then, the exchange control for the two corresponding replica processing units ends.
[0124] In this way, the exchange control unit 140 controls so that the exchange is performed probabilistically by performing an exchange determination using a determination formula with the random value rand. Here, when the data processing device 100 finishes the solution search using each replica processing unit, it outputs the best solution obtained in the solution search, that is, the solution with the minimum energy, as the final solution. The data processing device 100 may output a plurality of solutions, giving priority to those with lower energy.
[0125] Next, an example of the determination of the reference state by the reference determination unit 150 will be described. FIG. 8 is a flowchart showing a first determination example of the reference. The following steps S40 and S41 are executed by the reference determination unit 150 corresponding to the aforementioned step S16. Hereinafter, the case where the replica processing unit 120 falls into a local solution will be exemplified, but the reference determination unit 150 can perform the same processing on the replica processing unit when other replica processing units fall into a local solution.
[0126] (S40) The reference determination unit 150 receives a reference acquisition request from the replica processing unit 120. For example, when it is determined by the s' determination unit 131 that the replica processing unit has fallen into a local solution, the reference acquisition request is transmitted from the s' determination unit 131 to the reference determination unit 150. The reference determination unit 150 selects a1 replica processing units with a small difference in temperature value from the corresponding replica processing unit 120, and refers to the states and the energy H of the selected a1 replica processing units. At this time, the reference determination unit 150 excludes the corresponding replica processing unit 120 from the selection candidates. Also, a1 is an integer of 2 or more and is predetermined.
[0127] (S41) The reference determination unit 150 compares the energies of each of the a1 replica processing units, selects one state with the minimum energy from among the states of the a1 replica processing units, and sets it as the reference state sr. The reference determination unit 150 calculates the energy Hr corresponding to the reference state sr based on Equation (1). The reference determination unit 150 supplies the reference state sr and the energy Hr to the s' determination unit 131.
[0128] (S42) The s' determination unit 131 selects and flips x bits or 2 bits among the bits different from the reference in the current state s according to the comparison between the energy H of the current state s and the energy Hr, and sets it as the next candidate state s'. Then, in the replica processing unit 120, the process proceeds to step S20.
[0129] Figure 9 is a flowchart showing a second determination example of the reference. The following steps S40a and S41a are executed by the reference determination unit 150 corresponding to the aforementioned step S16. Hereinafter, the case where the replica processing unit 120 falls into a local solution will be exemplified, but the reference determination unit 150 can also perform the same processing on the replica processing unit when other replica processing units fall into a local solution.
[0130] (S40a) The reference determination unit 150 receives a reference acquisition request from the replica processing unit 120. The reference determination unit 150 selects a1 replica processing units with a small difference in temperature value from the corresponding replica processing unit 120, and refers to the local solutions and the energy H obtained by the selected a1 replica processing units. Here, the "local solution obtained by the a1 replica processing units" is the state with the lowest energy obtained by the corresponding replica processing unit among the states obtained from the start of solution search to the current time in each of the a1 replica processing units. Also, the reference determination unit 150 excludes the corresponding replica processing unit 120 from the selection candidates.
[0131] (S41a) The reference determination unit 150 compares the energies of the local solutions of each of the a1 replica processing units, selects one local solution with the minimum energy as the reference state sr, and calculates the energy Hr corresponding to the reference state sr based on Equation (1). The reference determination unit 150 supplies the reference state sr and the energy Hr to the s’ determination unit 131.
[0132] (S42a) The s’ determination unit 131 selects and flips x bits or 2 bits out of the bits different from the reference in the current state s according to the comparison between the energy H of the current state s and the energy Hr, and sets the next candidate state as s’. Then, the replica processing unit 120 proceeds to step S20.
[0133] Figure 10 is a flowchart showing a third determination example of the reference. The following steps S40b and S41b are executed by the reference determination unit 150 corresponding to the aforementioned step S16. Hereinafter, the case where the replica processing unit 120 falls into a local solution is exemplified, but the reference determination unit 150 can perform the same processing on other replica processing units that fall into a local solution.
[0134] (S40b) The reference determination unit 150 receives a reference acquisition request from the replica processing unit 120, selects a2 replica processing units with a small difference in temperature value from the corresponding replica processing unit 120, and refers to the states and energies H of the selected a2 replica processing units. At this time, the reference determination unit 150 excludes the corresponding replica processing unit 120 from the selection candidates. Also, a2 is an odd number of 3 or more and is predetermined.
[0135] (S41b) The reference determination unit 150 generates a state obtained by taking a majority vote on the bits of the states of each of the a2 replica processing units, calculates the energy of that state according to Equation (1), and uses it as a reference. In the method of taking a majority vote on the bits, in the a2 states, for each index, the number of "0" and "1" bits is counted, and the larger number is adopted as the value of the bit at that index. The reference determination unit 150 determines the value of each bit by this majority vote, sets the combination of the determined bit values as the reference state sr, and calculates the energy Hr corresponding to the state sr based on Equation (1). The reference determination unit 150 supplies the reference state sr and the energy Hr to the s' determination unit 131.
[0136] (S42b) The s' determination unit 131, according to the comparison between the energy H of the current state s and the energy Hr, selects and flips x bits or 2 bits among the bits different from the reference in the current state s to obtain the next candidate state s'. Then, the replica processing unit 120 proceeds to step S20 for processing.
[0137] FIG. 11 is a diagram showing an example of generating a reference state by majority vote. States s(1), s(2), s(3), s(4), s(5) are the states of five replica processing units selected by the reference determination unit 150 when a certain replica processing unit falls into a local solution. Assume that the number of bits of the state is 10 as an example.
[0138] Table 200 shows an example of the values of each bit in states s(1) to s(5) and the result of taking a majority vote on the bits of the same index. The numbers following "bit" in the figure represent the indexes of the bits. For example, "bit 1" is the bit with index "1". Assume that the maximum index in the bit string representing the state is 1, and the index increases by 1 for each smaller digit, and the minimum index is "10".
[0139] For example, state s(1) is "0011100011". State s(2) is "0000111010". State s(3) is "0110100010". State s(4) is "1001010000". State s(5) is "0100000010".
[0140] In this case, the result of taking a majority vote on the bits with the same index is "0000100010". The reference determination unit 150 sets the state obtained by taking such a majority vote as the reference state sr, and obtains the energy Hr = H(sr) corresponding to sr.
[0141] FIG. 12 is a diagram showing an example of generating candidate states for the transition destination. Table 300 shows an example of generating a candidate state s' for the transition destination by the s' determination unit 131 for the reference state sr and the current state s corresponding to the local solution of the replica processing unit 120. Assume that the number of bits of the state is 10 as an example.
[0142] For example, the reference state sr is "1001011101". Also, the current state s is "1000010010". In this case, the bits with different values between sr and s are the five bits at indexes "4", "7", "8", "9", and "10". These bits at the indexes are the selection candidates for the bits to be inverted. In Table 300, the bits of the selection candidates are marked with circles, and the bits other than the selection candidates are marked with Xs.
[0143] The s' determination unit 131 generates a candidate state s' by inverting the bits of the selection candidates in the state s. For example, when H(s) ≥ Hr = H(sr), the s' determination unit 131 randomly selects and inverts two bits out of the bits of the selection candidates. The example of Table 300 illustrates the case where the s' determination unit 131 selects and inverts two bits of index "4" and index "8". In Table 300, check marks are attached to the bits to be inverted, and hyphens (-) are attached to the other bits. In this case, although not shown, the candidate state s' becomes "1001010110".
[0144] On the other hand, when H(s) < Hr = H(sr), the s' determination unit 131 randomly selects and inverts half of the total number of bits, that is, N / 2 = 10 / 2 = 5 bits, from the bits of the selection candidates. However, when the number M of the bits of the selection candidates is less than half of the total number of bits N / 2, the s' determination unit 131 selects and inverts all of the M bits of the selection candidates. Note that M is expected to be greater than 2.
[0145] The example of Table 300 illustrates the case where the s' determination unit 131 selects and inverts five bits of index "4", "7", "8", "9", and "10". In this case, although not shown, the candidate state s' becomes "1001011101".
[0146] Other methods can also be considered for the method of determining s' by the s' determination unit 131. For example, the s' determination unit 131 compares each bit of the current state s and the reference state sr, randomly selects half of the total number of bits with different values, and in the s, by inverting the values of the selected bits, the next transition destination candidate state s' may be generated.
[0147] According to the data processing apparatus 100 of the second embodiment, the solution performance can be improved. The data processing apparatus 100 preferentially selects a predetermined number of replica processing units from a plurality of replica processing units with a small temperature value difference from the temperature value corresponding to the replica processing unit that has fallen into a local solution, so that the reference state can be appropriately obtained.
[0148] Here, if the temperature difference between the replica processing unit that has fallen into a local solution and other replica processing units is too large, the divergence of the energy of the states that can be taken by both replica processing units is likely to increase. Therefore, if a reference state sr is obtained using a replica processing unit with a relatively large temperature difference from the replica processing unit that has fallen into the local solution (state s), it may not be possible to appropriately evaluate the magnitude of the energy peak around state s by comparing H(s) and H(sr).
[0149] Therefore, the data processing device 100 preferentially selects a replica processing unit with a small temperature difference from the replica processing unit that has fallen into a local solution. As a result, the data processing device 100 can select, as the source for obtaining the reference state sr, another replica processing unit that takes a state with a relatively small energy divergence with respect to state s in the replica processing unit that has fallen into the local solution. Consequently, the data processing device 100 can appropriately evaluate the magnitude of the energy peak around state s by comparing H(s) and H(sr). For this reason, the data processing device 100 can appropriately determine the number of state variables to be updated, i.e., state s, in the replica processing unit that has fallen into the local solution by comparing H(s) and H(sr), and generate candidate states s' for the transition destination.
[0150] For example, when H(s) < H(sr), that is, when it is estimated that the energy peak around the local solution is large, the data processing device 100 can reduce the possibility of falling back into the same local solution in the replica processing unit by inverting the values of a relatively large number of state variables. When H(s) ≥ H(sr), that is, when it is estimated that the energy peak around the local solution is small, the data processing device 100 can reduce the possibility of missing a better solution near the local solution in the replica processing unit by inverting the values of a relatively small number of state variables.
[0151] By transitioning the corresponding replica processing unit to the candidate state s' thus generated and continuing the solution search, in the replica processing unit, the state s, that is, the escape from the local solution can be efficiently performed. As a result, the data processing apparatus 10 can increase the possibility of reaching a better solution as a whole of a plurality of replicas. In addition, the data processing apparatus 10 can obtain a good solution in a relatively short time and can speed up the solution search.
[0152] As described above, the data processing apparatus 100 executes, for example, the following processing. Hereinafter, the replica processing unit is simply referred to as a replica. The processor 101 detects that the number of times the first state indicated by the values of the plurality of state variables has appeared in the first replica within a predetermined time in the solution search performed using the plurality of replicas based on the evaluation function including the plurality of state variables. Here, each of the plurality of replicas indicates the values of the plurality of state variables and corresponds to a plurality of temperature values. Then, the processor 101 preferentially selects a predetermined number of replicas from the plurality of replicas with a small temperature value difference from the first temperature value corresponding to the first replica. At this time, the processor 101 can exclude the first replica from the selection candidates. The processor 101 obtains a second state to be compared with the first state based on the state obtained by the solution search in each of the selected predetermined number of replicas. The processor 101 determines the number of state variables whose values are to be changed among the plurality of state variables in the first state according to the comparison between the first value of the evaluation function corresponding to the first state and the second value of the evaluation function corresponding to the second state. The processor 101 generates a third state in which the values of the determined number of state variables among the plurality of state variables in the first state are changed. The processor 101 continues the solution search in the first replica using the third state.
[0153] As a result, the data processing device 100 can improve the solving performance. The data processing device 100 preferentially selects a predetermined number of replicas from a plurality of replicas based on those with a small difference in temperature value from the temperature value corresponding to the replicas that have fallen into local solutions, thereby appropriately obtaining a second state to be used as a reference.
[0154] Note that the solution search by the replica exchange method using a plurality of replicas is executed by, for example, the processor 108a. However, the processor 101 may perform the solution search by the replica exchange method. The energy function of the second embodiment is also called an evaluation function. Energy corresponds to the value of the evaluation function. The state in a replica is represented by a plurality of bits, that is, the values of a plurality of state variables. The current state of each replica can be held in the RAM 102 or the RAM 108b. Also, in each replica, the state with the lowest energy obtained up to the present time can be held in the RAM 102 or the RAM 108b.
[0155] Further, as described above, the processor 101 may detect for each replica that the number of times the first state has appeared within a predetermined time exceeds a predetermined number by comparing the continuous rejection count θnum with the predetermined number θstep. Alternatively, when the Rejection free method is used, when falling into a local solution, the behavior of always selecting only the same state or immediately returning to the same state even when transitioning to another state is repeated. Therefore, when the Rejection free method is used, the processor 101 may count for each replica the number of times the first state has been reached after each trial within a predetermined time after reaching the first state, and detect that the number has exceeded a predetermined number for a certain replica.
[0156] For example, in obtaining the second state, the processor 101 may obtain, as the second state, the state with the minimum value of the evaluation function among the current states of each of the selected predetermined number of replicas. Thereby, the data processing device 100 can increase the possibility of obtaining, as a reference, a second state whose evaluation function value is relatively close to the first state, and can appropriately obtain the second state.
[0157] Also, in obtaining the second state, the processor 101 may obtain, as the second state, the state with the minimum value of the evaluation function among the states obtained so far in the solution search for each of the selected predetermined number of replicas. Thereby, the data processing apparatus 100 can increase the possibility of obtaining, as a reference, a second state whose evaluation function value is relatively close to the first state, and can appropriately obtain the second state.
[0158] Alternatively, in obtaining the second state, the processor 101 may determine the value of the state variable corresponding to the index included in the second state by majority voting of the values of the state variables corresponding to the same index included in the current state of each of the predetermined number of replicas. Thereby, the data processing apparatus 100 can increase the possibility of obtaining, as a reference, a second state whose evaluation function value is relatively close to the first state, and can appropriately obtain the second state.
[0159] Also, in determining the number of state variables whose values are to be changed, if the first value is smaller than the second value, the processor 101 may use the number as the first number. If the first value is greater than or equal to the second value, the processor 101 may use the number as a second number smaller than the first number. Thereby, the data processing apparatus 100 can efficiently escape from the first state, that is, the local solution, in the first replica.
[0160] In determining the number of state variables whose values are to be changed, the processor 101 may obtain a third number of state variables whose values are different from those of the second state in the first state. If the first value is greater than or equal to the second value, the processor 101 may determine the number of state variables whose values are to be changed based on the third number. If the first value is smaller than the second value, the processor 101 may use a predetermined value as the number of state variables whose values are to be changed. Thereby, the data processing apparatus 100 can efficiently escape from the first state, that is, the local solution, in the first replica.
[0161] When determining the number of state variables whose values are to be changed based on the third number, the processor 101 may set the number of state variables whose values are to be changed to half the number of the plurality of state variables handled in one replica when the third number is greater than or equal to half the number of the plurality of state variables handled in one replica. When the third number is less than half the number of the plurality of state variables handled in one replica, the processor 101 may set the number of state variables whose values are to be changed to the third number. Thereby, the data processing apparatus 100 can efficiently determine the number of state variables whose values are to be changed from the first state.
[0162] When generating the third state, the processor 101 may select, from among the state variables whose values are different from those of the second state in the first state, a determined number of state variables, and change the values of the selected state variables among the plurality of state variables in the first state, thereby generating the third state. Thereby, the data processing apparatus 100 can efficiently generate the third state.
[0163] When selecting the determined number of state variables, the processor 101 may select the number of state variables from among the plurality of state variables in the first state randomly or based on the indexes of the state variables. Thereby, the data processing apparatus 100 can efficiently generate the third state. As a method of selection based on indexes, for example, a method of selecting state variables so that the difference in indexes is as large as possible, or a method of selecting state variables at intervals so that the difference in the indexes is equal to or greater than a certain value can be considered.
[0164] The above processing of the processor 101 may be executed by the processor 108a. That is, the s' determination unit 131 and the reference determination unit 150 corresponding to the above processing may be realized by the processor 101 or may be realized by the processor 108a.
[0165] Note that the information processing in the first embodiment may be realized by causing the processing unit 12 to execute a program. Also, the information processing in the second embodiment may be realized by causing the processor 101 to execute a program. The program can be recorded on a computer-readable recording medium 113.
[0166] For example, the program can be distributed by distributing the recording medium 113 on which the program is recorded. Also, the program may be stored in another computer and distributed via a network. The computer may, for example, store (install) the program recorded on the recording medium 113 or the program received from another computer in a storage device such as the RAM 102 or the HDD 103, and read and execute the program from the storage device.
Explanation of Reference Numerals
[0167] 10 Data processing device 11 Storage unit 12 Processing unit 20 Graph R(1)~R(m) Replica
Claims
1. On the computer, a solution search based on an evaluation function including a plurality of state variables, each of the plurality of replicas indicating values of the plurality of state variables and corresponding to a plurality of temperature values, wherein when a number of times that a first state indicated by the values of the plurality of state variables appears in a first replica among the plurality of replicas within a predetermined time period exceeds a predetermined number of times, a predetermined number of replicas are selected from the plurality of replicas, giving priority to replicas having a smaller difference in temperature value from a first temperature value corresponding to the first replica; obtaining a second state to be compared with the first state based on the state obtained by the solution search in each of the predetermined number of replicas; determining a number of state variables whose values are to be changed among the plurality of state variables in the first state in response to a comparison between a first value of the evaluation function corresponding to the first state and a second value of the evaluation function corresponding to the second state; generating a third state by changing values of the number of state variables among the plurality of state variables in the first state; continuing the solution search in the first replica using the third state; A program that executes a process.
2. In acquiring the second state, the state in which the value of the evaluation function is smallest among the current states in each of the predetermined number of replicas is acquired as the second state. The program according to claim 1, which causes the computer to execute a process.
3. In acquiring the second state, the state in which the value of the evaluation function is smallest among the states obtained by the solution search in each of the predetermined number of replicas is acquired as the second state. The program according to claim 1, which causes the computer to execute a process.
4. In obtaining the second state, a value of the state variable corresponding to the index included in the second state is determined by a majority vote of values of the state variable corresponding to the same index included in the current state in each of the predetermined number of replicas. The program according to claim 1, which causes the computer to execute a process.
5. In determining the number, if the first value is less than the second value, then the number is a first number; if the first value is greater than or equal to the second value, set the number to a second number less than the first number; The program according to claim 1, which causes the computer to execute a process.
6. In determining the number, obtaining a third number of the state variables that have different values in the first state than in the second state; if the first value is greater than or equal to the second value, determining the number based on the third number; if the first value is less than the second value, setting the number to a predetermined value; The program according to claim 1, which causes the computer to execute a process.
7. In determining the number based on the third number, if the third number is equal to or greater than half the number of the plurality of state variables, then setting the number to half the number of the plurality of state variables; if the third number is less than half the number of the plurality of state variables, the number is set to the third number; 7. The program according to claim 6, which causes the computer to execute a process.
8. In generating the third state, the determined number of state variables having values different from those in the second state are selected, and values of the selected number of state variables are changed among the plurality of state variables in the first state. The program according to claim 1, which causes the computer to execute a process.
9. selecting the number of state variables from the plurality of state variables in the first state randomly or based on an index of the state variable; The program according to claim 8, which causes the computer to execute a process.
10. The computer a solution search based on an evaluation function including a plurality of state variables, each of the plurality of replicas indicating values of the plurality of state variables and corresponding to a plurality of temperature values, wherein when a number of times that a first state indicated by the values of the plurality of state variables appears in a first replica among the plurality of replicas within a predetermined time period exceeds a predetermined number of times, a predetermined number of replicas are selected from the plurality of replicas, giving priority to replicas having a smaller difference in temperature value from a first temperature value corresponding to the first replica; obtaining a second state to be compared with the first state based on the state obtained by the solution search in each of the predetermined number of replicas; determining a number of state variables whose values are to be changed among the plurality of state variables in the first state in response to a comparison between a first value of the evaluation function corresponding to the first state and a second value of the evaluation function corresponding to the second state; generating a third state by changing values of the number of state variables among the plurality of state variables in the first state; continuing the solution search in the first replica using the third state; Data processing methods.
11. a storage unit that stores a state indicated by the values of a plurality of state variables acquired during a solution search for each of the plurality of replicas used in a solution search based on an evaluation function including the plurality of state variables, the state indicating the values of the plurality of state variables corresponding to a plurality of temperature values, the state being indicated by the values of the plurality of state variables acquired during the solution search; a processing unit that, when a number of times a first state has appeared in a first replica among the plurality of replicas within a predetermined time exceeds a predetermined number of times in the solution search, selects a predetermined number of replicas from the plurality of replicas, giving priority to replicas having a smaller difference in temperature value from a first temperature value corresponding to the first replica, obtains a second state to be compared with the first state based on the state of each of the predetermined number of replicas stored in the storage unit, determines a number of state variables in the first state whose values are to be changed in accordance with a comparison between a first value of the evaluation function corresponding to the first state and a second value of the evaluation function corresponding to the second state, generates a third state in which values of the number of state variables in the first state have been changed, and continues the solution search in the first replica using the third state; A data processing device having:
Citation Information
Patent Citations
Optimization device, optimization method, and optimization program
JP2022052222A
Program, data processing device, and data processing method
JP2023056471A
Infeasible schedules in a quantum annealing optimization process
US20170083873A1
Sampling from an analog processor
US20170116159A1