CN115329978A - Program and information processing apparatus - Google Patents

Program and information processing apparatus Download PDF

Info

Publication number
CN115329978A
CN115329978A CN202210143157.4A CN202210143157A CN115329978A CN 115329978 A CN115329978 A CN 115329978A CN 202210143157 A CN202210143157 A CN 202210143157A CN 115329978 A CN115329978 A CN 115329978A
Authority
CN
China
Prior art keywords
change
value
state
state variable
search
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210143157.4A
Other languages
Chinese (zh)
Inventor
土手晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Publication of CN115329978A publication Critical patent/CN115329978A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/17Function evaluation by approximation methods, e.g. inter- or extrapolation, smoothing, least mean square method
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Stored Programmes (AREA)
  • Power Sources (AREA)

Abstract

The invention relates to a program and an information processing apparatus. A program in which a computer executes the following processing: a search process is performed that repeatedly performs selection, determination, and state change according to a predetermined order to search for a solution to a problem represented by an energy function including a plurality of state variables. The search process includes: counting the number of times the value of the state variable determining the change candidate in the search process will not be continuously changed; and correcting a variation amount of the energy function corresponding to a variation in the value of the state variable of the variation candidate with the offset when the number of times counted in the counting process reaches a predetermined number of times. The determining includes performing, after correcting the amount of change, determining whether to change the value of the state variable of the change candidate based on the corrected amount of change.

Description

