Node state determination method and device and field programmable gate array chip

Through the thermodynamic distribution approximation method and adaptive temperature strategy, the node status determination process is optimized, solving the problems of slow calculation speed and high energy consumption in the traditional probability calculation method, and achieving more efficient node status determination.

CN118798374AInactive Publication Date: 2024-10-18ICY TECHNOLOGY (BEIJING) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410832262.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-10-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional probability calculation methods have the problems of slow calculation speed and high calculation energy consumption in the field of combinatorial optimization, resulting in slow determination of node target state values ​​and low calculation efficiency.

Method used

By obtaining the energy partial derivative of the temperature sequence and the node, the thermodynamic distribution approximation method is used to determine the probability distribution value and target state value of the node, and the adaptive, linear annealing or exponential annealing strategy is used to optimize the temperature sequence, combined with the Boltzmann distribution and activation function , to achieve efficient determination of node status.

Benefits of technology

It improves the determination speed and calculation efficiency of node target state values, reduces calculation energy consumption, makes full use of the efficiency of thermodynamic distribution approximation, and is suitable for resource-limited environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798374A_ABST
    Figure CN118798374A_ABST
Patent Text Reader

Abstract

The invention discloses a node state determination method and device and a field-programmable gate array chip, and relates to the technical field of artificial intelligence. The method comprises the steps that a temperature sequence is obtained, the temperature sequence comprises N different temperature values, and N is a positive integer; for each node in the M nodes, acquiring an energy partial derivative of the node; for each node in the M nodes, the probability distribution value of the node is determined according to the current temperature value and the energy partial derivative of the node, and the current temperature value is any one of the N temperature values; and for each node in the M nodes, determining a target state value of the node according to the probability distribution value and the target random value. According to the embodiment of the invention, the method can improve the calculation speed of the probability distribution value, reduces the calculation energy consumption, and can improve the determination speed and calculation efficiency of the target state value of the node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a node status determination method, device and field programmable gate array chip. Background Art

[0002] Probabilistic computing is an emerging computing paradigm that uses probabilistic models and random processes to provide new ideas and methods for solving combinatorial optimization problems. By mapping the problem into a probabilistic framework and combining it with classic probabilistic graphical models such as the Ising model, probabilistic computing can effectively escape the local optimum and find an approximate optimal solution in a reasonable time. With the development of new technologies such as quantum computing, the application of probabilistic computing in the field of combinatorial optimization has been further expanded, bringing new hope for solving large-scale combinatorial optimization problems. In-depth research and development of probabilistic computing theory and algorithms for combinatorial optimization have important theoretical and practical significance for promoting the development of fields such as operations optimization and artificial intelligence.

[0003] However, traditional probability calculation methods have the problems of slow calculation speed and high calculation energy consumption, which in turn leads to slow determination of the target state value of the node and low calculation efficiency.

[0004] The content of this background technology description is only for facilitating understanding of the relevant technology in this field and is not regarded as an admission of the prior art. Summary of the invention

[0005] In order to solve the above technical problems, the present application provides a node status determination method, device, field programmable gate array chip and medium. The specific scheme is as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for determining a node state, including:

[0007] Get a temperature sequence, which includes N different temperature values, where N is a positive integer;

[0008] For each of the M nodes, obtain the partial derivative of the node's energy;

[0009] For each of the M nodes, determine the probability distribution value of the node based on the current temperature value and the energy partial derivative of the node, and the current temperature value is any one of the N temperature values;

[0010] For each of the M nodes, the target state value of the node is determined according to the probability distribution value and the target random value.

[0011] In some embodiments of the first aspect, obtaining a temperature sequence includes:

[0012] According to the preset temperature strategy, obtain the temperature sequence;

[0013] The preset temperature strategy includes at least one of an adaptive temperature strategy, a linear annealing strategy and an exponential annealing strategy.

[0014] In some implementations of the first aspect, determining a probability distribution value of a node according to a current temperature value and an energy partial derivative of the node includes:

[0015] Get the Boltzmann constant;

[0016] Determine the probability distribution value of the node according to the current temperature value, the partial derivative of the node's energy, the Boltzmann constant and the preset expression;

[0017] The preset expressions include:

[0018] P(x)∝exp(-E(x) / kT)

[0019] Among them, P(x) represents the probability distribution value of the node; E(x) represents the energy partial derivative of the node; k represents the Boltzmann constant; T represents the current temperature value.

[0020] In some implementations of the first aspect, before determining the target state value of the node according to the probability distribution value and the target random value, the method further includes:

[0021] Get the initial random value;

[0022] Shift the target binary number corresponding to the initial random value left by one position to obtain the intermediate preset value;

[0023] The XOR result of the high P bits of the target binary number is used as the lowest bit of the intermediate preset value to obtain the target random value, where P is a positive integer greater than or equal to 2.

[0024] In some implementations of the first aspect, after determining the target state value of the node according to the probability distribution value and the target random value, the method further includes:

[0025] Take any temperature value among N-1 temperature values ​​other than the current temperature value among the N temperature values ​​as the current temperature value;

[0026] Jump to the step of "for each of the M nodes, determine the probability distribution value of the node according to the current temperature value and the energy partial derivative of the node" until the target state value of each of the M nodes under N temperature values ​​is determined.

[0027] In some implementations of the first aspect, determining a target state value of a node according to a probability distribution value and a target random value includes:

[0028] Determine the target state value of the node based on the probability distribution value, the preset activation function and the target random value.

[0029] In some implementations of the first aspect, the target state value includes a first target state value and a second target state value, and determining the target state value of the node according to the probability distribution value, the preset activation function and the target random value includes:

[0030] According to the preset activation function, determine the intermediate state value corresponding to the probability distribution value;

