This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2021-027815, filed on Feb. 24, 2021, the entire contents of which are incorporated herein by reference.
The embodiments discussed herein are related to a non-transitory computer-readable storage medium storing an information processing program, an information processing method, and an information processing device.
Single-spin flip and multi-spin flip are known as methods for calculating the minimum value of a Hamiltonian represented by a binary multivariable quadratic polynomial. The single-spin flip is a method of executing an annealing calculation by inverting a certain variable xi “from 0 to 1” or “from 1 to 0” to find an optimal solution, and the multi-spin flip is a method of executing the annealing calculation by inverting a plurality of certain variables (xi1, . . . , xik) at the same time.
In recent years, with respect to the shortest vector problem (SVP), which is one of the problems underlying the security of lattice-based cryptography, has been evaluated to see what scale of the problem can be solved by an annealing computer that performs annealing calculations. For example, as a technique for solving the SVP with the annealing computer, the SVP is divided into n ranges to generate n Hamiltonians, and the minimum value of each is solved by the annealing computer. Then, a technique to assume the smallest solution among the n solutions as the solution for the SVP is known.
Examples of the related art include as follows: Japanese Laid-open Patent Publication No. 2009-223848; Japanese National Publication of International Patent Application No. 2018-529142; U.S. Patent Application Publication No. 2009/0299947; and U.S. Patent Application Publication No. 2018/0218279.
According to an aspect of the embodiments, there is provided an information processing device of solving of a shortest vector problem using an annealing computer that performs a single-spin flip. In an example, the information processing device includes: a memory; and a processor coupled to the memory, the processor being configured to perform processing, the processing including: dividing the shortest vector problem including a basis vector into a predetermined number of ranges, the basis vector being a multidimensional integer vector; generating, for each of the predetermined number of ranges, a specific term that causes a transition of a linear sum of specific variables among respective variables included in the basis vector; and generating, for each of the predetermined number of ranges, a Hamiltonian of a pseudo-multi-spin flip in which the specific term is added to the Hamiltonian of the single-spin flip.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention.
Incidentally, tuning for large scale or acceleration of the annealing computer that performs the multi-spin flip has not been achieved, and it is common to use an annealing computer that performs the single-spin flip. On the other hand, in the annealing computer that performs the single-spin flip, a transition destination candidate is only the addition of an integral multiple of one basis vector, and there are few candidates. Thus, solutions cannot go beyond localized solutions and an enormous amount of time is required to calculate the minimum solution, or there may be cases where the minimum solution cannot be calculated.
In one aspect, it is an object to provide an information processing program, an information processing method, and an information processing device capable of efficiently solving a shortest vector problem using an annealing computer that performs the single-spin flip.
Hereinafter, embodiments of an information processing program, an information processing method, and an information processing device disclosed in the present application will be described in detail on the basis of the drawings. Note that the embodiments are not limited to the present disclosure. Furthermore, each of the embodiments may be appropriately combined within a range without inconsistency.
The information processing device 10 divides the SVP into n ranges (range 1 to range n) to generate n Hamiltonians, inputs each Hamiltonian to the annealing computer 50, acquires n solutions from the annealing computer 50, and uses the smallest solution as the solution for the SVP. Here, the information processing device 10 defines the SVP function as in Equation (1) when an n-dimensional integer vector “b1, . . . , bn” is given, but the reason for dividing is to achieve (x1, . . . , xn)≠(0, . . . , 0).
f(x1, . . . ,xn)=∥x1b1+ . . . +xnbb∥2 Equation (1)
where (x1, . . . , xn)≠(0, . . . , 0) and each variable takes an integer value.
Here, the single-spin flip and the multi-spin flip used in the annealing calculation will be described.
Next, the annealing calculation of the single-spin flip using this Hamiltonian will be described.
In such a state, a destination where each variable is flipped by 1 bit is illustrated in Table (a) of
Next, the multi-spin flip will be described.
Therefore, in the first embodiment, a method for solving the shortest vector problem using the annealing computer of single-spin flip is achieved. For example, the information processing device 10 divides the shortest vector problem given a basis vector, which is a multidimensional integer vector, into a predetermined number of ranges. Then, the information processing device 10 generates, for each of the ranges, a specific term that causes a transition of a linear sum of the basis vectors, and generates a Hamiltonian of a pseudo-multi-spin flip in which the previous specific term is added to the Hamiltonian of the single-spin flip. For example, the information processing device 10 generates a specific term for transitioning the linear sum of a plurality of basis vectors (i.e., a specific term that causes a transition of a linear sum of specific variables among respective variables included in the basis vector).
Thereafter, the information processing device 10 outputs the Hamiltonian of each pseudo-multi-spin flip to the annealing computer 50 that performs the single-spin flip, acquires the minimum solution corresponding to each of the ranges from the annealing computer 50, and selects the minimum value among the acquired respective minimum solutions as a result of solving of the shortest vector problem. Note that when adding each specific term to each Hamiltonian corresponding to each of the ranges, the information processing device 10 adds a specific term in compliance with the restriction that the coefficient of the last basis vector of each of the ranges is 1 or more, so that the possibility of falling into localized solutions and not being able to calculate the minimum solution may be reduced.
[Functional Configuration of Information Processing Device 10]
The communication unit 11 is a processing unit that controls communication with another device, and is implemented by, for example, a communication interface or the like. For example, the communication unit 11 transmits and receives various types of data to and from the annealing computer 50.
The storage unit 12 is a processing unit that stores programs and various types of data, and is achieved by, for example, a memory, a hard disk, or the like. For example, the storage unit 12 stores various calculation results calculated in the process of solving the SVP.
The control unit 13 is a processing unit that is in charge of the entire information processing device 10 and is implemented by, for example, a processor or the like. The control unit 13 includes a coefficient matrix generation unit 14, an addition unit 15, and a Hamiltonian generation unit 16. Note that the coefficient matrix generation unit 14, the addition unit 15, and the Hamiltonian generation unit 16 are achieved by an electronic circuit that the processor has, a process executed by the processor, or the like.
(Generation of Coefficient Matrix)
The coefficient matrix generation unit 14 is a processing unit that divides the shortest vector problem given a basis vector, which is a multidimensional integer vector, into a predetermined number of ranges, and generates, for each range, a coefficient matrix for generating a Hamiltonian.
For example, the description will be given with the basis vector B of the n-dimensional lattice being “B=(b1, . . . , bn) (n×n matrix)”, an integer i (1≤i≤n) representing the position, and a matrix A (i×N matrix) representing a search range. In this case, the coefficient matrix generation unit 14 “sets the zero matrix of (i×(N−1)i) in the vector V” as step 1. Subsequently, the coefficient matrix generation unit 14 generates “V[j][(N−1)×(j−1)+k]=A[j][k]” repeats respective for statements for i and j illustrated in step 2. Moreover, the coefficient matrix generation unit 14 “sets a zero vector with a length i to y” in step 3. Thereafter, the coefficient matrix generation unit 14 generates “y[j]=A[j][N]” by repeating the for statement for i in step 4.
(Pseudo-Multi-Spin Flip)
The addition unit 15 is a processing unit that adds a term of pseudo-multi-spin flip to the coefficient matrix. For example, for each range, the addition unit 15 generates a specific term (term of pseudo-multi-spin flip) for transitioning a linear sum of a plurality of basis vectors, and adds a specific term to the Hamiltonian of the single-spin flip. At this time, the addition unit 15 generates and adds a specific term in compliance with restrictions described later.
Here, the restrictions of the pseudo-multi-spin flip term will be described.
For example, as illustrated in
Therefore, in a case of the Hamiltonian in the range j, in order to add the term of the pseudo-multi-spin flip in a range that does not extend the coefficient of bj in the negative direction, “when adding the term (v1b1+ . . . +vjbj) of the pseudo-multi-spin flip in the Hamiltonian, “vj” is an integer equal to or more than zero” is provided as a restriction.
(Selection of Matrix M Representing Pseudo-Multi-Spin Flip)
Next, a method of selecting the matrix M representing the pseudo-multi-spin flip described above will be described.
As a method of setting the coefficients x and y at this time, if the absolute values of x and y are set to be small, the movement will be a small transition at the time of flipping, and if the absolute values of x and y are set to be large, the movement will be a large transition at the time of flipping, and which one to use can be set in any manner depending on the situation of the annealing calculation. For example, at point A, the transition destination is closer to the origin when flipped at (x, y)=(−2, −2) than when flipped at (x, y)=(1, 1). Conversely, at point B, the transition destination is closer to the origin when flipped at (x, y)=(1, 1) than when flipped at (x, y)=(−2, −2).
Moreover, a plurality of the same column vectors can be added. For example, the transitions of “xbj+ybk” are possible by the added number.
A generalization of the above contents is illustrated in
Here, a specific example of the matrix M representing the pseudo-multi-spin flip described above will be described.
Furthermore, the variables to be added may be two or more instead of one by one. For example, taking the case of n=3 and i=3, the matrix M can be generated as illustrated in (b) of
(Generation of Hamiltonian)
Returning to
Next, the Hamiltonian generation unit 16 generates “W” by multiplying “C” in step 2 and “transposed matrix of C” in step 3, defines a vector b in step 4, and defines a variable c in step 5. Consequently, the Hamiltonian generation unit 16 may define the Hamiltonian H described in equation (d) of
Thereafter, the Hamiltonian generation unit 16 transmits the Hamiltonian H in each range to the annealing computer 50 to instruct solving of the SVP. Then, the Hamiltonian generation unit 16 acquires the minimum solution of each range from the annealing computer 50, and performs storage in the storage unit 12, display on a display or the like, and/or transmission to an administrator terminal of the minimum solution, which is the minimum value thereof, as the final solution.
[Flow of Processing]
For example, the information processing device 10 generates a coefficient matrix A representing the search range (S102), generates a matrix M (additional target term) representing the pseudo-multi-spin flip using the coefficient matrix A (S103), and generates the Hamiltonian H to which the term M of the pseudo-multi-spin flip is added (S104).
Thereafter, the information processing device 10 transmits a request for solving including n Hamiltonians corresponding to each range to the annealing computer 50 (S105 and S106). Then, the annealing computer 50 executes the processing of solving each Hamiltonian (S107), and responds to the information processing device 10 with results of solving, which are the n minimum solutions (S108 and S109).
Then, the information processing device 10 selects the minimum solution out of the acquired n minimum solutions as the minimum solution of the shortest vector problem (S110).
Here, a specific example of the processing described above will be described with reference to
In this state, as illustrated in
Thereafter, the information processing device 10 calculates the matrix W, the vector b, and the variable c using the basis vector B and the vector V according to steps 1 to 5 illustrated in
[Effects]
As described above, the information processing device 10 uses the fact that there is no maximum value or minimum value in the restriction condition of the shortest vector problem, and generates a Hamiltonian to which “a term that shifts only a certain linear sum in the “basis vectors b1, . . . bn”” is added within the range of the restriction conditions of the shortest vector problem. Thus, the information processing device 10 may substantially achieve transitions for a plurality of variables with the annealing computer 50 of single-spin flip.
Therefore, the information processing device 10 may generate a Hamiltonian that can solve a larger shortest vector problem at higher speed by using the annealing computer 50 of single-spin flip, and may efficiently solve the shortest vector problem.
Here, an experimental example using the shortest vector problem of a 40-dimensional lattice will be described. For example, a 40-dimensional lattice with seed=0 of SVP Challenge is generated, and LLL-0.99 is performed. Furthermore, for “i=31, . . . , 40”, ten Hamiltonians were generated for each of the general single-spin flip and the method according to the first embodiment, and were solved by the annealing computer for single-spin flip. However, as a condition of M, “a total of four column vectors are generated in which the jth component is 1 or −1, the kth component is 1 or −1, and others are zero for any 1≤j<k≤i (however, when k=i, there are two kth components of 1) and adds the column vectors to the last column of M”, and consequently, M becomes a “i×2 (i−1)2” matrix.
In such a state, the total times taken to calculate the minimum solutions for the ten Hamiltonians were compared. While it takes 687 seconds to solve when using the Hamiltonian of general single-spin flip, by using the method of the first embodiment, it was possible to shorten the time to 13.8 seconds, and thus it was possible to achieve acceleration of about 50 times.
Now, while the embodiments have been described above, the embodiments may be carried out in a variety of different modes in addition to the above-described embodiments.
[Numerical Values and the Like]
The numerical examples, matrices, various types of variables, and the like used in the embodiment described above are merely examples and may be changed in any manner. Furthermore, the flow of the processing described in the sequence diagram may be appropriately changed within a consistent range.
[Introduction of Approximation Processing]
As a modification example of the first embodiment described above, it is possible to introduce approximation processing (approximate enumeration) using an enumeration type that can combine a plurality of constants.
Next, unlike the first embodiment, the addition unit 15 executes approximation processing. For example, the addition unit 15 calculates a GSO coefficient μj,k (1≤k≤j≤n) of the basis vector B in step 1. Subsequently, the addition unit 15 generates “y[j]=y[j]−[μj,k×y[k]]” by repeating the for statements of j, i, and l in step 2, and repeats the for statements of j and k in step 3.
Thereafter, the addition unit 15 connects the matrix M to the matrix V. For example, the addition unit 15 “extends the vector V to an i×{(N−1)i+M} matrix” in step 1. Subsequently, the addition unit 15 generates “V[j][(i−1)N+k]=M[j][k]” by repeating the for statements for j and k in step 2.
Then, the Hamiltonian generation unit 16 generates equation (z) as the Hamiltonian H in which a term for executing a pseudo-multi-spin flip is added to the Hamiltonian of the SVP by the same method as in the first embodiment. Note that x in equation (z) is a binary variable with a length “i(N−1)+m”.
In this manner, the information processing device 10 may generate a Hamiltonian into which the approximation processing is introduced, and may improve versatility and accelerate processing.
[System]
Pieces of information including a processing procedure, a control procedure, a specific name, various types of data, and parameters described above or illustrated in the drawings may be changed in any manner unless otherwise specified.
Furthermore, each component of each device illustrated in the drawings is functionally conceptual and does not necessarily have to be physically configured as illustrated in the drawings. For example, specific forms of distribution and integration of each device are not limited to those illustrated in the drawings. That is, all or a part thereof may be configured by being functionally or physically distributed or integrated in any units according to various types of loads, usage situations, or the like.
Moreover, all or any part of individual processing functions performed in each device may be implemented by a central processing unit (CPU) and a program analyzed and executed by the CPU, or may be implemented as hardware by wired logic.
[Hardware]
The communication device 10a is a network interface card or the like and communicates with another device. The HDD 10b stores a program that causes the functions illustrated in
The processor 10d reads a program that executes processing similar to the processing of each processing unit illustrated in
As described above, the information processing device 10 operates as an information processing device that executes an analysis method by reading and executing a program. Furthermore, the information processing device 10 may also implement functions similar to the functions of the above-described embodiments by reading the program described above from a recording medium by a medium reading device and executing the read program described above. Note that the program referred to in other embodiments is not limited to being executed by the information processing device 10. For example, the embodiments may be similarly applied to a case where another computer or server executes the program, or a case where these cooperatively execute the program.
This program may be distributed via a network such as the Internet. Furthermore, this program may be recorded in a computer-readable recording medium such as a hard disk, flexible disk (FD), compact disc read only memory (CD-ROM), magneto-optical disk (MO), or digital versatile disc (DVD), and may be executed by being read from the recording medium by a computer.
All examples and conditional language provided herein are intended for the pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although one or more embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2021-027815 | Feb 2021 | JP | national |