Program and information processing apparatus
Technical Field
Embodiments discussed herein relate to a program, an information processing method, and an information processing apparatus.
Background
The information processing apparatus may be configured to obtain a solution to a combinatorial optimization problem. The information processing apparatus converts the combinatorial optimization problem into an energy function of an Esino model that is a model representing the spin behavior of the magnet, and searches for a combination that minimizes or maximizes the energy function among combinations of values of state variables included in the energy function. The combination of values of the state variables that minimizes or maximizes the energy function corresponds to the ground state or optimal solution represented by the set of state variables. As a method for obtaining an approximate solution of a combinatorial optimization problem in real time, a method in which a Simulated Annealing (SA) method, a parallel tempering method, or the like is used in combination based on a Markov Chain Monte Carlo (MCMC) method is applied.
For example, as an apparatus for performing the MCMC method, there are an apparatus that selects state variables according to an index order (sequentially) and determines whether to allow a state transition in which the value of the state variable is to be changed, and an apparatus that performs parallel search for selecting a single state transition by simultaneously setting a plurality of state transitions as transition candidates.
[ list of references ]
[ patent document ]
[ patent document 1] Japanese patent application laid-open No. 2020-135727.
[ patent document 2] U.S. patent application publication No. 2014/0279816.
Disclosure of Invention
[ problem ]
As described above, in order to obtain a solution to the problem represented by the energy function, the state variables are selected in consideration of a predetermined order, for example, indexes of the state variables, and it is determined whether or not the state transition related to the state variables is allowed. According to this method, the determination for each of the plurality of state variables is repeatedly performed until the state transition is performed, for example, in such a manner that the next round of determination is started in a case where the state variables of one round are completed and any state transition is not allowed. However, since the number of iterations increases while not performing the state transition, the time taken to obtain the solution increases.
In one aspect, an object of the present embodiment is to provide a program, an information processing method, and an information processing apparatus for improving solution search efficiency.
[ solution of problem ]
In one embodiment, a program in which a computer executes: a search process is performed that repeatedly performs a selection process, a determination process, and a state change process according to a predetermined order to search for a solution to a problem represented by an energy function including a plurality of state variables. The selection process includes selecting state variables that are change candidates as part of the plurality of state variables in a predetermined order. The determination process includes determining whether to change the value of the state variable of the change candidate based on a change amount of the value of the energy function corresponding to the change in the value of the state variable of the change candidate selected in the selection process. The state change processing includes changing the value of the state variable of the change candidate when it is determined in the determination processing that the value of the state variable of the change candidate is to be changed. The search process further includes: a counting process including counting the number of times the value of the state variable determining the change candidate in the search process repeatedly performed will be continuously unchanged; and a correction process including correcting, when the number of times counted in the counting process reaches a predetermined number of times, a variation amount of the energy function corresponding to a variation in the value of the state variable of the newly selected variation candidate with the offset value. The determination processing includes performing, after the amount of change is corrected by the correction processing, determination as to whether or not to change the value of the state variable of the newly selected change candidate based on the corrected amount of change.
Further, in one embodiment, a program in which a computer executes: a search process is performed that repeatedly performs a selection process, a determination process, and a state change process according to a predetermined order to search for a solution to a problem represented by an energy function including a plurality of state variables. The selection process includes selecting state variables that are change candidates as part of the plurality of state variables in a predetermined order. The determination process includes determining whether to change the value of the state variable of the change candidate based on a change amount of the value of the energy function corresponding to the change in the value of the state variable of the change candidate selected in the selection process. The state change processing includes changing the value of the state variable of the change candidate when it is determined in the determination processing that the value of the state variable of the change candidate is to be changed. The search process further includes: a counting process including counting the number of times that the value of the state variable determining the change candidate in the search process repeatedly performed will not be changed continuously; selecting a first state variable from the plurality of state variables based on a probability key calculated from the variation and the random value when the number of times counted in the counting process reaches a predetermined number of times; and changing the value of the selected first value.
Further, in one embodiment, an information processing method is provided.
Further, in one embodiment, an information processing apparatus is provided.
[ Effect of the invention ]
According to one aspect, the efficiency of solution searching may be improved.
Drawings
Fig. 1 is a diagram showing an information processing apparatus according to a first embodiment;
fig. 2 is a diagram showing an information processing apparatus according to a second embodiment;
fig. 3 is a diagram showing an example of hardware of an information processing apparatus according to a third embodiment;
fig. 4 is a diagram showing a functional example of an information processing apparatus;
FIG. 5 is a diagram showing a function example of a copy update unit;
fig. 6 is a flowchart showing a processing example of the information processing apparatus;
FIG. 7 is a diagram illustrating an exemplary solution result (part 1);
FIG. 8 is a diagram illustrating an exemplary solution result (part 2);
fig. 9 is a diagram showing a functional example of a copy updating unit according to the fourth embodiment;
fig. 10 is a flowchart showing an example of processing of the information processing apparatus;
fig. 11 is a flowchart showing a comparative example; and
fig. 12 is a diagram showing a function example of an information processing apparatus according to a fifth embodiment.
Detailed Description
Hereinafter, the present embodiment will be described with reference to the drawings.
[ first embodiment ]
The first embodiment will be described.
Fig. 1 is a diagram showing an information processing apparatus according to a first embodiment.
The information processing apparatus 10 searches for a solution of the combinatorial optimization problem by using the MCMC method, and outputs the searched solution. The information processing apparatus 10 includes a storage unit 11 and a processing unit 12. The storage unit 11 may be a volatile storage device such as a Random Access Memory (RAM), and may be a non-volatile storage device such as a Hard Disk Drive (HDD) or a flash memory. The processing unit 12 may include a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a Graphics Processing Unit (GPU), and the like. The processing unit 12 may be a processor executing a program. A "processor" may include a collection of multiple processors (multi-processor).
The combinatorial optimization problem is formulated by an inching-type energy function and is replaced by, for example, a problem that minimizes the value of the energy function. The energy function may also be referred to as an objective function, an evaluation function, etc. The energy function includes a plurality of state variables. Each of the state variables is a binary variable having a value of 0 or 1, and may be referred to as a "bit". The solution of the combinatorial optimization problem is represented by values of a plurality of state variables. The solution that minimizes the value of the energy function represents the ground state of the Eicon model and corresponds to the optimal solution of the combinatorial optimization problem. The value of the energy function may be referred to as energy.
The isooctyl-type energy function is represented by equation (1).
[ equation 1]
Figure BDA0003507349160000041
The state vector x has a plurality of state variables as elements and represents the state of the ixing model. Equation (1) is an energy function formulated in the form of Quadratic Unconstrained Binary Optimization (QUBO). In the case of the problem of maximizing energy, the sign of the energy function may be reversed. The values of a plurality of state variables belonging to the state vector x are stored in the storage unit 11.
The first term on the right side of equation (1) is obtained by: to (for)All combinations of two state variables selected from all state variables are integrated without omission and repetition of the products of the values of the two state variables and the weight coefficients. The indices i and j are indices of the state variables. x is the number of i Is the ith state variable. x is the number of j Is the jth state variable. W ij Is the weight between the ith and jth state variables or a weight coefficient indicating the strength of the coupling. W ij =W ji And W is ii Is 0.
The second term on the right side of equation (1) is the sum of the products of each of the values of the state variables and the offsets of all the state variables. b i Indicating the bias of the ith state variable.
When the state variable x i Becomes 1-x i Time, state variable x i Is expressed as δ x i =(1-x i )-x i =1-2x i . Therefore, the state variable x accompanying the energy function E (x) i Change amount Δ E of the changed energy i Represented by equation (2).
[ equation 2]
Figure BDA0003507349160000051
In searching for a solution, the processing unit 12 uses the Metropolis (metterol bolis) or Gibbs (Gibbs) criteria to determine whether the amount of energy change therein is allowed to be Δ E i State transitions of, e.g. state variables x i A change in value of (a). The processing unit 12 randomly allows not only a transition to a state of decreased energy but also a transition to a state of increased energy in an adjacent search for a transition from a certain state to another state of lower energy than the certain state. For example, the amount of change Δ E of the received energy i Probability of state transition of (2), e.g. transition acceptance probability A i Represented by equation (3).
[ equation 3]
Figure BDA0003507349160000052
Beta is the temperature value T (T)>0) The reciprocal of (β = 1/T), and is referred to as inverse temperature. The min operator indicates the minimum value of the argument. The upper right side of equation (3) corresponds to the Metropolis standard, and the lower right side of equation (3) corresponds to the Gibbs standard. The processing unit 12 will satisfy 0<u<1 uniform random numbers u and A i A comparison is made and when u<A i The processing unit 12 accepts the state variable x i Change of state variable x and change of state variable x i The value of (c). Unless u<A i Otherwise processing unit 12 does not accept state variable x i Change of the state variable x without changing the state variable i The value of (c). According to equation (3), with Δ E i To a greater value, A i The smaller. With smaller β, e.g., larger T, more likely Δ E is allowed therein i A large state transition. For example, the processing unit 12 may search for a solution using an SA method, a parallel annealing (PT), a Population Annealing (PA), or the like, which are types of MCMC methods. The PT method is also called a swap monte carlo or a copy swap method.
The processing unit 12 selects the state variables that are change candidates of a part of the plurality of state variables in a predetermined order (for example, sequentially). As an example, the processing unit 12 selects one state variable of the change candidate. State variable x of selected change candidate i Is the next state variable subject to the transition determination. Information indicating a predetermined order is set in the storage unit 11 in advance. For example, the predetermined order may be the order of index i. Assuming that the number of all state variables is N, the order of each index i is i =1, 2, \8230;, N-1, N, 1,2, \8230;, N, 1,2, and 8230; \8230;, and 8230. Alternatively, the predetermined order may be a random arrangement Π 1 、Π 2 、Π 3 、Π N 、Π 1 、Π 2 And 8230, 8230. Here, { Π i Is an arrangement of {1, \ 8230; \8230;, N }. As will be described later, the processing unit 12 may select two or more state variables of the change candidates at a time.
As described above, the processing unit 12 bases on the state variable x being selected i Of a value ofAmount of change in energy Δ E in case i To determine whether to change the state variable x i The value of (c). When it is determined that the value is to be changed, the processing unit 12 changes the state variable x i And the next state variable to be determined is selected according to the above-mentioned predetermined order.
In contrast, when the state variable x is determined i Will not be changed, the processing unit 12 does not change the state variable x i The next state variable to be determined is selected. The processing unit 12 records the number of times the value of the state variable will not be changed continuously in the storage unit 11.
When it is continuously determined that the number of times the value of the state variable will not be changed reaches a predetermined number of times, the processing unit 12 corrects the amount of change in energy using the offset value, and determines whether to change the value of the selected state variable based on the corrected amount of change in energy.
For example, processing unit 12 utilizes offset value E off (E off >0) Correction is included in the transition acceptance probability A i Δ E in (1) i To obtain a corrected transition acceptance probability A' i . For example, A' i Is A i (ΔE i -E off ). Transition acceptance probability A 'when Metropolis criteria is used' i Represented by equation (4).
[ equation 4]
A′ i =min[1,exp(-β(ΔE i -E off ))] (4)
Due to inverse temperature beta and offset value E off Is positive, thus the transition acceptance probability A' i =A i (ΔE i -E off ) By accepting the original transition with a probability A i =A(ΔE i ) Multiplying by a coefficient exp (β · E) equal to or greater than 1 off ) And the obtained probability. Thus, using the transition acceptance probability A' i =A(ΔE i -E off ) In the case of (2), and using the original transition acceptance probability A i =A(ΔE i ) The ratio between the transition acceptance probabilities of the respective state transitions does not change compared to the case of (b).
In place of A i Processing unit 12 converts A' i Compares with the uniform random number u and determines whether to accept the state variable x i A change in value of. For example, when u<A' i The processing unit 12 accepts the state variable x i Change of the state variable x and change of the state variable x i The value of (c). Unless u<A' i Otherwise processing unit 12 does not accept state variable x i Change of the state variable x without changing the state variable i The value of (c). Since the transition acceptance probability for each state variable is increased, the state transition is likely to occur.
According to the acceptance probability A 'based on the transition' i After changing the value of any state variable, the processing unit 12 will E off Reset to 0 to set the correction amount to 0, for example, cancel the correction with the offset value. Thereafter, A i Used as transition acceptance probability for the state variable of the transition candidate to be newly selected. Then, the processing unit 12 selects the next state variable to be determined, and newly starts from 0 to count the number of times it is determined that the value of the state variable will not be changed continuously. Acceptance is based on transition acceptance probability A' i And the state variable x i The next state variable to be determined after the relevant state transition may be the state variable x selected according to the above-mentioned predetermined order i The next state variable, or may be the first state variable in the sequence.
For example, when the number of times that the value of the state variable is not to be changed is continuously determined to reach the round determination number Z, the processing unit 12 may correct the amount of change in energy using the offset value. When the number of state variables of the change candidates selected at one time is 1, the number of times of one round of determination Z may be Z = N.
Fig. 1 shows a processing example of the information processing apparatus 10. For example, the state vector 30 includes a state variable x 1 、x 2 823060, 8230a N . The number of times of one round determination Z is set to N. The processing unit 12 selects x sequentially one by one 1 、x 2 823060, 8230a N And determines whether to accept the state transition. When it is continuously determined that the number of times the value of the state variable will not be changed reaches Z = N, the processing unit 12 accepts probability a 'by using transition' i To determine whether to accept or not to compare with the state variable x i Associated State transition, transition Accept probability A' i By using an offset value E off Correction of Delta E i And obtaining the product. Graph 40 is an example as follows: for each state variable, the transition acceptance probability A is plotted for the case where the value of any state variable is changed for a certain state i And A' i . As shown in graph 40, by using offset value E off Correction of Delta E i And uncorrected for Δ E i The transition acceptance probability can be increased compared to the case of (b).
The processing unit 12 may be set to E off =E off *。E off * Represented by equation (5).
[ equation 5]
Figure BDA0003507349160000071
The max operator indicates the maximum value of the argument. By setting E off =E off * The transition may be accepted probability A' m Is provided as A' m =1, wherein transition acceptance probability A 'without state transition' m Corresponding to Δ E for all indices i i Minimum value of (a) E m . For example, processing unit 12 may reliably accept at least for x m Is changed. For example, the processing unit 12 may obtain E by storing, in the storage unit 11, the minimum value of the amount of change in energy obtained when it is continuously determined that the value of the state variable will not be changed off *。
The processing unit 12 may set the number of state variables of the change candidates selected at one time to two or more, and may change the values of the state variables of two or more change candidates at the same time for one transition determination. The processing unit 12 may calculate Δ E in the case where the values of the two or more state variables change according to the amount of change in energy based on equation (2) for each of the two or more state variables.
For example, by using a set of indexes, the sequence for selecting two state variables may be an order represented by (1, 2), (1, 3), \8230;, \8230, (1, N), (2, 3), (2, 4), \8230;, (2, N), \8230;, \8230, and (N-1, N). In this case, the number of times of one round of determination Z is Z = (N-1) + (N-2) +. · · +1= { N (N-1) }/2.
Alternatively, the sequence for selecting the two state variables may be represented by (Π) 1 ,Π 2 )、(Π 1 ,Π 3 )、……、(Π N-1 ,Π N ) The order of presentation. Here, { Π i Is a permutation of {1, \8230;, N }. In any case, the same set of state variables is not selected two or more times in a round, e.g., there is no duplication between the sets of state variables selected in a round.
The processing unit 12 may perform a search in which the number of state variables of the change candidate selected at one time is 1, and then perform a search in which the number of state variables of the change candidate selected at one time is 2. Considering the constraint that only one of the state variables belonging to the predetermined group is set to 1, the processing unit 12 may select the state variables to be determined in order.
According to the information processing apparatus 10, a search process for searching a solution of a problem represented by an energy function including a plurality of state variables is performed. The search process includes a selection process, a determination process, and a state change process. In the selection process, the processing unit 12 selects state variables that are change candidates of a part of the plurality of state variables in a predetermined order. In the determination process, the processing unit 12 determines whether to change the value of the state variable of the change candidate based on the change amount of the value of the energy function corresponding to the change in the value of the state variable of the change candidate selected in the selection process. In the state change processing, when it is determined in the determination processing that the value of the state variable of the change candidate is to be changed, the processing unit 12 changes the value of the state variable of the change candidate. In the search processing, the processing unit 12 repeatedly executes selection processing, determination processing, and state change processing according to a predetermined order. In the search processing, the processing unit 12 also performs count processing and correction processing. In the counting process, the processing unit 12 counts the number of times the value of the state variable that determines the change candidate during the search process that is repeatedly executed will not be changed continuously. In the correction processing, when the number of times counted in the count processing reaches a predetermined number of times, the processing unit 12 corrects the amount of change of the energy function corresponding to the change in the value of the state variable of the newly selected change candidate using the offset value. In the determination process after the amount of change has been corrected by the correction process, the processing unit 12 determines whether to change the value of the state variable of the newly selected change candidate based on the corrected amount of change.
Therefore, the information processing apparatus 10 can improve the efficiency of the solution search.
In order to obtain a solution to the problem represented by the energy function, it is considered to sequentially select the state variables as described above, and to determine whether to allow the state transition associated with the state variables based on the amount of change in energy. According to the method, the determination for each of the plurality of state variables is repeatedly performed until the state transition is performed, for example, in such a manner that the determination of the next round of determination is started in a case where the state variables of one round are completed and any state transition is not allowed. However, since the number of iterations increases while not performing the state transition, the time taken to obtain a solution increases. For example, Δ E for all indices i i >0, e.g. in the case of falling into a local solution or at low temperature (β)>>1) Even if one round of determination for all the state variables is repeated, state transition does not occur, sampling efficiency is reduced, and it may take time to obtain a solution.
Therefore, when it is continuously determined that the number of times the value of the state variable will not be changed reaches the predetermined number of times, the information processing apparatus 10 uses the offset value E off The amount of change in energy is corrected so as to easily accept the state transition associated with each state variable and facilitate the state transition. For example, by setting E off =E off * The information processing apparatus 10 reliably causes a state transition to occur in at least one state variable, and facilitates the state transition. Since the stagnation of the state transition is suppressed in this way, the information processing apparatus 10 can improve the efficiency of the solution search. As a result, information processingThe processing device 10 can reach a good solution in a short time. For example, even for a problem with a small number of inversion candidates, such as a combinatorial optimization problem with a large number of states where the energy takes a local minimum, a good solution can be searched efficiently.
[ second embodiment ]
Next, a second embodiment will be described.
Fig. 2 is a diagram showing an information processing apparatus according to a second embodiment.
As in the case of the information processing apparatus 10, the information processing apparatus 20 searches for a solution of the combinatorial optimization problem by using SA, PT, PA, or the like, which is a type of the MCMC method, and outputs the searched solution. The information processing apparatus 20 includes a storage unit 21 and a processing unit 22. The storage unit 21 may be a volatile storage device such as a RAM, or may be a nonvolatile storage device such as an HDD or a flash memory. Processing unit 22 may include a CPU, DSP, ASIC, FPGA, GPU, etc. The processing unit 22 may be a processor executing a program. A "processor" may include a collection of multiple processors (multi-processor).
As described in the first embodiment, the combinatorial optimization problem is replaced with a problem of obtaining a set of values of a plurality of state variables that minimizes the energy function of equation (1). The values of a plurality of state variables belonging to the state vector x of equation (1) are stored in the storage unit 21.
The processing unit 22 selects the state variables that are the change candidates of a part of the plurality of state variables in a predetermined order (for example, sequentially). As an example, the processing unit 22 selects one state variable of the change candidate. Information indicating a predetermined order is previously set in the storage unit 21. For example, the predetermined order may be the order of index i. Assuming that the number of all state variables is N, the order of each index i is i =1, 2, \8230;, N-1, N, 1,2, \8230;, N, 1,2, and 8230; \8230;. Alternatively, the predetermined order may be a random sequence Π 1 、Π 2 、……、Π N 、Π 1 、Π 2 And 8230, and its preparing process. Here, { Π i Is a rearrangement of {1, \8230; \ 8230;, N }. As will be described later, the processing unit 22 mayTo select two or more state variables of the change candidates at a time.
Amount of change Δ E based on energy represented by equation (2) i The processing unit 22 determines whether to change the selected state variable x i The value of (c). For example, the processing unit 22 accepts the probability a by the transition represented by equation (3) i (ΔE i ) And a random number u (0)<u<1) A comparison is made to perform the determination. The method for determination is the same as that in the determination by the processing unit 12. When it is determined that the value is to be changed, the processing unit 22 changes the state variable x i And the next state variable to be determined is selected according to the above-mentioned predetermined order.
In contrast, when the state variable x is determined i Will not be changed, the processing unit 22 does not change the state variable x i The next state variable to be determined is selected in case of a value of (c). The processing unit 22 records the number of times that the value of the continuously determined state variable will not be changed in the storage unit 21.
When it is continuously determined that the number of times the value of the state variable will not be changed reaches the predetermined number of times, the processing unit 22 determines a state variable whose value will be changed among the plurality of state variables based on the random key value calculated from the amount of change in energy and the random number, and changes the value of the determined state variable.
For example, consider the weighted probability P of the processing unit 22 based on equation (6) i A state variable whose value is to be changed is selected.
[ equation 6]
Figure BDA0003507349160000101
Weighted probability P i Indicating the state variable x after several trials i The probability that the value of (c) changes last. In this case, the processing unit 22 calculates the random number r in equation (7), and determines to change the state variable x satisfying the index k of equation (8) k The value of (c). R of equation (7) can be considered as a random key value.
[ equation 7]
Figure BDA0003507349160000102
[ equation 8]
Figure BDA0003507349160000111
Alternatively, the processing unit 22 may calculate a random key value k represented by any one of equations (9), (10), and (11) for each state variable i =k i (ΔE i ,u i ) And determining values that change the following state variables: for the state variable, k i Is a maximum or minimum value. u. of i Are mutually independent uniform random numbers, 0<u i <1。
[ equation 9]
Figure BDA0003507349160000112
[ equation 10]
k i =log u i /A i (10)
[ equation 11]
k i =max(0,βΔE i )+log(-log u i ) (11)
Using equations (9) and (10), the processing unit 22 selects k for it i The state variable at the maximum. Using equation (11), the processing unit 22 selects k for it i The state variable that is the minimum value. Equation (11) corresponds to the Metropolis standard. The "log" in each equation is the natural logarithm. The denominator of equation (10) is A i And the molecule is log (u) i )。
Therefore, when the state transition is delayed, it is possible to appropriately change the value of any state variable and facilitate solution search. In the case of changing the value of any state variable by using a random key value, the processing unit 22 selects the next state variable to be determinedAnd counting the number of times it is determined that the value of the state variable will not be changed continuously, starting anew from 0. Changing state variable x based on random key value i After the value of (b), the next state variable to be determined may be the state variable x selected according to the above-mentioned predetermined order i The next state variable, or may be the first state variable in the sequence.
For example, when the number of times that the value of the continuously determined state variable is not to be changed reaches the one-round determination number Z, the processing unit 22 may select the state variable whose value is to be changed based on the random key value. When the number of state variables of the change candidates selected at one time is 1, the number of times of one round of determination Z may be Z = N.
Fig. 2 shows a processing example of the information processing apparatus 20. For example, the state vector 30 includes a state variable x 1 、x 2 823060, 8230a N . The number of times of one round determination Z is set to N. The processing unit 22 selects x sequentially one by one 1 、x 2 823060, 8230a N And determines whether to accept the state transition. When it is determined continuously that the number of times the value of the state variable will not be changed reaches Z = N, the processing unit 22 uses, for example, a random key value k i (ΔE i ,u i ) To determine the change and random key value k M (ΔE M ,u M ) Corresponding state variable x M And change the state variable x M The value of (c). For example, depending on which of equations (9) to (11) is used, the processing unit 22 may store, in the storage unit 21, a random key value k obtained while continuously determining that the value of the state variable will not be changed i (ΔE i ,u i ) To obtain a random key value k M (ΔE M ,u M )。
The processing unit 22 may set the number of state variables of the change candidates selected at one time to two or more, and may change the values of the state variables of two or more change candidates simultaneously for one transition determination. The processing unit 22 may calculate Δ E in the case where the values of the two or more state variables change according to the amount of change in energy based on equation (2) for each of the two or more state variables.
For example, by using a set of indexes, the sequence for selecting two state variables may be an order represented by (1, 2), (1, 3), \8230;, \8230, (1, N), (2, 3), (2, 4), \8230; \8230, (2, N), \8230;, and (N-1, N). In this case, the number of times of one round of determination Z is Z = (N-1) + (N-2) +. · · +1= { N (N-1) }/2.
Alternatively, the sequence for selecting the two state variables may be represented by (Π) 1 ,Π 2 )、(Π 1 ,Π 3 )、……、(Π N–1 ,Π N ) The order of presentation. Here, { Π i Is a rearrangement of {1, \8230; \ 8230;, N }. In any case, the same set of state variables may not be selected two or more times in a round, e.g., there is no duplication between the set of state variables selected in a round. In the case where the number of state variables of the change candidates selected at one time is a (a is an integer of 1 or more), the number of state variables selected by the processing unit 22 based on the random key value is also a.
The processing unit 22 may perform a search in which the number of state variables of the change candidate selected at one time is 1, and then perform a search in which the number of state variables of the change candidate selected at one time is 2. The processing unit 22 may select the state variables to be determined in order, taking into account the constraint that only one of the state variables belonging to the predetermined group is set to 1.
According to the information processing apparatus 20, a search process for searching a solution of a problem represented by an energy function including a plurality of state variables is performed. The search process includes a selection process, a determination process, and a state change process. In the selection process, the processing unit 22 selects state variables that are change candidates of a part of the plurality of state variables in a predetermined order. In the determination process, the processing unit 22 determines whether to change the value of the state variable of the change candidate based on the change amount of the value of the energy function corresponding to the change in the value of the state variable of the change candidate selected in the selection process. In the state change processing, when it is determined in the determination processing that the value of the state variable of the change candidate is to be changed, the processing unit 22 changes the value of the state variable of the change candidate. In the search processing, the processing unit 22 repeatedly executes selection processing, determination processing, and state change processing according to a predetermined order. The processing unit 22 performs a counting process of counting the number of times the value of the state variable determining the change candidate will not be continuously changed during the search process repeatedly performed. When the number of times counted in the counting process reaches a predetermined number of times, the processing unit 22 selects a first state variable from the plurality of state variables based on a random key value calculated from the variation amount and the random number value, and changes the value of the first state variable.
Therefore, the information processing apparatus 20 can improve the efficiency of the solution search.
In order to obtain a solution to the problem represented by the energy function, it is considered to sequentially select the state variables as described above, and to determine whether to allow the state transition associated with the state variables based on the amount of change in energy. According to the method, the determination for each of the plurality of state variables is repeatedly performed until, for example, a state transition is performed in such a manner that a next round of determination is started in a case where the state variable of one round is completed and any state transition is not allowed. However, since the number of iterations increases while not performing state transition, the time taken to obtain a solution increases. For example, at Δ E for all indices i i >0, e.g. in the case of falling into a local solution or at low temperature (β)>>1) Even if one round of determination for all the state variables is repeated, state transition does not occur, sampling efficiency is reduced, and it may take time to obtain a solution.
Therefore, when it is continuously determined that the number of times the value of the state variable will not be changed reaches the predetermined number of times, the information processing apparatus 20 determines the state variable subject to the transition by using the amount of change in energy and the random key value of the random number value, and changes the value of the state variable to promote the state transition. Since the stagnation of the state transition is suppressed in this way, the information processing apparatus 20 can improve the efficiency of the solution search. As a result, the information processing apparatus 20 can reach a good solution in a short time. For example, even for a problem with a small number of inversion candidates, such as a combinatorial optimization problem with a large number of states where the energy takes a local minimum, a good solution can be searched efficiently.
Hereinafter, the information processing apparatuses 10 and 20 will be described more specifically.
[ third embodiment ]
Next, a third embodiment will be described.
Fig. 3 is a diagram showing an example of hardware of an information processing apparatus according to a third embodiment.
The information processing apparatus 100 searches for a solution of the combinatorial optimization problem by using the MCMC method, and outputs the searched solution. The information processing apparatus 100 includes a CPU 101, a RAM 102, an accelerator card 103, a HDD 104, a GPU 105, an input Interface (IF) 106, a media reader 107, and a Network Interface Card (NIC) 108.
The CPU 101 is a processor that executes commands of a program. The CPU 101 loads at least a part of the programs or data stored in the HDD 104 into the RAM 102, and executes the programs. The CPU 101 may include a plurality of processor cores. The information processing apparatus 100 may include a plurality of processors. The processes described below may be performed in parallel using multiple processors or processor cores. The collection of multiple processors may be referred to as a "multiprocessor," or in some cases simply a "processor.
The RAM 102 is a volatile semiconductor memory that temporarily stores programs executed by the CPU 101 or data for operations performed by the CPU 101. The information processing apparatus 100 may include a type of memory other than the RAM, and may include a plurality of memories.
The accelerator card 103 is a hardware accelerator that searches for a solution to a problem represented by an inching-type energy function represented by equation (1) by using the MCMC method. By performing the MCMC method at a fixed temperature or by performing the PT method of exchanging the state of the isooctane model between temperatures, the accelerator card 103 can function as a sampler that samples the state from the boltzmann distribution at the corresponding temperature. To obtain a solution to the combinatorial optimization problem, the accelerator card 103 performs an annealing process in which the temperature value is gradually decreased, such as a PT method or an SA method.
The SA method is a method of efficiently finding an optimal solution by lowering a temperature value used during sampling from a high temperature to a low temperature (e.g., increasing the inverse temperature β). Since the state changes to some extent even on the low temperature side (for example, β is large), there is a possibility that a good solution can be found even if the temperature value rapidly decreases. For example, when the SA method is used, the accelerator card 103 repeats the operation of lowering the temperature value after the trial of state transition is repeated a certain number of times at a specific temperature value.
The PT method is as follows: wherein the MCMC method is independently performed using a plurality of temperature values, and the temperature values are appropriately exchanged for the state obtained at each temperature value. By searching for a narrow range of state space at low temperatures using the MCMC method and a wide range of state space at high temperatures using the MCMC method, good solutions can be found efficiently. For example, when the PT method is used, the accelerator card 103 repeats the following operations: wherein parallel trials of state transitions at each of a plurality of temperature values are performed and each temperature value is swapped for the state obtained at each temperature value with a predetermined swap probability each time a certain number of trials are performed.
The accelerator card 103 includes an FPGA 111 and a RAM 112. The FPGA 111 implements a search function in the accelerator card 103. The search function may be implemented by another type of integrated circuit, such as a GPU or an ASIC. The RAM 112 holds data for search in the FPGA 111 or a solution searched by the FPGA 111.
A hardware accelerator (e.g., accelerator card 103) that searches for solutions to the problem in the form of yinxin may be referred to as an yinxin machine, a boltzmann machine, etc. Alternatively, the information processing apparatus 100 may include a plurality of accelerator cards.
The HDD 104 is a nonvolatile storage device that stores data and programs of software such as an Operating System (OS), middleware, and application software. The information processing apparatus 100 may include another type of storage device such as a flash memory or a Solid State Drive (SSD), and may include a plurality of nonvolatile storage devices.
The GPU 105 outputs an image to the display 51 coupled to the information processing apparatus 100 according to a command from the CPU 101. Any type of display such as a Cathode Ray Tube (CRT) display, a Liquid Crystal Display (LCD), a plasma display, or an Organic Electroluminescent (OEL) display may be used as the display 51.
The input IF 106 acquires an input signal from the input device 52 coupled to the information processing apparatus 100, and outputs the input signal to the CPU 101. As the input device 52, a pointing device such as a mouse, a touch panel, a touch pad or a trackball, a keyboard, a remote controller, a button switch, or the like can be used. Various types of input devices may be coupled to the information processing apparatus 100.
The medium reader 107 is a reading device that reads a program or data recorded in the recording medium 53. For example, a magnetic disk, an optical disk, a magneto-optical (MO) disk, a semiconductor memory, or the like may be used as the recording medium 53. The magnetic disk includes a Flexible Disk (FD) or an HDD. Optical discs include Compact Discs (CDs) or Digital Versatile Discs (DVDs).
The medium reader 107 copies, for example, programs and data read from the recording medium 53 to another recording medium such as the RAM 102 or the HDD 104. The read program is executed by, for example, the CPU 101. The recording medium 53 may be a portable recording medium, and may be used to distribute programs and data. The recording medium 53 and the HDD 104 may be referred to as a computer-readable recording medium in some cases.
The NIC 108 is an interface that is connected to the network 54 and communicates with another computer via the network 54. The NIC 108 is connected to a communication device such as a switch or router, for example, via a cable.
The FPGA 111 is an example of the processing unit 12 according to the first embodiment and the processing unit 22 according to the second embodiment. The RAM 112 is an example of the storage unit 11 according to the first embodiment and the storage unit 21 according to the second embodiment.
The functions of the accelerator card 103 can be realized by causing the CPU 101 to execute programs stored in the RAM 102. In this case, the CPU 101 is an example of the processing unit 12 according to the first embodiment and the processing unit 22 according to the second embodiment. The RAM 102 is an example of the storage unit 11 according to the first embodiment and the storage unit 21 according to the second embodiment.
Fig. 4 is a diagram showing a functional example of the information processing apparatus.
The information processing apparatus 100 includes a coefficient holding unit 120, a search processing unit 130, and a control unit 190. The storage area of the RAM 102 or the HDD 104 is used for the coefficient holding unit 120. The search processing unit 130 is implemented by the accelerator card 103. The control unit 190 is realized by causing the CPU 101 to execute a program stored in the RAM 102.
The coefficient holding unit 120 holds weight coefficients { W } corresponding to all combinations of two state variables included in the energy function ij }。
Based on the energy function and the weight coefficients stored in the coefficient holding unit 120, the search processing unit 130 searches for a solution corresponding to the ground state of the isooctane model. One set of all state variables included in the energy function is called a replica. The search processing unit 130 includes a copy updating unit 140, an index generating unit 150, and a random number generating unit 160.
The copy updating unit 140 updates the single copy by using the SA method, the PT method, or the like. Based on the index input from the index generation unit 150, the replica update unit 140 sequentially selects state variables as state transition candidates. The details of the copy updating unit 140 will be described later.
The index generating unit 150 generates an index indicating the next state variable of the change candidate, and inputs the index to the duplicate updating unit 140. The index generation unit 150 generates indexes in a predetermined order designated in advance by the control unit 190, and inputs the indexes to the copy update unit 140. As an example, the number of state variables of the change candidates in one experiment is 1. In this case, the index generating unit 150 inputs one index of the state variables indicating the next change candidate to the duplicate updating unit 140.
For example, the predetermined order may be the order of the index i. Assuming that the number of all state variables is N, the order of each index i is i =1, 2, \8230;, N-1, N, 1,2, \8230;, N, 1,2, and 8230; \8230;. An order obtained by randomly skipping indexes from the order of the index i may be used. As such a method, for example, the following document 1 is referred to.
Document 1: ren et al, "Acceleration of Markov chain month relations through sequential establishment updating", J.chem.Phys. Vol.124, no. 6, 064109, 2006.
Alternatively, the predetermined order may be a random sequence Π 1 、Π 2 、……、Π N 、Π 1 、Π 2 And 8230, 8230. Here, { Π i Is a rearrangement of {1, \8230; \ 8230;, N }. For each wheel or for some wheels, about { Π i The arrangement order of {1, \8230;, N } of } may be changed at predetermined timing. As will be described later, the number of state variables of the change candidates in one experiment may be two or more. In this case, the index generating unit 150 inputs two or more indexes of state variables indicating next change candidates to the duplicate updating unit 140.
The random number generation unit 160 accepts the probability a of transition based on equation (3) i And a transition acceptance probability A 'of equation (4)' i Generating uniform random number u (0) for acceptance determination of state transition<u<1) And inputs the uniform random number u to the replica updating unit 140.
The control unit 190 acquires information on the combinatorial optimization problem input from the user and generates information on an energy function corresponding to the combinatorial optimization problem. The control unit 190 stores the weight coefficients corresponding to the combinatorial optimization problem in the coefficient holding unit 120. The control unit 190 inputs parameters such as a temperature value for search, the order of indexes generated by the index generation unit 150, and the like to the search processing unit 130, and causes the search processing unit 130 to start the solution search.
The control unit 190 acquires the solution searched by the search processing unit 130. The control unit 190 converts the acquired solution into a form of a solution of the combinatorial optimization problem and causes the display 51 to display the solution or transmits the solution to a terminal device used by the user via the network 54 to provide the solution to the user.
For example, the following document 2 is referred to as a method of sequentially performing the transition determination as described above.
Document 2: manousiouthrakis et al, "Strong purified Balance is Uncessesary in Monte Carlo Simulation", J.chem.Phys. Vol.110, no. 6, pages 2753-2756, 1999.
Fig. 5 is a diagram showing a functional example of the copy update unit.
The copy updating unit 140 includes a cache 141, a state holding unit 142, a Δ E calculating unit 143, an acceptance determining unit 144, and an offset setting unit 145.
The cache 141 holds the weight coefficient { W } relating to the index i of the next transition candidate input from the index generation unit 150 1i 、W 2i 、……、W Ni }. The duplicate update unit 140 updates the weight coefficient W 1i 、W 2i 、……、W Ni Is preloaded into cache 141.
The state holding unit 142 holds current values { x ] of a plurality of state variables 1 、x 2 、……、x N Energy E corresponding to current values of a plurality of state variables, and the inverse β of the current temperature value. The state holding unit 142 holds and holds a state variable x 1 、x 2 8230a, and x N Corresponding local field h 1 、h 2 823060 \ 8230a & N . Local field h i Represented by equation (12).
[ equation 12]
Figure BDA0003507349160000171
The state holding unit 142 stores the local field h associated with the index i of the next transition candidate input from the index generating unit 150 i Output to Δ E calculation section 143.
Based on the local field h saved in the state saving unit 142 i The Δ E calculation unit 143 calculates the amount of change in energy Δ E by equation (13) i
[ equation 13]
Figure BDA0003507349160000181
Δ E calculation section 143 calculates Δ E i Output to acceptance determination unit 144.
Acceptance determination unit 144 executes Δ E input from Δ E calculation unit 143 i Subtracting the offset value E input from the offset setting unit 145 off The correction of (2). Based on the corrected variation (Delta E) i -E off ) The acceptance determination unit 144 calculates the transition acceptance probability a 'of equation (4)' i . In general, E is set by the offset setting unit 145 off And =0. At E off In the case of =0, the acceptance probability A 'is converted' i =A i
By combining the uniform random number u input from the random number generation unit 160 with the transition acceptance probability A' i By comparison, the acceptance determination unit 144 determines whether or not to accept the state transition of the index i. When u is<A' i At this time, the acceptance determination unit 144 accepts the state transition of the index i. Unless u<A' i Otherwise the processing unit 12 does not accept the state transition of index i, e.g. rejects the state transition of index i.
U, A 'may be taken as the acceptance determination unit 144' i And can satisfy log (u)<-β(ΔE i -E off ) Accept the state transition of index i and can be satisfied log (u)<-β(ΔE i -E off ) The state transition of index i is not accepted. In this way, since the acceptance determination unit 144 may perform determination by saving information of log (u) and calculating the left side of the determination equation, and may not calculate the transition acceptance probability a' i Therefore, for example, the acceptance determination can be performed at high speed.
When accepting the state transition of the index i, the state saving unit 142 notifies the state saving unit 142 of accepting the state transition of the index i. Based on the notification, the state holding unit 142 inverts the state variable x i The value of (c). State save unit 142 based on Δ E i For E = E + Δ E i The update is performed. The state holding unit 142 updates the local field based on the weight coefficient held in the cache 141h 1 、h 2 8230a nd a nd N
In the state variable x j Partial field h in case of value of (d) being inverted i Amount of change δ h of i (j) Represented by equation (14).
[ equation 14]
Figure BDA0003507349160000191
When the state transition of the index i is rejected, the acceptance determining unit 144 notifies the offset setting unit 145 of the rejection of the state transition of the index i.
The offset setting unit 145 sets an offset value E off . The offset setting unit 145 includes an offset holding unit 145a and an offset control unit 145b.
Offset holding section 145a holds offset value E off And offset value E is added off Output to the acceptance determination unit 144. Offset value E held by offset holding section 145a off Set by the offset control unit 145b. Offset value E off Is 0. When the acceptance determination unit 144 accepts the state transition, the acceptance determination unit 144 holds the offset value E held by the offset holding unit 145a off Reset to 0.
The offset control unit 145b counts the number of times the acceptance determination unit 144 continuously rejects the state transition, and when the number of times reaches the one-round determination number of times Z of the transition determination, the offset value E to be saved in the offset saving unit 145a off Change from 0 to E off *。E off * Represented by equation (5). For example, when the number of state variables of the change candidates selected at one time is 1, the number of times of one round of determination Z may be N. By keeping a minimum value Δ E of the amount of energy variation obtained when a state transition is successively rejected min When the number of times that the state transition is successively rejected reaches Z, the offset control unit 145b may be based on E off *=ΔE min Obtaining E off *。
The arithmetic function in the copy updating unit 140, the index generating unit 150, and the random number generating unit 160 are implemented by the FPGA 111. The RAM 112 is used to save data in the copy update unit 140.
The search processing unit 130 is realized by causing the CPU 101 to execute a program stored in the RAM 102. In this case, the information held in the search processing unit 130 may be held in the RAM 102 or the cache of the CPU 101.
Fig. 6 is a flowchart showing an example of processing of the information processing apparatus.
(S10) the control unit 190 stores the weight coefficient in the coefficient holding unit 120, and initializes the copy updating unit 140. In the initialization, the control unit 190 sets the initial temperature value used in the SA method or the PT method and the number of iterations tested in the search (the specified number of iterations) in the replica updating unit 140, and sets the order of scanning the state variables in the index generating unit 150. The control unit 190 may solve the initial solution (state variable x) 1 、x 2 8230a, and x N The first value of each state variable), the initial value of the local field, and the initial value of the energy are set in the copy update unit 140. The control unit 190 stores the offset value E in the offset storage unit 145a off Reset to E off And =0. The control unit 190 resets the non-updated counter n held in the offset control unit 145b to n =0 and Δ E min Reset to a relatively large initial value. The non-updated counter n is a counter for counting the number of times the state transition is successively rejected. The control unit 190 causes the search processing unit 130 to start the solution search.
(S11) the copy updating unit 140 reads the next index i generated by the index generating unit 150. The duplicate update unit 140 updates the weight coefficient { W } corresponding to the index i 1i 、W 2i 、……、W Ni Is preloaded into cache 141.
(S12) the replica updating unit 140 calculates Delta E i From Δ E i Minus E off And update Δ E min . As described above, Δ E is calculated by the Δ E calculation unit 143 i . Execution of slave Δ E by acceptance determination unit 144 i Subtract E off . Delta E is performed by the offset control unit 145b min The update of (2).ΔE min Is denoted as Δ E min =min(ΔE min ,max(0,ΔE i ))。
(S13) based on the uniform random number u input from the random number generation unit 160, the replica update unit 140 determines whether to accept the state variable x i Is inverted, e.g., whether to accept the state transition of index i. When accepting the state variable x i When the value of (b) is determined, for example, when the state transition of the index i is accepted, the process proceeds to step S14. When the state variable x is not accepted i When the value of (b) is inverted, for example, when the state transition of the index i is rejected, the process proceeds to step S15. The determination of step S13 is performed by the acceptance determination unit 144. As described above, in the determination of step S13, the acceptance determining unit 144 may determine the determination formula u<A' i Is true or is definite formula log (u)<-β(ΔE i –E off ) Whether it is true.
(S14) the replica updating unit 140 updates the state variable x i And a local field h i . The replica update unit 140 resets n to 0 and E off Reset to 0, and reset Δ E min . For example, the replica update unit 140 stores the state variable x in the state storage unit 142 i Is inverted to update the energy to E = E + Δ E i And updates the local field h according to the inversion 1 、h 2 、……、h N }. The process proceeds to step S18.
(S15) the copy updating unit 140 determines whether the non-updated counter N is equal to or greater than a round determination number N, for example, whether the counter N is N ≧ N. In the case where n.gtoreq.N, the process proceeds to step S16. In the case where N < N, the process proceeds to step S17. The determination of step S15 is performed by the offset control unit 145b.
The determination of step S15 may also be to determine whether the non-updated counter N has reached a round determination number N, for example, whether N = N. In the case where N = N, the process proceeds to step S16, and in the case where N ≠ N, the process proceeds to step S17.
(S16) the duplicate update unit 140 sets E off =ΔE min . For example, offsetThe control unit 145b sets the offset value held in the offset holding unit 145a to E off =ΔE min . The process proceeds to step S18.
(S17) the copy update unit 140 increments the non-updated counter n. For example, the offset control unit 145b sets n = n +1. The process proceeds to step S18.
(S18) the duplicate updating unit 140 determines whether the value of the state variable has been updated a specified number of times. When the state variable has been updated a specified number of times, the process ends. When the state variable is not updated the specified number of times, the process proceeds to step S11.
According to the above-described procedure, when one scan is completed without inversion, since Δ E is at least in the next scan i Index of minimum value is taken' i =1, the value of at least one state variable can therefore be inverted in the next sweep.
As described above, the search processing unit 130 may use the SA method, the PT method, or the like for the solution search. According to the SA method or the PT method, the temperature value T for the replica is changed at a predetermined timing. Therefore, the above steps S11 to S18 can be regarded as a series of processes for one temperature value T. For example, in the case of yes in step S18, the search processing unit 130 repeatedly executes the process of changing to the next temperature value T and repeating steps S11 to S18, and outputs the set of values of the plurality of state variables finally obtained by the state saving unit 142 as a solution to the control unit 190. The search processing unit 130 may output energy corresponding to the solution to the control unit 190 together with the above solution.
In step S15, it is determined whether the value of a wheel state variable is completed without being inverted based on the non-updated counter n. As a method in which one scan round of determining the state variable is performed, the following two methods are conceivable. According to the first method, when all permutations of the pre-generated index are consumed, it is determined that one round has been completed. According to the second method, it is determined that one round has been completed when the number N of state variables counted from the middle of the immediately preceding round has elapsed. Although the flowchart in fig. 6 shows the second method, the first method may be used.
The search processing unit 130 may set the number of state variables of the change candidates selected at one time to two or more, and may simultaneously change the values of the state variables of two or more change candidates for one transition determination. The search processing unit 130 may calculate Δ E in the case where the values of the two or more state variables change according to the amount of change in energy based on equation (2) for each of the two or more state variables.
For example, by using a set of indexes, the sequence for selecting two state variables may be an order represented by (1, 2), (1, 3), \8230;, \8230, (1, N), (2, 3), (2, 4), \8230; \8230, (2, N), \8230;, and (N-1, N). Alternatively, the sequence for selecting the two state variables may be represented by (Π) 1 ,Π 2 )、(Π 1 ,Π 3 ) 823060, (8230a) and (Π) N-1 ,Π N ) The order of presentation. Here, { Π i Is a rearrangement of {1, \8230;, N }. The search processing unit 130 may change regarding { Π at predetermined timing for each round or some rounds i {1, \ 8230; \ 8230;, N } of (A) }.
The search processing unit 130 may perform a search in which the number of state variables of the change candidate selected at one time is 1, and then perform a search in which the number of state variables of the change candidate selected at one time is 2. The search processing unit 130 may sequentially select the state variables to be determined in consideration of a constraint that only one of the state variables belonging to the predetermined group is set to 1. Examples of such constraints include constraints known as 1W1H (unidirectional one-Way one-Hot (1-Way 1-Hot)) and 2W1H (bidirectional one-Way one-Hot (2-Way 1-Hot)).
For example, when two state variables are simultaneously changed in a parallel search in which a plurality of state transitions are simultaneously set as transition candidates and one state transition is selected from the plurality of state transitions, the number of combinations of transition candidates is increased to N (N-1). Therefore, in the parallel search, it is not realistic to perform a search in which two or more state variables are changed at the same time. In contrast, in the method of sequentially selecting state variables, a search in which two or more state variables are changed simultaneously can be easily performed, and the degree of freedom of the search can be improved. As an example of the parallel search, japanese laid-open patent publication No. 2019-125155 can be used as a reference.
In order to obtain a solution to the problem represented by the energy function, it is considered to sequentially select the state variables as described above, and to determine whether to allow the state transition associated with the state variables based on the amount of change in energy. According to this method, the determination for each of the plurality of state variables is repeatedly performed until the state transition is performed, for example, in such a manner that the next round of determination is started in a case where the state variables of one round are completed and any state transition is not allowed. However, since the number of iterations increases while not performing the state transition, the time taken to obtain the solution increases.
Therefore, when it is continuously determined that the number of times the value of the state variable will not be changed reaches the predetermined number of times, the information processing apparatus 100 uses the offset value E off The amount of change in energy is corrected so as to easily accept the state transition associated with each state variable and promote the state transition. For example, by setting E off =E off * The information processing apparatus 100 reliably causes a state transition to occur in at least one state variable, and facilitates the state transition.
Since the stagnation of the state transition is suppressed in this way, the information processing apparatus 100 can improve the efficiency of the solution search. As a result, the information processing apparatus 100 can reach a good solution in a short time. For example, even for a problem with a small number of inversion candidates, such as a combinatorial optimization problem with a large number of states where the energy takes a local minimum, a good solution can be searched efficiently.
Fig. 7 is a diagram showing an exemplary solution result (part 1).
Graph G10 shows exemplary solution results of the ferromagnetic isooctyl model at low temperature (T = 0.01). The graph G10 is obtained by performing 200 times of simulations while changing the random number seed and plotting the number of trials that have reached the solution and the cumulative frequency thereof. The horizontal axis of the graph G10 indicates the number of trials that have reached the solution. The vertical axis of graph G10 indicates the cumulative frequency of runs that have reached the solution in percent. The term "run" corresponds to one of 200 simulations.
The number of state variables of the ferromagnetic eosin model set in this problem is 32 × 32=1024, and periodic boundary conditions are applied. The initial state of the search is random, and all state variables are 0 or 1 in the ground state (lowest energy state). In this case, it is theoretically estimated that about 2/3 of the operation is limited to the local solution.
Graph G10 shows series G11, G12 and G13.
The series G11 is a result in the case of using a parallel search in which a plurality of state transitions are simultaneously set as transition candidates and one state transition is selected from the plurality of state transitions.
Series G12 is when the state variables are sequentially selected and when no offset value E is applied off The result in the case where the search is performed.
The series G13 is a series of sequentially selecting state variables and applying an offset value E by the function of the information processing apparatus 100 off The result in the case where the search is performed.
When comparing the series G11 and G12 with each other, it can be seen that the sequential method is about three times faster than the parallel search in which a plurality of state transitions are simultaneously set as transition candidates.
When comparing the series G12 and G13 with each other, it can be seen that the percentage of runs to reach the solution is further increased by applying an offset value in the sequential method. As described above, by using the offset value, a large number of runs can reach the solution in a relatively short time, and the solution search performance can be improved.
Fig. 8 is a diagram showing an exemplary solution result (part 2).
Graph G20 shows an exemplary solution result for the PT method for the Quadratic Assignment Problem (QAP). The graph G20 is obtained by performing 200 times of simulations while changing the random number seed and plotting the number of trials that have reached a solution and the cumulative frequency thereof. The horizontal axis of the graph G20 indicates the number of trials that have reached the solution. The vertical axis of graph G20 indicates, in percentage, the cumulative frequency of runs that have reached the solution.
The target QAP is the esc16a of QAPIB. The number of state variables is 16 × 16=256. All state variables are set to 0 in the initial state. The temperature value T ranges from 0.5 to 5.0. The number of copies is 26. The number of trials (e.g., exchange intervals) before the temperature value or state is exchanged is 256.
Graph G20 shows series G21, G22 and G23.
The series G21 is a result in the case of using a parallel search in which a plurality of state transitions are simultaneously set as transition candidates and one state transition is selected from the plurality of state transitions.
Series G22 is a series of sequentially selected state variables and no offset E is applied off The result in the case of performing a search.
The series G23 is a series of sequentially selecting state variables and applying an offset value E by the function of the information processing apparatus 100 off The result in the case where the search is performed.
When comparing series G23 with series G21 and G22, it can be seen that by the offset value E off The number of trials before reaching the solution was reduced to about 1/2. As described above, the offset value E may be set off Escape from the local solution with less trial count and may be better than without the use of the offset value E off The situation reaches the optimal solution several times faster.
[ fourth embodiment ]
Next, a fourth embodiment will be described. Items different from the above-described third embodiment will be mainly discussed below, while descriptions of common items are omitted.
Fig. 9 is a diagram showing a functional example of a copy updating unit according to the fourth embodiment.
The information processing apparatus 100a is implemented by the same hardware as that of the information processing apparatus 100. As in the information processing apparatus 100, the information processing apparatus 100a includes a coefficient holding unit 120, a search processing unit 130, and a control unit 190 shown in fig. 4. Fig. 9 shows the copy updating unit 140a, the index generating unit 150, and the random number generating unit 160 included in the search processing unit 130, and does not show the search processing unit 130 and the control unit 190.
The information processing apparatus 100a differs from the third embodiment in that a copy updating unit 140a is included in the search processing unit 130 instead of the copy updating unit 140.
The duplicate updating unit 140a includes a cache 141, a state holding unit 142, a Δ E calculation unit 143, an acceptance determination unit 144, and a random key setting unit 146. The cache 141, the state holding unit 142, the Δ E calculation unit 143, and the acceptance determination unit 144 perform processing similar to that of the function having the same name shown in fig. 5. However, in the fourth embodiment, when rejecting the state transition of the index i, the acceptance determining unit 144 notifies the rejection of the state transition of the index i to the random key setting unit 146.
Based on equation (11), the random key setting unit 146 obtains a random key value k for the index i i . According to a fourth embodiment, the random key value is abbreviated as a probabilistic key.
The random key setting unit 146 counts the number of times the acceptance determination unit 144 continuously rejects the state transition, and when the number reaches the round determination number Z of the transition determination, it is based on the random key k i A state variable whose value is to be changed is determined and the state holding unit 142 is notified of the state variable.
For example, when the number of state variables of the change candidates selected at one time is 1, the number of times of one round of determination Z may be N. The random key setting unit 146 holds the minimum value k of the random key obtained when the state transition is successively rejected min For calculating k min Δ E of m And its index m. When the number of consecutive rejections reaches Z, the random key setting unit 146 will correspond to the saved k min Is determined to be subjected to transition, and notifies the state holding unit 142 of the state variable corresponding to k min State variable x of m And Δ E m
The state holding unit 142 pairs the state variable x subjected to transition received from the random key setting unit 146 m Value of (A)The inversion is performed. State retention unit 142 based on Δ E m For E = E + Δ E m The update is performed. The state holding unit 142 updates the local field h based on the weight coefficient held in the cache 141 1 、h 2 823060 \ 8230a & N
According to a random key k based on equation (9) or equation (10) i The random key setting unit 146 may determine a state variable whose value is to be changed. In this case, as described above, the random key setting unit 146 changes the value of the state variable that takes the maximum random key. The random key setting unit 146 may be based on the weighted probability P in equation (6) i To determine the state variable whose value is to be changed. In this case, the random key setting unit 146 calculates the random number r in equation (7), and determines to change the index satisfying equation (8) k State variable x of k The value of (c). R of equation (7) can also be considered as being based on the random number u and the variation Δ E i The random key of (2).
The search processing unit 130, and the copy updating unit 140a, the index generating unit 150, and the random number generating unit 160 included in the search processing unit 130 are realized by the accelerator card 103 included in the information processing apparatus 100 a. The arithmetic function, the index generation unit 150, and the random number generation unit 160 in the copy update unit 140a are realized by the FPGA 111. The RAM 112 is used to save data in the copy update unit 140a.
The search processing unit 130 and the copy updating unit 140a, the index generating unit 150, and the random number generating unit 160 included in the search processing unit 130 can be realized by causing the CPU 101 to execute a program stored in the RAM 102 included in the information processing apparatus 100 a. In this case, the information held in the search processing unit 130 may be held in the RAM 102 or the cache of the CPU 101.
Fig. 10 is a flowchart showing an example of processing of the information processing apparatus.
(S20) the control unit 190 stores the weight coefficients in the coefficient holding unit 120, and initializes the copy updating unit 140a. In the initialization, the control unit 190 sets an initial temperature value and a PT temperature value to be used in the SA method or the PT methodThe number of iterations (specified number) of trials in search is set in the duplicate update unit 140a, and the order of scanning the state variables is set in the index generation unit 150. The control unit 190 may set the initial solution, the initial value of the local field, and the initial value of the energy in the copy updating unit 140a. The control unit 190 sets k held in the random key setting unit 146 min Reset to a relatively large initial value. The control unit 190 resets the non-updated counter n held in the random key setting unit 146 to n =0. The control unit 190 causes the search processing unit 130 to start the solution search.
(S21) the copy updating unit 140a reads the next index i generated by the index generating unit 150. The duplicate update unit 140a updates the weight coefficient { W } corresponding to the index i 1i 、W 2i 、……、W Ni Is preloaded into cache 141.
(S22) the replica updating unit 140a calculates Delta E i And update k min . As described above, Δ E is calculated by the Δ E calculation unit 143 i 。k min Is performed by the random key setting unit 146. k is a radical of min Is denoted as k min =min(k min ,k i )。K i Represented by equation (11). The random key setting unit 146 also holds a key corresponding to k min Δ E of i And an index i.
(S23) based on the uniform random number u input from the random number generation unit 160, the duplicate update unit 140a determines whether to accept the state variable x i E.g., whether to accept a state transition for index i. When accepting the state variable x i When the value of (b) is determined, for example, when the state transition of the index i is accepted, the process proceeds to step S24. When the state variable x is not accepted i When the value of (b) is inverted, for example, when the state of the rejection index i is transitioned, the process proceeds to step S25. The determination of step S23 is performed by the acceptance determination unit 144. As described above, in the determination of step S23, the acceptance determination unit 144 may determine that the formula u is determined<A' i Whether it is true, or determining the formula log (u)<-β(ΔE i -E off ) Whether it is true.
(S24) the duplicate update unit 140a updates the state changeQuantity x i And a local field h i . The copy update unit 140a resets n to 0 and E off Reset to 0, and reset Δ E min . For example, the replica update unit 140a will save the state variable x in the state saving unit 142 i Is inverted to update the energy to E = E + Δ E i And updates the local field h according to the inversion 1 、h 2 、……、h N }. The process proceeds to step S28.
(S25) the duplicate updating unit 140a determines whether the non-updated counter N is equal to or greater than a round determination number N, for example, whether the counter N is N ≧ N. In the case where n.gtoreq.N, the process proceeds to step S26. In the case where N < N, the process proceeds to step S27. The determination of step S25 is performed by the random key setting unit 146.
The determination of step S25 may also be to determine whether the non-updated counter N has reached a round determination number N, for example, whether N = N. When N = N, the process proceeds to step S26, and when N is not the same as N, the process proceeds to step S27.
(S26) the duplicate updating unit 140a updates the secret key k corresponding to the random key min State variable x of m And a local field h i . Replica update unit 140a resets n to 0 and resets k min . For example, the replica update unit 140a will save the state variable x in the state saving unit 142 i To update the energy to E = E + Δ E m And updates the local field h according to the inversion 1 、h 2 、……、h N }. The process proceeds to step S28.
(S27) the duplicate updating unit 140a increments the non-updated counter n. For example, the random key setting unit 146 sets n = n +1. The process proceeds to step S28.
(S28) the duplicate updating unit 140a determines whether the value of the state variable has been updated a specified number of times. When the state variable has been updated a specified number of times, the process ends. When the state variable is not updated the specified number of times, the process proceeds to step S21.
According to the above-described procedure, when inversion does not occur after completion of one round of scanning, the value of the state variable corresponding to the index for which the random key has the minimum value can be inverted.
As described above, the search processing unit 130 may use the SA method, the PT method, or the like for the solution search. According to the SA method or the PT method, the temperature value T for the replica is changed at a predetermined timing. Therefore, the above steps S21 to S28 may be regarded as a series of processes for one temperature value T. For example, in the case of yes in step S28, the search processing unit 130 repeatedly executes the process of changing to the next temperature value T and repeating steps S21 to S28, and outputs the set of values of the plurality of state variables finally obtained by the state saving unit 142 as a solution to the control unit 190. The search processing unit 130 may output energy corresponding to the solution to the control unit 190 together with the above solution.
In step S25, it is determined whether the value of a wheel state variable is completed without being inverted based on the non-updated counter n. As a method in which one scan round of determining the state variable is performed, the following two methods are conceivable. According to the first method, when all permutations of the pre-generated index are consumed, it is determined that one round has been completed. According to the second method, it is determined that one round has been completed when the number N of state variables counted from the middle of the immediately preceding round has elapsed. Although the flowchart in fig. 10 shows the second method, the first method may be used.
The search processing unit 130 may set the number of state variables of the change candidates selected at one time to two or more, and may simultaneously change the values of the state variables of two or more change candidates for one transition determination. The search processing unit 130 may calculate Δ E in the case where the values of the two or more state variables are changed according to the amount of change in energy based on equation (2) for each of the two or more state variables.
For example, by using a set of indexes, the sequence for selecting two state variables may be an order represented by (1, 2), (1, 3), \8230;, \8230, (1, N), (2, 3), (2, 4), \8230; \8230, (2, N), \8230;, and (N-1, N). Alternatively, for selecting two state variablesThe sequence may be (Π) 1 ,Π 2 )、(Π 1 ,Π 3 ) < u > 8230 </u >, < u > 8230 </u > and < u > pi N-1 ,Π N ) The order of presentation. Here, { Π i Is a rearrangement of {1, \8230;, N }. The search processing unit 130 may change the relation { Π ] at predetermined timings for each round or some rounds i {1, \ 8230; \ 8230;, N } of (A) }. In the case where the number of state variables of the change candidates selected at one time is a (a is an integer of 1 or more), the number of state variables selected by the duplicate updating unit 140a based on the random key is also a.
The search processing unit 130 may perform a search in which the number of state variables of the change candidate selected at one time is 1, and then perform a search in which the number of state variables of the change candidate selected at one time is 2. The search processing unit 130 may sequentially select the state variables to be determined in consideration of a constraint that only one of the state variables belonging to the predetermined group is set to 1. Examples of such constraints include constraints referred to as 1W1H and 2W 1H.
For example, when two state variables are simultaneously changed in a parallel search in which a plurality of state transitions are simultaneously set as transition candidates and one state transition is selected from the plurality of state transitions, the number of combinations of transition candidates is increased to N (N-1). Therefore, in the parallel search, it is not realistic to perform a search in which two or more state variables are changed at the same time. In contrast, in the method of sequentially selecting state variables, a search in which two or more state variables are simultaneously changed may be easily performed, and the degree of freedom of the search may be improved.
In order to obtain a solution to the problem represented by the energy function, it is considered to sequentially select the state variables as described above, and to determine whether to allow the state transition associated with the state variables based on the amount of change in energy. According to this method, the determination for each of the plurality of state variables is repeatedly performed until the state transition is performed, for example, in such a manner that the determination of the next round of determination is started in the case where the state variables of one round are completed and any state transition is not allowed. However, since the number of iterations increases while not performing the state transition, the time taken to obtain the solution increases.
Therefore, when it is continuously determined that the number of times the value of the state variable will not be changed reaches the predetermined number of times, the information processing apparatus 100a determines the state variable subject to transition by using the random key according to the amount of change in energy, and changes the value of the state variable to promote state transition. Since the stagnation of the state transition is suppressed in this way, the information processing apparatus 100a can improve the efficiency of the solution search. As a result, the information processing apparatus 100a can reach a good solution in a short time. For example, even for a problem with a small number of inversion candidates, such as a combinatorial optimization problem with a large number of states where the energy takes a local minimum, a good solution can be searched efficiently.
Next, a comparative example of search using a random key will be described. In the comparative example, sampling by a non-Rejection (RF) method is illustrated. As an example of the RF method, japanese laid-open patent publication No. 2020-135727 can be used as a reference. According to the comparative example, N random keys corresponding to N state variables are calculated in parallel, and the state variable whose value is to be inverted is selected based on the N random keys. The CPU 101 is illustrated as a processing entity of a comparative example.
Fig. 11 is a flowchart showing a comparative example.
(S30) the CPU 101 initializes the search processing. At the time of initialization, the initial temperature value and the specified number of iterations are set as in step S20.
(S31) the CPU 101 executes reading of the index.
(S32) the CPU 101 executes the pairing of the random key k in parallel 1 、k 2 8230a nd a nd N And (4) calculating. For example, k is calculated by equation (11) i . For example, the CPU 101 causes a plurality of search processing units to operate in parallel, and causes each search processing unit to calculate the random key k 1 、k 2 823060, (8230a) and N each of which.
(S33) the CPU 101 acquires the random Key k 1 、k 2 823060, (8230a) and N and searching for the minimum valuek i
(S34) the CPU 101 updates the state variable x i And a local field h i (e.g., h) 1 、h 2 823060 \ 8230a & N )。
(S35) the CPU 101 determines whether the value of the state variable has been updated a specified number of times. When the state variable has been updated a specified number of times, the process ends. When the state variable is not updated the specified number of times, the process proceeds to step S31.
As shown in fig. 10, steps S31 to S35 may be regarded as a process for one temperature value in the SA method or the like, and steps S31 to S35 may be regarded as being repeatedly performed at each temperature value used in the PT method, annealing, or the like.
According to the comparative example, when the problem to be solved is equal to or less than parallelism in one device, the loop of steps S31 to S35 can be performed at high speed. However, when the problem scale is larger than the parallelism of the apparatus, the following method is used. According to the first method, one device divides all indexes into a plurality of sections, performs steps S31 to S33 for each section in a time division manner, and searches for k in all indexes i Is measured. According to the second method, a certain device distributes a part of the index to a plurality of devices, each device performs steps S31 to S33, and one device performs k obtained by each device i And searching for k in all indexes i Is measured.
However, in the first method, the number of iterations of the loop of steps S31 to S35 becomes very large, so that the calculation time increases. In the second method, the calculation time is increased due to communication overhead between a plurality of devices.
In contrast, according to the information processing apparatus 100a, it is possible to suppress an increase in the calculation time spent during the above-described first and second methods, and to reach a good solution in a short time even for a relatively large-scale problem.
[ fifth embodiment ]
Next, a fifth embodiment will be described. Items different from the above-described third and fourth embodiments will be mainly discussed below, while descriptions of common items will be omitted.
Fig. 12 is a diagram showing a functional example of an information processing apparatus according to the fifth embodiment.
The information processing apparatus 100b is implemented by the same hardware as that of the information processing apparatus 100. As in the information processing apparatus 100, the information processing apparatus 100b includes a copy control unit 170 in addition to the coefficient holding unit 120, the search processing unit 130, and the control unit 190 shown in fig. 4. Fig. 12 shows copy update units 140b1, 140b2, \8230; and 140bn and index generation unit 150 included in search processing unit 130, and search processing unit 130 and control unit 190 are not shown.
The information processing apparatus 100b is different from those of the third and fourth embodiments in that copy update units 140b1, 140b2, \8230; and 140bn are included in the search processing unit 130 instead of the copy update units 140 and 140a. n is the number of duplicate update units and is an integer of 2 or more. Each of copy update units 140b1, 140b2, \8230 \ 8230;, and 140bn is the same as copy update unit 140 or copy update unit 140a. Fig. 12 does not show the random number generation unit 160 that provides uniform random numbers u (0 yarn u yarn 1) to each of the copy update units 140b1, 140b2, \8230 \ 8230; and 140 bn.
The information processing apparatus 100b may include a plurality of accelerator cards including the accelerator card 103. In this case, the copy update units 140b1, 140b2, \8230, and 140bn, and the index generation unit and the random number generation unit corresponding to each copy update unit 140 may be implemented by a plurality of accelerator cards. The copy control unit 170 may be realized by causing the CPU 101 to execute a program stored in the RAM 102, or may be realized by the accelerator card 103.
Each of the duplicate update units 140b1, 140b2, \8230 \ 8230;, and 140bn reads the weight coefficient corresponding to the index supplied from the index generation unit 150 from the coefficient holding unit 120, and performs transition determination according to the index. Each of the copy update units 140b1, 140b2, \8230 \ 8230;, and 140bn updates energy by changing the value of a state variable, and updates a local field according to the result of the transition determination. Index generation unit 150 may input the same index to all of copy update units 140b1, 140b2, \8230; and 140bn, or may input different indices to all or some of the copy update units.
The copy control unit 170 controls the acquisition of a solution by the SA method, the PT method, etc. using the copy update units 140b1, 140b2, \8230 \ 8230, and 140 bn. The copy control unit 170 controls a change in a temperature value in an SA method, an exchange of a temperature value between copies in a PT method, and the like in each of the copy update units 140b1, 140b2, \8230 \ 8230; and 140 bn. The copy control unit 170 may also obtain a solution by performing a PA method using the copy update units 140b1, 140b2, \8230 \ 8230, and 140 bn.
For example, the replica control unit 170 or the control unit 190 may acquire a solution finally obtained by each of the replica update units 140b1, 140b2, \8230; and 140bn, select an optimal solution (e.g., a solution having the smallest energy), and provide the selected solution to the user.
As described above, in the information processing apparatus 100b, each of the plurality of replica updating units selects the state variables of the change candidates in a predetermined order, performs transition determination on the state variables of the change candidates, and searches for a solution. When the number of times that the state transition is successively rejected reaches a predetermined number, each of the plurality of replica updating units corrects the amount of change in energy used for the transition determination with the offset value, or determines the state variable subject to the transition based on a random key corresponding to the amount of change in energy.
Therefore, as in the third and fourth embodiments, the information processing apparatus 100b can improve the efficiency of solution search and improve the solution search performance. For example, since each of the plurality of replica update units distributes and allocates the range of indexes of state variables responsible for transition determination, the information processing apparatus 100b can cope with a relatively large scale problem with a large number of state variables.
In which a plurality of state transitions are simultaneously set as transition candidates and transitions from a plurality of statesIn a parallel search in which one state transition is selected, Δ E is calculated for all N state variables in the vicinity of the current state i . Therefore, in the case of a problem in which the parallelism is equal to or higher than the parallelism possible in hardware, the calculation speed is reduced. For example, in the case of solving a 100 k-bit problem by using a 1 k-bit parallel device, 100 parallel determinations are performed, and then it is determined which bit is to be inverted, which takes time.
As exemplified in japanese laid-open patent publication No. 2020-140631, a method of sequentially inverting the values of the state variables by parallel search is also considered. However, even with the above method, there is a problem with few accepted candidates or with a large number of local minima (where Δ E is for all i) i >0) It is difficult to find a good solution in a short time even without inverting the value of the state variable.
When a stagnation of state transition is observed in the method of sequentially selecting transition candidates, each of the information processing apparatuses 100, 100a, and 100b uses an offset value or a random key to facilitate the state transition. Therefore, even for a relatively large-scale problem with a small number of inversion candidates, such as a combinatorial optimization problem with a large number of states where the energy takes a local minimum, a good solution can be searched efficiently.
For example, the information processing apparatus 100 according to the third embodiment performs the following processing. The information processing apparatus 100b according to the fifth embodiment can also execute processing similar to that of the information processing apparatus 100. The processing unit 12 according to the first embodiment can also perform the following processing of the duplicate update unit 140. The information processing apparatus 100 searches for a solution of a problem represented by an energy function including a plurality of state variables.
The replica updating unit 140 selects state variables that are change candidates of a part of the plurality of state variables in a predetermined order. The replica updating unit 140 determines whether to change the value of the state variable of the change candidate based on the change amount of the value of the energy function corresponding to the state variable of the selected change candidate. When it is determined that the value of the state variable of the change candidate is to be changed, the replica updating unit 140 changes the value of the state variable of the change candidate. When the number of times that the value of the state variable of the change candidate is continuously determined to be unchanged reaches a predetermined number of times, the replica updating unit 140 corrects the amount of change corresponding to the state variable of the newly selected change candidate using the offset value. Based on the corrected amount of change, the replica updating unit 140 determines whether to change the value of the state variable of the change candidate.
Therefore, the information processing apparatus 100 can improve the efficiency of solution search. For example, even in the case where a local solution falls in the search by the sequential method (sequential MCMC method), the information processing apparatus 100 can promote the state transition and can improve the efficiency of the solution search.
For example, the information processing apparatus 100 executes a search process for searching a solution of a problem represented by an energy function including a plurality of state variables. The search process includes a selection process, a determination process, and a state change process. In the selection process, the replica updating unit 140 selects state variables that are change candidates of a part of the plurality of state variables in a predetermined order. In the determination process, the duplicate update unit 140 determines whether to change the value of the state variable of the change candidate based on the change amount of the value of the energy function corresponding to the change in the value of the state variable of the change candidate selected in the selection process. In the state change process, when it is determined in the determination process that the value of the state variable of the change candidate is to be changed, the copy updating unit 140 changes the value of the state variable of the change candidate. In the search processing, the duplicate update unit 140 repeatedly executes the selection processing, the determination processing, and the state change processing according to a predetermined order. In the search processing, the duplicate update unit 140 also performs count processing and correction processing. In the counting process, the duplicate updating unit 140 counts the number of times the value of the state variable determining the change candidate will not be continuously changed during the search process repeatedly performed. In the correction process, when the number of times counted in the count process reaches a predetermined number of times, the replica updating unit 140 corrects the amount of change of the energy function corresponding to the change in the value of the state variable of the newly selected change candidate using the offset value. In the determination process after the amount of change is corrected by the correction process, the duplicate update unit 140 determines whether to change the value of the state variable of the newly selected change candidate based on the corrected amount of change.
Therefore, the information processing apparatus 100 can improve the efficiency of solution search. For example, even in the case where a local solution falls in the search by the sequential method (sequential MCMC method), the information processing apparatus 100 can promote the state transition and can improve the efficiency of the solution search.
For example, in the correction of the variation amount of the value of the energy function, the replica updating unit 140 performs the correction of subtracting the offset value from the variation amount.
Therefore, in searching for a solution to the problem of minimizing energy, the probability that the value of the state variable that determines the newly selected change candidate will be changed can be increased as compared with the case where correction with the offset value is not performed. In the case of searching for a solution to the problem of maximizing energy, it is conceivable that the replica updating unit 140 performs random selection in such a manner that state transitions with large amounts of energy variation are prioritized. In this case, in the correction of the amount of change in energy, it is also conceivable that the replica updating unit 140 promotes the state transition by adding a positive offset value to the amount of change.
After changing the value of the state variable of the change candidate based on the corrected amount of change, the duplicate update unit 140 cancels the correction with the offset value.
Therefore, the information processing apparatus 100 can restart the appropriate search based on the normal amount of change in energy. For example, elimination of correction using an offset value corresponds to subtracting the offset value E described above off Reset to 0.
The duplicate updating unit 140 sets the number of selections required for one round of selection of the state variables of the change candidates according to the predetermined order as a predetermined number of times.
Therefore, for example, even in the case where a local solution falls in the search by the sequential method, the information processing apparatus 100 can promote the state transition and can improve the efficiency of the solution search. The number of selections required for one round of selection is the number of selections of the state variables of the change candidates required to select all the state variables of the change candidates from the plurality of state variables in a predetermined order. The number of selections required for one round of selection corresponds to the number of determinations Z described above.
The replica updating unit 140 randomly determines whether to change the value of the state variable of the change candidate by comparing the amount of change in energy with a random value. By correcting the amount of change in energy using the offset value, the replica updating unit 140 increases the probability of determining the value of the state variable that changes the change candidate, compared to the case where correction using the offset value is not performed.
Therefore, even in the case where a local solution falls in the search by the sequential method, the information processing apparatus 100 can promote the state transition and can improve the efficiency of the solution search.
For example, when it is determined that the number of times the value of the state variable of the change candidate is not continuously changed reaches a predetermined number of times, the replica updating unit 140 sets the minimum value of the amount of change obtained for each state variable of the change candidate as the offset value.
Therefore, the information processing apparatus 100 can obtain the optimum offset value.
For example, the replica updating unit 140 sets the probability of determining to change the value of the state variable of the change candidate corresponding to the above-described minimum value to 1 by performing correction of subtracting the offset value from the amount of change in energy.
Therefore, the information processing apparatus 100 can determine to change the value of the state variable of the change candidate corresponding to at least the minimum value described above, and can reliably cause the state transition.
The replica updating unit 140 sets the number of state variables of the change candidate selected for one determination of whether to change the value of the state variable of the change candidate to one or more.
Therefore, the information processing apparatus 100 can improve the degree of freedom of the search, and can increase the possibility of further improving the efficiency of the solution search according to the problem.
For example, the information processing apparatus 100a according to the fourth embodiment performs the following processing. The information processing apparatus 100b according to the fifth embodiment can also execute processing similar to that of the information processing apparatus 100 a. The processing unit 22 according to the second embodiment can also execute the following processing of the duplicate update unit 140a. The information processing apparatus 100a searches for a solution to a problem represented by an energy function including a plurality of state variables.
The replica updating unit 140a selects state variables that are change candidates of a part of the plurality of state variables in a predetermined order. The replica updating unit 140a determines whether to change the value of the state variable of the change candidate based on the change amount of the value of the energy function corresponding to the state variable of the selected change candidate. When it is determined that the value of the state variable of the change candidate is to be changed, the replica updating unit 140a changes the value of the state variable of the change candidate. When the number of times that the value of the state variable of the change candidate is not to be changed is continuously determined reaches a predetermined number of times, the replica updating unit 140a selects a first state variable from the plurality of state variables based on the random key value calculated from the change amount and the random number value, and changes the value of the first state variable.
Therefore, the information processing apparatus 100a can improve the efficiency of solution search. For example, even in the case where a local solution falls in the search by the sequential method, the information processing apparatus 100a can promote the state transition and can improve the efficiency of the solution search.
For example, the information processing apparatus 100a performs a search process for searching for a solution to a problem represented by an energy function including a plurality of state variables. The search process includes a selection process, a determination process, and a state change process. In the selection process, the replica updating unit 140a selects state variables that are change candidates of a part of the plurality of state variables in a predetermined order. In the determination process, the duplicate update unit 140a determines whether or not to change the value of the state variable of the change candidate based on the change amount of the value of the energy function corresponding to the change in the value of the state variable of the change candidate selected in the selection process. In the state change process, when it is determined in the determination process that the value of the state variable of the change candidate is to be changed, the duplicate update unit 140a changes the value of the state variable of the change candidate. In the search processing, the duplicate update unit 140a repeatedly executes the selection processing, the determination processing, and the state change processing according to a predetermined order. The duplicate updating unit 140a performs a counting process for counting the number of times the value of the state variable that determines the change candidate will not be changed continuously during the search process that is repeatedly performed. When the number of times counted in the counting process reaches a predetermined number of times, the replica updating unit 140a selects a first state variable from the plurality of state variables based on the random key value calculated from the variation and the random number value, and changes the value of the first state variable.
Therefore, the information processing apparatus 100a can improve the efficiency of solution search. For example, even in the case where a local solution falls in the search by the sequential method, the information processing apparatus 100a can promote the state transition and can improve the efficiency of the solution search.
When it is determined that the number of times the value of the state variable of the change candidate will not be changed continuously reaches a predetermined number of times, the duplicate update unit 140a calculates a random key value corresponding to the variation amount and the random number value obtained for each state variable of the change candidate. The duplicate updating unit 140a sets the state variable of the change candidate corresponding to the minimum value or the maximum value among the calculated random key values as the first state variable.
Therefore, the information processing apparatus 100a can appropriately obtain the first state variable. As a random number value used to calculate a specific random key value, the copy updating unit 140a may use a random number value generated at a timing when a corresponding random key value is calculated.
The copy updating unit 140a calculates a random key value based on the amount of energy variation, the random number value, and the temperature value used for the search solution.
Therefore, the information processing apparatus 100a can select the first state variable according to an appropriate standard (e.g., metropolis standard or the like).
The replica updating unit 140a sets the number of selections required for one round of selection of the state variables of the change candidates according to the predetermined order to a predetermined number of times.
Therefore, even in the case where a local solution falls in the search by the sequential method, the information processing apparatus 100a can promote the state transition and can improve the efficiency of the solution search. The number of selections required for one round of selection is the number of selections of the state variables of the change candidates required to select the state variables of all the change candidates from the plurality of state variables in a predetermined order. The number of selections required for one round of selection corresponds to the number of determinations Z described above.
The replica updating unit 140a sets the number of state variables of the change candidate selected for one determination of whether to change the value of the state variable of the change candidate to one or more.
Therefore, the information processing apparatus 100a can improve the degree of freedom of the search, and can increase the possibility of further improving the efficiency of the solution search according to the problem.
The information processing according to the first embodiment can be realized by causing the processing unit 12 to execute a program. The information processing according to the second embodiment can be realized by causing the processing unit 22 to execute a program. The information processing of the third to fifth embodiments can be realized by causing the CPU 101 to execute a program. Each of the information processing apparatuses 10, 20, 100a, and 100b may be implemented by a computer. The program may be recorded in the computer-readable recording medium 53.
For example, the program is circulated by distributing the recording medium 53 in which the program is recorded. The program may be stored in another computer, and the program may be distributed via a network. For example, the computer may store (install) the program recorded in the recording medium 53 or the program received from another computer in a storage device (e.g., the RAM 102 or the HDD 104), and may read the program from the storage device to execute the program.

