Information processing system, information processing method, and computer-readable recording medium storing program
By calculating the expected value of the cost term change from the constraint satisfaction solution to the constraint violation solution, determining the constraint coefficients and optimizing the energy function, the problem of long-term determination of constraint coefficients in the prior art is solved, and the search efficiency of the combination optimization problem is improved.
Patent Information
- Application Number
- CN202410582236.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-05-15
- Filing Date
- 2024-05-11
- Publication Date
- 2024-11-15
AI Technical Summary
Existing methods require a large number of adjustments and time when determining the constraint coefficients, making it difficult to efficiently search and obtain high-quality solutions on a large scale.
By calculating the expected value of the change in the cost term from the constraint satisfaction solution to the constraint violation solution, the coefficient of the constraint term is determined, and the energy function is optimized to shorten the determination time of the constraint coefficient.
The time required for determining the constraint coefficient is reduced, the search efficiency of combination optimization problems is improved, and the number of adjustments is reduced.
Smart Images

Figure CN118965942A_ABST
Abstract
Description
Technical Field
[0001] The embodiments discussed herein relate to an information processing system, an information processing method, and a non-transitory computer-readable recording medium storing a program. Background Art
[0002] There is an Ising machine (also known as a Boltzmann machine) that calculates a multivariable combinatorial optimization problem that von Neumann computers are not good at by replacing the combinatorial optimization problem with an Ising model, which is a model that represents the behavior of spins in magnetic materials. Examples of methods for solving problems replaced with the Ising model in real time include simulated annealing (SA) methods and Markov chain Monte Carlo (MCMC) methods such as replica exchange methods. The combinatorial optimization problem is formulated by an energy function including multiple state variables. For example, an information processing device searches for a ground state of the Ising model that minimizes the value of the energy function by repeatedly trying state transitions caused by changing the values of state variables using the MCMC method. The ground state corresponds to the optimal solution to the combinatorial optimization problem.
[0003] The energy function can be represented by the sum of the cost term and the constraint term. The energy function (E(x)) can be represented by, for example, the following equation (1).
[0004] [Mathematical formula 1]
[0005] E(x)=C(x)+αP(x) (1)
[0006] In formula (1), x represents a vector based on a state variable, and the state variable is a binary variable of x=(x1, x2, ..., xn). C(x) is the cost term of the objective function to be minimized. αP(x) is a constraint term. When the combinatorial optimization problem satisfies the constraint conditions to be satisfied (when the constraint is satisfied), P(x)=0 holds, and when the constraint conditions are not satisfied (when the constraint is violated), P(x)>0 holds. α represents a constraint coefficient, whose value is greater than 0. By adding such a constraint term to the cost term, it becomes difficult to select a solution that does not satisfy the constraint conditions (constraint violation solution).
[0007] Note that if the sign of the energy function changes, the state of the Ising model that maximizes the value of the energy function can be searched.
[0008] Examples of practical problems of combinatorial optimization problems include quadratic assignment problems (QAP). QAP is a problem of obtaining the following assignment when n assignment elements (facilities, etc.) are assigned to n assignment destinations (places, etc.): the assignment minimizes the sum of the products of the flow between the assignment elements (such as the cost of the transportation volume of the supply between the facilities) and the distance between the assignment destinations to which each assignment element is assigned. The flow between the assignment elements and the distance between the assignment destinations can each be represented using a matrix. In addition, the constraint that all assignment elements are assigned to assignment destinations that are different from each other is imposed on QAP.
[0009] Meanwhile, when the constraint coefficient (α in the case of equation (1)) as described above is too small, a constraint violation solution may be generated, and when the constraint coefficient is too large, the energy barrier between constraint satisfaction solutions increases to hinder the solution space search. In addition, the appropriate value of the constraint coefficient varies greatly depending on the individual problem. So far, a method for optimizing the constraint coefficient by repeating the following process has been proposed: in this process, the constraint coefficient is adjusted based on the search result of the solution to the combinatorial optimization problem by the Ising machine.
[0010] International Publication Pamphlet No. WO 2021 / 044516 and Japanese Laid-Open Patent Publication No. 2004-110831 are disclosed as related technologies. Summary of the invention
[0011] Technical issues
[0012] However, according to existing methods, a large number of adjustments may be required to obtain a constraint coefficient capable of searching in a large range to obtain a high-quality solution, and time is required to determine the constraint coefficient.
[0013] In one aspect, an object of an embodiment is to provide an information processing system, an information processing method, and a program capable of shortening the time required to determine a constraint coefficient.
[0014] Solution to the problem
[0015] According to one aspect of the embodiment, an information processing system is provided. The information processing system is configured to calculate a combinatorial optimization problem including constraints based on an energy function of an Ising model, wherein the energy function of the Ising model is represented by the sum of a cost term and a constraint term corresponding to the constraint condition, and the information processing system comprises: a processing unit configured to obtain problem information of the combinatorial optimization problem, calculate an expected value of a change in the cost term when a transition from a solution satisfying the constraint condition to a solution not satisfying the constraint condition occurs based on the problem information, determine coefficients of the constraint term based on the expected value, and output information of the energy function using the determined coefficients; and a search unit configured to search for a ground state of the Ising model based on the output information.
[0016] According to another aspect of the embodiment, an information processing method is provided. The information processing method includes: calculating a combinatorial optimization problem including constraints by using an energy function of an Ising model, wherein the energy function of the Ising model is represented by the sum of a cost term and a constraint term corresponding to the constraint condition, and the information processing method includes: obtaining problem information of the combinatorial optimization problem; calculating an expected value of a change in the cost term when a transition occurs from a solution satisfying the constraint condition to a solution not satisfying the constraint condition based on the problem information; determining coefficients of the constraint term based on the expected value; outputting information of the energy function using the determined coefficients; and searching for a ground state of the Ising model based on the output information.
[0017] According to another aspect of the embodiment, a non-transitory computer-readable recording medium storing a program is provided. The program causes a computer used in an information processing system to perform processing, the information processing system calculates a combinatorial optimization problem including constraints based on an energy function of an Ising model, the energy function of the Ising model being represented by the sum of a cost term and a constraint term corresponding to the constraint condition, the processing comprising: obtaining problem information of the combinatorial optimization problem; calculating an expected value of a change in the cost term when a transition occurs from a solution satisfying the constraint condition to a solution not satisfying the constraint condition based on the problem information; determining a coefficient of the constraint term based on the expected value; and using the determined coefficient to output information of the energy function to a search unit of the information processing system, the search unit being configured to search for a ground state of the Ising model based on the output information.
[0018] Advantageous Effects of the Invention
[0019] In one aspect, embodiments may reduce the time required to determine constraint coefficients. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a diagram showing an exemplary information processing system according to the first embodiment;
[0021] Figure 2 is a diagram showing exemplary hardware of an information processing system according to a second embodiment;
[0022] Figure 3 is a diagram illustrating exemplary functions of an information processing system;
[0023] Figure 4 is a diagram showing an example of the presence or absence of constraint violation and constraint violation energy in a QAP;
[0024] Figure 5 is a diagram showing an exemplary relationship between states and values of an energy function;
[0025] Figure 6 is a flowchart showing the flow of an exemplary process of an information processing system;
[0026] Figure 7 is a diagram showing an exemplary matrix expansion;
[0027] Figure 8 It shows that in a certain distribution state, ij The element Q selected in ij A diagram of exemplary variations of ;
[0028] Fig. 9 is a flowchart showing the flow of processing by an information processing system according to a comparative example;
[0029] Fig.10 is a diagram showing the relationship between the value of the constraint coefficient and the calculation result according to the example of the comparative example;
[0030] Fig.11 is a diagram showing the relationship between the value of the adjustment coefficient and the calculation result according to the example of the present embodiment;
[0031] Fig.12 is a flowchart illustrating an exemplary flow of a process for determining an adjustment coefficient;
[0032] Fig.13 is a graph showing the relationship between the value of the adjustment coefficient and the calculation result of the same type of instance with different problem sizes;
[0033] Fig.14 is the matrix showing the addition of the quadratic and linear terms to equation (16) ik x jk 's picture;
[0034] Fig.15 The matrix x added to the quadratic and linear terms in (17) is shown as ik x il 's picture;
[0035] Fig.16 is a diagram showing an exemplary QUBO matrix of constraints;
[0036] Fig.17 is a diagram showing an exemplary QUBO matrix of the entire energy function;
[0037] Fig.18 is a flowchart showing the flow of an exemplary process of the information processing system according to the third embodiment;
[0038] Fig.19 It is a small matrix d kl Elements of F to small matrix f ij A diagram of an exemplary allocation of D;
[0039] Fig. 20 is a flow chart showing an exemplary process of matrix modulation; and
[0040] Fig.21 is a diagram showing the relationship between the value of the adjustment coefficient and the calculation result of an example in the case of using matrix modulation. DETAILED DESCRIPTION
[0041] Hereinafter, modes for carrying out the embodiments will be described with reference to the drawings.
[0042] (Constraint coefficient determination strategy)
[0043] The energy function of the Ising model can be expressed by the above formula (1). Here, if α, which is a constraint coefficient, is set to a value that makes the constraint violation solution greater than the constraint satisfaction solution, it is sufficient to avoid constraint violation. However, the constraint satisfaction solution has a range from the optimal solution that minimizes the value of C(x) to a solution where the value of C(x) is larger even if the constraint condition is satisfied, and it is unclear which value is suitable for use as a reference. In addition, the value of the optimal solution is unclear at first. As described above, it has been proposed to optimize the constraint coefficient by repeating the following process: in this process, the constraint coefficient is adjusted based on the search result of the solution to the combinatorial optimization problem by the Ising machine, but the adjustment takes time. In view of the above, in the present embodiment, α is determined by paying attention to the change in the value of C(x) when transitioning from the constraint satisfaction solution to the constraint violation solution.
[0044] Note that according to the MCMC method using the temperature parameter, the probability of the transition from the constraint satisfaction solution to the constraint violation solution being accepted is lower as the value of C(x) increases, although this depends on the setting of the value of the temperature parameter. Therefore, in the following, a case where the value of C(x) decreases due to the transition from the constraint satisfaction solution to the constraint violation solution will be considered.
[0045] In the case where the value of C(x) decreases due to the transition from a constraint-satisfied solution to a constraint-violated solution, if the increase in αP(x) due to the constraint violation is less than the change (decrease) in C(x), then E(x) in Equation (1) becomes smaller due to the transition. Therefore, it is very likely that a transition to a constraint-violated solution occurs. Thus, if αP(x) is set to a value that compensates for at least the decrease in C(x), it is sufficient to suppress constraint violation. Next, a method for calculating the expected value of the decrease in C(x) will be described.
[0046] (Method for calculating the expected value of the decrease in C(x))
[0047] When C(x) is represented by quadratic unconstrained binary optimization (QUBO) in Equation (1), the following Equation (2) is obtained.
[0048] [Mathematical formula 2]
[0049]
[0050] In Equation (2), Q ij represents the coupling coefficient matrix, h i represents the bias coefficient vector, and c represents the constant term.
[0051] Assuming that the order of Q ij is n, when the number of elements q ij (i < j) of Q ij is n 2 , since q ij = q ji and q ii = 0 (i.e., the diagonal elements are 0), the number of effective q ij is N = n(n - 1) / 2. Hereinafter, the above-mentioned N effective q ij are set as the elements of the upper triangle (excluding the diagonal elements) of Q ij used as the coupling coefficient matrix, and are represented as q s (s = 1,..., N). The sum of q s can be represented by the following Equation (3), and the average value (μ s ) of q q can be represented by the following Equation (4).
[0052] [Mathematical formula 3]
[0053]
[0054] [Mathematical formula 4]
[0055]
[0056] In addition, h iThe number of elements of is n, and h i The average value (μ h ) can be expressed by the following formula (5).
[0057] [Formula 5]
[0058]
[0059] In formula (2), in x i x j =1, Q ij x i x j has a value other than 0. That is, at x i x j = 1, select ij The element where column i and row j intersect. When assuming that a solution x includes x i (i=1,……,n) where the state variable x i = 1 when the number is p, the Q to be selected ij The number of elements is p(p-1) / 2.
[0060] In formula (2), in x i =1, h i x i has a value other than 0. That is, at x i =1, select h i elements of . Under the assumption that x i = 1, when the number of state variables is p, the h to be selected i The number of elements is p.
[0061] In p x values 1 i When one of the Q is reversed from 1 (deselected) to 0, the Q to be deselected ij The number of elements is p-1, and the h to be deselected i The number of elements of is 1. ij and h i The sum of the deselected elements is the reduction in C(x).
[0062] Considering the attempt to s (s=1,……,N), the value of the extracted element is X=q1,……,q N is a random variable. However, the extraction of the p-1 elements that are deselected above is a sampling without replacement, and the p-1 elements that are deselected exist in Q ij In the same row or column of iThe choice of is not random, but a function of x. Therefore, the sequence of random variables {X1, ..., X p-1} does not follow independent and identical distribution.
[0063] However, when n is large, sampling without replacement can be approximately regarded as sampling with replacement. In addition, when choosing x to reverse i When , the solution through the Ising machine includes random processes. In view of the above, assuming that X is a random variable that approximately follows an independent and identically distributed (iid) distribution, then the random variable sequence {X1, ..., X1} including the p-1 elements that are deselected p-1 The expected value of the sum S of} is μ q(1→0) =(p-1)μ q .
[0064] Similarly, consider the set of bias coefficients {h s (s=1,……,N)}. Assume that the value of the extracted element is Y=h1,……,h p is a random variable that follows iid, then the expected value of the sum of the random variable sequence {Y1} (the number of elements is 1 as mentioned above) including the deselected elements is μ h(1→0) =μ h .
[0065] Based on the above, the expected value of the reduction in C(x) is Δ - C(x)=μ q(1→0) +μ h(1→0) =(p-1)μ q +μ h When using such a Δ - When C(x) is used as the constraint coefficient α, when the value of C(x) decreases due to the transition from a constraint satisfaction solution to a constraint violation solution, the increase in αP(x) due to the constraint violation can be set to a value that compensates for the decrease in C(x).
[0066] (Applicable to QAP)
[0067] In the objective function of QAP, h i is 0 identically to c, and therefore C(x) can be expressed by the following formula (6).
[0068] [Mathematical formula 6]
[0069]
[0070] In QAP, each of the flow between allocation elements and the distance between respective allocation destinations can be represented using a matrix (see Figure 1). In the case of allocating n allocation elements to n allocation destinations, C(x) can be expressed by the following equation (7).
[0071] [Formula 7]
[0072]
[0073] In formula (7), f ij The flow in the i column and j row of the flow matrix F represents the flow between the distribution elements (the flow between the i-th distribution element and the j-th distribution element). The distance in the k column and l row of the distance matrix D represents the distance between the distribution destinations (the distance between the k-th distribution destination and the l-th distribution destination). kl The allocation matrix x representing the allocation state (see the later description) Figure 1 ) is assigned to columns i and rows k by x ik In the case where the i-th allocation element is allocated to the k-th allocation destination, x ik =1 holds, and when the i-th allocation element is not allocated to the k-th allocation destination, x ik =0 holds true.
[0074] Note that P(x) in equation (1) can be expressed as equation (8) in QAP.
[0075] [Mathematical formula 8]
[0076]
[0077] The first term on the right side is used to make an i satisfy x ik = 1 and k are the same constraint items, and indicate the constraint of allocating an allocation element to an allocation destination. The second item on the right side is used to make a k satisfy x ik =1 and i are the same constraint terms, and indicate the constraint of allocating one allocation element to one allocation destination. Although α≠β may be satisfied, the flow matrix F and the distance matrix D are essentially symmetric matrices in QAP, and thus β=α may be satisfied, and the constraint terms may be collectively expressed as αP(x).
[0078] As shown in the following formula (9), Q in formula (6) ij It can be represented by a matrix Q based on the Kronecker product of the flow matrix F and the distance matrix D. The matrix Q includes n×n small matrices f ij D.
[0079] [Mathematical formula 9]
[0080]
[0081] When Equation (9) is expanded, a matrix Q of order n as indicated in Equation (10) is obtained. 2 The matrix Q of order n.
[0082] [Mathematical formula 10]
[0083]
[0084] In addition, as in Equation (11) below, the allocation matrix x can be represented by a column vector having the number of elements of n. 2 The number of elements of n.
[0085] [Mathematical formula 11]
[0086]
[0087] As in Equation (10), when the number of elements q ij (i < j) in the matrix Q is n 4 , since q ij = q ji and q ii = 0 (i.e., the diagonal elements are 0), the number of effective q ij is N = n 2 (n 2 - 1) / 2. When the N effective q ij are set as the elements of the upper triangle of the matrix Q (excluding the diagonal elements) and represented as q s (s = 1,..., N), the sum of q s can be represented by Equation (3) above, and the average value of q s can be represented by Equation (4) above.
[0088] As described above, although the expected value of the reduction amount of C(x) can be expressed as Δ - C(x) = μ q( 1→0) + μ h(1→0) = (p - 1)μ q + μ h ,, but in the case of QAP, μ h ≡ 0 holds. In addition, in the case of QAP, the number p of x i that is 1 in the constraint satisfaction solution is p = n. Therefore, Δ - C(x) = (p - 1)μ q = (n - 1)μ q = (n - 1)S / N = 2S / n 2 (n + 1) holds for Δ - C(x).
[0089] When using such a Δ -When C(x) is used as the constraint coefficient α, in the case where the value of C(x) decreases due to the transition from a constraint-satisfied solution to a constraint-violated solution, the increased αP(x) due to constraint violation can be set to a value that compensates for the decrease in C(x).
[0090] (Δ - (Another example of C(x))
[0091] As represented by Equation (9), the matrix Q includes n×n small matrices f ij D. The number of small matrices that do not include diagonal elements (f ij D (i = j)) in the upper triangular part of the matrix Q is n(n - 1) / 2, and the number of elements that do not include diagonal elements (f ij d kl (k = l)) in each small matrix is n(n - 1). In this case, the number of valid q ij (i < j) is N′ = n(n - 1) × n(n - 1) / 2 = n 2 (n - 1) 2 / 2. When the above-mentioned valid N′ q ij are represented as q s (s = 1, ……, N′), the sum S′ of q s can be represented by Equation (12) below.
[0092] [Mathematical formula 12]
[0093]
[0094] Here, since the values of the invalid elements of the matrix Q are 0 in QAP, S′ = S holds. Therefore, the average value of q s can be represented by Equation (13) below.
[0095] [Mathematical formula 13]
[0096]
[0097] Therefore, Δ - C(x) = (n - 1)S / N′ = 2(n - 1)S / n 2 (n - 1) 2 = 2S / n 2 (n - 1) holds for Δ - C(x).
[0098] Even when using such Δ - C(x) as the constraint coefficient α, in the case where the value of C(x) decreases due to the transition from a constraint-satisfied solution to a constraint-violated solution, the increased αP(x) due to constraint violation can also be set to a value that compensates for the decrease in C(x).
[0099] (First Embodiment)
[0100] Figure 1 is a diagram showing an exemplary information processing system according to the first embodiment.
[0101] The information processing system 10 calculates the combinatorial optimization problem based on the energy function of the Ising model represented by equation (1).
[0102] The information processing system 10 includes a storage unit 11 , a processing unit 12 , and a search unit 13 .
[0103] The storage unit 11 may be a volatile storage device such as a dynamic random access memory (DRAM), etc., or may be a non-volatile storage device such as a hard disk drive (HDD), a flash memory, etc. The storage unit 11 stores various types of data for processing by the processing unit 12. In addition, the storage unit 11 stores problem information of the combinatorial optimization problem. For example, in the case where the optimization problem is QAP, the problem information includes the flow between each allocation element and the distance between each allocation destination.
[0104] 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), etc. The processing unit 12 may be a processor that executes a program. The "processor" may include a group of multiple processors (multiprocessor).
[0105] The processing unit 12 obtains problem information of the combinatorial optimization problem, formulates the combinatorial optimization problem through an energy function based on the problem information, and outputs information about the energy function to the search unit 13. The processing unit 12 obtains a solution obtained by the search unit 13, and outputs the obtained solution to the outside. For example, the processing unit 12 may display the content of the solution on a display device coupled to the information processing system 10, or may transmit the solution to another information processing device via a network.
[0106] The search unit 13 receives information about the energy function from the processing unit 12, and searches for the ground state of the Ising model based on the information about the energy function, that is, a solution that minimizes the value of the energy function. The search unit 13 outputs the solution obtained by the search to the processing unit 12. The search unit 13 can be implemented by dedicated hardware. For example, a search circuit implemented by using an integrated circuit such as an FPGA, an ASIC, a graphics processing unit (GPU), etc. can be used as the search unit 13. However, the search unit 13 can be implemented by a processor that executes a predetermined program. Examples of the search method used by the search unit 13 include the SA method, the replica exchange method, simulated quantum annealing (SQA), etc.
[0107] Hereinafter, an exemplary operation of the information processing system 10 according to the first embodiment will be described.
[0108] When formulating the combinatorial optimization problem by the energy function, the processing unit 12 determines the value of α which is a coefficient of the constraint term (constraint coefficient).
[0109] First, the processing unit 12 obtains (reads) problem information of the combinatorial optimization problem stored in the storage unit 11 . Figure 1 An example of question information of a QAP is shown.
[0110] The problem information of QAP includes the flow between each allocation element and the distance between each allocation destination. The flow between each allocation element is represented by a flow matrix F with n rows and n columns, and the distance between each allocation destination is represented by a distance matrix D with n rows and n columns.
[0111] Notice, Figure 1 An example of the allocation matrix x is also shown. The allocation of the i column and k row of the allocation matrix x representing the allocation state is represented by x ik In the case where the i-th allocation element is allocated to the k-th allocation destination, x ik = 1 holds, and when the i-th allocation element is not allocated to the k-th allocation destination, x ik = 0 holds. Note that the allocation matrix x can also be composed of n 2 It is represented by a column vector of the number of elements, as in the above formula (11).
[0112] When a transition occurs from a solution satisfying the constraints of the combinatorial optimization problem (constraint satisfaction solution) to a solution not satisfying the constraints (constraint violation solution), the processing unit 12 calculates an expected value of the amount of change of the cost item based on the obtained problem information.
[0113] When the cost term is expressed as in equation (2), it can be expressed as Δ - C(x)=(p-1)μ q +μ h The expected value of the change (reduction) is calculated by using the formula (the method of calculating the expected value of the reduction of C(x)). Note that, as mentioned above, p is the number of n state variables x included in a solution. i (i=1,……,n) where the state variable x i = 1. Q as the coupling coefficient matrix ij The valid N elements q in s The average value of (s=1, ..., N) is given by μ q indicates that, and h i The average value of the n elements of (bias coefficient vector) is given by μ h express.
[0114] The constraint satisfaction solution is stored as an initial solution in the storage unit 11, and the processing unit 12 can determine the value of p based on the initial solution, or the value of p itself can be pre-stored in the storage unit 11. Based on the problem information, μ is calculated by the above equations (3) to (5). q and μ h In the case of a combinatorial optimization problem such as the Traveling Salesman Problem (TSP), Δ - C(x) can be obtained by the above Δ - C(x)=(p-1)μ q +μ h to calculate.
[0115] Figure 1 It is shown that in the case of QAP, the combinatorial optimization problem is - Exemplary calculation of C(x). The cost term C(x) of the QAP can be expressed as in the above equation (6). As expressed in the above equation (9), the processing unit 12 calculates the matrix Q by the Kronecker product of the flow matrix F and the distance matrix D. Then, the processing unit 12 calculates the matrix Q based on the average value μ of each element included in the matrix Q as expressed in equation (10). q To calculate Δ - C(x). Note that equations (6), (9) and (10) also Figure 1 Shown in.
[0116] In the case of QAP, as described above, it is sufficient if the average value of the significant elements that are the elements of the upper triangle of the matrix Q (excluding the diagonal elements) is obtained. Since the number of significant elements is N=n 2 (n 2 -1) / 2, so S / N=2S / n is obtained by dividing the sum of the values of the valid elements S by N. 2 (n 2 -1) is the average value μ q In addition, since p = n holds when the combinatorial optimization problem is a QAP, Δ - C(x)=2S / n 2 (n+1) holds.
[0117] Note that processing unit 12 can be represented by Δ - C(x)=2S / n 2 (n-1) to calculate Δ - C(x)(Δ - Another example of C(x)).
[0118] In addition, as the problem size (n) of QAP increases, Δ -n+1 and n-1 included in the calculation formula of C(x) become approximately equal, and also become approximately equal to n. Therefore, even if n is used instead of n+1 or n-1, Δ - The values of C(x) are also roughly similar. Therefore, the above Δ can be appropriately changed according to the size of the problem. - The calculation formula of C(x).
[0119] The processing unit 12 calculates the - C(x) to determine the constraint coefficient α. For example, the processing unit 12 may determine α=Δ - C(x), or it can be determined by - C(x) is multiplied by a value obtained by an adjustment coefficient of α to be described later.
[0120] Thereafter, the processing unit 12 outputs information about the energy function obtained by formulating the combinatorial optimization problem using the determined α. The information about the energy function to be output is, for example, matrix data (also referred to as a QUBO matrix) in which the energy function of equation (1) is expressed in the QUBO format.
[0121] The search by the search unit 13 is performed, for example, as follows. As an example, consider a case where the SA method or the replica exchange method is used.
[0122] The search unit 13 calculates the amount of change in the value of the energy function caused by the change in the value of one of the multiple state variables for each of the multiple state variables, and randomly accepts it in a preferential manner with the change in the value of the energy function becoming smaller. At this time, the steepest descent method is adopted, and it is difficult to escape when falling into a local solution. In view of the above, the search unit 13 uses the metropolis method or the Gibbs method to determine the transition probability of the Ising model from a certain state to the next state caused by the change of a certain state variable. That is, the search unit 13 randomly allows the change in the value of the energy function to become larger based on the comparison between the amount of change in the value of the energy function and the noise value. The noise value is obtained based on the value of the temperature parameter or a random number. The larger the value of the temperature parameter, the larger the amplitude of the noise value. The larger the amplitude of the noise value, the easier it is to allow the state transition in which the value of the energy function increases significantly.
[0123] The search unit 13 repeatedly attempts state transitions based on such processing from the start of the search until the search end condition is satisfied, and obtains a set of values of a plurality of state variables when the search end condition is satisfied as a solution. For example, the search end condition is verified based on whether a predetermined unit time has passed, or whether the number of attempts for the change of the state variable has reached a predetermined unit number of times, etc.
[0124] As described above, the processing unit 12 of the information processing system 10 calculates the expected value Δ of the amount of change in C(x) when a transition from a constraint satisfaction solution to a constraint violation solution occurs. - C(x) is used to determine the constraint coefficient α. Therefore, in the case where the value of C(x) decreases due to the transition from a constraint satisfaction solution to a constraint violation solution, αP(x) increased due to the constraint violation can be set to a value that compensates for the decrease in C(x). Therefore, the occurrence of a large number of adjustment times to obtain an appropriate α can be suppressed, and the time required to determine the constraint coefficient can be shortened.
[0125] (Second Embodiment)
[0126] Figure 2 is a diagram showing exemplary hardware of an information processing system according to a second embodiment
[0127] The information processing system 20 includes an information processing device 100 and an optimization device 200 .
[0128] The information processing apparatus 100 generates information on an energy function corresponding to a combinatorial optimization problem by formulating the combinatorial optimization problem, and inputs the generated information on the energy function to the optimization apparatus 200. In the second embodiment, QAP is handled as an example of a combinatorial optimization problem to be calculated.
[0129] The information processing apparatus 100 includes a CPU 101, a RAM 102, an HDD 103, an input / output (IO) interface 104, a GPU 105, an input interface 106, a media reader 107, and a network interface card (NIC) 108. The CPU 101 is an example of the processing unit 12 according to the first embodiment. The RAM 102 is an example of the storage unit 11 according to the first embodiment.
[0130] The CPU 101 is a processor that executes program commands. The CPU 101 loads at least a portion of the program and data stored in the HDD 103 into the RAM 102 and executes the program. Note that the CPU 101 may include a plurality of processor cores. In addition, the information processing device 100 may include a plurality of processors. Sometimes a collection of a plurality of processors is referred to as a "multiprocessor" or simply a "processor".
[0131] The RAM 102 is a volatile semiconductor memory that temporarily stores programs to be executed by the CPU 101 and data to be used for operations by the CPU 101. The RAM 102 is, for example, a DRAM. Note that the information processing apparatus 100 may include a memory of a different type from the RAM 102, or may include a plurality of memories.
[0132] The HDD 103 is a nonvolatile storage device that stores programs and data of software such as an operating system (OS), middleware, and application software. Note that the information processing device 100 may include another type of storage device such as a flash memory and a solid state drive (SSD), and may include a plurality of nonvolatile storage devices.
[0133] The IO interface 104 is coupled to the optimization device 200, and inputs data to or outputs data from the optimization device 200 according to an instruction from the CPU 101. For example, in response to an instruction from the CPU 101, the IO interface 104 writes data of the RAM 102 to a register or memory of the optimization device 200, or reads data from the optimization device 200 and writes the read data to the RAM 102. For example, a peripheral component interconnect express (PCI-e) or the like is used as the IO interface 104.
[0134] The GPU 105 outputs an image to a display 111 coupled to the information processing apparatus 100 according to an instruction from the CPU 101. As the display 111, any type of display such as a cathode ray tube (CRT) display, a liquid crystal display (LCD), a plasma display, an organic electroluminescence (OEL) display, etc. can be used.
[0135] The input interface 106 obtains an input signal from an input device 112 coupled to the information processing apparatus 100, and outputs it to the CPU 101. A pointing device such as a mouse, a touch panel, a touch pad, a trackball, etc., a keyboard, a remote controller, a button switch, etc. can be used as the input device 112. In addition, various types of input devices can be coupled to the information processing apparatus 100.
[0136] The medium reader 107 is a reading device that reads the program and data recorded in the recording medium 113. For example, a magnetic disk, an optical disk, a magneto-optical disk (MO), a semiconductor memory, etc. can be used as the recording medium 113. Examples of magnetic disks include a floppy disk (FD) and an HDD. Examples of optical disks include a compact disk (CD) and a digital versatile disk (DVD).
[0137] The medium reader 107 copies, for example, a program or data read from the recording medium 113 to another recording medium, such as the RAM 102, the HDD 103, etc. The read program is executed by, for example, the CPU 101. Note that the recording medium 113 may be a portable recording medium and is sometimes used to distribute programs and data. In addition, the recording medium 113 and the HDD 103 may be referred to as computer-readable recording media.
[0138] The NIC 108 is an interface that is coupled to the network 30 and communicates with another computer through the network 30. For example, the NIC 108 is coupled to a communication device such as a switch, a router, etc. through a cable.
[0139] The optimization device 200 is an accelerator that performs a base state search based on information about an energy function by hardware, for example, using an SA method or an MCMC method such as a replica exchange method. The optimization device 200 may be referred to as an Ising machine, a Boltzmann machine, or the like. The optimization device 200 includes an FPGA 201 and a RAM 202. The FPGA 201 implements a solution search function for a problem represented by an Ising model. The solution search function performed by the optimization device 200 may be implemented by another type of integrated circuit, such as an ASIC, a GPU, or the like. The RAM 202 is a memory for storing various types of data for solution search by the FPGA 201. The RAM 202 is, for example, a static RAM (SRAM).
[0140] Note that the optimization device 200 may be hardware that performs a ground state search by a quantum annealing method. In addition, the function of a search unit using, for example, an SA method, a replica exchange method, an SQA method, etc. may be implemented by the CPU 101 included in the information processing device 100 or another processor that executes predetermined software instead of the optimization device 200.
[0141] Figure 3 is a diagram illustrating exemplary functions of an information processing system.
[0142] The information processing apparatus 100 includes a storage unit 120, a control unit 130, and a solution output unit 140. A storage area of the RAM 102 or the HDD 103 is used as the storage unit 120. The control unit 130 and the solution output unit 140 are realized by the CPU 101 executing a program stored in the RAM 102.
[0143] In addition, the optimization device 200 includes a search unit 210. The search unit 210 is implemented by the FPGA 201.
[0144] The storage unit 120 stores various types of data used by the control unit 130 to formulate the QAP. For example, the storage unit 120 stores information about the flow matrix F and the distance matrix D in the QAP, and information about the matrix Q obtained by the Kronecker product of the flow matrix F and the distance matrix D (see the above Figure 1 ).
[0145] The control unit 130 receives input of data of the QAP and formulates the QAP based on the data. The control unit 130 generates information about the energy function expressed in the QUBO format of equation (1). The control unit 130 outputs the generated information about the energy function to the optimization device 200, and causes the optimization device 200 to search for a solution based on the energy function.
[0146] The control unit 130 obtains a solution obtained by the search of the optimization device 200 , and outputs the obtained solution to the solution output unit 140 while outputting the obtained solution satisfying the constraint as a final solution.
[0147] The solution output unit 140 obtains the solution obtained by the search of the optimization device 200 and outputs the obtained solution. For example, the solution output unit 140 may convert the solution obtained from the optimization device 200 into a solution format for QAP and cause the display 111 to display the solution format, or may transmit information about the solution to another computer via the network 30.
[0148] The search unit 210 obtains information about the energy function output from the control unit 130 , and searches for a ground state of the Ising model, that is, an optimal solution, based on the energy function. The search unit 210 outputs a solution obtained by the search to the information processing device 100 .
[0149] (The correspondence between the presence or absence of constraint violation and energy function in QAP)
[0150] The energy function of the QAP includes a constraint term as expressed in equation (8). In the facility placement problem, the constraint conditions are, for example, "place one facility at one location" and "one facility is placed at one location", which is an example of a QAP. Therefore, the search in the search unit 210 is affected by the constraint term.
[0151] Figure 4 is a diagram showing an example of the presence or absence of constraint violation and constraint violation energy in a QAP.
[0152] Figure 4 The constraint terms expressed in equation (8) are shown. Figure 4 For example, Figure 1 A portion of the allocation matrix x is shown, and the constraint violation energy (constraint violation eg) corresponding to each state is shown in the form of "state: constraint violation energy". The constraint violation energy is a penalty value associated with the constraint violation added to the cost term and is calculated based on equation (8). In addition, Figure 4 In , it is assumed that a state is represented by a number indicating that state.
[0153] For example, state "1" is {xik}=(x 11 , x 12 , x 21 , x 22 )=(0,1,1,0). State "1" does not violate the constraint condition, that is, the constraint is satisfied. Therefore, the constraint violation energy corresponding to state "1" is "0".
[0154] State "2" is {x ik}=(x 11 , x 12 , x 21 , x 22 )=(0,0,1,0). State "2" violates the constraint condition. The constraint violation energy corresponding to state "2" is "α+β".
[0155] State "3" is {x ik}=(x 11 , x 12 , x 21 , x 22 )=(0,0,0,0). State "3" violates the constraint condition. The constraint violation energy corresponding to state "3" is "2(α+β)".
[0156] State "4" is {x ik}=(x 11 , x 12 , x 21 , x 22 )=(1,0,0,0). State "4" violates the constraint condition. The constraint violation energy corresponding to state "4" is "α+β".
[0157] State "5" is {x ik}=(x 11 , x 12 , x 21 , x 22 )=(1,0,0,1). State "5" does not violate the constraint condition, that is, the constraint is satisfied. Therefore, the constraint violation energy corresponding to state "5" is "0".
[0158] Figure 5 is a diagram showing an exemplary relationship between states and values of energy functions.
[0159] exist Figure 5 In , for convenience, the state of the Ising model is shown in one dimension. Figure 5In FIG. 1 , the horizontal axis represents the state of the Ising model, and the vertical axis represents energy. Energy represents the value of a cost term or the value of an energy function (including a constraint term). Sequence G1a is a sequence indicating the relationship between the state of a problem and the value of an energy function. Sequence G1b is a sequence indicating the relationship between the state of the problem and the value of a cost term.
[0160] In addition, Figure 5 In the figure, it is shown that Figure 4 The states "1" to "5" shown correspond to the energy difference between the sequences G1a and G1b in the state.
[0161] Since the state "1" is a state of constraint satisfaction (constraint satisfaction solution), and the above-mentioned constraint violation energy is "0", the energies of the sequences G1a and G1b coincide with each other.
[0162] Since states "2" and "4" are states of constraint violation, and the constraint violation energy described above is "α+β", the energy of sequence G1a is higher than the energy of sequence G1b by "α+β".
[0163] Since state "3" is also a state of constraint violation, and the constraint violation energy described above is "2(α+β)", the energy of sequence G1a is higher than the energy of sequence G1b by "2(α+β)".
[0164] like Figure 5 As shown, in the states such as states "2" to "4", the value of the cost item represented by the sequence G1b is smaller than the value in the states "1" or "5" as constraint satisfied solutions, although constraint violation occurs. Therefore, in the absence of constraint items, transition to such states "2" to "4" may occur.
[0165] Therefore, it is preferable to determine the constraint coefficients α and β with appropriate sizes. When α and β are too small, a constraint violation solution may be generated, and when α and β are too large, the energy barrier between constraint satisfaction solutions increases to hinder the solution space search.
[0166] Therefore, with Figure 1 In a similar manner to the processing unit 12 of the information processing system 10 in FIG. 1 , the control unit 130 of the information processing device 100 calculates the expected value Δ of the change amount of C(x) when a transition from a constraint satisfaction solution to a constraint violation solution occurs. - C(x) is used to determine the constraint coefficient α. Note that it is assumed that β=α is satisfied.
[0167] In the case of QAP, for example, by setting α=Δ - C(x)=2S / n 2(n+1), the constraint term added due to constraint violation can be set to a value that compensates for the decrease in C(x).
[0168] Next, the processing procedure of the information processing system 20 will be described.
[0169] Figure 6 is a flowchart illustrating the flow of an exemplary process of the information processing system.
[0170] The control unit 130 obtains a flow matrix F and a distance matrix D from data of a QAP input by a user (step S1).
[0171] The control unit 130 performs matrix expansion (step S2). That is, the control unit 130 calculates the Kronecker product of the flow matrix F and the distance matrix D to generate the matrix Q ij .
[0172] Figure 7 is a diagram showing an example of matrix expansion.
[0173] Figure 7 It is shown that in the case where each of the flow matrix F and the distance matrix D is a matrix of four rows and four columns, that is, in the case of n=4, Q ij Example generation of Q ij is a matrix of 16 rows and 16 columns. Such a matrix is also called the QUBO matrix of the cost term.
[0174] The allocation elements are represented by A to D, and the allocation destinations are represented by a to d. Figure 7 An example of an allocation matrix x with four rows and four columns is shown. Figure 7 In the example of , the allocation element A is allocated to the allocation destination d, the allocation element B is allocated to the allocation destination a, the allocation element C is allocated to the allocation destination c, and the allocation element D is allocated to the allocation destination b.
[0175] The flow matrix F is a matrix in which the flows between the distribution elements A to D are arranged. For example, f AB Represents the flow between the distribution elements A and B.
[0176] The distance matrix D is a matrix in which the distances between the allocation destinations a to d are arranged. ab Indicates the distance between allocation destinations a and b.
[0177] The matrix Q is obtained by the Kronecker product of the flow matrix F and the distance matrix D ij It consists of 4×4 small matrices, such as Figure 7 As shown. The position of each small matrix is represented by (column, row)=(i, j) of the matrix Q. In addition, the position of the element of the small matrix is represented by (column, row)=(k, l) of the matrix Q.
[0178] The matrix Q is represented by the product of the flow (=0) and each distance between the same allocation elements. ij The value of each element included in the four diagonal small matrices of is 0. In addition, the value of the diagonal element of each small matrix represented by the product of the distance (=0) between the same allocation destinations and each flow rate is 0.
[0179] Note that due to the inclusion of ij The small matrix in the lower triangular part includes the small matrix corresponding to the upper triangular part, so the information to be output to the search unit 210 only needs to include information about the small matrix corresponding to the upper triangular part (excluding the four diagonal small matrices mentioned above).
[0180] Next, the control unit 130 calculates Δ - C(x) (step S3).
[0181] As mentioned above, Δ - C(x) represents the expected value of the reduction in C(x) when a transition from a constraint satisfaction solution to a constraint violation solution occurs.
[0182] Figure 8 It shows that in a certain distribution state, ij The element q selected in ij FIG. 1 is a diagram of exemplary variations of .
[0183] When calculating the cost term, select the Q corresponding to the state variable with a value of 1 ij The element q at the intersection of the row and column ij . Figure 8 Shows x 13 、x 22 、x 31 and x 44 The value of is 1. Since the number of state variables with a value of 1 in each row and column is 1, the constraint condition of QAP is satisfied and a constraint satisfaction solution is obtained. In this case, six q ij Note that here, as mentioned above, we consider ij The small matrix corresponding to the upper triangular part of (excluding the four diagonal small matrices mentioned above).
[0184] exist Figure 8 In the example of , 140 is the value of C(x) obtained by adding 70 of the lower triangular part to 12+12+10+8+12+16=70, which is six q ij The sum of the values of .
[0185] Here, in the flip x 13 In the case where the value changes from 1 to 0, the number of state variables having a value of 1 in the first row of the assignment matrix x becomes 0. Therefore, the constraint condition of the QAP is not satisfied, and a constraint violation solution is obtained. In this case, in the above six q ij In the , deselect the three q with values 12, 8, and 16 ij . Therefore, the reduction in C(x) is 36.
[0186] The expected value of this reduction in C(x) is Δ - C(x) can be expressed as Δ - C(x)=2S / n 2 (n-1) formula to calculate.
[0187] Next, the control unit 130 determines whether the adjustment coefficient has been determined (step S4). If it is determined that the adjustment coefficient has been determined, the control unit 130 performs the process of step S6, and if it is determined that the adjustment coefficient has not been determined, the control unit 130 performs the process of step S5.
[0188] In the process of step S5, the control unit 130 determines the adjustment coefficient. The process of step S5 will be described later. After the process of step S5, the control unit 130 performs the process of step S6.
[0189] In the process of step S6, the control unit 130 changes the value of Δ - C(x) is multiplied by the adjustment coefficient to calculate the constraint coefficient α.
[0190] Thereafter, the control unit 130 generates information on the energy function expressing the equation (1) in the QUBO format (step S7).
[0191] The control unit 130 sets the information on the energy function generated in step S7 in the search unit 210 (step S8).
[0192] The search unit 210 performs a combined optimization operation based on the set information on the energy function. The search unit 210 searches for a solution to the QAP through the operation (step S9).
[0193] The search unit 210 outputs a solution obtained by the search to the control unit 130 (step S10).
[0194] The control unit 130 obtains a solution from the search unit 210 , outputs it to the outside via the solution output unit 140 , and terminates the process.
[0195] (Comparison example)
[0196] Fig. 9is a flowchart showing the flow of processing of an information processing system according to a comparative example.
[0197] Fig. 9 There is shown a procedure of a process using a method of optimizing constraint coefficients by repeating a process in which the constraint coefficients are adjusted based on a search result of a solution to a combinatorial optimization problem by an Ising machine as in the related art.
[0198] The processing of steps S20 and S21 is Figure 6 The processing of steps S1 and S2 shown is the same.
[0199] In the process of step S22, the initial value (temporary value) of the constraint coefficient α is set. Figure 6 Similar processing to the processing in steps S7 to S9 shown is performed (steps S23, S24, and S25), and the allocation matrix x obtained by the combinatorial optimization operation is output (step S26).
[0200] Then, it is determined whether the constraint condition of the QAP is satisfied based on the allocation matrix x (step S27). If it is determined that the constraint condition is satisfied, the process of step S28 is performed, and if it is determined that the constraint condition is not satisfied, the process of step S30 is performed.
[0201] In the process of step S28, the value of the cost item obtained by the combinatorial optimization operation is output.
[0202] Thereafter, it is determined whether the value of the cost item satisfies a predetermined condition (step S29), and if it is determined that the condition is satisfied, the process of step S31 is performed, and if it is determined that the condition is not satisfied, the process of step S30 is performed.
[0203] In the process of step S30, the constraint coefficient α is updated. For example, if a constraint satisfying solution is not obtained, an adjustment to increase the constraint coefficient is performed, and if the value of the cost item is greater than a predetermined threshold, an adjustment to decrease the constraint coefficient is performed. After the process of step S30, the process starting from step S23 is repeated.
[0204] In the process of step S31, the Figure 6 The processing of step S10 shown is similar to the processing.
[0205] Next, exemplary cases of various examples of calculating QAP using the method of the comparative example described above will be described below.
[0206] Fig.10 is a graph showing the relationship between the value of the constraint coefficient and the calculation result according to the example of the comparative example. Fig.10An exemplary case of performing calculation by changing the values of constraint coefficients of five instances having a problem size n of n=12 using an Ising machine that performs a replica exchange method is shown. The five instances are tai12a, scr12, rou12, nug12, and had12 selected from the QAP library (QAPLIB). The horizontal axis represents the value of the constraint coefficient, and the vertical axis represents the number of replicas that obtain constraint satisfaction solutions among the 128 replicas.
[0207] When the constraint coefficient changes from a small value to a larger value, when only the constraint violation solution is obtained in the part with a small constraint coefficient, the constraint satisfaction solution is obtained as the constraint coefficient increases in the calculation result for any instance. Eventually, the constraint satisfaction solution is obtained for almost all copies. As described above, although the constraint satisfaction solution can be almost reliably obtained when the constraint coefficient is sufficiently increased, generally, when the constraint coefficient is small, a solution in which the value of the cost item is closer to the optimal solution is obtained (suboptimal solution: a solution in which the value of the cost item is sufficiently close to the value of the optimal solution). Therefore, an appropriate value of the constraint coefficient is a value from the value at which the constraint satisfaction solution is initially obtained to a value that is approximately the constraint satisfaction solution and in which part of the constraint violation solution (the part where the slope of the graph is positive) is retained. As Fig.10 As shown, it can be seen that even with the same problem size, the value of the constraint coefficient varies greatly from less than 100 to tens of thousands depending on the instances.
[0208] For example, in the initial state of the solution of rou12 (such as Fig.10 In the state before the relationship calculation shown in FIG. 1 is calculated, the approximate number of the constraint coefficient is also unknown, so it is assumed that a sufficiently large value is set as the initial value of the constraint coefficient. When the combinatorial optimization operation is performed with the initial value of the constraint coefficient appropriately set to, for example, (1) 50,000, the constraint satisfaction solution for all 128 copies is obtained, and it is found that 50,000 seems to be too large. Next, when 50,000 is reduced by half and (2) 25,000 is set as the value of the constraint coefficient to perform the combinatorial optimization operation (corresponding to returning to Fig. 9(part of the processing of step S23 in ), all 128 replicas result in constraint violation solutions. Therefore, it is found that the appropriate range of the value of the constraint coefficient (α) is 25,000<α<50,000. In view of the above, next, for example, (3) 40,000 between 25,000 and 50,000 is set as the value of the constraint coefficient to perform the combinatorial optimization operation. However, in this case, the constraint satisfaction solutions of all replicas are obtained, and it is therefore found that it is still too large. Subsequently, (4) 30,000 is set as the value of the constraint coefficient to perform the combinatorial optimization operation. In this case, the constraint satisfaction solutions of some replicas are obtained, and it is found that the constraint coefficient is close to an appropriate value. Thereafter, the combinatorial optimization operation is performed using several values, such as a value between 30,000 and 40,000, a value slightly less than 30,000, etc., and ultimately, for example, 29,500 is determined to be an appropriate constraint coefficient. The above operations can also be combined as an algorithm.
[0209] Meanwhile, in the case of calculating nug12 and the like, assuming that the initial value of the constraint coefficient is 50,000, for example, when it is changed to 50,000, 20,000, 10,000, 5,000, 2,000, 1,000, 500, 200, 100, and 50, a constraint violation solution is obtained. Therefore, there are many useless attempts.
[0210] Although it is conceivable to use Bayesian reasoning or the like instead of manual operation to optimize the constraint coefficient, there is no change because many attempts are required.
[0211] In contrast to the comparative example described above, the execution according to the present embodiment is as follows. Figure 6 The information processing system 20 shown in the processing can be based on the calculated Δ - C(x) determines the constraint coefficient α to shorten the adjustment time of the constraint coefficient α. Note that although Figure 6 Step S5 for determining the adjustment coefficient is included, but since the search range of the appropriate adjustment coefficient is limited, the increase in calculation time caused by the processing of step S5 is smaller than that in the case of the comparative example, as described below.
[0212] (Adjustment coefficient determination)
[0213] Next, determination of the adjustment coefficient will be described.
[0214] The instances solved by the Ising machine (represented using QUBO matrices) have different "statistical properties" depending on the problem (mean and variance of matrix elements, sparseness and density of matrices, distribution of values, etc.). Therefore, it is preferred to adjust Δ - C(x) is used to determine the constraint coefficient α.
[0215] Problems to be formulated as QAPs include not only the allocation of plants to plant sites, but also a variety of things. For example, there is the arrangement of wards and facilities in a hospital, the arrangement of gates to minimize the total travel distance of passengers in transit at an airport, printed circuit board arrangement and wiring problems, keyboard key arrangement, table seating arrangement, turbine blade weight balance, etc. The "statistical properties" of each of these problems are different.
[0216] Note that QAPLIB is a library that abstracts such problems and is created with series of different sizes for each problem, and the library is used as a benchmark for solution accuracy and solution speed.
[0217] Fig.11 : is a diagram showing the relationship between the value of the adjustment coefficient and the calculation result according to the example of the present embodiment. Fig.11 The following exemplary case is shown: the information processing system 20 according to the second embodiment obtains the expected value Δ of the reduction amount of C(x) for five instances with a problem size n of n=12 - C(x), and then the calculation is performed based on the replica exchange method by changing the value of the adjustment coefficient. The five examples are tai12a, scr12, rou12, nug12 and had12 selected from QAPLIB. The horizontal axis represents the value of the adjustment coefficient, and the vertical axis represents the number of replicas that obtain the constraint satisfaction solution among the 128 replicas.
[0218] and Fig.10 Compared with the case of the comparative example shown in FIG. 1 , the variation of the appropriate value of the adjustment coefficient between the instances is significantly small. However, when observed in detail, since the statistical characteristics under each instance are different, there is a difference of about several tens of percent in the appropriate adjustment coefficient (the range in which the slope of the graph is positive). Therefore, in order to enable the information processing system 20 according to the second embodiment to obtain a better solution, it is preferable to determine the appropriate adjustment coefficient for each instance.
[0219] Fig.12 is a flowchart illustrating an exemplary flow of a process for determining an adjustment coefficient.
[0220] First, the initial value, increase amount, and upper limit of the adjustment coefficient are set (step S40). In the process of step S40, for example, the setting can be performed based on the initial value, increase amount, or upper limit input by the user, or can be performed based on the initial value, increase amount, or upper limit pre-stored in the storage unit 120.
[0221] Thereafter, the control unit 130 and the search unit 210 perform the same Figure 6The processes of steps S6 to S9 shown are similar to the processes of steps S41 to S44, and the allocation matrix x as the search result of the base state of the Ising model is output from the search unit 210 (step S45).
[0222] After the process of step S45, the control unit 130 determines whether the adjustment coefficient has reached the upper limit (step S46).
[0223] If it is determined that the adjustment coefficient has not reached the upper limit, the control unit 130 increases the adjustment coefficient by the increase amount (step S47 ), and repeats the processing from step S41 .
[0224] If it is determined that the adjustment coefficient has reached the upper limit, the control unit 130 determines the optimal adjustment coefficient based on the allocation matrix x as the search result obtained so far (step S48), and terminates the process of determining the adjustment coefficient. Fig.11 As shown, the control unit 130 determines the adjustment coefficient based on the allocation matrix x obtained so far within a range where the number of replicas obtaining constraint satisfying solutions increases according to the change of the adjustment coefficient (a range with a positive slope), thereby obtaining an appropriate adjustment coefficient.
[0225] The search range for the appropriate adjustment coefficient is limited to about 1×100, and furthermore, it is sufficient if the search increment (the increase amount of the above adjustment coefficient) is set to about 0.05 to 0.1. In addition, the number of adjustment times of the adjustment coefficient is determined by the initial value, increase amount, and upper limit set in the process of step S40.
[0226] Therefore, it can be expected that the number of adjustments of the adjustment coefficient is significantly smaller than the number of updates of the constraint coefficient α in the comparative example.
[0227] Furthermore, once the adjustment coefficients are determined, they can be used when performing combinatorial optimization operations for instances of the same type, and thus, an attempt to determine the adjustment coefficients need only be made the first time.
[0228] Fig.13 is a graph showing the relationship between the value of the adjustment coefficient and the calculation result for the same type of instances with different problem sizes. Fig.13 The following exemplary case is shown: the information processing system 20 according to the second embodiment obtains the expected value Δ of the reduction amount of C(x) for 12 taiNa (N represents the problem size) with different problem sizes - C(x), and then the calculation is performed by the replica exchange method by changing the value of the adjustment coefficient. The horizontal axis represents the value of the adjustment coefficient, and the vertical axis represents the number of replicas that obtain the constraint satisfaction solution among the 128 replicas. Note that Fig.13, the calculation results for each instance are displayed in a manner shifted by 150 degrees in the vertical axis direction.
[0229] exist Fig.13 In the example, for example, constraint satisfaction solutions for 12 instances (tai) of the same type with different problem sizes can be obtained by using the adjustment factor (about 1.3) to the extent that constraint satisfaction solutions begin to be obtained in tai10a with the smallest problem size.
[0230] As described above, when obtaining the adjustment coefficient, the problem size of the problem to be calculated is reduced to search for an appropriate adjustment coefficient, and the adjustment coefficient is used to solve the actual problem, thereby significantly reducing the adjustment coefficient search time.
[0231] When obtaining the adjustment coefficient, it is preferred to use a model obtained by reducing the problem to be optimized (for example, reducing the number of plants and the number of sites in the allocation of plants to sites). However, in the case where there are no statistically large deviations in the flow matrix and the distance matrix even in an abstract problem, the adjustment coefficient can be obtained using a small-sized flow matrix and distance matrix configured by extracting appropriate rows and columns from each matrix.
[0232] Note that although the method of setting the increase amount and upper limit of the adjustment coefficient and increasing the adjustment coefficient until the adjustment coefficient reaches the upper limit is used in the above example of determining the adjustment coefficient, the method of setting the decrease amount and lower limit of the adjustment coefficient and decreasing the adjustment coefficient until the adjustment coefficient reaches the lower limit can also be used.
[0233] (Example QUBO Generation)
[0234] Next, exemplary QUBO generation based on the determined constraint coefficient α will be described.
[0235] For example, the constraint term can be expressed as the above equation (8). The quadratic polynomial multiplied by α in the first term on the right side of equation (8) can be expressed as the following equation (14).
[0236] [Formula 14]
[0237]
[0238] In equation (14), the quadratic term on the right side can be expressed as the following expression (15).
[0239] [Mathematical formula 15]
[0240]
[0241] In expression (15), the sum of the state variables within the non-diagonal elements of the upper triangle (i>j) of the outer product of the state variable vector is obtained (see Fig.14 ), and multiply it by 2 due to the lower triangle to obtain the quadratic term. In addition, in expression (15), x ik 2 represents the diagonal elements (see Fig.14 ). Since x ik represents a binary variable of 0 or 1, so x ik 2 =x ik From the above, equation (14) can be transformed into the following equation (16).
[0242] [Mathematical formula 6]
[0243]
[0244] For reasons similar to those described above, the quadratic polynomial by which β in the second term on the right side of equation (8) is multiplied can be expressed as in the following equation (17).
[0245] [Mathematical formula 17]
[0246]
[0247] As described below, the x added to the quadratic and linear terms in equation (16) is ik x jk Represented by a matrix.
[0248] Fig.14 is the matrix showing the addition of the quadratic and linear terms to equation (16) ik x jk . Fig.14 An exemplary case where the problem size n is n=4 is shown.
[0249] The product of the two state variables in region 40 is added to the quadratic term. Fig.14 In , the matrix elements representing the product of two state variables added to the quadratic term are indicated by different shading for each value of k (=1 to 4).
[0250] exist Fig.14 In , as diagonal elements of the matrix, the linear terms are indicated by different shading for each value of k (=1 to 4).
[0251] As described below, the x added to the quadratic and linear terms in equation (17) is ik x il Represented by a matrix.
[0252] Fig.15 The matrix x added to the quadratic and linear terms in (17) is shown as ik x il . Fig.15An exemplary case where the problem size n is n=4 is also shown.
[0253] The product of the two state variables in region 41 is added to the quadratic term. Fig.15 In , the matrix elements representing the product of two state variables added to the quadratic term are indicated by different shading for each value of i (=1 to 4).
[0254] exist Fig.15 In , as diagonal elements of the matrix, the linear terms are indicated by different shading for each value of i (=1 to 4).
[0255] Fig.16 is a diagram showing an example of a QUBO matrix of constraint terms.
[0256] When combined Fig.14 and 15 As a result, the QUBO matrix of the constraint item is Fig.16 As shown. In the QUBO matrix with respect to the constraint terms, the diagonal elements are -(α+β), and the diagonal elements of each small matrix of the upper triangular part (i>j) are 2α. In addition, each element of the upper triangular part of each of the four diagonal small matrices is 2β. Note that it can be considered that α=β holds, as described above.
[0257] Fig.17 is a diagram showing an example of the QUBO matrix of the entire energy function.
[0258] By Figure 7 The QUBO matrix of the cost terms shown and Fig.16 The QUBO matrices of the constraints shown are added to obtain Fig.17 The QUBO matrix of the entire energy function in .
[0259] The control unit 130 outputs such a QUBO matrix as information on the energy function and sets it in the search unit 210 .
[0260] According to the information processing system 20 of the second embodiment as described above, effects similar to those of the information processing system 10 of the first embodiment can be obtained. That is, a large number of adjustments can be suppressed to obtain an appropriate constraint coefficient and the time required to determine the constraint coefficient can be shortened.
[0261] (Third Embodiment)
[0262] Fig.18 is a flowchart showing the flow of an exemplary process of the information processing system according to the third embodiment.
[0263] The processing of steps S50 and S51 is the same as Figure 6 The processing of steps S1 and S2 shown is the same.
[0264] After the process of step S51, the control unit 130 performs matrix modulation (step S52). In the process of step S52, Q generated by the Kronecker product of the flow matrix F and the distance matrix D is performed. ij An example of modulation will be described later.
[0265] After the process of step S52, the control unit 130 performs the Figure 6 The processing of step S3 shown is similar to that of the Q after modulation. ij To calculate Δ - C(x) (step S53). In the information processing system according to the third embodiment, the adjustment coefficient may be set to 1.0, and Δ - C(x) can be set to a constraint coefficient α, and the reason will be described later.
[0266] The processing of steps S54 to S57 is similar to Figure 6 The processing of steps S7 to S10 is shown.
[0267] (Matrix Modulation)
[0268] C′(x) in the following equation (18) is obtained by adding an optional constant C to the cost term C(x) expressed in equation (2).
[0269] [Mathematical formula 18]
[0270]
[0271] In the calculation of combinatorial optimization problems, the optimal solution (optimal allocation in the case of QAP) does not change even if the same constant C is regularly added to or subtracted from the cost term, and the value of the cost term in the optimal solution differs only by the constant C added to or subtracted from the cost term. In addition, not only the optimal solution, but all solutions and their ranks (size relations) naturally remain unchanged.
[0272] Meanwhile, in QAP, the matrix Q represented by the Kronecker product of the flow matrix F and the distance matrix D includes n×n small matrices f as in the above equation (9): ij D. When considering any two allocation elements (factories, etc.) identified by i and j, the allocatable allocation destinations (sites, etc.) are all possible combinations of the two allocation destinations. ij D represents a cost term corresponding to all combinations of two allocation destinations for any two allocation elements identified by i and j.
[0273] In the constraint satisfaction solution of QAP, from each small matrix f ij Select any element f from D except the diagonal elementsij d kl That is, from each small matrix f ij Any element f of D other than the diagonal elements ij d kl The value of is added to the cost term of the constraint satisfaction solution.
[0274] Therefore, for a constraint-satisfying solution, even if the same constant is added to all f included in the solution ij d kl or from all f included in the solution ij d kl By subtracting the same constant from the cost term, the same optimal solution is obtained in a similar manner as when the constant C is regularly added to or subtracted from the cost term in a simple manner as described above. In addition, all solutions and their ranks also remain unchanged.
[0275] Therefore, in the matrix Q, for the n(n-1) / 2 small matrices f including the above valid elements ij Each of D, regardless of whether any of the same constants are added to each element f ij d kl Or from each element f ij d kl Subtracting any identical constant from f yields the same solution (assignment) and order of cost terms with respect to the constraint satisfaction solution. Adding any identical constant to each element f ij d kl Or from each element f ij d kl Such an operation of subtracting any identical constant corresponds to a modulation of the matrix Q.
[0276] Meanwhile, the small matrix d obtained in the case of performing the Kronecker product by switching the order of the flow matrix F and the distance matrix D kl F represents the cost term corresponding to all combinations of two allocation elements for any two allocation destinations identified by k and l. However, since the Kronecker product is not commutative, the small matrix d kl The elements of F do not constitute a small matrix in the matrix Q as shown in formula (9), and are assigned one by one to each small matrix f of the matrix Q ij D.
[0277] Fig.19 It is a small matrix d kl Elements of F to small matrix f ij Figure 2. An exemplary distribution of D. Fig.19 Shown as a small matrix d kl Example of F 2n Elements of F to small matrix f ij Example allocation of D.
[0278] For example, d 2n The element f of F 12 d 2n Assign to the small matrix f 12 D, and d 2n The element f of F 1n d 2n Assign to the small matrix f 1n D.
[0279] In the constraint satisfaction solution of QAP, with the small matrix f ij D is similar to the case of D, from the small matrix d kl Select any element f from F except the diagonal elements ij d kl That is, except for the small matrix d kl Any element f other than the diagonal elements of F ij d kl The value of is added to the cost term of the constraint satisfaction solution. Therefore, for a constraint satisfaction solution, even if the same constant is added to all f included in the solution ij d kl or from all f included in the solution ij d kl Subtracting this same constant from the cost term also yields the same optimal solution in a similar manner as when the constant C is regularly added to or subtracted from the cost term in a simple manner as described above. Furthermore, all solutions and their ranks also remain unchanged. Note that due to the small matrix f ij The elements of the lower triangle of D are the same as the elements of the upper triangle, so they may not be used (they may be considered invalid elements).
[0280] Therefore, with the small matrix f ij In a similar way to D, for n(n-1) / 2 small matrices d including valid elements kl Each of F, regardless of whether any identical constant is added to each element f ij d kl Or from each element f ij d kl Subtracting any identical constant from d yields the same solution (assignment) and order of cost terms with respect to the constraint satisfaction solution. Adding any identical constant to d kl Every element f of F ij d kl Or from d kl Every element f of F ij d kl Such an operation of subtracting any identical constant also corresponds to a modulation of the matrix Q.
[0281] Reduce f by means of these kinds of matrix modulations ij d kl The deviation of the value of can be reduced to smooth the solution space, and the value of the constraint term can be reduced to improve the solution search efficiency. From a statistical point of view, this can be regarded as follows. Initially, f with different deviations for each instance sequence ij d kl Based on matrix modulation, the deviation reduction is performed, so that it is converted into another instance sequence with similar statistical characteristics to each other, regardless of the original instance sequence, and has the same solution as the original instance.
[0282] As described above, when determining the constraint coefficient, the statistical characteristics can be made consistent by applying matrix modulation to the instance to be calculated. Therefore, the adjustment coefficient for correcting the statistical differences of the instance sequence used in the second embodiment can be set to an almost constant value while reducing the sequence dependence of the instances.
[0283] Fig. 20 is a flowchart showing an exemplary process of matrix modulation.
[0284] The control unit 130 calculates the average value of the elements of the matrix Q obtained by the Kronecker product of the flow matrix F and the distance matrix D (step S60). In addition, the control unit 130 calculates the average value of the elements of each small matrix f ij D(i < j) (step S61). Then, for each small matrix f ij D(i < j), the control unit 130 subtracts from each element of the small matrix f ij D(i < j) (the average value of the elements of the small matrix f ij D(i < j) - the average value of the elements of the matrix Q) (step S62). Note that in the case where (the average value of the elements of the small matrix f ij D(i < j) - the average value of the elements of the matrix Q) is negative, the control unit 130 adds the difference to each element of the small matrix f ij D(i < j).
[0285] Next, the control unit 130 calculates the average value of the elements of each small matrix d kl F(k < l) (step S63). Then, for each small matrix d kl F(k < l), the control unit 130 subtracts from each element of the small matrix d kl F(k < l) (the average value of the elements of the small matrix d kl F(k < l) - the average value of the elements of the matrix Q) (step S64). Note that in the case where (the average value of the elements of the small matrix d kl F(k < l) - the average value of the elements of the matrix Q) is negative, the control unit 130 adds the difference to the small matrix dkl Each element of F(k<l).
[0286] Finally, the control unit 130 subtracts the minimum value in the matrix Q from all elements of Q (step S65).
[0287] In the above matrix modulation operation, the process of step S62 corresponds to adding to or subtracting from each element of each small matrix f a value that matches the average value of the elements of the entire matrix Q. Further, the process of step S64 corresponds to adding to or subtracting from each small matrix d a value that matches the average value of the elements of the entire matrix Q ij where the average value of the elements of D(i<j) is made to match the average value of the elements of the entire matrix Q. In addition, the process of step S64 corresponds to adding to or subtracting from each small matrix d kl a value that matches the average value of the elements of the entire matrix Q kl where the average value of the elements of F(k<l) is made to match the average value of the elements of the entire matrix Q kl to each small matrix d
[0288] Note that the order of the above processes is an example, and the order of the processes can be changed appropriately.
[0289] Fig.21 is a graph showing the relationship between the values of the adjustment coefficient of the example and the calculation results in the case of using matrix modulation. Fig.21 shows the following exemplary case: obtaining the expected value Δ - C(x) of the reduction amount of C(x) based on the matrix Q that has been matrix-modulated by the above method, and then performing calculations by the replica exchange method by changing the value of the adjustment coefficient. The examples to be calculated are tai12a, scr12, rou12, nug12, and had12 selected from QAPLIB. The horizontal axis represents the value of the adjustment coefficient, and the vertical axis represents the number of replicas that obtain the constraint satisfaction solution among 128 replicas.
[0290] In the case of using the matrix Q that has been matrix-modulated by the above method, the adjustment coefficient can be set to approximately 1.0 for five examples, as Fig.21 shown. That is, as Fig.18 shown, Δ - C(x) can be directly used as the constraint coefficient α without the trial-and-error method for determining the constraint coefficient α.
[0291] However, in the case of performing the matrix modulation operation as Fig. 20 shown, the adjustment coefficient becomes 1.0, and in the case of performing another matrix modulation operation, the adjustment coefficient can be a value different from 1.0.
[0292] Furthermore, it is natural to adjust the constraint coefficient α without adjusting the constraint coefficient α before obtaining a solution, or to adjust the constraint coefficient α again after obtaining a solution, so as to achieve a better value of the cost term.
[0293] Note that the information processing of the first embodiment can be realized by causing the processing unit 12 to execute a program. Furthermore, the information processing of the second and third embodiments can be realized by causing the CPU 101 to execute a program. The program can be recorded in the computer-readable recording medium 113.
[0294] For example, the program can be distributed by distributing the recording medium 113 in which the program is recorded. In addition, the program can be stored in another computer, and the program can be distributed through a network. For example, the computer can store (install) the program recorded in the recording medium 113 or received from another computer in a storage device such as RAM 102, HDD 103, read the program from the storage device, and execute the program.
[0295] Although one aspect of the information processing system, the information processing method, and the program according to the embodiment has been described above based on the embodiment, these are merely examples and are not limited to the above description.
Claims
1. An information processing system, configured to calculate a combinatorial optimization problem including constraints based on an energy function of an Ising model, wherein the energy function of the Ising model is represented by a sum of a cost term and a constraint term corresponding to the constraint condition, the information processing system comprising: a processing unit configured to: obtain problem information of the combinatorial optimization problem, calculate an expected value of a change amount of the cost term when a transition from a solution satisfying the constraint condition to a solution not satisfying the constraint condition occurs based on the problem information, determine a coefficient of the constraint term based on the expected value, and output information of the energy function using the determined coefficient; as well as A searching unit is configured to search for a ground state of the Ising model based on the output information.
2. The information processing system according to claim 1, wherein: The combinatorial optimization problem includes a quadratic assignment problem, and The processing unit is configured to calculate a third matrix obtained by a Kronecker product of a first matrix and a second matrix representing problem information of the quadratic assignment problem, and calculate the expected value based on a first average value of elements included in the third matrix.
3. The information processing system according to claim 1, wherein: The processing unit is configured to calculate the coefficient by multiplying the expected value by an adjustment coefficient.
4. The information processing system according to claim 3, wherein: The information processing system is further configured to repeat a process until the adjustment coefficient reaches an upper limit or a lower limit, the process comprising: The processing unit outputs information of the energy function formulated using the coefficient obtained by multiplying the expected value by the adjustment coefficient; The search unit outputs a search result of the base state performed based on the information; and The processing unit increases or decreases the adjustment coefficient, wherein: When the adjustment coefficient reaches an upper limit or a lower limit, the processing unit determines the adjustment coefficient based on the search result.
5. The information processing system according to claim 2, wherein: The third matrix includes a plurality of small matrices obtained by multiplying each element included in one of the first matrix or the second matrix by the other matrix, and In each of the multiple small matrices, the processing unit adds a difference between a first average value and a second average value of elements included in each of the multiple small matrices to the values of the elements included in each small matrix, or subtracts the difference from the values of the elements included in each small matrix, so that the first average value and the second average value match.
6. An information processing method implemented by a computer, the information processing method calculating a combinatorial optimization problem including constraint conditions by using an energy function of an Ising model, wherein the energy function of the Ising model is represented by the sum of a cost term and a constraint term corresponding to the constraint condition, the information processing method comprising: Obtaining problem information of the combinatorial optimization problem; calculating, based on the problem information, an expected value of a change amount of the cost item when a transition occurs from a solution satisfying the constraint condition to a solution not satisfying the constraint condition; determining a coefficient of the constraint term based on the expected value; outputting information of the energy function using the determined coefficients; as well as A ground state of the Ising model is searched based on the output information.
7. A non-transitory computer-readable recording medium storing a program, the program causing a computer used in an information processing system to execute a process, the information processing system calculating a combinatorial optimization problem including constraint conditions based on an energy function of an Ising model, the energy function of the Ising model being represented by a sum of a cost term and a constraint term corresponding to the constraint condition, the process comprising: Obtaining problem information of the combinatorial optimization problem; calculating, based on the problem information, an expected value of a change amount of the cost item when a transition occurs from a solution satisfying the constraint condition to a solution not satisfying the constraint condition; determining a coefficient of the constraint term based on the expected value; The determined coefficients are used to output information of the energy function to a search unit of the information processing system, and the search unit is configured to search for a ground state of the Ising model based on the output information.
Citation Information
Cited By
Sparse angle CT image inversion method and system based on local MCMC sampling
CN120612391A
