A method for training a multi-layer feedforward neural network for an ising machine

By transforming the supervised learning of quantized neural networks into a quadratic unconstrained binary optimization problem, and using the Ising machine to solve it quickly, a multilayer feedforward neural network is efficiently trained on the Ising machine. This solves the problems of slow training speed and gradient vanishing in traditional methods, and achieves efficient training of multilayer feedforward neural networks.

CN117313819BActive Publication Date: 2025-12-26TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311379749.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-23
Publication Date
2025-12-26
Estimated Expiration
2043-10-23

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently train multilayer feedforward neural networks on the Ising machine, and traditional methods suffer from problems such as vanishing gradients, local optima, and slow inference speed.

Method used

Supervised learning of quantized neural networks is formulated as a quadratic constrained binary optimization problem, which is then transformed into a quadratic unconstrained binary optimization problem using a penalty function and Rosenberg's reduction method. The optimal solution is then quickly obtained using the Ising machine to train a multilayer feedforward neural network.

Benefits of technology

This study enables efficient training of multilayer feedforward neural networks on the Ising machine, improving training speed and accuracy. It provides a novel non-gradient training method suitable for large datasets and real-time applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117313819B_ABST
    Figure CN117313819B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multilayer feedforward neural network training methods for Ising machine, the method includes supervision learning task construction, problem form conversion, network parameter solution;Wherein supervision learning task construction is the modeling of quadratic constrained binary optimization problem on training data set and quantization neural network parameter;Wherein problem form conversion is the quadratic unconstrained binary optimization problem of quadratic constrained binary optimization problem constructed into;Wherein network parameter solution is the optimal solution of quadratic unconstrained binary optimization problem on Ising machine, and optimal solution is decoded to obtain optimal quantization neural network parameter, and the multilayer feedforward neural network of training is obtained.The application realizes the multilayer feedforward neural network of training on Ising machine, and provides the alternative method of traditional back propagation method as a kind of non-gradient training method.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of quantum computing, and particularly relates to a multilayer feedforward neural network training method for Ising machines. BACKGROUND

[0002] The huge computing cost of training deep neural networks has become a key bottleneck for the development of artificial intelligence. The traditional gradient-based backpropagation training method has encountered many problems such as gradient vanishing and falling into local optimum. This training method requires a large number of graphic processing units (GPUs) to efficiently update the model. Ising machines, as a special quantum computer, have realized a large number of spin bits, showing the potential of training neural networks on Ising machines.

[0003] Ising machines are suitable for solving combinatorial optimization problems that can be formatted as quadratic unconstrained binary optimization (QUBO), such as maximum cut problems, traveling salesman problems, and NP-hard problems. In the Ising model, the system is composed of a group of interacting spins, each spin can take two discrete values such as +1 and -1, and the state of the entire Ising model is determined by the combined state of all spins. QUBO problems and Ising models can be converted into each other through linear transformation. In the QUBO problem, a quadratic objective function needs to be minimized or maximized on a set of binary variables, where the value range of the binary variable is 0 or 1. The QUBO problem can be converted into the form of the Ising model, and then the Ising machine or other Ising model solving algorithm is used to search for the state with the lowest energy, i.e. the ground state, to obtain the approximate optimal solution of the QUBO problem. The Ising machine solves the problem by using the inherent convergence characteristics of the hardware system. Generally, the Ising machine can converge to the ground state with extremely high efficiency. For example, for the maximum cut problem in QUBO format with 100,000 binary variables, a coherent Ising machine can obtain a good enough result within 1 millisecond. Therefore, if the fast computing power of the Ising machine can be applied to train deep feedforward neural networks, it will be a revolutionary progress for the field of artificial intelligence.

[0004] So far, Ising machines have been used for some machine learning tasks, such as training of support vector machines and training of clustering models. Meanwhile, in the field of neural networks, Ising machines can be used to train Boltzmann machines and dynamical energy networks, which are not feedforward networks. There is a study that uses the method of ultrafast statistical sampling on Ising machines to train restricted Boltzmann machines (RBM). However, the neural network expression ability of RBM is limited because it only contains single-layer connections between visible layer units and hidden layer units. In order to improve this problem, there is a study that unsupervisedly trains deep belief networks (DBN) on Ising machines, which is achieved by training an RBM in each training step, and each RBM is composed of two consecutive layers in DBN. The training of DBN is completed step by step by training RBMs from the bottom layer to the top layer. However, this method is not a real multi-layer neural network training method because it only trains one layer at a time, which may lead to local optimum rather than global optimum. Another way is to train the whole deep Boltzmann machine (DBM) directly on the Ising machine with sparse connections. However, the inference of DBM is based on the Gibbs sampling method, which is slower than the feedforward inference process. This drawback makes the training of DBM difficult on large data sets and makes DBM unable to be used in real-time applications. Another method is to train the dynamical energy network by the method of equilibrium propagation (EP), which calculates the equilibrium state of neurons by Ising machine, and then uses a local learning rule to approximate the gradient. However, the inference of this network needs a gradual convergence process based on the energy function, which leads to the same slow inference speed as DBM. The above networks are not multi-layer feedforward networks, and the inference process of feedforward networks is a one-way flow process from the input layer to the intermediate layer and then to the output layer. Due to the strong representation ability, fast inference ability and flexible connection structure of feedforward networks, multi-layer feedforward networks are the most widely used type of neural networks in industry. Therefore, the current challenge is how to train multi-layer feedforward neural networks on Ising machines. SUMMARY