Claims (13)

1. A program in which a computer executes processing of:
performing a search process of repeatedly performing a selection process, a determination process, and a state change process according to a predetermined order to search for a solution of a problem represented by an energy function including a plurality of state variables,
the selection process includes selecting state variables that are change candidates of a part of the plurality of state variables in a predetermined order,
the determination process includes determining whether to change the value of the state variable of the change candidate based on a change amount of the value of the energy function corresponding to a change in the value of the state variable of the change candidate selected in the selection process, and
the state change process includes changing a value of a state variable of the change candidate when it is determined in the determination process that the value of the state variable of the change candidate is to be changed, wherein,
the search process further comprises:
a counting process including counting the number of times the value of the state variable determining the change candidate will not be continuously changed in the search process repeatedly performed, and
a correction process including correcting a variation amount of the energy function corresponding to a variation in a value of a state variable of a newly selected variation candidate with an offset value when the number of times counted in the counting process reaches a predetermined number of times, wherein,
the determination processing includes performing, after the amount of change is corrected by the correction processing, determination as to whether or not to change the value of the state variable of the newly selected change candidate based on the corrected amount of change.
2. The non-transitory computer-readable storage medium of claim 1,
wherein the correction processing includes correcting the amount of change by subtracting the offset value from the amount of change.
3. The non-transitory computer-readable storage medium of claim 1, wherein the processing further comprises canceling the correction using the offset value after changing a value of a state variable of the change candidate based on the corrected amount of change.
4. The non-transitory computer-readable storage medium according to claim 1, wherein the processing further includes setting, as the predetermined number, a number of selections required for one round of selections of the state variables of the change candidates according to the predetermined order.
5. The non-transitory computer-readable storage medium of claim 1, wherein the processing further comprises increasing a probability of determining to change a value of a state variable of the change candidate by correcting the change amount with the offset value.
6. The non-transitory computer-readable storage medium of claim 1, wherein the process further comprises:
setting, as the offset value, a minimum value of the variation amount obtained for each of the state variables of the variation candidates when the number of times reaches the predetermined number of times; and
setting a probability of determining to change the value of the state variable of the change candidate corresponding to the minimum value to 1 by subtracting the offset value from the amount of change.
7. The non-transitory computer-readable storage medium of claim 1, wherein the processing further comprises setting the number of state variables of the change candidates selected for one determination of whether to change the values of the state variables of the change candidates to one or more.
8. An information processing apparatus comprising:
a memory; and
a processor coupled to the memory and configured to perform a search process that repeatedly performs a selection process, a determination process, and a state change process according to a predetermined order to search for a solution to a problem represented by an energy function including a plurality of state variables, wherein,
the selection process includes selecting state variables that are change candidates of a part of the plurality of state variables in a predetermined order,
the determination process includes determining whether to change the value of the state variable of the change candidate based on a change amount of the value of the energy function corresponding to a change in the value of the state variable of the change candidate selected in the selection process, and
the state change processing includes changing a value of a state variable of the change candidate when it is determined in the determination processing that the value of the state variable of the change candidate is to be changed, wherein,
the search process further includes:
a counting process including counting the number of times that the value of the state variable determining the change candidate in the repeatedly performed search process will not be changed continuously, and
a correction process including correcting, when the number of times counted in the counting process reaches a predetermined number of times, a change amount of the energy function corresponding to a change in value of a state variable of a newly selected change candidate with an offset value, wherein,
the determination process includes, after the amount of change is corrected by the correction process, performing determination as to whether to change the value of the state variable of the newly selected change candidate based on the corrected amount of change.
9. A program in which a computer executes processing of:
performing a search process of repeatedly performing a selection process, a determination process, and a state change process according to a predetermined order to search for a solution of a problem represented by an energy function including a plurality of state variables,
the selection process includes selecting state variables that are change candidates of a part of the plurality of state variables in a predetermined order,
the determination process includes determining whether to change the value of the state variable of the change candidate based on a change amount of the value of the energy function corresponding to a change in the value of the state variable of the change candidate selected in the selection process, and
the state change process includes changing a value of a state variable of the change candidate when it is determined in the determination process that the value of the state variable of the change candidate is to be changed,
the search process further includes:
a counting process including counting a number of times that a value of a state variable determining the change candidate in the repeatedly performed search process will not be changed continuously,
selecting a first state variable from the plurality of state variables based on a random key calculated from the variation and a random number value when the number of times counted in the counting process reaches a predetermined number, and
changing the value of the selected first value.
10. The program of claim 9, wherein the processing further comprises:
calculating the random key from the variation obtained for each of the state variables of the variation candidates and the random number value; wherein,
the selecting includes selecting, as the first state variable, a state variable of the variation candidate corresponding to a maximum value or a minimum value of the calculated random key.
11. The program of claim 9, wherein the processing further comprises computing the random key from the delta, the random number value, and a temperature value used to search for the solution.
12. The program according to claim 9, wherein the processing further comprises setting, as the predetermined number of times, a number of selections required for one round of selection of the state variables of the change candidates according to the predetermined order.
13. The program according to claim 9, wherein the processing further includes setting the number of state variables of the change candidates to one or more.
CN202210143157.4A 2021-05-11 2022-02-16 Program and information processing apparatus Pending CN115329978A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021080535A JP2022174616A (en) 2021-05-11 2021-05-11 Program, information processing method, and information processing apparatus
JP2021-080535 2021-05-11