[0031] When the intermediate state value is greater than the target random value, determining the target state value to be the first target state value;

[0032] When the intermediate state value is less than or equal to the target random value, the target state value is determined to be a second target state value.

[0033] In a second aspect, an embodiment of the present application provides a node status determination device, including:

[0034] A first acquisition module is used to acquire a temperature sequence, where the temperature sequence includes N different temperature values, where N is a positive integer;

[0035] The second acquisition module is used to acquire the energy partial derivative of each node among the M nodes;

[0036] A first determination module is used to determine, for each of the M nodes, a probability distribution value of the node according to a current temperature value and an energy partial derivative of the node, where the current temperature value is any one of the N temperature values;

[0037] The second determination module is used to determine the target state value of each node among the M nodes according to the probability distribution value and the target random value.

[0038] In some implementations of the second aspect, the first acquisition module is specifically configured to:

[0039] According to the preset temperature strategy, obtain the temperature sequence;

[0040] The preset temperature strategy includes at least one of an adaptive temperature strategy, a linear annealing strategy and an exponential annealing strategy.

[0041] In a third aspect, an embodiment of the present application provides a field programmable gate array chip, which is used to implement the above-mentioned node status determination method.

[0042] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0043] According to the node state determination method, device, field programmable gate array chip and medium provided by the embodiment of the present application, the temperature sequence is first obtained, and then the energy partial derivative of the node is obtained for each of the M nodes; then for each of the M nodes, the probability distribution value of the node is determined according to the current temperature value and the energy partial derivative of the node, and the current temperature value is any one of the N temperature values; then for each of the M nodes, the target state value of the node is determined according to the probability distribution value and the target random value. In this way, by using the thermodynamic distribution method, the high efficiency of the probability calculation of the thermodynamic distribution approximation is fully utilized, the calculation speed of the probability distribution value can be improved, the calculation energy consumption can be reduced, and then the determination speed and calculation efficiency of the target state value of the node can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 A schematic diagram of a process flow of a node status determination method provided in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of the structure of a node status determination device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0048] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0049] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.

[0050] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0051] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0052] Before introducing the node status determination method provided in the embodiment of the present application, the terms that may be involved in the embodiment of the present application are introduced below.

[0053] Thermodynamic distribution approximation: Thermodynamic distribution approximation is a commonly used approximation method, which originates from the principle of entropy maximization in statistical physics. It approximates the distribution of complex systems to thermodynamic distributions, such as maximum entropy distribution or Gibbs distribution, thereby simplifying the solution process. This approximation method is widely used in signal processing, machine learning, image reconstruction and other fields, and provides an effective framework for processing complex random systems. Despite the existence of certain approximations, the thermodynamic distribution approximation shows good performance and value in engineering practice.

[0054] The Boltzmann distribution originates from statistical physics and describes the probability of a system being in a certain state at a specific temperature. For a system with N particles and energy E, the probability of being in a certain microscopic state is proportional to exp(-E / kT), where k is the Boltzmann constant and T is the absolute temperature.

[0055] In the field of probability computing, the state distribution of p-bit networks is often designed to obey the Boltzmann distribution. By adjusting the partial derivative of the corresponding energy between p-bits and the noise level of the system (corresponding to temperature T), the network can be controlled to tend to certain specific states. In optimization problems, these states usually correspond to the optimal solution or approximate optimal solution of the problem. By cleverly designing the energy function of probability calculation, the Boltzmann distribution of the network state is concentrated near the optimal solution of the integer decomposition problem in the low temperature limit. By simulating the random evolution of the network, the optimal solution space can be efficiently sampled and heuristic optimization can be achieved.

[0056] In general, the Boltzmann distribution provides an important theoretical basis for studying p-bit networks. By regulating the energy and temperature parameters of the network, the p-bit network can simulate the thermodynamic behavior of various complex systems and explore its application potential in combinatorial optimization, machine learning and other fields. This theoretical framework not only provides an intuitive physical image for analyzing p-bit systems, but also provides an important reference for designing efficient probabilistic algorithms.

[0057] Thermodynamic distribution approximation in signal processing: In the field of signal processing, thermodynamic distribution approximation is widely used in image / signal denoising, LDPC code decoding, compressed sensing reconstruction, wavelet transform denoising and blind signal separation. This method models complex signals / systems as thermodynamic distributions, such as Gibbs distribution, Ising model, Gaussian mixture model, etc., and constructs the objective function solution based on the maximum entropy or maximum a posteriori probability criteria. With the help of statistical physics theory, thermodynamic distribution approximation provides a strong theoretical basis and technical means for probabilistic modeling and optimization problems in signal processing.

[0058] Thermodynamic distribution approximation in machine learning: In the field of machine learning, thermodynamic distribution approximation provides a framework based on energy functions for probabilistic modeling. It is widely used in unsupervised learning and generative models such as Boltzmann machines, restricted Boltzmann machines, deep belief networks, and Markov random fields. By parameterizing the energy function, the probability distribution approximation of the data can be obtained. The Monte Carlo sampling algorithm can efficiently sample from the modeled thermodynamic distribution. Thermodynamic distribution approximation provides a strong theoretical basis and technical means for machine learning tasks such as unsupervised learning and structured prediction.

[0059] The following is a description of related technologies that may be involved in the embodiments of the present application.

[0060] (1) Large-scale optimization problems urgently need to develop efficient approximate algorithms and hardware to fully exploit the potential of thermodynamic distribution:

[0061] As the complexity of real-world problems increases, the probability distributions that need to be modeled also become more complex.

[0062] How can thermodynamic distribution effectively fit these complex distributions while ensuring the accuracy of the solution and the optimal configuration of hardware resources?

[0063] (2) Existing thermodynamic distribution approximation methods have the following limitations:

[0064] Slow convergence: At low temperatures, the system converges very slowly, resulting in inefficient algorithms.

[0065] Difficulty in handling complex constraints: Existing methods have difficulty in handling complex constraints, such as non-convex constraints or constraints that are difficult to represent.

[0066] Lack of theoretical analysis: Existing methods lack theoretical analysis, which makes it difficult to predict algorithm performance and guide parameter selection.

[0067] (3) Inefficient probability calculation speed and computing energy consumption:

[0068] For complex models, how to accurately and efficiently estimate the parameters of thermodynamic distribution (such as the weight of the energy function) is still a thorny problem. Commonly used methods such as gradient descent still need to improve convergence and computational efficiency.

[0069] High-dimensional data processing: In the case of high-dimensional data and large sample sizes, thermodynamic distribution models often have huge computational overhead. How to expand and optimize computational efficiency and cope with the challenges of high-dimensional data requires new theoretical breakthroughs and algorithmic innovations.

[0070] (4) Lack of a dedicated thermodynamic distribution approximation method paradigm for probability calculations:

[0071] Most thermodynamic distribution models are relatively fixed in form and difficult to integrate into other hardware modules. How to improve the flexibility and scalability of the thermodynamic distribution modeling paradigm and combine it with other models is an urgent problem to be solved.

[0072] Thermodynamic distribution models model probability through energy functions, but energy functions are often difficult to explain intuitively. Improving the interpretability and reliability of thermodynamic distribution models and deploying them to hardware systems are the pain points that need to be solved in practical applications.

[0073] The embodiments of the present application are intended to solve at least one of the above problems.

[0074] Figure 1 A flowchart of a node status determination method provided in an embodiment of the present application.

[0075] The node state determination method provided in the embodiment of the present application can be executed by a field programmable gate array chip, a node state determination device, etc. The following takes the node state determination method executed by a field programmable gate array chip as an example for description.

[0076] like Figure 1 As shown, the node status determination method provided in the embodiment of the present application may include S110 to S140.

[0077] S110 , obtaining a temperature sequence, where the temperature sequence includes N different temperature values, where N is a positive integer.

[0078] S120. For each of the M nodes, obtain the energy partial derivative of the node.

[0079] S130. For each of the M nodes, determine the probability distribution value of the node according to the current temperature value and the energy partial derivative of the node, where the current temperature value is any one of the N temperature values.

[0080] S140 . For each of the M nodes, determine a target state value of the node according to the probability distribution value and the target random value.

[0081] According to the node state determination method provided by the embodiment of the present application, the temperature sequence is first obtained, and then for each of the M nodes, the energy partial derivative of the node is obtained; then for each of the M nodes, the probability distribution value of the node is determined according to the current temperature value and the energy partial derivative of the node, and the current temperature value is any one of the N temperature values; then for each of the M nodes, the target state value of the node is determined according to the probability distribution value and the target random value. In this way, by using the thermodynamic distribution method, the high efficiency of the probability calculation of the thermodynamic distribution approximation is fully utilized, the calculation speed of the probability distribution value can be improved, the calculation energy consumption can be reduced, and then the determination speed and calculation efficiency of the target state value of the node can be improved.

[0082] The specific implementation of the above steps is described below.

[0083] In S110, the value of N can be set according to actual conditions and is not limited here. For example, N can be 10, 15, 100, etc.

[0084] In some examples, the N different temperature values ​​included in the temperature sequence may be N temperature values ​​that decrease in sequence.

[0085] Illustratively, the temperature sequence may be 30°C, 29°C, 27°C, 24°C, 21°C, 20°C, 17°C, 13°C and 8°C.

[0086] In some examples, obtaining a temperature sequence may include:

[0087] According to the preset temperature strategy, obtain the temperature sequence;

[0088] The preset temperature strategy includes at least one of an adaptive temperature strategy, a linear annealing strategy and an exponential annealing strategy.

[0089] Exemplarily, the field programmable gate array chip may include a temperature sequence configuration module, and the temperature sequence may be acquired through the temperature sequence configuration module. More specifically, the temperature sequence may be acquired through the temperature sequence configuration module according to a preset temperature strategy.

[0090] For example, in the heuristic algorithm, the temperature sequence configuration module can be used as a module for controlling the randomness of the algorithm search process. The temperature value is usually a non-negative real number, and the higher it is, the greater the randomness of the algorithm.

[0091] Control the exploration ability of the algorithm: At high temperatures, the algorithm is more likely to accept poor solutions, thereby improving the algorithm's exploration ability, enabling it to jump out of the local optimal solution and find a better solution.

[0092] Control the convergence speed of the algorithm: At low temperatures, the algorithm is more likely to accept better solutions, thereby increasing the convergence speed of the algorithm and enabling it to find the optimal solution faster.

[0093] Balancing exploration and exploitation: The temperature sequence configuration module can balance the algorithm's exploration and exploitation capabilities, enabling the algorithm to strike a balance between exploring the search space and exploiting the solutions found.

[0094] In an adaptive temperature strategy, the temperature value is dynamically adjusted according to the search state of the adaptive temperature strategy. For example, when the adaptive temperature strategy is trapped in a local optimal solution, the temperature value can be increased to enhance the algorithm's exploration ability; when the adaptive temperature strategy finds a better solution, the temperature value can be reduced to speed up the algorithm's convergence. The adaptive temperature strategy may include an adaptive temperature algorithm.

[0095] In a linear annealing strategy, the temperature is reduced in steps of a certain size. In each annealing stage, the temperature is reduced by a fixed amount. Therefore, the speed of linear annealing is fixed, and the temperature can be reduced quickly in a shorter time.

[0096] Exponential annealing strategies are often used to solve combinatorial optimization problems, especially those involving finding optimal or near-optimal solutions.

[0097] It should be noted that the method and embodiment of the algorithm for determining the temperature sequence is an important part of the heuristic algorithm, and its performance will directly affect the efficiency and robustness of the algorithm. Therefore, it is crucial to select an appropriate preset temperature strategy according to actual conditions to improve the performance of the heuristic algorithm.

[0098] Exemplarily, when the temperature loading signal or the calculation enable signal is valid, the temperature configuration state is entered to receive the temperature sequence.

[0099] Exemplarily, the temperature register of the full adder is updated according to the write address and 128-bit temperature data transmitted from the state machine to read a specific temperature value from the temperature sequence.

[0100] In S120 , after obtaining the temperature sequence, the field programmable gate array chip may also obtain the energy partial derivative of each of the M nodes.

[0101] The energy partial derivative can be the partial derivative of the Hamiltonian (energy) of the Ising model with respect to the node, that is, the energy impact of a single node on the entire system. The energy partial derivative can usually represent the quality of the current state of the node, and a lower energy partial derivative indicates a better current state of the node.

[0102] As an example, the energy partial derivatives may be pre-stored in a field programmable gate array chip for subsequent direct call.

[0103] As another example, the field programmable gate array chip may include a normalized function fitting module, which may be a module for mapping the energy value of a node to a probability distribution value, and the module may be used to implement a thermodynamic approximate distribution algorithm, which is a heuristic algorithm based on statistical mechanics and may be used to solve complex optimization problems. The energy value of the current state of the node may be calculated by the normalized function fitting module.

[0104] In S130, after obtaining the energy partial derivative of each of the M nodes, the field programmable gate array chip can also determine the probability distribution value of the node for each of the M nodes based on the current temperature value and the energy partial derivative of the node, where the current temperature value is any one of the N temperature values.

[0105] In an embodiment of the present application, the normalization function fitting module can also apply a normalization function to map the energy value of the node's current state to a probability distribution value. The probability distribution value can represent the possibility of each node's current state being selected, and a higher probability indicates a node's current state that is more likely to be selected.

[0106] In some examples, determining the probability distribution value of a node according to the current temperature value and the energy partial derivative of the node may include:

[0107] Get the Boltzmann constant;

[0108] Determine the probability distribution value of the node according to the current temperature value, the partial derivative of the node's energy, the Boltzmann constant and the preset expression;

[0109] The preset expressions include:

[0110] P(x)∝exp(-E(x) / kT)

[0111] Among them, P(x) represents the probability distribution value of the node; E(x) represents the energy partial derivative of the node; k represents the Boltzmann constant; T represents the current temperature value.

[0112] Exemplarily, the Boltzmann constant may be pre-stored in a field programmable gate array chip for subsequent direct call.

[0113] Exemplarily, the preset expression includes P(x)=exp(-E(x) / kT), and the current temperature value, the energy partial derivative of the node, and the Boltzmann constant are substituted into P(x)=exp(-E(x) / kT) to calculate the probability distribution value of the node. The above preset expression is only used for example and is not used to limit this application. In actual implementation, the preset expression can be set according to the actual situation and is not limited here.

[0114] In other examples, the current temperature value and the energy partial derivative of the node may be input into a normalized function fitting module to calculate the probability distribution value of the node through the normalized function fitting module.

[0115] Exemplarily, the current temperature value may be the first temperature value in the temperature sequence, or the last temperature value in the temperature sequence, etc.

[0116] In S140, after the field programmable gate array chip determines the probability distribution value of the node for each of the M nodes according to the current temperature value and the energy partial derivative of the node, it can also determine the target state value of the node for each of the M nodes according to the probability distribution value and the target random value.

[0117] In some implementations, determining a target state value of a node according to a probability distribution value and a target random value may include:

[0118] Determine the target state value of the node based on the probability distribution value, the preset activation function and the target random value.

[0119] In some embodiments, the preset activation function may include at least one of a hyperbolic tangent function, a Sigmoid function, a ReLU function, a Leaky ReLU function, a Parametric ReLU function, an ELU function, a SELU function, and a Softmax function.

[0120] As an example, the preset activation function may include a hyperbolic tangent function tanh.

[0121] As another example, the preset activation function may include a hyperbolic tangent function and a sigmoid function.

[0122] In some implementations, the target state value includes a first target state value and a second target state value, and determining the target state value of the node according to the probability distribution value, the preset activation function and the target random value includes:

[0123] According to the preset activation function, determine the intermediate state value corresponding to the probability distribution value;

[0124] When the intermediate state value is greater than the target random value, determining the target state value to be the first target state value;

[0125] When the intermediate state value is less than or equal to the target random value, the target state value is determined to be a second target state value.

[0126] The first target state value may be a state that flips the current state of the first target node, and the second target state value may be a state that maintains the current state of the first target node.

[0127] Exemplarily, the initial state value of the first target node may include -1 or 1. Taking the initial state value of the first target node as -1 as an example, when the intermediate state value is greater than the target random value, the target state value is determined to be the first target state value 1; when the intermediate state value is less than the target random value, the target state value is determined to be the second target state value -1.

[0128] That is, when the intermediate state value is greater than the target random value, the initial state value of the first target node is updated; when the intermediate state value is less than the target random value, the initial state value of the first target node is maintained.

[0129] In some examples, the probability distribution value may be input into a preset activation function to calculate an intermediate state value corresponding to the probability distribution value.

[0130] In other examples, since it is difficult to determine the intermediate state value corresponding to the probability distribution value using the hyperbolic tangent function on hardware, the hyperbolic tangent function tanh(x) can be fitted by a piecewise linear function, where x can represent the probability distribution value. The specific fitting process is as follows:

[0131] Determine the target segment to which the probability distribution value x belongs, and then fit tanh(x) according to the slope k and intercept b of the target segment, that is, tanh(x)=kx+b.

[0132] Exemplarily, a hyperbolic tangent function can be fitted with a first linear function, a second linear function, and a third linear function. For the first linear function, the mathematical expression is y = 64x, where the value range of x is 0 < x <= 32; for the second linear function, the mathematical expression is y = 32x + 1024, where the value range of x is 32 < x <= 64; for the third linear function, the mathematical expression is y = 8x + 2560, where the value range of x is 64 < x <= 196; for the fourth linear function, the mathematical expression is y = 4095, where the value range of x is x > 196. If x = 98, then the target segment is determined to be 64 < x <= 196. Furthermore, y = 8x + 2560 can be used to fit tanh(x), that is, tanh(x) = 8x + 2560. The above numerical values are only for illustration and do not limit this application. That is to say, the slopes and intercepts of the linear functions are stored in a Random Access Memory (RAM), the target segment to which the probability distribution value x belongs is judged, and then the slope and intercept corresponding to the target segment are read for linear operation, and the final output obtained is the intermediate state value.

[0133] It should be noted that for the section with a relatively large slope, a multi-cycle or parallel processing method can be adopted. After obtaining the positive output y of the linear function normally, -y can be obtained as the negative output through an inverting circuit.

[0134] The normalization function fitting module can be used to implement various heuristic algorithms, such as the simulated annealing algorithm and the Boltzmann Markov chain. In these algorithms, the normalization function fitting module can be used to control the search process of the algorithm, enabling it to more effectively explore the search space and find the optimal solution.

[0135] In some embodiments, a field programmable gate array chip may include a node update module, and the node update module can be used to determine the target state value of the node according to the probability distribution value and the target random value. That is to say, the field programmable gate array chip can determine the target state value of the node through the node update module.

[0136] In some embodiments, before determining the target state value of the node according to the probability distribution value and the target random value, the method further includes:

[0137] Obtain an initial random value;

[0138] Shift the target binary number corresponding to the initial random value one bit to the left to obtain an intermediate preset value;

[0139] Use the exclusive OR result of the high P bits of the target binary number as the lowest bit of the intermediate preset value to obtain the target random value, where P is a positive integer greater than or equal to 2.

[0140] In the above manner, new random numbers can be continuously generated.

[0141] The value of P can be set according to actual conditions and is not limited here. For example, the value of P can be 4.

[0142] Exemplarily, the initial random value may be pre-stored in a field programmable gate array chip for subsequent calling, or the above group of random values ​​may be used as the initial random value.

[0143] Taking the previous set of random values ​​as the initial random values ​​as an example, the previous set of random values ​​is shifted left by one bit, and the high four bits of the previous set of random values ​​are XORed at the right end as the lowest bit of this set of random values ​​to continuously generate new random values.

[0144] Exemplarily, the initial random number is 111000110101, then the intermediate preset value is 110001101011, taking P as 4 as an example, the result 0 of 1 XOR 1 XOR 0 XOR 0 is taken as the lowest bit of the intermediate preset value to obtain the target random value 1100011010110.

[0145] In some embodiments, the field programmable gate array chip may include a random value generation module. The random value generation module may be a module for generating a target random value. The target random value may be used to guide the search process of the algorithm.

[0146] In some examples, the random value generation module may generate random values ​​via a pseudo-random number generator (PRNG) or the like.

[0147] In other examples, the random value generation module may include an entropy source random value generation module to generate a target random value.

[0148] Considering that the random values ​​generated by PRNG are not truly random, but have a deterministic pattern. This may cause the algorithm to fall into a local optimum and fail to find a global optimal solution. In order to improve or solve this problem, a random value generation module including an entropy source can be used to generate a target random value. An entropy source refers to a physical system or process that can generate truly random data. For example, thermal noise, quantum noise, and chaotic systems are all common entropy sources. Exemplarily, the entropy source includes a random magnetic tunnel junction (sMTJ).

[0149] More specifically, the random value generation module may also include a data acquisition submodule and a data processing submodule. The data acquisition submodule is connected to the data processing submodule. The data acquisition submodule can be used to collect random values ​​generated by the entropy source. The data processing submodule can be used to process the collected random values ​​so that they meet the requirements of the algorithm. The data processing submodule can perform at least one of the following operations: filtering, format conversion, and correction. Among them, filtering can be to filter out noise and other interference in the random value; format conversion can be to convert the random value into the format required by the algorithm; correction can be to correct the distribution of the random value so that it conforms to the expected distribution. In some embodiments, after determining the target state value of the node according to the probability distribution value and the target random value, the method also includes:

[0150] Take any temperature value among N-1 temperature values ​​other than the current temperature value among the N temperature values ​​as the current temperature value;

[0151] Jump to the step of "for each of the M nodes, determine the probability distribution value of the node according to the current temperature value and the energy partial derivative of the node" until the target state value of each of the M nodes under N temperature values ​​is determined.

[0152] Exemplarily, the field programmable gate array chip may also include a temperature drop module, which can be used to determine the current temperature value from the temperature sequence. Starting from the highest temperature value provided by the host computer, the computing core (i.e., the field programmable gate array chip) is responsible for solving the target state value of M nodes. When calculating, the pbit data (i.e., the target state value) and the weight of all nodes are updated from the first node numbered 0, until all nodes pbit updates are completed, and the system enters the next temperature value. When the temperature sequence is fully solved, it will be calculated again from the lowest temperature until the number of loop solutions required by the host computer is completed. The final calculated result is stored in the pbit register of the computing core and transmitted back to the host computer through the PCIe (Peripheral Component Interconnect Express) interface.

[0153] The node status determination method provided in the embodiment of the present application is described below in conjunction with specific application scenarios.

[0154] The node state determination method provided in the embodiment of the present application may be a node state determination method based on a thermodynamic distribution approximation method in a probability calculation implementation, and may include the following steps:

[0155] 1. PCIe sends data

[0156] First, after the host computer issues a temperature sequence update command, the weights and weight sums of all nodes will be transmitted to the accelerator card (i.e., field programmable gate array chip) through the PCIe interface.

[0157] Since the fully connected weight data is very large (for example, the weight data of 8192 nodes occupies 8192*8192*16bit=1Gb, and the weight sum occupies 8192*32bit=256Kb), after the PCIe weight is sent, it will be written into the 2Gb on-chip dynamic random access memory (DRAM) through the asynchronous first-in, first-out (FIFO) and DDR3 (Double Data Rate 3) controller, and the temperature sequence and weight sum will be directly stored in the static random access memory cache (SRAM Cache) in the computing core for easy and fast access.

[0158] 2. Asynchronous FIFO Cache

[0159] Write data: The write clock domain writes the data into the FIFO and updates the write pointer.

[0160] Read data: The read clock domain reads data from the FIFO and updates the read pointer.

[0161] State management: The write clock domain and the read clock domain maintain their own read and write pointers respectively, and synchronize the empty and full state signals through the Gray code counter and synchronizer.

[0162] Empty and full judgment: The empty and full status of the FIFO is judged by comparing the synchronized read and write pointers, thereby controlling the write and read operations.

[0163] 3. Data is stored in memory

[0164] The temperature sequence and weights are stored in the compute core cache.

[0165] The weights are stored in dynamic random access memory.

[0166] 4. Generate a new random value rand (i.e. target random value)

[0167] Shift the previous set of random values ​​one bit to the left, and XOR the high four bits of the previous set of random values ​​to the right end as the lowest bit of this set of random values ​​to continuously generate new random values.

[0168] 5. Calculation of pbit (i.e. target state value)

[0169] When a new node state is generated, the weights of all nodes connected to the node are read through the DDR3 interface according to the new sbit value (ie, the target state value) to update the sum of all node weights.

[0170] The node status data is stored in the register and after the entire temperature sequence calculation is completed, it is transmitted to the host computer through the PCIe interface as the calculation result.

[0171] 6. pbit (i.e. target status value) is transmitted back to the host computer

[0172] When all temperature sequences are solved, the calculation will start again from the lowest temperature until the number of loop solutions required by the host computer is completed.

[0173] The final calculation result is stored in the pbit register of the computing core and transmitted back to the host computer through the PCIe interface.

[0174] Through the above steps, a thermodynamic distribution approximation is completed in the probability calculation process, and the probability calculation solution is optimized. In practical applications, the performance and effect of the model can be further optimized by adjusting the model structure, sampling method and optimization algorithm.

[0175] Exemplarily, the product structure of the hardware acceleration card may include:

[0176] Field-Programmable Gate Array (FPGA) chip: As the core processor of the accelerator card, it is responsible for performing probability calculations of sparse connections.

[0177] External memory: used to store model parameters and input data.

[0178] Controller: used to manage data input and output, and schedule the operation process of the accelerator card.

[0179] PCIe interface: The device exchanges data with other components through the PCIe bus interface.

[0180] In the process of simulated annealing optimization solution, it is crucial to reasonably adjust the temperature cooling strategy. The embodiment of the present application adopts a novel adaptive temperature control method, which can gradually improve the accuracy of the solution while ensuring the global search capability. In the high temperature stage, this method can freely traverse every corner of the solution space; when gradually approaching the optimal solution, the temperature drops, and the search will be carefully carried out around the optimization area. Our large number of experimental results show that this innovative thermodynamic distribution approximation strategy greatly improves the efficiency and correctness of simulated annealing in solving various complex optimization problems. The algorithm converges quickly and can always reach the global optimal solution with a very high probability. This method is expected to promote the widespread application of probabilistic computing in practical engineering fields.

[0181] In the embodiments of the present application, the ability to model complex distributions is improved by studying new thermodynamic distribution approximation methods; by designing hierarchical decomposition, model simplification and other strategies, complex models are decomposed into multiple easy-to-solve sub-module combinations, and structured prior knowledge, rules, etc. (i.e., weights) are introduced to constrain and guide the modeling process of complex distributions; targeted sampling methods are developed to collect nodes, such as the Gibbs sampling method, to improve overall computing efficiency and solution accuracy at a certain loss of computing time; new hardware technologies such as quantum computing are explored to provide a new computing basis for efficient probabilistic computing; an extensible and combinable probabilistic computing model framework is studied to support modular design and multi-model integration; a general thermodynamic distribution encoding / decoding method is designed to improve the portability and cross-platform deployment capability of the model; and by implementing the thermodynamic distribution approximation method as an application-specific integrated circuit (ASIC) core or a field-programmable gate array (FPGA), a flexible and high-performance hardware acceleration solution is provided to meet the needs of different application scenarios.

[0182] The embodiments of the present application have at least the following beneficial effects:

[0183] Through the normalized function fitting module and the temperature drop module, efficient calculation of node energy is achieved. By using the thermodynamic distribution method and parallel computing architecture, the efficiency of probability calculation of thermodynamic distribution approximation and the parallelism of hardware calculation are fully utilized. This optimization significantly improves the calculation speed and reduces the computing energy consumption, so that the model can also achieve efficient calculation in a resource-constrained environment, solving the problems of slow calculation speed and low energy efficiency of existing probability calculation.

[0184] It is designed specifically for the probability calculation of thermodynamic distribution approximation, taking into account its unique computing and storage requirements. By optimizing the hardware architecture and computing process, efficient support for the Ising model is achieved. This specially designed approximation method can give full play to the performance of probability calculation on the hardware platform, so that probability calculation can be fully utilized in a resource-constrained environment, solving the problem that the existing hardware system cannot support the probability calculation of thermodynamic distribution approximation.

[0185] The embodiment of the present application cleverly combines the algorithm with the hardware, and realizes an efficient Boltzmann approximation scheme through innovations in structure, module coupling and operation process. Structurally, the patent proposes a hardware implementation scheme for a probability bit (p-bit) based on an entropy source (including a random magnetic tunnel junction (sMTJ)). By integrating the entropy source with the hardware circuit, a heterogeneous architecture is formed. This architecture allows p-bit to utilize the random dynamic characteristics of the entropy source to quickly and high-quality generate random bit streams, laying a physical foundation for the construction of large-scale probabilistic systems.

[0186] In terms of module coupling, the embodiment of the present application demonstrates how to organize multiple p-bits into a highly correlated network. By carefully designing the coupling mode and strength between p-bits, the state distribution of the network is approximately subject to the Boltzmann distribution. This Boltzmann-like p-bit network can efficiently solve complex problems such as combinatorial optimization and has broad application prospects. In terms of operation flow, the embodiment of the present application utilizes the unique physical properties of the entropy source. Unlike traditional synchronous clock drive, the p-bit network evolves under asynchronous updates randomly triggered by sMTJ. This asynchronous operation mode better fits the random sampling mechanism of the Boltzmann machine, which is conducive to accelerating the convergence process of the network. At the same time, the asynchronous architecture also reduces the dependence on the global clock and improves the parallelism and energy efficiency of the system.

[0187] The innovation of the embodiment of this application is to propose a p-bit hardware solution based on sMTJ devices, and optimize the structure, module coupling and operation process, and finally realize an efficient and scalable Boltzmann-like system. This kind of soft-hard collaborative design has opened up a new way for the development of probabilistic computing in the post-Moore era. By further improving the technical details, it is expected to promote its practical application in the fields of artificial intelligence, combinatorial optimization, etc., and achieve major breakthroughs.

[0188] Based on the same inventive concept, an embodiment of the present application also provides a node status determination device. The node status determination device provided in the embodiment of the present application is described below in conjunction with the accompanying drawings.

[0189] like Figure 2 As shown, the node status determination device provided in the embodiment of the present application may include:

[0190] A first acquisition module 210 is used to acquire a temperature sequence, where the temperature sequence includes N different temperature values, where N is a positive integer;

[0191] A second acquisition module 220 is used to acquire the energy partial derivative of each node in the M nodes;

[0192] A first determination module 230 is used to determine, for each of the M nodes, a probability distribution value of the node according to a current temperature value and an energy partial derivative of the node, the current temperature value being any one of the N temperature values;

[0193] The second determination module 240 is used to determine, for each of the M nodes, a target state value of the node according to the probability distribution value and the target random value.

[0194] According to the node state determination device provided by the embodiment of the present application, the temperature sequence is first obtained, and then the energy partial derivative of the node is obtained for each of the M nodes; then, for each of the M nodes, the probability distribution value of the node is determined according to the current temperature value and the energy partial derivative of the node, and the current temperature value is any one of the N temperature values; then, for each of the M nodes, the target state value of the node is determined according to the probability distribution value and the target random value. In this way, by using the thermodynamic distribution method, the high efficiency of the probability calculation of the thermodynamic distribution approximation is fully utilized, the calculation speed of the probability distribution value can be improved, the calculation energy consumption can be reduced, and then the determination speed and calculation efficiency of the target state value of the node can be improved. .

[0195] In some implementations, the first acquisition module 210 may be specifically configured to:

[0196] According to the preset temperature strategy, obtain the temperature sequence;

[0197] The preset temperature strategy includes at least one of an adaptive temperature strategy, a linear annealing strategy and an exponential annealing strategy.

[0198] In some implementations, the first determining module 230 may be specifically configured to:

[0199] Get the Boltzmann constant;

[0200] Determine the probability distribution value of the node according to the current temperature value, the partial derivative of the node's energy, the Boltzmann constant and the preset expression;

[0201] The preset expressions include:

[0202] P(x)∝exp(-E(x) / kT)

[0203] Among them, P(x) represents the probability distribution value of the node; E(x) represents the energy partial derivative of the node; k represents the Boltzmann constant; T represents the current temperature value.

[0204] In some embodiments, the device may further include:

[0205] A third acquisition module is used to obtain an initial random value;

[0206] A left shift module is used to shift the target binary number corresponding to the initial random value to the left by one position to obtain an intermediate preset value;

[0207] The first module is used to take the XOR result of the high P bits of the target binary number as the lowest bit of the intermediate preset value to obtain the target random value, where P is a positive integer greater than or equal to 2.

[0208] In some embodiments, the device may further include:

[0209] The second is a module for taking any temperature value among N-1 temperature values ​​other than the current temperature value among the N temperature values ​​as the current temperature value;

[0210] The jump module is used to jump to the step of "determining the probability distribution value of the node for each of the M nodes according to the current temperature value and the energy partial derivative of the node" until the target state value of each of the M nodes under N temperature values ​​is determined.

[0211] In some implementations, the target state value includes a first target state value and a second target state value, and the second determination module 240 may include:

[0212] A first determination submodule, used to determine an intermediate state value corresponding to the probability distribution value according to a preset activation function;

[0213] A second determination submodule, configured to determine the target state value to be a first target state value when the intermediate state value is greater than the target random value;

[0214] The third determining submodule is used to determine the target state value as a second target state value when the intermediate state value is less than or equal to the target random value.

[0215] The node status determination device provided in the embodiment of the present application can realize Figure 1 The functions of the node status determination method provided and its corresponding technical effects can be achieved. For the sake of brevity, they will not be repeated here.

[0216] In addition, in combination with the node status determination method in the above embodiments, the embodiments of the present application may provide a field programmable gate array chip, which is used to implement any one of the node status determination methods in the above embodiments.

[0217] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0218] The above is only a specific implementation method of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application. The methods, programs, systems, devices, etc. in the embodiments of the present application can be executed or implemented in a single or multiple networked computers, and can also be practiced in a distributed computing environment. In the embodiments of this specification, in these distributed computing environments, tasks can be performed by remote processing devices connected through a communication network.

[0219] The specific implementation process of the provided field programmable gate array chip can refer to the specific implementation process of the acceleration card provided in the above embodiment, which will not be described in detail here.

[0220] Those skilled in the art should understand that the embodiments of the present specification may be provided as methods, systems or computer program products. Therefore, those skilled in the art may imagine that the functional modules / units or controllers and related method steps described in the above embodiments may be implemented in software, hardware or a combination of software / hardware.

[0221] Unless explicitly stated, the actions or steps of the methods, programs, and embodiments of the present application do not have to be performed in a specific order and can still achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0222] In this article, multiple embodiments of the present application are described, but for the sake of simplicity, the description of each embodiment is not exhaustive, and the same or similar features or parts between the various embodiments may be omitted. In this article, "one embodiment", "some embodiments", "example", "specific example", or "some examples" are intended to be applicable to at least one embodiment or example according to the present application, rather than all embodiments. The above terms do not necessarily mean to refer to the same embodiment or example. In the absence of mutual contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.

[0223] The exemplary systems and methods of the present application have been specifically shown and described with reference to the above embodiments, which are merely examples of the best modes for implementing the present systems and methods. It will be appreciated by those skilled in the art that various changes may be made to the embodiments of the systems and methods described herein when implementing the present systems and / or methods without departing from the spirit and scope of the present application as defined in the appended claims.

Claims

1. A method for determining a node state, characterized in that: include: Acquire a temperature sequence, wherein the temperature sequence includes N different temperature values, where N is a positive integer; For each of the M nodes, obtain the energy partial derivative of the node; For each of the M nodes, determine a probability distribution value of the node according to the current temperature value and the energy partial derivative of the node, wherein the current temperature value is any one of the N temperature values; For each of the M nodes, a target state value of the node is determined according to the probability distribution value and the target random value.

2. The method according to claim 1, characterized in that The step of obtaining a temperature sequence comprises: According to the preset temperature strategy, obtain the temperature sequence; The preset temperature strategy includes at least one of an adaptive temperature strategy, a linear annealing strategy and an exponential annealing strategy.

3. The method according to claim 1, characterized in that Determining the probability distribution value of the node according to the current temperature value and the energy partial derivative of the node includes: Get the Boltzmann constant; Determine a probability distribution value of the node according to the current temperature value, the partial energy derivative of the node, the Boltzmann constant and a preset expression; The preset expressions include: P(x)∝exp(-E(x) / kT) Wherein, P(x) represents the probability distribution value of the node; E(x) represents the energy partial derivative of the node; k represents the Boltzmann constant; and T represents the current temperature value.

4. The method according to claim 1, characterized in that Before determining the target state value of the node according to the probability distribution value and the target random value, the method further includes: Get the initial random value; Shift the target binary number corresponding to the initial random value left by one position to obtain an intermediate preset value; The XOR result of the high P bits of the target binary number is used as the lowest bit of the intermediate preset value to obtain the target random value, where P is a positive integer greater than or equal to 2.

5. The method according to claim 1, characterized in that After determining the target state value of the node according to the probability distribution value and the target random value, the method further includes: Taking any temperature value among N-1 temperature values ​​other than the current temperature value among the N temperature values ​​as the current temperature value; Jump to the step of "for each of the M nodes, determining the probability distribution value of the node according to the current temperature value and the energy partial derivative of the node" until the target state value of each of the M nodes under N temperature values ​​is determined.

6. The method according to claim 1, characterized in that Determining the target state value of the node according to the probability distribution value and the target random value includes: The target state value of the node is determined according to the probability distribution value, the preset activation function and the target random value.

7. The method according to claim 6, characterized in that The target state value includes a first target state value and a second target state value, and determining the target state value of the node according to the probability distribution value, the preset activation function and the target random value includes: According to the preset activation function, determining the intermediate state value corresponding to the probability distribution value; When the intermediate state value is greater than the target random value, determining the target state value to be the first target state value; When the intermediate state value is less than or equal to the target random value, the target state value is determined to be a second target state value.

8. A device for determining a node state, characterized in that: include: A first acquisition module is used to acquire a temperature sequence, where the temperature sequence includes N different temperature values, where N is a positive integer; A second acquisition module is used to acquire the energy partial derivative of each node among the M nodes; A first determination module is used to determine, for each of the M nodes, a probability distribution value of the node according to the current temperature value and the energy partial derivative of the node, wherein the current temperature value is any one of the N temperature values; The second determination module is used to determine, for each of the M nodes, a target state value of the node according to the probability distribution value and the target random value.

9. The device for determining node status according to claim 8, characterized in that: The first acquisition module is specifically used to: According to the preset temperature strategy, obtain the temperature sequence; The preset temperature strategy includes at least one of an adaptive temperature strategy, a linear annealing strategy and an exponential annealing strategy.

10. A field programmable gate array chip, characterized in that: The field programmable gate array chip is used to implement the node status determination method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for improving policy for stochastic control problem

    CN109154798A

  • Method, device and program for calculating transport coefficient

    JP2014106554A

  • System and method for managing personal learing based on chat room

    KR1020230163209A

  • Method for simulating fluid flow using tsallis entropy and renyi entropy

    US20200074337A1