Entangled Boltzmann machine apparatus and method
By entangling the probability bit node array and related devices of the Boltzmann machine device, the problem of local optimal trap in the combined optimization problem is solved, and a low-cost and efficient global optimal solution is achieved.
Patent Information
- Application Number
- CN202411464525.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-21
AI Technical Summary
When solving the combination optimization problem, the prior art is difficult to efficiently cross the energy barrier, resulting in falling into a local optimal solution, and the quantum annealing method is expensive and sensitive to environmental noise.
Using an entangled Boltzmann machine device, including a probability bit node array, a random sampling device, a probability calculation device, a decision-making device and a driving device, the state sampling of the entangled probability bit node and its entangled probability distribution is determined whether to change the node state to Achieving the target state and adjusting the node signal through the drive device.
It realizes efficient solution of combination optimization problems at low cost, significantly improving the success rate of obtaining global optimal solutions, and avoiding local optimal traps.
Smart Images

Figure CN119416832A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an entangled Boltzmann machine device and method, which are suitable for solving combinatorial optimization and other problems. Background Art
[0002] Combinatorial optimization problems (COPs) are widely found in many scientific research and engineering application fields, including logistics optimization, network design, resource allocation, scheduling problems, and machine learning. The essence of combinatorial optimization is to find the global optimal solution from a large set of discrete candidate solutions. Since combinatorial optimization problems usually have high dimensionality and complex constraints, the difficulty of solving them increases exponentially as the scale of the problem increases. Such problems can often be reduced to an energy model, and the set of candidate solutions corresponds to the energy phase space. In the huge and rugged energy phase space, there are many local optimal solutions. Any algorithm that only relies on local energy gradient updates will eventually fall into the local optimal solution with a high probability. Therefore, efficient algorithms to solve such problems need to have the ability to cross energy barriers and reach the global optimum.
[0003] There are two mainstream ways to escape from local optimality: classical thermal excitation and quantum tunneling. The former can be implemented in the simulated annealing algorithm (SA). The core step is to determine the probability of accepting a new solution through the Metropolis rule: p = min{1, exp(-ΔE / k B T)}, where ΔE = E new -E old represents the energy difference between the new solution and the old solution, k B is the Boltzmann constant, and T is the system temperature. If ΔE<0, p=1, then the new solution will be accepted absolutely, otherwise, p=exp(-ΔE / k B T), it will decide whether to accept the new solution through random probability sampling. When the temperature T goes from high to low, the algorithm will gradually reduce the probability of accepting worse solutions, and finally converge to the global optimal solution or better solution. However, in the actual annealing process, SA has problems such as slow convergence speed and extremely low temperature divergence. Another method is to achieve it through quantum tunneling, which is usually used in quantum annealing machines or quantum computers. Taking the quantum annealing machine as an example, it applies an additional strong transverse magnetic field H in the classical Ising Hamiltonian. x To realize the quantum superposition state, in H x In the process of gradually decreasing to 0, the system jumps out of the local optimum through the quantum tunneling effect and finally reaches H x = 0 is estimated as the global optimal solution. However, quantum annealing requires a highly precise quantum system to achieve quantum tunneling under harsh physical conditions such as low temperature, which is costly and very sensitive to environmental noise.
[0004] Therefore, there is still a need for a solution device and method that can solve combinatorial optimization problems at low cost and efficiently. Summary of the invention
[0005] The present invention is proposed in view of the above problems.
[0006] One embodiment provides an entangled Boltzmann machine device, comprising: a probability bit node array, comprising multiple probability bit nodes, each probability bit node is used to generate a true random number with a desired probability; a random sampling device, used to sample the current states of multiple entangled probability bit nodes in the probability bit node array; a probability calculation device, used to calculate the entanglement probability distribution of the multiple entangled probability bit nodes based on their current states; a decision device, used to decide whether to change the current states of the multiple entangled probability bit nodes to a target state based on the entanglement probability distribution of the multiple entangled probability bit nodes; and a driving device, used to adjust the driving signals of the multiple entangled probability bit nodes to achieve the target state in response to the decision device deciding to change the current states of the multiple entangled probability bit nodes to the target state.
[0007] In one example, the probabilistic bit node includes a magnetic tunnel junction configured to receive a critical flipping voltage or current to achieve random flipping between a high resistance state and a low resistance state, and also receive a bias voltage or current to control a flipping probability.
[0008] In one example, the probability calculation device includes: a conditional probability calculation unit, used to calculate the conditional probability of each entanglement probability bit node based on the current state of a plurality of entanglement probability bit nodes, the conditional probability indicating the probability that one or more of the plurality of entanglement probability bit nodes have a state under the condition that one or more of the plurality of entanglement probability bit nodes have a predetermined state; and an entanglement probability calculation unit, used to calculate the entanglement probability distribution of the plurality of entanglement probability bit nodes in various states based on the conditional probability of each entanglement probability bit node.
[0009] In one example, the entanglement probability calculation unit includes: a transfer matrix calculation module, which is used to determine the probability superposition state of each entanglement probability bit node based on the conditional probability of the entanglement probability bit node, and calculate the probability transfer matrix between the probability superposition states of the multiple entanglement probability bit nodes; and an entanglement probability calculation module, which is used to calculate the steady-state entanglement probability distribution or non-steady-state entanglement probability distribution of the multiple entanglement probability bit nodes in various states when the probability transfer process between the probability superposition states of the multiple entanglement probability bit nodes reaches stability or before reaching stability.
[0010] In one example, the decision device is configured to normalize the steady-state or non-steady-state entanglement probabilities of two or more target states among the various states of the multiple entanglement probability bit nodes, and perform binary sampling on the normalized probabilities to determine whether to change the current state of the multiple entanglement probability bit nodes to a different target state.
[0011] In one example, the decision device also includes: an energy calculation unit, which is used to calculate the system total energy corresponding to the changed target state when the decision device decides to change the current state of the multiple entangled probability bit nodes to a different target state; an optimal solution determination unit, which is used to compare the system total energy corresponding to the target state with the previously determined optimal total energy, and when the system total energy corresponding to the target state is better than the previously determined optimal total energy, determine the changed target state as the optimal solution; an optimal solution storage unit, which is used to store the target state as an updated optimal solution, and its corresponding system total energy as the optimal total energy; and an output unit, which is used to output the optimal solution and the optimal total energy when the determined optimal solution or optimal total energy meets a predetermined convergence condition, and stop sampling the current state of the multiple entangled probability bit nodes in the probability bit node array.
[0012] In one example, the driving device is configured to adjust a bias voltage or a current of a magnetic tunnel junction in the plurality of entanglement probability bit nodes so as to achieve the target state with an entanglement probability corresponding to the target state.
[0013] Another embodiment provides an operation method of an entangled Boltzmann machine, comprising: using each of a plurality of probability bit nodes included in a probability bit node array to generate a true random number with a desired probability; using a random sampling device to sample the current states of a plurality of entangled probability bit nodes in the probability bit node array; using a probability calculation device to calculate their entanglement probability distribution based on the current states of the plurality of entangled probability bit nodes; using a decision device to decide whether to change the current states of the plurality of entangled probability bit nodes to a target state based on the entanglement probability distribution of the plurality of entangled probability bit nodes; and using a driving device to adjust the driving signals of the plurality of entangled probability bit nodes to achieve the target state in response to the decision device deciding to change the current states of the plurality of entangled probability bit nodes to a target state.
[0014] In one example, the probabilistic bit node includes a magnetic tunnel junction configured to receive a critical flipping voltage or current to achieve random flipping between a high resistance state and a low resistance state, and also receive a bias voltage or current to control a flipping probability.
[0015] In one example, using a probability calculation device to calculate the entanglement probability distribution of multiple entanglement probability bit nodes based on their current states includes: a conditional probability calculation unit calculates the conditional probability of each entanglement probability bit node based on the current states of the multiple entanglement probability bit nodes, the conditional probability indicating the probability that one or more of the multiple entanglement probability bit nodes have a state under the condition that one or more of the multiple entanglement probability bit nodes have a predetermined state; and the entanglement probability calculation unit calculates the entanglement probability distribution of the multiple entanglement probability bit nodes in various states based on the conditional probabilities of each entanglement probability bit node.
[0016] In one example, the entanglement probability calculation unit calculates the entanglement probability distribution of the multiple entanglement probability bit nodes in various states based on the conditional probability of each entanglement probability bit node, including: the transfer matrix calculation module determines the probability superposition state of each entanglement probability bit node based on the conditional probability of each entanglement probability bit node, and calculates the probability transfer matrix between the probability superposition states of the multiple entanglement probability bit nodes; and the entanglement probability calculation module calculates the steady-state entanglement probability distribution or non-steady-state entanglement probability distribution of the multiple entanglement probability bit nodes in various states when or before the probability transfer process between the probability superposition states of the multiple entanglement probability bit nodes reaches stability.
[0017] In one example, using a decision device to decide whether to change the current state of the multiple entanglement probability bit nodes to a target state based on the entanglement probability distribution of the multiple entanglement probability bit nodes includes: normalizing the steady-state or non-steady-state entanglement probabilities of two or more target states in various states of the multiple entanglement probability bit nodes, and performing binary sampling on the normalized probabilities to decide whether to change the current state of the multiple entanglement probability bit nodes to a different target state.
[0018] In one example, the method also includes: when the decision device decides to change the current state of the multiple entanglement probability bit nodes to a different target state, the energy calculation unit calculates the system total energy corresponding to the changed target state; the optimal solution determination unit compares the system total energy corresponding to the target state with the previously determined optimal total energy, and when the system total energy corresponding to the target state is better than the previously determined optimal total energy, the changed target state is determined as the optimal solution; the optimal solution storage unit stores the target state as an updated optimal solution, and its corresponding system total energy as the optimal total energy; and when the determined optimal solution or optimal total energy meets a predetermined convergence condition, the output unit outputs the optimal solution and the optimal total energy, and stops sampling the current states of the multiple entanglement probability bit nodes in the probability bit node array.
[0019] In one example, a driving device is used in response to the decision device deciding to change the current state of the multiple entanglement probability bit nodes to a target state, and adjusting the driving signals of the multiple entanglement probability bit nodes to achieve the target state includes: adjusting the bias voltage or current of the magnetic tunnel junctions in the multiple entanglement probability bit nodes to achieve the target state with an entanglement probability corresponding to the target state. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1A This is a schematic diagram of the Boltzmann machine model;
[0021] Figure 1B It is a schematic diagram of the model of the restricted Boltzmann machine;
[0022] Figure 2 It is a schematic diagram of the structure of the Boltzmann machine model used to solve the traveling salesman problem;
[0023] Figure 3 It is a graph of energy probability at different temperatures obtained when the traditional Boltzmann machine and the entangled Boltzmann machine of the present invention are used to solve the traveling salesman problem.
[0024] Figure 4 It is an energy curve diagram obtained by guiding optimization based on non-steady-state entanglement probability when using the entangled Boltzmann machine of the present invention to solve the traveling salesman problem.
[0025] Figure 5 Schematic diagram of the hardware architecture of an entangled Boltzmann machine according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] Exemplary embodiments of the present invention will be described below.
[0027] Boltzmann Machine (BM) is a neural network model proposed by Hinton and Sejnowski in 1986. It consists of a visible layer (also called input layer) and a hidden layer. Figure 1A As shown. The inter-layer neurons adopt a fully connected structure, and there are connections between the neurons in the layer. These neurons have only two states, unactivated and activated, generally represented by binary 0 and 1, and the value of the state is determined according to the law of probability statistics. The Boltzmann machine has a strong unsupervised learning ability and can learn complex rules in the data, but its training (learning) time is very long. In addition, it is impossible to accurately calculate the distribution represented by the BM, and it is even difficult to obtain a random sample that obeys the distribution represented by the BM.
[0028] To overcome this problem, Smolensky introduced a restricted Boltzmann machine (RBM), such as Figure 1B As shown. Figure 1A Compared with the Boltzmann machine shown in the figure, there is no connection between the neurons in the visible layer and the hidden layer of the restricted Boltzmann machine, and they are independent of each other. Therefore, when the state of the visible layer unit (input data) is given, the activation conditions of each hidden unit are independent; conversely, when the state of the hidden unit is given, the activation conditions of the visible layer units are also independent. In this way, random samples that obey the distribution represented by the RBM can be obtained through parallel Gibbs sampling. In 2006, Hinton et al. proposed the Deep BeliefNets (DBN), which includes a stack of several RBMs, and these RBMs can be trained layer by layer from low to high. The bottom RBM is trained using the original input data, and the features extracted from the bottom RBM are used as input data for training the top RBM. This training framework bypasses the high complexity of the overall training of DBN, simplifies it into the training problem of multiple RBMs, reduces the amount of calculation, and solves the problem of slow model training, laying the foundation for the development of large models.
[0029] In the following text and in the claims of this application, when referring to a Boltzmann machine, it may refer to a conventional Boltzmann machine (e.g., Figure 1A ), can also refer to a restricted Boltzmann machine (e.g., as Figure 1B shown).
[0030] The Boltzmann machine and the Ising model have similar energy expressions: E = Σw ij x i x j +Σb i x i , where x i and x j Respectively represent the state values of the i-th and j-th neuron nodes, also known as decision values, which are 0 or 1. For simplicity, x is used here to represent neuron nodes without distinguishing between hidden layer nodes and visible layer nodes. ij is from node x i To node x j The connection weight of b i is node x i The Boltzmann machine updates the node through the Gibbs sampling rule. While ensuring that the states of other nodes remain unchanged, the target node x is updated according to the full conditional probability p. i (0 or 1) for probability sampling, as shown in the following formula:
[0031]
[0032] where ΔE i ≡E(x i =1|x j≠i)-E(x i =0|x j≠i )=Σ j≠i w ij x j +b i , k B represents the Boltzmann constant, and T represents the temperature. Similar to the Metropolis rule, the final energy distribution of the Boltzmann machine based on Gibbs sampling will approach the Boltzmann distribution, which is also the origin of the name of the Boltzmann machine. It should be noted that the node x j≠i Other nodes x can only be identified by their current actual state (0 or 1) i This interaction between nodes is applicable to all classical bits. In sharp contrast, quantum bits (q-bits) can encode superposition states of 0 and 1 at the same time. More importantly, the interaction of quantum bits can be realized before the superposition state collapses (measures or samples), which explains the tunneling mechanism in quantum systems, which cannot be realized in classical systems.
[0033] This application proposes a new algorithm based on Markov chain and Boltzmann machine (BM) - entangled Boltzmann machine, which can realize simulated quantum tunneling under classical computer. This application also proposes a hardware probability computing architecture, including probability bit node array, random sampling device, probability computing device, decision device and driving device, which can efficiently solve combinatorial optimization problems. In this application, probability superposition state (PSS) is introduced. i =p|1>+(1-p)|0> into the Gibbs sampling of the Boltzmann machine, thereby realizing the probabilistic entanglement between multiple nodes, simulating the tunneling effect in the quantum system in the classical system, and ultimately significantly improving the success rate of obtaining the global optimal solution.
[0034] The following will first describe the principle of two-node entanglement, which can serve as the basis for implementing more node entanglement. Unlike Gibbs sampling, which updates one node at a time, with two-node entanglement, the states of two nodes can be updated at the same time. i and x j For each node in the two states of 0 and 1, Gibbs sampling is performed when another node is in the two states of 0 and 1, and the four conditional probabilities expressed by the following formula (2) can be obtained, namely, x j When x is 1 or 0, i The probability of x being 1, and i When x is 1 or 0, j The probability of being 1 is:
[0035]
[0036] Where E mn Represents x i =m,x j =n, β≡1 / k B T. Based on the above conditional probability, the probabilistic superposition state (PSS) of each entangled node can be established, that is, x i =p(x i =1)|1>+p(x i =0)|0> and x j =p(x j =1)|1>+p(x j =0)|0>, and then using Bayesian theory, the entanglement between these two probabilistic superposition states PSS can be determined, as shown in the following formulas (3a) and (3b):
[0037]
[0038] By using the entanglement relationship between the two probability superposition states expressed by formulas (3a) and (3b), the Markov transition process of each probability superposition state itself can be established, as shown in the following formulas (4a) and (4b):
[0039]
[0040] where n I represents the number of iterations of the Markov chain, p ini represents the initial probability, p s represents the probability that the iteration converges to a steady state, and represents the steady-state PSS sampling probability of the two entanglements.
[0041] Based on the above analysis, we can further establish the entanglement of more nodes based on the two-entanglement steady-state PSS sampling probability, thereby solving the actual combinatorial optimization problem. Taking the four-node entanglement as an example, consider x i 、x j 、x k and x l The entanglement of four nodes divides the four nodes into two groups. For example, suppose x i and x j are two nodes in the same layer, x k and x l are two nodes of another layer. If it is known that node x i and x j The state value of node x can be determined by analyzing the two-node entanglement method mentioned above. k and x l The conditional probability p(x k =1xi ,x j ) and p(x l =1x i ,x j ), as shown in the following formula (5):
[0042]
[0043] Where m and n represent the allowed state values of the x node, i.e., 0 and 1. Considering all possible (m, n) combinations, there are 16 conditional probabilities in formula (5). According to Bayesian theory, we can get i , x j ) to (x k , x l )’s probability transfer matrix T ij , and from (x k , x l ) to (x i , x j )’s probability transfer matrix T kl , as shown in Formula 6 below:
[0044]
[0045] Similar to the two-node entanglement described above, by iterating the probability transfer process shown in formula (6) until a steady state is reached, we will get (x i , x j ) and (x k , x l ), or by solving the matrix T1≡(T ij T kl ) and T2≡(T kl T ij ) with an eigenvalue of 1, and the column vector corresponding to the steady-state transfer matrix is obtained, as shown in the following formula (7):
[0046]
[0047] After the steady-state probability distribution in formula (7) is obtained by numerical calculation, the probability p of the four-node entanglement can be calculated based on the above s Simultaneous sampling (x i , x j , x k , x l ) four nodes to achieve steady-state entanglement sampling.
[0048] The following describes an exemplary embodiment of using the entangled Boltzmann machine of the present application to solve a combinatorial optimization problem. The Traveling Salesman Problem (TSP) is a classic combinatorial optimization problem. Given a number of cities and the distances or costs between them, the goal is to find the shortest route so that the traveling salesman starts from a certain city, visits each city exactly once, and finally returns to the starting city. Taking a TSP problem with N cities as an example, we first introduce how to convert it into a traditional Boltzmann machine model. Figure 2 As shown, the TSP problem is encoded as a network of N×N nodes, where each node x ij represents the probability of the salesman visiting the jth city on the i-th day. If x ij =1, it means visiting the city; if x ij =0, it means that the city is not visited. Therefore, we can define the matrix X = {x ij} to represent the entire dispatch. The map information can be defined as the distance matrix D = {d ij}, where d ij represents the distance from the i-th city to the j-th city. In addition, an N×N constant delay matrix R can be defined to simplify the calculation of the total distance of a route:
[0049]
[0050] From this, the total distance E can be calculated d =Tr(X·D·X R T ), where X R = R·X. In addition to the contribution of distance, some constraints can be added to the Boltzmann machine model to meet the requirements of the TSP problem, such as the constraint that each city must be visited once and only one city can be visited per day, that is, and The contribution of these restrictions to the total energy can be expressed as the penalty term The penalty factor λ determines the relaxation or strengthening of these constraints. The total energy of the system is E = E p +E d , after simplification, it can be expressed as the energy expression of the Boltzmann machine. If the traditional Boltzmann machine is used to solve this problem at a single temperature, that is, the nodes are continuously sampled according to the Gibbs sampling rule, the probability of the final system energy appearing conforms to the Boltzmann distribution.
[0051] Compared with the traditional Boltzmann machine, the entangled Boltzmann machine of the present invention can solve the traveling salesman problem more efficiently. Figure 2As shown in the figure, the penalty factor λ is used as the entanglement constant between the nodes of the entangled Boltzmann machine to adjust the strength of the entanglement or association. The specific process of the algorithm is as follows: at a suitable temperature, the N×N network is initialized to any reasonable solution of the TSP problem, that is, each row and each column has only one node with a value of 1, and the rest are 0. Then an iterative loop is performed, and each loop randomly selects two rows of the network model, and the transition from one reasonable solution to another can be completed by exchanging the node values of these two rows. It can be understood that the row exchange operation will change the values of the four nodes in the network model, so the steady-state probability of the four-node entanglement described above can be used to guide the decision. As mentioned above, the conditional probability between the selected four nodes is first calculated to establish the corresponding probability transfer matrix, and then the steady-state probability distribution of the transfer matrix is calculated, thereby obtaining the steady-state probabilities corresponding to the 16 states of the four nodes. Since the four nodes can only be in two states before and after the row exchange operation, the sampling probabilities corresponding to the two states are normalized twice, and the normalized probability results are used to guide whether to perform the row exchange operation (i.e., perform a binary sampling with a known probability, the sampling value is 0 or 1, 1 means the exchange operation is performed, and 0 means no exchange operation is performed). Finally, the total energy of the system after this operation is calculated. If it is smaller than the optimal energy found in the previous cycle, it means that the network node value after this exchange operation is the newly obtained optimal solution, which is saved as the current optimal solution and the optimal energy value is updated; if the total energy of the system after the exchange operation is greater than the optimal energy found in the previous cycle, it means that the network node value after this exchange operation is not the optimal solution, and there is no need to save it as the optimal solution and update the optimal energy value, thus completing a cycle. The above cycle process is continuously performed until a solution with a total energy (total path) that meets the requirements or a known global optimal solution is found, then the cycle is stopped and the optimal solution and the corresponding path selection are output.
[0052] The following is a pseudocode example of an entangled Boltzmann machine:
[0053] Input: N×N network model, distance matrix D = {d ij}, temperature T, entanglement constant λ, total energy of optimal solution E_best_solution, convergence condition ε, where the distance matrix D = {d ij} and the total energy of the optimal solution E_best_solution are given by the Bays29 instance (number of cities N = 29) in the traveling salesman problem library TSP-LIB. The value ranges of the two parameters, temperature T and entanglement constant λ, depend on the specific traveling salesman problem instance. Different instances can correspond to different parameter ranges. The optimal values can be determined based on experience, and the convergence condition ε can also be determined based on experience.
[0054] Initialization: For the N×N network model, there is an initial arbitrary reasonable solution X0, corresponding to the total energy E0. Let the optimal energy E_min = E0, and the optimal solution X min = X0;
[0055] While |E_min - E_best_solution| > ε (that is, if the convergence condition is not met, perform the following loop operation):
[0056] Randomly select any two rows i, j (1 ≤ i, j ≤ N, and i ≠ j), and determine the four relevant nodes whose values will change when these two rows are exchanged;
[0057] Calculate the conditional probabilities p, q, P, Q between the four selected nodes,
[0058] Establish a probability transition matrix;
[0059] Calculate the steady-state probability distribution of the probability transition matrix;
[0060] Perform quadratic normalization on the steady-state probabilities of the two target states;
[0061] Perform binary sampling according to the normalized probabilities to decide whether to exchange row i and row j;
[0062] If the exchange operation is performed, update the network structure to the exchanged X’, and calculate the corresponding total system energy E_new;
[0063] If E_new < E_min, save the current network structure X’ as the optimal solution X min , that is, X min
[0064] = X’, and save the corresponding total system energy E_new as the optimal total energy E_min, that is, E_min
[0065] = E_new;
[0066] If E_new ≥ E_min, it means that the exchanged network structure X ’ is not the optimal solution, and there is no need to perform the operation of saving the optimal solution and the corresponding optimal total energy;
[0067] Output: The optimal solution X min , and the corresponding optimal total energy E_min.
[0068] Using the entanglement Boltzmann machine algorithm of the present invention, the global optimal solution 2020 of the Bays29 problem instance (the number of cities is 29) in the traveling salesman problem library TSP-LIB was successfully found in the above example. Moreover, at the same temperature, for example, T = 100K, the energy probability distribution of the entanglement Boltzmann machine is much better than that of the traditional Boltzmann machine, as Figure 3 As shown in Figure 2, the traditional Boltzmann machine must be cooled to T = 35 K to be comparable to the energy probability distribution of the entangled Boltzmann machine at T = 100 K. This shows that the performance of the entangled Boltzmann machine in solving global optimization problems is far superior to that of the traditional Boltzmann machine.
[0069] The study also found that when the Markov process of the probability transfer matrix represented by formula 7 above is not stable, non-steady-state entanglement can also be established to guide optimization. In actual operation, when the number of iterations n of the Markov chain transfer matrix is reduced I At the same temperature, non-steady-state entanglement sampling can achieve optimization with a lower equivalent temperature, that is, the low-energy solution has a greater population probability. Figure 4 As shown in the curve graph, the horizontal axis is the number of iterations of the aforementioned cyclic process, and the vertical axis is the total energy of the optimal solution. In the cyclic iteration process, Gibbs sampling is used at the beginning, that is, entanglement is not introduced, and then entanglement sampling is introduced, in which non-steady-state entanglement sampling is used. The length of the Markov chain (that is, the number of probability transfer iterations) n I It gradually decreases from 600 to 50, and it can be seen that the corresponding energy has a decreasing trend. Based on this, the non-steady-state probability of the probability superposition state PSS can be used to guide the row exchange operation, so that Figure 4 As shown in the figure, a similar annealing effect is achieved at the same temperature. This reflects the excellent performance of the entangled Boltzmann machine and the uniqueness of simulating the quantum tunneling effect.
[0070] The hardware implementation of the entangled Boltzmann machine of the present invention is described below. Figure 5 The hardware architecture 500 of an entangled Boltzmann machine according to an embodiment of the present invention is shown, which mainly includes a probability bit node array 510, a random sampling device 520, a probability calculation device 530, a decision device 540 and a driving device 550.
[0071] The probability bit node array 510 includes an array formed by a plurality of probability bit node units 512, such as an array arranged in rows and columns or an array of other predetermined formats / layouts. Each probability bit node unit 512 is formed as a hardware node of an entangled Boltzmann machine, which can generate true random numbers, such as 0 and 1, with a predetermined probability, and is generated through a real physical process. In some embodiments, a magnetic tunnel junction (MTJ) can be used as a probability bit node unit 512, which mainly includes a ferromagnetic metal free layer, a non-magnetic insulating barrier layer, and a ferromagnetic metal reference layer. The resistance of the magnetic tunnel junction is determined by the relative arrangement direction of the magnetic moments of the ferromagnetic metal free layer and the ferromagnetic metal reference layer, and the parallel arrangement corresponds to a low resistance state (e.g., 0), and the anti-parallel arrangement corresponds to a high resistance state (e.g., 1). By applying a spin-orbit torque (SOT) generated by a flip voltage / current in the write line layer or a spin transfer torque (STT) generated by applying a flip voltage / current along the longitudinal direction of the magnetic tunnel junction, the magnetic moment direction of the ferromagnetic metal free layer can be flipped, thereby realizing the switching of the high and low resistance states of the magnetic tunnel junction. For the SOT flipping method, the magnetic tunnel junction also includes a spin Hall effect (SHE) layer adjacent to and in contact with the free magnetic layer, such as Pt, Ta, W or their alloys, which generates a spin-orbit torque to flip the magnetic moment direction of the free layer when an in-plane current is applied. Due to the random nature of the magnetic moment flipping of the free layer under critical conditions, the magnetic tunnel junction has been shown to be able to be used as a physical entropy source for generating true random numbers.
[0072] like Figure 5 As shown, a critical switching voltage V may be applied to the magnetic tunnel junction forming the probability bit node unit 512. DD (or current), which has a probability of generating a low resistance state 0 and a high resistance state 1 of 50% each; in addition, a bias voltage Vin (or current) is applied, which can control the probability of the magnetic tunnel junction generating 0 and 1 bits. It should be noted that the critical flip voltage V DD The application method of the bias voltage Vin (or current) is not limited to Figure 5 The embodiment shown. For a SOT-type magnetic tunnel junction, the critical switching current is an in-plane current applied to the SHE layer. In this case, the bias current can be a vertical current, and the direction can be upward or downward, so as to control the switching probability through the STT effect, or the bias current can be an in-plane current applied to the SHE layer, and its direction can be parallel or perpendicular to the switching current, so as to control the switching probability through the SOT effect. Similarly, for an STT-type magnetic tunnel junction, the switching current is a vertical current applied to the magnetic tunnel junction. In this case, the bias current can be a vertical current or an in-plane current applied to the SHE layer, so as to control the switching probability through the STT effect or the SOT effect. It can be understood that the critical switching voltage V DDThe bias voltage Vin (or current) and the bias voltage Vin (or current) can be applied simultaneously to generate a random number 0 or 1 with a predetermined probability. The probability P of generating a random number 0 or 1 can be controlled by controlling the magnitude and / or direction (e.g., positive and negative directions) of the bias voltage Vin (or current). 0 / 1 The flip probability P of the magnetic tunnel junction can be calculated in advance. 0 / 1 By calibrating the dependency between the bias voltage Vin (or current), a probabilistic bit node unit 512 that generates a 0 / 1 random number with any probability can be constructed. After the flip operation, a read voltage V R (or current) to read the resistance state of the magnetic tunnel junction (e.g., high resistance state 1 or low resistance state 0), and read the voltage V R (or current) is generally much smaller than the flip voltage V DD (or current), so it does not affect the resistance state of the magnetic tunnel junction. Figure 5 As shown, each magnetic tunnel junction may also be connected in series with a switch element, such as an NMOS transistor 514, to control the read and write operations of the magnetic tunnel junction.
[0073] For various embodiments of using magnetic tunnel junctions as probability-controllable true random number generators, please refer to the invention patent application No. 202111072657.5 entitled "Probability-controllable spin random number generator" filed by the applicant on September 14, 2021, the invention patent application No. 202310147344.4 entitled "Magnon junction, magnetic random access memory, microwave oscillator and detector, electronic device" filed on February 14, 2023, and the invention patent application No. 202310147344.4 entitled "Magnon junction, magnetic random access memory, microwave oscillator and detector, electronic device" filed on May 8, 2023. Invention patent application No. 202310508761.7 entitled “True Random Number Generator”, and invention patent application No. 202410527496.1 entitled “True Random Number Generation Device and Self-calibration Method and Electronic Device” filed on April 29, 2024, the contents of these related prior applications are incorporated herein by reference, and therefore a detailed description of various embodiments of using magnetic tunnel junctions to form a probability-controllable true random number generator, i.e., a probability bit node unit 512, is omitted here.
[0074] Continue to refer to Figure 5 The random sampling device 520 is used to sample each probability bit node unit 512, that is, to read the random number 0 or 1 generated by the probability bit node unit 512. Figure 5 As shown, the random sampling device 520 may include an array of comparators 522, which corresponds to the array of probability bit node units 512, and the inverting input terminal of each comparator 522 can be connected to one end of the magnetic tunnel junction in the probability bit node unit 512 ( Figure 5The low voltage terminal is shown, but it can also be connected to the high voltage terminal) to read its resistance state, and its non-inverting input terminal can receive the reference voltage Vref, and by comparing the voltage at one end of the magnetic tunnel junction with the reference voltage Vref, it is determined whether the magnetic tunnel junction is in a high resistance state or a low resistance state, that is, a random number 1 or 0 is generated. It should be understood that during operation, during each loop iteration, the random sampling device 520 can sample the outputs of multiple entangled nodes 512.
[0075] The probability calculation device 530 may include a conditional probability calculation unit 532 and an entanglement probability calculation unit 534. The conditional probability calculation unit 532 is used to calculate the corresponding conditional probability based on the output values of the multiple entangled nodes 512 sampled by the random sampling device 520. Here, the conditional probability refers to the probability that the corresponding entangled node takes certain values when one or more nodes take specific values (i.e., conditions), for example, as described above in combination with Formula 2 and Formula 5. However, it should be understood that the embodiments of the present invention are not limited to the two-node entanglement and four-node entanglement described above in combination with Formula 2 and Formula 5, but can adopt the entanglement of more nodes, which depends on the specific model structure, or the specific combinatorial optimization problem to be solved by the model.
[0076] The entanglement probability calculation unit 534 may include a transfer matrix calculation module 535, which determines the probability superposition state PSS of each entangled node based on the conditional probabilities of multiple entangled nodes, that is, the probability of the node being in various possible states, also referred to as the PSS probability here, and then determines the Markov chain probability transfer matrix between the PSS probabilities of the entangled nodes, as described above with reference to formulas 3a, 3b and 6, thereby establishing an entanglement relationship between the nodes. Specifically, the probability superposition state PSS of each entangled node can be determined based on the calculated conditional probability, for example, each node can be represented as a superposition of a probability with a value of 0 and a probability with a value of 1, and then determines the probability transfer matrix between the entangled nodes, for example, for converting the node (x i ,x j ) is transformed into the PSS probability of node (x k ,x l ) and the first transfer matrix of the PSS probability of the node (x k ,x l ) is transformed into the PSS probability of node (x i ,x j ) is the second transfer matrix of the PSS probability.
[0077] The entanglement probability calculation unit 534 may also include an entanglement probability calculation module 537, which determines the steady-state entanglement probability of each entangled node when the probability transfer process reaches equilibrium based on the determined probability transfer matrix, or the non-steady-state entanglement probability of each entangled node before the probability transfer process reaches equilibrium (for example, when the transfer iteration reaches a predetermined number of times). In one embodiment, the entanglement probability calculation module 537 can iteratively perform the probability transfer process between entangled nodes using matrix multiplication until the transfer matrix reaches equilibrium to determine the steady-state entanglement probability of each node, or perform the probability transfer process a predetermined number of times (not reaching equilibrium) to determine the non-steady-state entanglement probability of each node. In another embodiment, the entanglement probability calculation module 537 can calculate the steady-state entanglement probability using the eigenvector solution method. Different from traditional Gibbs sampling, the present invention determines the entanglement probability of multiple entangled nodes, which refers to the probability distribution of multiple nodes being in multiple target states together, rather than determining the probability of a single node being in a certain state as in Gibbs sampling. For example, for four entangled nodes, each node may be in two states, 0 and 1, so there are 16 possible states, and the entanglement probability calculation module 537 can determine the probability distribution of the 16 states.
[0078] The decision device 540 can determine the final state of each node according to the steady-state or non-steady-state entanglement probability of each entangled node, for example, taking a value of 0 or 1, in other words, determining whether the state of each entangled node needs to be changed. In one embodiment, the decision device 540 can obtain the steady-state or non-steady-state entanglement probability distribution of the entangled nodes, normalize the steady-state or non-steady-state entanglement probability of two or more target states in various states (for example, for the four entangled nodes of the traveling salesman problem, due to the restriction that there is only one node in each row and each column in state 1, there are only two target states), and perform binary sampling (i.e., the sampling value is 0 or 1) on the normalized probability, thereby determining the final state, i.e., determining whether the state of each entangled node needs to be changed.
[0079] In one embodiment, the decision device 540 may further include an energy calculation unit 542, which is used to calculate the total system energy after the node state is changed when the decision device 540 decides to change the state of each entangled node. It can be understood that the energy calculation unit 542 can calculate the total energy of the system based on the node state (e.g., 0 or 1) and the weight value between the nodes (e.g., the distance value described above, or other weight values set depending on the specific problem). The decision device 540 may also include an optimal solution determination unit 544, which is used to compare the calculated total system energy with the previously determined optimal energy, and when the calculated total system energy is better than the previously determined optimal energy, the current system state is determined as the optimal solution, and an optimal solution storage unit 546, which is used to store the current system state as the optimal solution in the memory, and also stores the corresponding optimal system energy.
[0080] The driving device 550 can drive each entangled node according to the decision made by the decision device 540. For example, when the decision device 540 decides not to change the state of each entangled unit, the driving device 550 can keep the original driving state unchanged; when the decision device 540 decides to change the state of each entangled unit, the driving device 550 can adjust the driving signal of each entangled node, such as the bias voltage Vin (i.e., the probability control voltage / parameter), so as to generate the target state (i.e., output 0 or 1) with the determined entanglement probability.
[0081] It can be understood that the entangled Boltzmann machine hardware architecture 500 can cyclically perform operations from random sampling to updating the drive signal (e.g., bias voltage Vin) to traverse various states of the probability bit node array 510 and find the optimal solution corresponding to the optimal (e.g., minimum) energy. In one embodiment, the decision device 540 may also include an output unit 548, which is used to output the optimal solution and the corresponding optimal energy when the determined optimal solution meets the convergence condition, and stop the cyclic operation from random sampling to updating the drive signal. In other words, if the currently determined optimal solution does not meet the convergence condition, the cyclic operation can continue to be performed to find more optimal solutions. The convergence condition can be, for example, that the optimal solution obtained by the current solution is the same or close to the known optimal solution, or that the energy no longer decreases after several cycles, and so on.
[0082] It should be understood that the probability bit node unit 512 in the entangled Boltzmann machine of the present invention can use not only magnetic tunnel junctions, but also other probability controllable true random number generators such as memristors as entropy sources. In addition, the entangled Boltzmann machine of the present invention, including algorithms and hardware architectures, is not only suitable for solving combinatorial optimization problems, but also for tasks such as training and reasoning of neural networks.
[0083] One embodiment of the present invention further provides an operation method of an entangled Boltzmann machine, which has been described above with respect to Figure 5 This has been discussed in the description of , and will not be repeated here for the sake of brevity.
[0084] Unless the context clearly requires otherwise, throughout the specification and claims, the words "comprise", "comprising", "including", "comprising", etc. should be interpreted in an inclusive sense, rather than an exclusive or exhaustive sense. That is, the meaning is "including but not limited to". The word "connected" as generally used herein refers to two or more elements that can be directly connected or connected through one or more intermediate elements. As generally used herein, the word "connected" refers to two or more elements that can be directly connected or connected through one or more intermediate elements. In addition, when used in this application, the words "herein", "above", "below" and words of similar meanings should refer to the entirety of this application rather than to any particular part of this application. Where the context permits, the word "or" refers to a list of two or more items, which covers all of the following interpretations of the word: any item in the list, all items in the list, and any combination of items in the list.
[0085] Furthermore, unless otherwise specifically stated or understood in the context of use, conditional language used herein, such as "can," "may," "might," "could," "for example," "for example," "such as," and the like, is generally intended to convey that certain embodiments include, while other embodiments do not include, certain features, elements, and / or states. Thus, such conditional language is generally not intended to imply that one or more embodiments require features, elements, and / or states in any way, or that one or more embodiments must include logic for making decisions, with or without author input or prompting, that such features, elements, and / or states are included or will be performed in any particular embodiment.
[0086] Although certain embodiments have been described, these embodiments are presented only by way of example and are not intended to limit the scope of the present disclosure. In fact, the novel facilities, methods, and systems described herein may be embodied in various other forms; in addition, various omissions, substitutions, and changes may be made to the forms of the methods and systems described herein without departing from the spirit of the present disclosure. For example, although blocks are presented in a given arrangement, alternative embodiments may perform functions similar to different components and / or circuit topologies, and may delete, move, add, subdivide, combine, and / or modify some blocks. Each of these blocks may be implemented in a variety of different ways. Any suitable combination of the elements and actions of the various embodiments described above may be combined to provide further embodiments. The attached claims and their equivalents are intended to cover these forms or modifications that fall within the scope and spirit of the present disclosure.
[0087] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. An entangled Boltzmann machine device, comprising: A probability bit node array, comprising a plurality of probability bit nodes, each probability bit node being used to generate a true random number with a desired probability; A random sampling device, used for sampling the current states of a plurality of entangled probability bit nodes in the probability bit node array; A probability calculation device, for calculating the entanglement probability distribution of a plurality of entanglement probability bit nodes based on their current states; A decision-making device, used to decide whether to change the current state of the plurality of entanglement probability bit nodes to a target state based on the entanglement probability distribution of the plurality of entanglement probability bit nodes; as well as A driving device is used to adjust the driving signals of the multiple entanglement probability bit nodes to achieve the target state in response to the decision of the decision device to change the current state of the multiple entanglement probability bit nodes to the target state.
2. The entangled Boltzmann machine device according to claim 1, wherein: The probabilistic bit node includes a magnetic tunnel junction configured to receive a critical flipping voltage or current to achieve random flipping between a high resistance state and a low resistance state, and also receive a bias voltage or current to control a flipping probability.
3. The entangled Boltzmann machine device according to claim 2, wherein: The probability calculation device comprises: a conditional probability calculation unit, configured to calculate a conditional probability of each entanglement probability bit node based on a current state of the plurality of entanglement probability bit nodes, the conditional probability indicating a probability that one or more of the plurality of entanglement probability bit nodes have a state under the condition that one or more of the plurality of entanglement probability bit nodes have a predetermined state; and The entanglement probability calculation unit is used to calculate the entanglement probability distribution of the multiple entanglement probability bit nodes in various states based on the conditional probability of each entanglement probability bit node.
4. The entangled Boltzmann machine device according to claim 3, wherein: The entanglement probability calculation unit comprises: A transfer matrix calculation module, used to determine the probability superposition state of each entanglement probability bit node based on the conditional probability of the entanglement probability bit node, and calculate the probability transfer matrix between the probability superposition states of the plurality of entanglement probability bit nodes; and An entanglement probability calculation module is used to calculate the steady-state entanglement probability distribution or non-steady-state entanglement probability distribution of the multiple entanglement probability bit nodes in various states when the probability transfer process between the probability superposition states of the multiple entanglement probability bit nodes reaches stability or before reaching stability.
5. The entangled Boltzmann machine device according to claim 4, wherein: The decision device is configured to normalize the steady-state or non-steady-state entanglement probabilities of two or more target states in various states of the multiple entanglement probability bit nodes, and perform binary sampling on the normalized probabilities to determine whether to change the current state of the multiple entanglement probability bit nodes to a different target state.
6. The entangled Boltzmann machine device according to claim 5, wherein: The decision-making device also includes: an energy calculation unit, configured to calculate the total system energy corresponding to the changed target state when the decision device decides to change the current state of the plurality of entanglement probability bit nodes to a different target state; an optimal solution determination unit, configured to compare the total system energy corresponding to the target state with the previously determined optimal total energy, and when the total system energy corresponding to the target state is better than the previously determined optimal total energy, determine the changed target state as the optimal solution; an optimal solution storage unit, used to store the target state as an updated optimal solution and its corresponding system total energy as an optimal total energy; and An output unit is used to output the optimal solution and the optimal total energy when the determined optimal solution or optimal total energy meets a predetermined convergence condition, and stop sampling the current states of multiple entangled probability bit nodes in the probability bit node array.
7. The entangled Boltzmann machine device according to claim 6, wherein: The driving device is configured to adjust the bias voltage or current of the magnetic tunnel junctions in the plurality of entanglement probability bit nodes so as to achieve the target state with an entanglement probability corresponding to the target state.
8. A method for operating an entangled Boltzmann machine, comprising: generating a true random number with a desired probability using each of a plurality of probability bit nodes included in the probability bit node array; Using a random sampling device to sample current states of a plurality of entangled probability bit nodes in the probability bit node array; Using a probability calculation device to calculate the entanglement probability distribution of multiple entanglement probability bit nodes based on their current states; Using a decision device to decide whether to change the current state of the plurality of entanglement probability bit nodes to a target state based on the entanglement probability distribution of the plurality of entanglement probability bit nodes; as well as In response to the decision of the decision device to change the current state of the plurality of entanglement probability bit nodes to a target state, a driving device is used to adjust the driving signals of the plurality of entanglement probability bit nodes to achieve the target state.
9. The method of claim 8, wherein: The probabilistic bit node includes a magnetic tunnel junction configured to receive a critical flipping voltage or current to achieve random flipping between a high resistance state and a low resistance state, and also receive a bias voltage or current to control a flipping probability.
10. The method of claim 9, wherein: Calculating the entanglement probability distribution of the plurality of entanglement probability bit nodes based on their current states using a probability calculation device includes: The conditional probability calculation unit calculates the conditional probability of each entanglement probability bit node based on the current state of the plurality of entanglement probability bit nodes, wherein the conditional probability indicates the probability that one or more of the plurality of entanglement probability bit nodes have a state under the condition that one or more of the plurality of entanglement probability bit nodes have a predetermined state; and The entanglement probability calculation unit calculates the entanglement probability distribution of the plurality of entanglement probability bit nodes in various states based on the conditional probability of each entanglement probability bit node.
11. The method of claim 10, wherein: Calculating, by the entanglement probability calculation unit, the entanglement probability distribution of the plurality of entanglement probability bit nodes in various states based on the conditional probability of each entanglement probability bit node includes: The transfer matrix calculation module determines the probability superposition state of each entanglement probability bit node based on the conditional probability of the entanglement probability bit node, and calculates the probability transfer matrix between the probability superposition states of the plurality of entanglement probability bit nodes; and The entanglement probability calculation module calculates the steady-state entanglement probability distribution or non-steady-state entanglement probability distribution of the multiple entanglement probability bit nodes in various states when the probability transfer process between the probability superposition states of the multiple entanglement probability bit nodes reaches stability or before reaching stability.
12. The method of claim 11, wherein: Using a decision device to determine whether to change the current states of the plurality of entanglement probability bit nodes to a target state based on the entanglement probability distribution of the plurality of entanglement probability bit nodes includes: The steady-state or non-steady-state entanglement probabilities of two or more target states in various states of the multiple entanglement probability bit nodes are normalized, and binary sampling is performed on the normalized probabilities to determine whether to change the current state of the multiple entanglement probability bit nodes to a different target state.
13. The method of claim 12, further comprising: When the decision device decides to change the current state of the plurality of entanglement probability bit nodes to a different target state, the energy calculation unit calculates the total system energy corresponding to the changed target state; The optimal solution determination unit compares the total system energy corresponding to the target state with the previously determined optimal total energy, and when the total system energy corresponding to the target state is better than the previously determined optimal total energy, determines the changed target state as the optimal solution; The optimal solution storage unit stores the target state as an updated optimal solution and the corresponding system total energy as an optimal total energy; as well as When the determined optimal solution or optimal total energy meets the predetermined convergence condition, the optimal solution and the optimal total energy are output by the output unit, and the operation of sampling the current states of multiple entangled probability bit nodes in the probability bit node array is stopped.
14. The method of claim 13, wherein: Using a driving device to change the current state of the plurality of entanglement probability bit nodes to a target state in response to the decision of the decision device, adjusting the driving signals of the plurality of entanglement probability bit nodes to achieve the target state comprises: The bias voltage or current of the magnetic tunnel junctions in the plurality of entanglement probability bit nodes is adjusted so as to achieve the target state with an entanglement probability corresponding to the target state.
Citation Information
Patent Citations
Spin random number generator with controllable probability
CN115809044A
True random number generator
CN116521132A
Magneton junction, magneton random access memory, microwave oscillator, microwave detector and electronic equipment
CN118510374A
True random number generation device, self-calibration method thereof and electronic equipment
CN118550502A
Systems and methods for creating and using quantum boltzmann machines
CN108369668A
Cited By
Probability bit circuit and method for controlling probability bit circuit
CN122159858A