[0005] The present application aims to at least partially solve one of the technical problems in the related art.

[0006] To this end, the application provides a multilayer feedforward neural network training method for Ising machines, which can express supervised learning of a quantized neural network (QNN) as a quadratic constrained binary optimization (QCBO) problem, and solve the problem on Ising machines after converting the QCBO problem into a QUBO problem, thereby realizing training of the multilayer feedforward neural network on Ising machines.

[0007] Another object of the application is to provide a multilayer feedforward neural network training system for Ising machines.

[0008] To achieve the above object, the application provides a multilayer feedforward neural network training method for Ising machines, which comprises a supervised learning task construction, a problem form conversion, and a network parameter solving.

[0009] The supervised learning task construction is a quadratic constrained binary optimization problem modeling performed on a training data set and quantized neural network parameters.

[0010] The problem form conversion is a conversion of the constructed quadratic constrained binary optimization problem into a quadratic unconstrained binary optimization problem.

[0011] The network parameter solving is a solving of an optimal solution of the quadratic unconstrained binary optimization problem on Ising machines, a decoding of the optimal solution to obtain optimal quantized neural network parameters, and a training of a multilayer feedforward neural network.

[0012] The multilayer feedforward neural network training method for Ising machines of the application can further have the following additional technical features.

[0013] In an embodiment of the application, the training problem composed of the training data set and the quantized neural network parameters is constructed as a quadratic constrained binary optimization problem, which comprises:

[0014] The linear transformation and the activation function are taken as equality constraints to represent the feedforward topology of the quantized neural network.

[0015] All optimization variables are encoded using a binary representation rule to establish a relationship between the optimization variables and spins of Ising machines.

[0016] In an embodiment of the application, the constraint representation method of the activation function comprises:

[0017] The activation function is represented as an inequality constraint.

[0018] An auxiliary variable is introduced on the basis of the inequality constraint to convert the inequality constraint into an equality constraint.

[0019] In one embodiment of the present application, the binary representation rule of all optimization variables in the optimization problem is constructed, including:

[0020] The binary representation rule of decimal numbers is used to limit the variable value range within a certain upper and lower bound range.

[0021] In one embodiment of the present application, the quadratic constrained binary optimization problem is converted into a quadratic unconstrained binary optimization problem, including:

[0022] The high-order loss function is obtained by eliminating all equality constraints using the penalty function method;

[0023] The high-order loss function is converted into a quadratic loss function using the Rosenberg reduction method to convert into a quadratic unconstrained binary optimization problem.

[0024] In one embodiment of the present application, the penalty function method includes:

[0025] By taking the difference between the two ends of the equality constraint, the square of the difference is added to the loss function as a penalty term;

[0026] A large penalty coefficient is introduced to the penalty term, and the cost of violating the constraint will be greater than the cost of improving the prediction accuracy, ensuring the feasibility of the constraint;

[0027] The constraint condition is converted into part of the objective function using the penalty function method to convert the original constrained problem into an unconstrained problem.

[0028] In one embodiment of the present application, the Rosenberg reduction method includes:

[0029] Find the quadratic term factor that appears most frequently in the loss function, and introduce an auxiliary binary variable to replace the quadratic term factor;

[0030] The Rosenberg polynomial is added to the original loss function as a penalty term, and a large penalty coefficient is introduced;

[0031] Iterate the Rosenberg reduction method until the loss function is reduced to quadratic;

[0032] The high-order loss function is converted into a quadratic loss function to convert into a quadratic unconstrained binary optimization problem.

[0033] In one embodiment of the present application, the linear weights of the quantized neural network except the last layer are limited to +1 or -1; the bias terms except the first and last layers are frozen; the linear weights of the last layer and the bias terms of the first and last layers are limited to quantized values of a certain bit width.

[0034] In an embodiment of the present application, the optimal solution of the quadratic unconstrained binary optimization problem is solved on the Ising machine, and the optimal solution is decoded to obtain the optimal quantized neural network parameter, and a trained multi-layer feedforward neural network is obtained.

[0035] In an embodiment of the present application, the number of spins required by all variables is summed, and then the spatial complexity is analyzed to obtain the trend of the number of spins required by the Ising machine with the increase of the problem size, which is proportional to the size of the data set, proportional to the network depth, and proportional to the square of the network width.

[0036] To achieve the above-mentioned purpose, another aspect of the present application provides a multi-layer feedforward neural network training system for an Ising machine, comprising:

[0037] A learning task construction module is configured to model a quadratic constrained binary optimization problem on the training data set and the quantized neural network parameter;

[0038] A problem form conversion module is configured to convert the constructed quadratic constrained binary optimization problem into a quadratic unconstrained binary optimization problem;

[0039] A network parameter solving module is configured to solve the optimal solution of the quadratic unconstrained binary optimization problem on the Ising machine, and decode the optimal solution to obtain the optimal quantized neural network parameter, and obtain a trained multi-layer feedforward neural network.

[0040] In general, the multi-layer feedforward neural network training method for the Ising machine according to the embodiments of the present application finally converts the training of the QNN into a quadratic unconstrained binary optimization problem, i.e., a QUBO problem, and the conversion process is divided into two steps. In the first step, the training problem is represented as a quadratic constrained binary optimization problem, i.e., a QCBO problem, and in this step, two techniques are included, i.e., a constraint representation of the network topology and a binary representation of the optimization variable. The constraint representation technique represents the feedforward topology of the QNN by taking the linear transformation and the activation function as the equality constraint. The binary representation technique constructs all optimization variables based on the binary representation rule of the decimal number, thereby establishing the relationship between the optimization variable and the spin of the Ising machine. In the second step, the technical solution of the present application uses a conversion method for converting the QCBO problem into the QUBO problem. In the conversion method, two techniques are included, i.e., a penalty function method and a Rosenberg reduction method. The penalty function method is used to eliminate all equality constraints to obtain a high-order loss function. The Rosenberg reduction method is used to convert the high-order loss function into a quadratic loss function. Finally, the quadratic loss function composed of binary variables is a QUBO problem, which can be efficiently and quickly solved on the Ising machine.

[0041] Additional aspects and advantages of the present application will be made apparent by the following description, which, taken in conjunction with the accompanying drawings, will provide a better understanding of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0042] The above and / or additional aspects and advantages of the present application will become apparent and be more fully understood from the following description, taken in conjunction with the accompanying drawings, in which:

[0043] Figure 1 Flow chart of the method for training the multi-layer feedforward neural network for Ising machine in embodiments of the present application;

[0044] Figure 2 Structure diagram of the quantized neural network in embodiments of the present application;

[0045] Figure 3 Flow principle diagram of the verification on the MNIST dataset in embodiments of the present application;

[0046] Figure 4 Loss function histogram of the verification on the MNIST dataset in embodiments of the present application;

[0047] Figure 5 Confusion matrix diagram of the verification on the MNIST dataset in embodiments of the present application;

[0048] Figure 6 System structure schematic diagram of the method for training the multi-layer feedforward neural network for Ising machine in embodiments of the present application. DETAILED DESCRIPTION

[0049] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The technical solutions in the embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0050] In order for the persons in the field of the present application to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the persons of ordinary skill in the art without creative labor should belong to the protection scope of the present application.

[0051] The method and system for training the multi-layer feedforward neural network for Ising machine according to the embodiments of the present application will be described below with reference to the accompanying drawings.

[0052] Figure 1 Flow chart of the method for training the multi-layer feedforward neural network for Ising machine in embodiments of the present application.

[0053] As shown in Figure 1 , the method includes but is not limited to the following steps:

[0054] S1, supervised learning task construction: modeling a quadratic constrained binary optimization problem on the training dataset and quantized neural network parameters;

[0055] S2, problem form transformation: transforming the constructed quadratic constrained binary optimization problem into a quadratic unconstrained binary optimization problem;

[0056] S3, network parameter solving: solving the optimal solution of the quadratic unconstrained binary optimization problem on the Ising machine, and decoding the optimal solution to obtain the optimal quantized neural network parameters, obtaining the trained multi-layer feedforward neural network.

[0057] Specifically, the input of the present application includes a dataset D and a quantized neural network parameterized by θ.

[0058] In an embodiment of the present application, a method for formulating a supervised learning of a quantized neural network (QNN) as a quadratic constrained binary optimization (QCBO) problem is provided, which includes a constraint representation of the network topology and a binary representation of the optimization variables.

[0059] Specifically, the constraint representation technique represents the feedforward topology of the QNN as equality constraints of linear transformations and activation functions. The binary representation technique constructs all optimization variables based on the binary representation rules of decimal numbers, thereby establishing a relationship between the optimization variables and the spins of the Ising machine.

[0060] where f is a multi-layer quantized neural network with quantization parameter θ, the size of the dataset D is N, and the loss function is the mean squared error (MSE). Then the learning problem can be formulated as where The operation of the kth layer is f (k) (x)=g(W (k) x+b (k) ), g is the activation function, W (k) represents the quantized weights of the kth layer, and b (k) represents the quantized bias of the kth layer. This problem format is suitable for the backpropagation training method, but not suitable for training on the Ising machine, with two main reasons: first, the variable domain does not match, in order to utilize the Ising machine, the training should be formulated as a QUBO problem, which should only involve binary variables, however the network parameters θ usually contain non-binary variables; second, the high nonlinearity of the loss function, the existence of the nonlinear activation function g makes it difficult to represent the loss function as a quadratic loss. Therefore, the present patent designs a method and system to make this training problem solvable on the Ising machine.

[0061] Firstly, the present scheme simplifies and limits the QNN, including: limiting the linear weight of all layers except the last layer to +1 or -1, and freezing the bias term of all layers except the first and last layers. In addition, the linear weight of the last layer and the bias term of the first and last layers are limited to quantized values of a certain bit width, so as to obtain quantized values with higher precision, because these layers play a more important role in the prediction of the neural network. As shown in the following table: Figure 2 The figure for quantizing the neural network structure in the embodiment of the present application is shown in the following table, wherein 101 represents the input layer neuron, 102 represents the hidden layer neuron, and 103 represents the output layer neuron.

[0062] For the constraint representation technique of the quantized neural network, the linear transformation and the activation function are represented as equality constraints.

[0063] For the linear transformation, the equality constraint is used:

[0064] W (k) a (k-1) +b (k) =s (k)

[0065] In the formula, W (k) and b (k) are the weight and bias of the kth layer, s (k) is the value before activation of the kth layer, and a (k-1) is the value after activation of the kth-1 layer.

[0066] For the activation function, the sign function is used as the activation function of the network, that is:

[0067]

[0068] The present patent designs the following two constraint conditions to represent this activation function:

[0069] a (k) ⊙s (k) =r (k)

[0070] a (k) +2r (k) ≥1

[0071] wherein a (k) ∈{-1,+1} H respectively represent the value before activation and the value after activation of the kth layer, H represents the number of neural units of each hidden layer, the operation ⊙ represents element-wise multiplication, is an auxiliary variable. The above constraint a (k) ⊙s (k) =r (k) ensures that a(k) and s (k) have the same sign, because r (k) is a non-negative integer. In the case that this constraint is satisfied, the value of r (k) will be equal to the absolute value of s (k) . When s (k) = 0, the constraint a (k) + 2r (k) ≥ 1 guarantees that a (k) = +1. To make the constraint easier to handle later, the invention introduces an auxiliary variable converts the inequality constraint to an equality constraint:

[0072] a (k) + 2r (k) = 1 + t (k) .

[0073] Next, the invention represents the training of a QNN as a combinatorial optimization problem. Assume there is a dataset D, where the input and label of the i-th sample are where Here B denotes the bit-width of the input data. By introducing a scale factor, typical classification and regression problems can be transformed into this kind of dataset, so it is not without generality.

[0074] Before training, the input x i should be quantized to an integer variable x i by rounding. The trainable parameters of this network are θ = {W (k) | k = 1, 2,..., L}∪{b (1) , b (L)}, L denotes the total number of layers of the neural network. In the subsequent variables of this patent, the subscript i represents the value of the corresponding variable when the i-th sample in the dataset is input into the network.

[0075] The loss function in supervised learning can be represented as the MSE loss:

[0076]

[0077] where y is the predicted value of sample i.

[0078] When minimizing L MSE , some constraints of the aforementioned design of this patent must be satisfied, which will be listed hierarchically.

[0079] For the first layer, the following linear constraints and activation constraints should be satisfied, the linear constraints represent the linear transformation process in the feedforward process, and the activation constraints represent the transformation process of the activation function in the feedforward system:

[0080]

[0081] For the 2, 3,..., L-1 layers, the following linear constraints and activation constraints should be satisfied:

[0082]

[0083] For the last layer, only the linear constraints should be satisfied:

[0084]

[0085] The MSE loss function and all the constraints above form an optimization problem, whose decision variables are

[0086] Next, all the decision variables are coded by binary bits, whose value domain is {0, 1}, corresponding to a spin on the Ising machine. This coding scheme is implemented by the decimal binary coding rule, and the coding scheme of all variables will be listed layer by layer below.

[0087] For the first layer, all the decision variables include: and are coded by the following binary variables: The specific expressions of each variable are as follows:

[0088]

[0089]

[0090]

[0091]

[0092]

[0093]

[0094] where the value domain of the binary variable is:

[0095]

[0096]

[0097] For the 2, 3,..., L-1 layers, all the decision variables include: and are coded by the following binary variables: The specific expressions of each variable are as follows:

[0098]

[0099]

[0100]

[0101]

[0102] where the value domain of binary variable is:

[0103]

[0104]

[0105] For the last layer, all decision variables include: Encoded by the following binary variables: The specific expression of each variable is as follows:

[0106]

[0107]

[0108]

[0109] where the value domain of binary variable is:

[0110]

[0111]

[0112] The embodiment of the application defines the training of the quantized neural network as a quadratic constrained binary optimization problem by the above scheme. In this step, the constraint representation of the network topology and the binary representation of the optimization variable are included. The constraint representation technique represents the feedforward topology of the quantized neural network by taking the linear transformation and the activation function as the equality constraint. The binary representation technique constructs all optimization variables based on the binary representation rule of decimal numbers, thereby establishing the relationship between the optimization variables and the spins of the Ising machine.

[0113] The Ising machine is suitable for solving the QUBO problem without any constraint conditions, so it is necessary to convert the QCBO problem into the QUBO format. In an embodiment of the application, a conversion method for converting the QCBO problem into the QUBO problem is provided, which includes the use of the penalty function method and the Rosenberg reduction method. The penalty function method is used to eliminate all equality constraints to obtain a high-order loss function. The Rosenberg reduction method is used to convert the high-order loss function into a quadratic loss function. Finally, the quadratic loss function composed of binary variables is a QUBO problem, which can be efficiently and quickly solved on the Ising machine. The method for converting the QCBO problem into the QUBO problem will be described in detail below.

[0114] In the first step, the present application adopts a penalty function method to eliminate all the constraints. The loss function is re-expressed as:

[0115]

[0116] where ρ is a large enough positive number, so that the cost of violating the constraints is greater than the cost of improving the prediction accuracy, ensuring the satisfaction of the constraints.

[0117] In the second step, the loss function is reduced in degree by using a Rosenberg polynomial, and a quadratic unconstrained loss function L QUBO is obtained. The Rosenberg polynomial is:

[0118] h(u1,u2,v)=3v+u1u2-2u1v-2u2v

[0119] where u1,u2,v∈{0,1}.

[0120] The Rosenberg polynomial has the following two properties:

[0121]

[0122] h(u1,u2,v)=0, if and only if v=u1u2

[0123] The above properties show that when v=u1u2, h(u1,u2,v)=0, and when v≠u1u2, h(u 11 ,u2,v)>0. Therefore, any high-order binary optimization problem can be converted into a quadratic binary optimization problem by the following steps: find the most frequently occurring quadratic factor u1u2 in the loss function, then replace the product of the two variables u1 and u2 with an auxiliary binary variable v, and then add the Rosenberg polynomial h(u1,u2,v) composed of u1,u2 and v to the loss function as a penalty term, and give the penalty term a large enough positive coefficient, and iterate this process until the loss function is reduced to quadratic.

[0124] The above scheme converts the training of the quantized neural network from a QCBO problem to a QUBO problem.

[0125] For the QUBO problem, the solution scheme of the present application can be expressed as:

[0126] σ * =arg min σ L QUBO

[0127] θ * =decode(σ * )

[0128] where the loss function LQUBO Through L penalty σ is obtained by reducing the order. * The optimal solution is obtained by optimization using the Ising machine. "Decode" means to decode the optimal solution σ. * Decoding yields the optimal network parameters θ * This problem can be solved optimally on the Ising machine in a short time. Generally, the time to solve the QUBO problem on the Ising machine is measured in milliseconds.

[0129] Furthermore, the technical solution of this invention analyzes the space complexity of the solution itself. In existing Ising machines, the main bottleneck is the number of available spins, and the computation time is also affected by the number of spins used. Therefore, it is best to use as few spins as possible during the problem-solving phase. This invention adds up the number of spins used for all variables to obtain the space complexity corresponding to the total number of spins used on the Ising machine:

[0130] O(nH+mN log H+HN log n+H 2 L+BHN+mBH+mBN+HLN log H).

[0131] Space complexity refers to the tendency for the number of spins to increase as the training problem becomes more complex. As shown in the equation above, space complexity is related to network depth L, network width H, dataset size N, the dimension of the input features n, the dimension of the output features m, and the bit width B of the input features.

[0132] Assuming n, n, and B are constants, the space complexity becomes O(H). 2 L + HLN log H). This yields the conclusion that the number of spins is proportional to the dataset size N, the network depth L, and the square of the network width H. As time progresses, the number of spins in the Ising machine will continue to increase, and the technical solution of this invention has the potential to train deeper networks and larger datasets in the future.

[0133] It is understood that the multilayer feedforward neural network training method for Ising machines proposed in this invention ultimately formulates the supervised learning of quantized neural networks as a quadratic unconstrained binary optimization problem, which is solved at high speed on the Ising machine. Furthermore, as a non-gradient training method, the technical solution of this invention provides an alternative to the traditional backpropagation method, and is the first method to train multilayer feedforward networks on Ising machines, unlocking new hardware and a new paradigm for neural network training.

[0134] To sum up, the flow of the embodiment of the present application is: (1) for a supervised learning task composed of a data set D and a quantized neural network with θ as a parameter, the task is constructed as a QCBO problem (2) the QCBO problem is converted into a QUBO problem (3) the QUBO problem is solved on an Ising machine, and the neural network parameters are decoded.

[0135] Further, in order to prove the feasibility of the technical scheme of the present application, the embodiment of the present application includes problem solvability verification, that is, the solvability of the problem is verified using a simplified MNIST handwritten digital image data set. The MNIST data set contains 10 kinds of handwritten digital images from 0 to 9, and each image only has black and white pixels.

[0136] In the simplified MNIST handwritten digital image data set, the embodiment of the present application selects two numbers, 6 and 9, to construct an image binary classification task. First, the image is preprocessed, and the image is divided into four regions, namely the upper left, upper right, lower left and lower right four ranges, and each region is down-sampled into one pixel value, and finally the whole image is down-sampled into a 2*2 pixel image. In the processed image, each pixel value is -1, 0 or +1, depending on the number of white pixels in the corresponding range in the original image. The down-sampled value of the region with the most white pixels is set to +1, the down-sampled value of the region with the least white pixels is set to -1, and the down-sampled value of the remaining range is set to 0. After preprocessing, only four images, two images of the number 6 and two images of the number 9, are selected as the training data set.

[0137] For the network structure, a QNN with 1 hidden layer and 1 hidden unit is used in the experiment. There are 4 units in the input layer, and each input unit receives a pixel value in the 2*2 image. The output value of the last layer is in the range of [-1, +1]. When the output value is non-negative, it represents a prediction of the number 6; when the output value is negative, it represents a prediction of the number 9. For example, Figure 3 The flow principle diagram for the verification of the embodiment of the present application on the MNIST data set.

[0138] The embodiment of the present application uses a GPU-based analog Ising machine Fixstars Amplify AE to conduct experiments. In the experiment, the original image classification problem is converted into a QUBO problem that can be solved by the Ising machine, and the number of spins used in the converted QUBO problem is 86. The embodiment of the present application sets the annealing time to 500 milliseconds, and the probability of the loss function reaching 0 in 100 runs is 88%, which means that the success probability of finding the optimal solution is 88%. Figure 4 The loss function histogram for the optimization training of the embodiment of the present application on the simplified MNIST handwritten digital image data set. Figure 5The confusion matrix diagram of the image classification verification of the embodiment of the present application on the simplified MNIST handwritten digital image dataset is shown in FIG. 8. Figure 5 As shown in FIG. 8, the classification accuracy reaches 96.7% in the test dataset containing 1967 images. The experimental result successfully proves the solvability of the converted QUBO problem on the Ising machine and the feasibility of the scheme of the present application.

[0139] The multi-layer feedforward neural network training method for the Ising machine according to the embodiment of the present application is a non-gradient training method different from the back propagation training. In order to realize the above embodiment, the multi-layer feedforward neural network training system 10 for the Ising machine is further provided in the embodiment, as shown in FIG. 9, which comprises a learning task construction module 100, a problem form conversion module 200 and a network parameter solving module 300. Figure 6

[0140] The learning task construction module 100 is used for modeling the quadratic constrained binary optimization problem on the training dataset and the quantized neural network parameters;

[0141] The problem form conversion module 200 is used for converting the constructed quadratic constrained binary optimization problem into a quadratic unconstrained binary optimization problem;

[0142] The network parameter solving module 300 is used for solving the optimal solution of the quadratic unconstrained binary optimization problem on the Ising machine, decoding the optimal solution to obtain the optimal quantized neural network parameters, and obtaining the trained multi-layer feedforward neural network.

[0143] Further, in the learning task construction module 100, the constraint representation subunit is used for taking the linear transformation and the activation function as the equality constraint to represent the feedforward topology of the quantized neural network;

[0144] The binary representation subunit is used for encoding all the optimization variables using the binary representation rule to establish the relationship between the optimization variables and the spins of the Ising machine.

[0145] Further, the constraint representation subunit is further used for:

[0146] representing the activation function as an inequality constraint;

[0147] introducing an auxiliary variable based on the inequality constraint to convert the inequality constraint into an equality constraint.

[0148] Further, the binary representation subunit is further used for:

[0149] restricting the variable value domain of each variable within a specific upper and lower bound range by using the binary representation rule of the decimal number.

[0150] ​Further, the problem form transformation module 200 described above comprises:

[0151] an equation constraint elimination subunit configured to eliminate all equation constraints by using a penalty function method to obtain an unconstrained problem, in which a high-order loss function is present;

[0152] a loss function transformation subunit configured to transform the high-order loss function into a quadratic loss function by using a Rosenberg reduction method, so as to finally convert the training problem into a quadratic unconstrained binary optimization problem.

[0153] Further, the equation constraint elimination subunit is further configured to:

[0154] square the difference between the two ends of the equation constraint and add the difference to the loss function as a penalty term;

[0155] introduce a large penalty coefficient to the penalty term, so that the cost of violating the constraint is greater than the cost of improving the prediction accuracy, thereby ensuring the feasibility of the constraint.

[0156] transform the constraint condition into a part of the objective function by using the penalty function method, so as to transform the original constrained problem into an unconstrained problem.

[0157] Further, the loss function transformation subunit is further configured to:

[0158] find the quadratic term factor with the highest frequency in the loss function, and introduce an auxiliary binary variable to replace the quadratic term factor;

[0159] add a Rosenberg polynomial as a penalty term to the original penalty function, and introduce a large penalty coefficient;

[0160] iteratively perform the Rosenberg reduction method until the loss function is reduced to quadratic;

[0161] transform the high-order loss function into a quadratic loss function, so as to convert into a quadratic unconstrained binary optimization problem.

[0162] Further, the learning task construction module 200 described above is further configured to specially limit the weights of the quantized neural network, comprising:

[0163] limit the linear weights in the QNN except the last layer to +1 or -1, and freeze the bias terms except the first layer and the last layer. In addition, the linear weights of the last layer and the bias terms of the first layer and the last layer are limited to specific bit-width quantized values.

[0164] Further, the network parameter solving module 300 is further configured to:

[0165] The optimal solution of the quadratic unconstrained binary optimization problem is solved on the Ising machine, and the optimal solution is decoded to obtain the optimal quantized neural network parameters, and a trained multi-layer feedforward neural network is obtained.

[0166] Further, the system is further used for:

[0167] The number of spins required by all variables is summed up, and then the spatial complexity is analyzed to obtain the trend of the number of spins required by the Ising machine with the growth of the problem size; the number of spins is proportional to the size of the data set, proportional to the network depth, and proportional to the square of the network width.

[0168] According to the multi-layer feedforward neural network training system for the Ising machine provided in the embodiments of the present application, the number of spin bits of the Ising machine will increase over time, and the technical solution of the present application has the potential to train deeper networks and larger data sets in the future.

[0169] In the description of the present specification, the description of the terms ''one embodiment'', ''some embodiments'', ''an example'', ''a specific example'', or ''some examples'' and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples without contradiction.

[0170] In addition, the terms ''first'', ''second'', ''third'', etc. are only used for description purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with ''first'', ''second'', etc. can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of ''a plurality of'' is at least two, for example, two, three, etc., unless otherwise specifically limited.

Claims

1. A method for training a multi-layer feedforward neural network for an Ising machine, characterized in that, The method comprises a supervised learning task construction, a problem form conversion and a network parameter solution. The supervised learning task construction is a quadratic constrained binary optimization problem modeling on a training data set and a quantized neural network parameter. The problem form conversion is a conversion of the constructed quadratic constrained binary optimization problem into a quadratic unconstrained binary optimization problem. The network parameter solution is an optimal solution of the quadratic unconstrained binary optimization problem on an Ising machine, and the optimal solution is decoded to obtain an optimal quantized neural network parameter, thereby obtaining a trained multi-layer feedforward neural network. The training data set and the quantized neural network parameter are constructed into a quadratic constrained binary optimization problem, comprising: linear transformation and activation function are taken as equality constraints to represent the feedforward topology of the quantized neural network; all optimization variables are encoded using a binary representation rule to establish a relationship between the optimization variables and the spins of the Ising machine; the constraint representation method of the activation function comprises: the activation function is represented as an inequality constraint; auxiliary variables are introduced on the basis of the inequality constraint to convert the inequality constraint into an equality constraint.

2. The method of claim 1, wherein, The binary representation rule of all optimization variables in the optimization problem comprises: the value range of each variable is limited within a specific upper and lower bound range by using the binary representation rule of a decimal number.

3. The method of claim 1, wherein, The quadratic constrained binary optimization problem is converted into a quadratic unconstrained binary optimization problem, comprising: a high-order loss function is obtained by eliminating all equality constraints by using a penalty function method; the high-order loss function is converted into a quadratic loss function by using a Rosenberg reduction method, to convert into a quadratic unconstrained binary optimization problem.

4. The method of claim 3, wherein, The penalty function method comprises: by taking the difference between both ends of the equality constraint, the square of the difference is added to the loss function as a penalty term; a large penalty coefficient is introduced to the penalty term, and the cost of violating the constraint will be greater than the cost of improving the prediction accuracy, to ensure the feasibility of the constraint; the constraint condition is converted into a part of the objective function by using the penalty function method, to convert the original constrained problem into an unconstrained problem.

5. The method of claim 3, wherein, The Rosenberg reduction method comprises: the most frequently occurring quadratic term factor in the loss function is found, and an auxiliary binary variable is introduced to replace the quadratic term factor; a Rosenberger polynomial is added to the original loss function as a penalty term, and a large penalty coefficient is introduced; the Rosenberg reduction method is iterated until the loss function is reduced to quadratic; the high-order loss function is converted into a quadratic loss function to convert into a quadratic unconstrained binary optimization problem.

6. The method of claim 1, wherein, The weights of the quantized neural network are specially limited, comprising: limiting the linear weights except the last layer to +1 or ; bias items except the first layer and the last layer are frozen; linear weights of the last layer and bias items of the first layer and the last layer are limited to quantized values of a specific bit width.

7. The method of claim 6, wherein, The optimal solution of the quadratic unconstrained binary optimization problem on the Ising machine is solved, and the optimal solution is decoded to obtain the optimal quantized neural network parameter, to obtain the trained multi-layer feedforward neural network.

8. The method of claim 7, wherein, The spin number required by all variables is summed up, and then the spatial complexity is analyzed to obtain the trend of the number of spins required on the Ising machine with the growth of the problem size, which is proportional to the dataset size, proportional to the network depth, and proportional to the square of the network width.

9. A multi-layer feedforward neural network training system for an Ising machine, characterized in that, Comprise: A learning task construction module for modeling a quadratic constrained binary optimization problem performed on a training dataset and quantized neural network parameters; A problem form conversion module for converting the constructed quadratic constrained binary optimization problem into a quadratic unconstrained binary optimization problem; A network parameter solving module for solving the optimal solution of the quadratic unconstrained binary optimization problem on an Ising machine, and decoding the optimal solution to obtain optimal quantized neural network parameters, thereby obtaining a trained multi-layer feedforward neural network; The learning task construction module comprises: A constraint representation subunit for representing linear transformation and activation function as equality constraints to represent the feedforward topology of the quantized neural network; A binary representation subunit for encoding all optimization variables using a binary representation rule to establish a relationship between the optimization variables and the spins of the Ising machine; The constraint representation subunit is also used for: Representing the activation function as an inequality constraint; Introducing auxiliary variables based on the inequality constraint to convert the inequality constraint into an equality constraint.

10. The system of claim 9, wherein, The binary representation subunit is also used for: Restricting the variable value domain to a specific upper and lower bound range using the binary representation rule of decimal numbers.

11. The system of claim 9, wherein, The problem form conversion module comprises: An equality constraint elimination subunit for eliminating all equality constraints using a penalty function method to obtain a high-order loss function; A loss function conversion subunit for converting the high-order loss function into a quadratic loss function using the Rosenberg reduction method to convert it into a quadratic unconstrained binary optimization problem.

12. The system of claim 11, wherein, The equality constraint elimination subunit is also used for: By taking the difference between the two ends of the equality constraint, square the difference value and add it to the loss function as a penalty term; Introducing a large penalty coefficient to the penalty term, the cost of violating the constraint will be greater than the cost of improving the prediction accuracy, ensuring the feasibility of the constraint; Using the penalty function method to convert the constraint condition into part of the objective function to convert the original constrained problem into an unconstrained problem.

13. The system of claim 11, wherein, The loss function conversion subunit is also used for: Finding the quadratic term factor that appears most frequently in the loss function, and introducing an auxiliary binary variable to replace the quadratic term factor; Adding the Rosenberg polynomial as a penalty term to the original loss function and introducing a large penalty coefficient; Iteratively perform the Rosenberg reduction method until the loss function is reduced to quadratic; Convert the high-order loss function into a quadratic loss function to convert it into a quadratic unconstrained binary optimization problem.

14. The system of claim 9, wherein, The weights of the quantized neural network are specially restricted, including: limiting the linear weights except the last layer to +1 or ; Freezing the bias terms except the first and last layers; Restricting the linear weights of the last layer and the bias terms of the first and last layers to specific bit-width quantized values.

15. The system of claim 9, wherein, The network parameter solving module is also used for: Solving the optimal solution of the quadratic unconstrained binary optimization problem on the Ising machine; The optimal solution is decoded to obtain optimal quantized neural network parameters, and a trained multilayer feedforward neural network is obtained.

16. The system of claim 9, wherein, The system is also used for: The number of spins required by all variables is calculated, and then the spatial complexity is analyzed to obtain the trend of the number of spins required on the Ising machine with the growth of the problem size; the number of spins is proportional to the size of the data set, proportional to the network depth, and proportional to the square of the network width.