Publications (1)

Publication Number Publication Date
CN115329978A true CN115329978A (en) 2022-11-11

Family

ID=80001261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210143157.4A Pending CN115329978A (en) 2021-05-11 2022-02-16 Program and information processing apparatus

Country Status (4)

Country Link
US (1) US20220366011A1 (en)
EP (1) EP4089591A3 (en)
JP (1) JP2022174616A (en)
CN (1) CN115329978A (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10095660B2 (en) 2013-03-13 2018-10-09 Sas Institute Inc. Techniques for producing statistically correct and efficient combinations of multiple simulated posterior samples
JP6993571B2 (en) 2018-01-17 2022-01-13 富士通株式会社 Optimization device and control method of optimization device
JP7273288B2 (en) 2019-02-25 2023-05-15 富士通株式会社 Sampling device and sampling device control method
JP7197789B2 (en) 2019-03-01 2022-12-28 富士通株式会社 Optimization device and control method for optimization device

Also Published As

Publication number Publication date
EP4089591A3 (en) 2023-01-04
JP2022174616A (en) 2022-11-24
US20220366011A1 (en) 2022-11-17
EP4089591A2 (en) 2022-11-16

Similar Documents

Publication Publication Date Title
CN111210046B (en) Optimizing apparatus and control method of optimizing apparatus
EP3779616B1 (en) Optimization device and control method of optimization device
US11562210B2 (en) Stochastically determining to accept a state transition for an optimization device
US20210334332A1 (en) Information processing apparatus, information processing method, and non-transitory computer-readable storage medium for storing program
US20210065087A1 (en) Information processing apparatus, combination optimization method, and computer-readable recording medium recording combination optimization program
CN113342403A (en) Information processing method, information processing system, and computer-readable recording medium
EP3896622A1 (en) Sampling device, sampling method, and sampling program
EP3872656A1 (en) Information processing apparatus, information processing method, and program
US11199884B2 (en) Optimization device and method of controlling optimization device utilizing a spin bit
US20210397923A1 (en) Information processing device, regression model generation method, and regression model generation program product
EP4187448A1 (en) Information processing apparatus, information processing method, and program
CN113919504A (en) Information processing system, information processing method, and computer-readable storage medium
CN115329978A (en) Program and information processing apparatus
EP4290417A1 (en) Information processing apparatus, information processing method, and information processing program
US20230350972A1 (en) Information processing apparatus and information processing method
US20240111833A1 (en) Data processing apparatus and data processing method
EP4148628A1 (en) Data processing apparatus, data processing method, and data processing program
US20230267165A1 (en) Computer-readable recording medium storing data processing program, data processing device, and data processing method
CN117930940A (en) Data processing apparatus, data processing method, and computer-readable recording medium
CN116186343A (en) Information processing apparatus, information processing method, and computer-readable recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination