Learning device, learning method, and program
The learning device efficiently learns restricted Boltzmann machines by iteratively acquiring samples and updating parameters on a quantum computer, addressing the inefficiencies of conventional methods by refining inverse temperature estimation through Gibbs sampling, thus reducing sample collection costs and improving processing efficiency.
Patent Information
- Application Number
- PCT/JP2024/023676
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-28
- Filing Date
- 2024-06-28
- Publication Date
- 2025-01-02
AI Technical Summary
Conventional methods for learning restricted Boltzmann machines using quantum annealing machines require a large number of samples to estimate inverse temperature, which is costly and inefficient, and the estimated temperature often deviates over time, separating the estimation and learning processes.
A learning device and method that utilizes a quantum computer to iteratively acquire samples, estimate inverse temperature, and update parameters for a restricted Boltzmann machine, incorporating Gibbs sampling to refine the temperature estimation and reduce the sample collection cost, allowing for efficient learning without a large sample set.
Enables efficient learning of restricted Boltzmann machines by continuously updating parameters and estimating changing inverse temperatures in real-time, reducing the need for extensive sample collection and improving processing efficiency.
Smart Images

Figure JP2024023676_02012025_PF_FP_ABST
Abstract
Description
Learning device, learning method, and program
[0001] The present invention relates to a learning device, a learning method, and a program.
[0002] A technique for modeling a probability distribution by learning a Boltzmann machine has been known. For example, Patent Literature 1 discloses a method for training a restricted Boltzmann machine (RBM), the method including the steps of generating a set of hidden values in a hidden layer of the RBM from a first set of visible values, and generating a second set of visible values in a visible layer of the RBM based on the generated set of hidden values.
[0003] Japanese Patent Application Laid-Open No. 2022-031730
[0004] The restricted Boltzmann machine may be trained by providing the parameters of the restricted Boltzmann machine to a quantum annealing machine to acquire samples, and then using the acquired samples and training data prepared in advance. In this case, the samples output from the quantum annealing machine are biased (inverse temperature) compared to the true distribution, so it is necessary to estimate the inverse temperature in advance and correct the parameters provided to the quantum annealing machine.
[0005] In this regard, the conventional technique involves acquiring a large number of samples from a quantum annealing machine in advance and estimating the inverse temperature from the acquired large number of samples. However, this method requires the cost of collecting a large number of samples in advance, and the inverse temperature value tends to change over time, so the inverse temperature as a fixed value estimated in advance may deviate from the true value. Furthermore, in the conventional technique, the step of estimating the inverse temperature and the step of training the restricted Boltzmann machine are separate, which may result in inefficient processing overall.
[0006] The present invention has been made in consideration of the above circumstances, and one of its objects is to provide a learning device, a learning method, and a program that can efficiently learn a restricted Boltzmann machine while estimating the inverse temperature that changes over time, without incurring the cost of collecting a large number of samples.
[0007] The learning device, learning method, and program according to the present invention employ the following configuration: (1): A learning device according to one aspect of the present invention is a learning device that uses a quantum computer to learn a restricted Boltzmann machine, and includes: an acquisition unit that inputs parameters of the restricted Boltzmann machine to the quantum computer and acquires one or more samples of the restricted Boltzmann machine from the quantum computer, an estimation unit that estimates an inverse temperature of the restricted Boltzmann machine related to the quantum computer based on the acquired one or more samples, and a learning unit that updates the parameters of the restricted Boltzmann machine based on training data of the restricted Boltzmann machine prepared in advance and the acquired one or more samples.
[0008] (2): In the aspect of (1) above, the acquisition unit, the estimation unit, and the learning unit re-input the parameters in which the estimated inverse temperature is reflected in the updated parameters into the quantum computer, re-acquire the one or more samples of the restricted Boltzmann machine, and repeat the process of re-executing the estimation and update based on the one or more re-acquired samples.
[0009] (3): In the aspect of (1) above, the one or more samples include samples of the visible layer and the hidden layer of the restricted Boltzmann machine, and the estimation unit obtains a second sample of the visible layer from the sample of the hidden layer by Gibbs sampling, obtains a second sample of the hidden layer from the sample of the visible layer by Gibbs sampling, and estimates the inverse temperature by repeating a process of updating the inverse temperature based on the samples of the visible layer and the hidden layer and the second sample of the visible layer and the hidden layer obtained by Gibbs sampling.
[0010] (4) In the aspect (1) above, the estimation unit estimates a single inverse temperature for the restricted Boltzmann machine.
[0011] (5) In the above aspect (1), the estimation unit estimates the inverse temperature individually for each of the visible layer, the hidden layer, and the weight of the restricted Boltzmann machine.
[0012] (6): In the above aspect (1), the learning unit updates the parameters so as to reduce an index value representing the difference between the empirical distribution of the learning data and the distribution of the one or more samples.
[0013] (7): In the above aspect (1), the learning unit updates the parameters so as to reduce an index value representing the difference between the empirical distribution of the learning data and the distribution of the one or more samples.
[0014] (8): A learning method according to another aspect of the present invention is a learning method in which a computer learns a restricted Boltzmann machine using a quantum computer, the learning method comprising: inputting parameters of the restricted Boltzmann machine to the quantum computer; acquiring one or more samples of the restricted Boltzmann machine from the quantum computer; estimating an inverse temperature of the restricted Boltzmann machine with respect to the quantum computer based on the acquired one or more samples; and updating the parameters of the restricted Boltzmann machine based on training data of the restricted Boltzmann machine prepared in advance and the acquired one or more samples.
[0015] (9): Another aspect of the present invention provides a program for causing a computer to learn a restricted Boltzmann machine using a quantum computer, the program inputting parameters of the restricted Boltzmann machine to the quantum computer, causing the quantum computer to acquire one or more samples of the restricted Boltzmann machine from the quantum computer, estimating an inverse temperature of the restricted Boltzmann machine related to the quantum computer based on the acquired one or more samples, and updating the parameters of the restricted Boltzmann machine based on training data of the restricted Boltzmann machine prepared in advance and the acquired one or more samples.
[0016] According to aspects (1) to (9), it is possible to efficiently train a restricted Boltzmann machine while estimating the inverse temperature that changes over time, without incurring the cost of collecting a large number of samples.
[0017] FIG. 1 is a diagram showing a configuration of a system 1 including a learning device 100 according to an embodiment. FIG. 2 is a diagram showing an example of the configuration of a restricted Boltzmann machine 140A. FIG. 3 is a diagram for explaining mapping of the restricted Boltzmann machine 140A to a quantum annealing machine 200. FIG. 4 is a diagram for explaining an overview of parallel processing performed by an estimation unit 120 and a learning unit 130. FIG. 5 is a flowchart showing an example of the flow of processing performed by the learning device 100. FIG. 6 is a flowchart showing an example of the flow of inverse temperature estimation processing performed by the estimation unit 120.
[0018] Hereinafter, embodiments of a learning device, a learning method, and a program according to the present invention will be described with reference to the drawings.
[0019] 1 is a diagram showing the configuration of a system 1 including a learning device 100 according to an embodiment. As shown in FIG. 1, the system 1 includes the learning device 100 and a quantum annealing machine 200.
[0020] The learning device 100 is an information processing device that communicates with a quantum annealing machine 200 via a network NW and learns a restricted Boltzmann machine 140A based on training data 140B. The learning device 100 includes, for example, an acquisition unit 110, an estimation unit 120, a learning unit 130, and a storage unit 140. The acquisition unit 110, the estimation unit 120, and the learning unit 130 are realized by a hardware processor, such as a central processing unit (CPU), executing a program (software). Some or all of these components may be realized by hardware (including circuitry), such as a large-scale integration (LSI), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a graphics processing unit (GPU), or may be realized by a combination of software and hardware. The program may be stored in advance in a storage device (a storage device having a non-transitory storage medium) such as a hard disk drive (HDD) or flash memory, or may be stored in a removable storage medium (a non-transitory storage medium) such as a DVD or CD-ROM, and installed by inserting the storage medium into a drive device. The storage unit 140 is realized by, for example, a HDD, flash memory, an electrically erasable programmable read-only memory (EEPROM), a read-only memory (ROM), or a random access memory (RAM). The storage unit 140 stores a restricted Boltzmann machine 140A and training data 140B.
[0021] FIG. 2 illustrates an example of the configuration of the restricted Boltzmann machine 140A. As shown in FIG. 2, the restricted Boltzmann machine 140A is a probabilistic model expressed as an undirected graph, including a visible layer and a hidden layer in which no interactions occur within the same layer. The nodes v1 to vn (n is any positive integer) in the visible layer represent the probability distribution to be modeled by the restricted Boltzmann machine 140A, and the nodes h1 to hm (m is any positive integer) in the hidden layer represent explanatory variables for expressing the probability distribution using the model. Each node v1 to vn in the visible layer takes a value of 1 or 0, and their respective occurrence probabilities are represented as b1 to bn. Furthermore, each node h1 to hm in the hidden layer takes a value of 1 or 0, and their respective occurrence probabilities are represented as c1 to cM. Furthermore, in FIG. 2, the weight wij (i = 1 to n, j = 1 to m) represents the degree of correlation between the appearance of node vi in the visible layer and the appearance of node hj in the hidden layer. That is, when the weight wij is a positive value, it indicates that there is a positive correlation between the appearance probability of node vi and the appearance probability of node hj, and when the weight wij is a negative value, it indicates that there is a negative correlation between the appearance probability of node vi and the appearance probability of node hj. The storage unit 140 stores these parameters b1 to bn, h1 to hm, and wij (i = 1 to n, j = 1 to m) as the restricted Boltzmann machine 140A.
[0022] In this embodiment, each node v1 to vn in the visible layer represents a pixel in an image. For example, if a node vi in the visible layer has a value of 1, the value of the pixel corresponding to that node vi represents 1 (ON), and if a node vi in the visible layer has a value of 0, the value of the pixel corresponding to that node vi represents 0 (OFF). In the training data 140B, a value of 1 or 0 is previously associated with each pixel in one or more images.
[0023] Based on the above assumptions, if the nodes in the visible layer are denoted as v = {v1, v2, ..., vn}, the nodes in the hidden layer are denoted as h = {h1, h2, ..., hm}, and the parameters are denoted as θ = {w11, ..., wnm, b1, ..., bn, h1, ..., hm}, then v and h will follow the Boltzmann distribution of the following equation (1).
[0024] ...(1)
[0025] In formula (1), E represents the energy function defined by the following formula (2), and Z represents the partition function defined by the following formula (3). The smaller the value of the energy function E, the higher the probability of occurrence of v and h. The partition function Z normalizes the energy function E to ensure that the sum of the probability densities is 1.
[0026] ... (2)
[0027] ...(3)
[0028] The restricted Boltzmann machine 140A is trained by minimizing the KL divergence defined by equation (4) below.
[0029] ...(4)
[0030] In equation (4), χ represents all possible combinations of visible layer node v = {v1, v2, ..., vn}, Q represents the empirical distribution (true distribution) of training data 140B, and P(v|θ) represents the marginal distribution for visible layer node v obtained by eliminating hidden layer node h from equation (1) representing the joint distribution of visible layer node v and hidden layer node h. That is, P(v|θ) represents a probability model that should be brought closer to the empirical distribution Q, and the KL divergence is an index value representing the distance between the empirical distribution Q and the probability model P(v|θ).
[0031] Minimizing equation (4) is equivalent to maximizing the log-likelihood expressed by equation (5) below.
[0032] ...(5)
[0033] In equation (5), D represents the value of node v in the visible layer included in training data 140B, and ND represents the number of nodes v in the visible layer included in training data 140B. By partially differentiating equation (5) with respect to θ, the gradient represented by the following equation (6) is obtained.
[0034] ...(6)
[0035] In equation (6), <...>D and <...>χ respectively represent the average value over all possible combinations of the training data 140B and the visible layer nodes v = {v1, v2, ..., vn}. By rewriting equation (6) for each component, we obtain the update rule for each parameter, which is expressed by the following equation (7).
[0036] ... (7)
[0037] As described above, <...>χ represents the average value across all possible combinations of nodes v = {v1, v2, ..., vn} in the visible layer, so the number is 2n, making it unrealistic to directly calculate equation (7). In conventional techniques, Gibbs sampling, a type of Markov Chain Monte Carlo method (MCMC), is used to generate samples from the restricted Boltzmann machine 140A undergoing training, and the parameter θ is updated so as to bring the distribution of the generated samples closer to the empirical distribution Q. However, the MCMC method generally has the problem of high computational cost.
[0038] In light of these circumstances, this embodiment uses a quantum annealing machine 200 that can generate random numbers based on physical properties rather than calculations. More specifically, the acquisition unit 110 inputs parameters of the restricted Boltzmann machine 140A to the quantum annealing machine 200 via the network NW and acquires samples of the restricted Boltzmann machine 140A according to the input parameters from the quantum annealing machine 200. Here, the samples acquired from the quantum annealing machine 200 include samples of nodes v1 to vn in the visible layer and nodes h1 to hm in the hidden layer. Therefore, the learning unit 130 can train the restricted Boltzmann machine 140A (update the parameter θ) according to equation (7) based on the empirical distribution Q of the training data 140B and the distribution of the samples acquired from the quantum annealing machine 200.
[0039] Here, there is generally a limit to the number of connections between quantum bits due to hardware constraints of the quantum annealing machine 200. Therefore, in order to acquire samples from the quantum annealing machine 200, the acquisition unit 110 maps the restricted Boltzmann machine 140A into a form (for example, an Ising model or QUBO) that is compatible with calculations by the quantum annealing machine 200.
[0040] 3 is a diagram illustrating the mapping of the restricted Boltzmann machine 140A to the quantum annealing machine 200. As an example, FIG. 3 illustrates a case where the quantum annealing machine 200 has Chimera graph-based hardware. As shown in FIG. 3, each node of the restricted Boltzmann machine 140A is embedded in the Chimera graph as two Ising spins to maintain the representation of interactions (16 nodes in the restricted Boltzmann machine 140A are embedded as 32 Ising spins in the Chimera graph). This embedding allows the quantum annealing machine 200 to generate samples of the restricted Boltzmann machine 140A represented as a Chimera graph.
[0041] [Estimation of Inverse Temperature] As described above, in this embodiment, the acquisition unit 110 maps the restricted Boltzmann machine 140A into a form compatible with calculations by the quantum annealing machine 200, and then inputs the mapped data to the quantum annealing machine 200 to acquire samples from the quantum annealing machine 200 for use in learning by the learning unit 130. However, in general, the samples output from the quantum annealing machine 200 are biased (inverse temperature) compared to the true distribution of the parameters of the input restricted Boltzmann machine 140A. More specifically, when the inverse temperature of the restricted Boltzmann machine 140A related to the quantum annealing machine 200 is expressed as β and the QUBO matrix is generated by Equation (2), the samples generated by the quantum annealing machine 200 follow a distribution expressed by the following Equation (8), in which the influence of the inverse temperature β is reflected in Equation (1).
[0042] ...(8)
[0043] In equation (8), β represents the inverse temperature, and Zβ represents the partition function. If the inverse temperature β can be estimated, the parameter θ is divided by the inverse temperature β (in other words, the influence of the inverse temperature β is reflected) to construct a QUBO matrix, thereby making it possible to obtain a sample from the quantum annealing machine 200 from which the influence of the inverse temperature β has been removed.
[0044] The estimation unit 120 estimates the inverse temperature βeff based on the samples output from the quantum annealing machine 200, with the parameter θ fixed. More specifically, the estimation unit 120 estimates the inverse temperature β by minimizing the distance between the distribution P(v, h|θ, β) expressed by equation (8) and the empirical distribution of the samples output from the quantum annealing machine 200. To achieve minimization, the estimation unit 120 maximizes the log-likelihood expressed by the following equation (9), with the parameter θ fixed.
[0045] ...(9)
[0046] In equation (9), S represents a set of samples, and SD represents the number of samples included in the set of samples. As described above, the quantum annealing machine 200 generates samples of nodes in the visible layer and the hidden layer. Therefore, unlike equation (4) for training the restricted Boltzmann machine 140A, the probability distribution represented by equation (9) is not a marginal distribution for the visible layer. When equation (9) is transformed assuming the inverse temperature βeff of equation (8) as an internal variable, the following equation (10) is obtained.
[0047] ...(10)
[0048] Therefore, by differentiating equation (10) with respect to βeff, the update rule expressed by the following equation (11) is obtained.
[0049] ...(11)
[0050] Similar to equation (6), <...>χ in equation (11) means the average value across all possible combinations of nodes, and therefore the number is a power of 2. Therefore, in this embodiment, instead of equation (11), the estimation unit 120 obtains a new sample by performing Gibbs sampling from the sample output from the quantum annealing machine 200, and estimates the inverse temperature βeff by comparing the distance from the original sample.
[0051] More specifically, the estimation unit 120 first sets the inverse temperature βeff and the inverse temperature intermediate variable βtmp to 1. Next, the estimation unit 120 acquires the visible layer sample v0 and the hidden layer sample h0 output from the quantum annealing machine 200. Next, the estimation unit 120 performs Gibbs sampling from the hidden layer sample h0 according to the visible layer marginal distribution P(v|h, θ, βtmp) to acquire the visible layer sample v1. At the same time, the estimation unit 120 performs Gibbs sampling from the visible layer sample v0 according to the hidden layer marginal distribution P(h|v, θ, βtmp) to acquire the hidden layer sample h1. Next, the estimation unit 120 calculates the distance between the value obtained by substituting the acquired samples v0 and h0 into the energy function E and the value obtained by substituting the samples v1 and h1 obtained by Gibbs sampling into the energy function E using the following equation (12), which corresponds to equation (11).
[0052] ...(12)
[0053] The estimation unit 120 repeats the calculation of equation (12) until a stopping condition (e.g., a predetermined number of times) is met. More specifically, the estimation unit 120 performs Gibbs sampling again from the hidden layer sample h1 obtained by Gibbs sampling according to the marginal distribution P(v|h, θ, βtmp) of the visible layer to obtain the visible layer sample v2. At the same time, the estimation unit 120 performs Gibbs sampling from the visible layer sample v1 obtained by Gibbs sampling according to the marginal distribution P(h|v, θ, βtmp) of the hidden layer to obtain the hidden layer sample h2. The estimation unit 120 calculates the distance between the value obtained by substituting the samples v1 and h1 obtained by the Gibbs sampling into the energy function E and the value obtained by substituting the samples v2 and h2 obtained by the current Gibbs sampling into the energy function E using equation (12). When the stop condition is met, the estimation unit 120 updates the inverse temperature βeff as βeff=βeffβtmp and acquires it as an estimated value.
[0054] [Parallel Processing of Parameter Learning and Inverse Temperature Estimation] In this embodiment, the learning of the parameter θ by the learning unit 130 and the estimation of the inverse temperature βeff by the estimation unit 120 described above can be executed in parallel. FIG. 4 is a diagram for explaining an overview of the parallel processing executed by the estimation unit 120 and the learning unit 130. First, the acquisition unit 110 randomly initializes the parameter θ, sets the inverse temperature βeff to 1, and inputs θ / βeff = θ to the quantum annealing machine 200. At this time, as described with reference to FIG. 3, the acquisition unit 110 inputs the parameter θ of the restricted Boltzmann machine 140A after mapping it into a form compatible with calculations by the quantum annealing machine 200.
[0055] Upon receiving the parameter θ / βeff, the quantum annealing machine 200 generates a sample of the restricted Boltzmann machine 140A according to the received parameter θ / βeff and transmits it to the learning device 100. When the learning device 100 acquires the sample, the learning unit 130 updates the parameter θ according to equation (7) based on the empirical distribution Q of the training data 140B and the distribution of the samples acquired from the quantum annealing machine 200. At the same time, the estimation unit 120 updates the inverse temperature βeff by repeating the calculation of equation (12) based on the samples acquired from the quantum annealing machine 200.
[0056] The acquisition unit 110 divides the parameter θ updated by the learning unit 130 by the inverse temperature βeff estimated by the estimation unit 120 (i.e., reflects the influence of the inverse temperature βeff) to obtain a parameter θ / βeff, which is input to the quantum annealing machine 200, and the estimation unit 120 and the learning unit 130 repeat the same process. As described above, according to the present embodiment, the learning of the parameters by the learning unit 130 and the estimation of the inverse temperature by the estimation unit 120 are performed in parallel, so that it is not necessary to collect a large number of samples in advance for estimating the inverse temperature, and it is possible to efficiently learn the restricted Boltzmann machine while estimating the inverse temperature that changes over time.
[0057] [Processing Flow] Next, the processing flow executed by the learning device 100 will be described with reference to Figures 5 and 6. Figure 5 is a flowchart showing an example of the processing flow executed by the learning device 100. First, the acquisition unit 110 initializes the parameters and inverse temperature of the restricted Boltzmann machine 140A (step S100). Next, the acquisition unit 110 reflects the inverse temperature in the parameters of the restricted Boltzmann machine 140A and inputs it to the quantum annealing machine 200 (step S102). Next, the acquisition unit 110 acquires a sample from the quantum annealing machine 200 (step S104).
[0058] Next, the estimation unit 120 estimates the inverse temperature based on the samples acquired from the quantum annealing machine 200 (step S106). Next, the learning unit 130 updates the parameters of the restricted Boltzmann machine 140A based on the samples acquired from the quantum annealing machine 200 and the learning data 140B (step S108). As described above, since the estimation by the estimation unit 120 and the learning by the learning unit 130 can be performed in parallel, the processing of step S106 and the processing of step S108 may be performed in reverse order or may be performed simultaneously.
[0059] Next, the learning unit 130 determines whether the stop condition is satisfied (step S110). If it is determined that the stop condition is not satisfied, the learning unit 130 returns the process to step S102. On the other hand, if it is determined that the stop condition is satisfied, the learning unit 130 acquires the restricted Boltzmann machine 140A at the time when the stop condition is satisfied as a trained model (step S112). This ends the process of this flowchart.
[0060] 6 is a flowchart showing an example of the flow of the inverse temperature estimation process executed by the estimation unit 120. The process of the flowchart shown in FIG. 6 is a detailed illustration of step S106 in the flowchart shown in FIG.
[0061] First, the estimation unit 120 initializes intermediate variables of the inverse temperature (step S200). Next, the estimation unit 120 sets the samples of the visible layer and the hidden layer obtained from the quantum annealing machine 200 as first samples (step S202). Next, the estimation unit 120 obtains a second sample of the visible layer from the first sample of the hidden layer by Gibbs sampling (step S204). Next, the estimation unit 120 obtains a second sample of the hidden layer from the first sample of the visible layer by Gibbs sampling (step S206). Note that the processing of step S204 and the processing of step S206 may be performed in reverse order or simultaneously.
[0062] Next, the estimation unit 120 calculates the distance between the first sample and the second sample according to Equation (12) and adds it to the intermediate variable (step S208). Next, the estimation unit 120 determines whether the stop condition is met (step S210). If it is determined that the stop condition is not met, the estimation unit 120 sets the second sample as the first sample (step S212) and returns the process to step S204. On the other hand, if it is determined that the stop condition is met, the estimation unit 120 multiplies the inverse temperature by the intermediate variable at the time the stop condition is met, thereby completing the estimation of the inverse temperature (step S214). This ends the process of this flowchart.
[0063] [Modification] In the above embodiment, as an example, a case has been described in which the estimation unit 120 estimates a single inverse temperature for the restricted Boltzmann machine 140A. However, as a modification, the estimation unit 120 may estimate an inverse temperature separately for each of the visible layer, hidden layer, and weight of the restricted Boltzmann machine 140A. In this case, the samples output from the quantum annealing machine 200 will follow the distribution expressed by the following equation (13) instead of equation (8).
[0064] ...(13)
[0065] In equation (13), Bvh represents the inverse temperature for the weight, Bv represents the inverse temperature for the visible layer, and Bh represents the inverse temperature for the hidden layer. Based on the distribution of equation (13), by performing the same transformation as equations (9) and (10), the update rule expressed by the following equation (14) is obtained.
[0066] ...(14)
[0067] Furthermore, as another modification, the estimation unit 120 may estimate the inverse temperature individually for each of the nodes and weights in the visible and hidden layers of the restricted Boltzmann machine 140A. In this case, the samples output from the quantum annealing machine 200 will follow the distribution expressed by the following equation (15) instead of equation (8).
[0068] ...(15)
[0069] In equation (15), Bvh represents the inverse temperature for the weight, Bvi represents the inverse temperature for each node vi in the visible layer, and Bhj represents the inverse temperature for each node hj in the hidden layer. Assuming the distribution of equation (15), the update rule expressed by the following equation (16) is obtained by transforming the equation in the same way as equations (9) and (10) (the update rule for the inverse temperature Bvh for the weight is the same as equation (14)).
[0070] ...(16)
[0071] The estimation unit 120 can update and estimate individual inverse temperatures by performing Gibbs sampling from the samples output from the quantum annealing machine 200 according to the distribution represented by equation (13) or equation (15) to obtain new samples, and comparing the distance from the original samples according to equation (14) or equation (16).
[0072] According to the present embodiment described above, parameters of the restricted Boltzmann machine are input to a quantum computer, one or more samples of the restricted Boltzmann machine are acquired from the quantum computer, the inverse temperature of the restricted Boltzmann machine for the quantum computer is estimated based on the acquired one or more samples, and the parameters of the restricted Boltzmann machine are updated based on training data of the restricted Boltzmann machine prepared in advance and the acquired one or more samples. This makes it possible to efficiently train the restricted Boltzmann machine while estimating the inverse temperature that changes over time, without incurring the cost of collecting a large number of samples.
[0073] The above-described embodiment can be expressed as follows: A learning device comprising: a storage medium storing computer-readable instructions; and a processor connected to the storage medium, wherein the processor is configured to, in order to learn a restricted Boltzmann machine using a quantum computer, by executing the computer-readable instructions to: input parameters of the restricted Boltzmann machine to the quantum computer and acquire one or more samples of the restricted Boltzmann machine from the quantum computer; estimate an inverse temperature of the restricted Boltzmann machine related to the quantum computer based on the acquired one or more samples; and update the parameters of the restricted Boltzmann machine based on previously prepared learning data of the restricted Boltzmann machine and the acquired one or more samples.
[0074] The above describes the form for carrying out the present invention using an embodiment, but the present invention is not limited to such an embodiment, and various modifications and substitutions can be made within the scope that does not deviate from the gist of the present invention.
[0075] 100 Learning device 110 Acquisition unit 120 Estimation unit 130 Learning unit 140 Storage unit 140A Restricted Boltzmann machine 140B Learning data 200 Quantum annealing machine
Claims
1. A learning device that learns a restricted Boltzmann machine using a quantum computer, comprising: an acquisition unit that inputs parameters of the restricted Boltzmann machine to the quantum computer and acquires one or more samples of the restricted Boltzmann machine from the quantum computer; an estimation unit that estimates an inverse temperature of the restricted Boltzmann machine with respect to the quantum computer based on the acquired one or more samples; and a learning unit that updates the parameters of the restricted Boltzmann machine based on previously prepared learning data of the restricted Boltzmann machine and the acquired one or more samples.
2. The learning device described in claim 1, wherein the acquisition unit, the estimation unit, and the learning unit re-input the parameters in which the estimated inverse temperature is reflected in the updated parameters to the quantum computer, re-acquire the one or more samples of the restricted Boltzmann machine, and repeat the process of re-executing the estimation and updating based on the one or more re-acquired samples.
3. The learning device of claim 1, wherein the one or more samples include samples of a visible layer and a hidden layer of the restricted Boltzmann machine, and the estimation unit obtains a second sample of the visible layer from the sample of the hidden layer by Gibbs sampling, obtains a second sample of the hidden layer from the sample of the visible layer by Gibbs sampling, and estimates the inverse temperature by repeating a process of updating the inverse temperature based on the samples of the visible layer and the hidden layer and the second sample of the visible layer and the hidden layer obtained by Gibbs sampling.
4. The learning device according to claim 1 , wherein the estimation unit estimates a single inverse temperature for the restricted Boltzmann machine.
5. The learning device according to claim 1, wherein the estimation unit estimates the inverse temperature separately for each of a visible layer, a hidden layer, and a weight of the restricted Boltzmann machine.
6. The learning device according to claim 1, wherein the estimation unit estimates the inverse temperature for each of one or more nodes and weights in a visible layer and a hidden layer of the restricted Boltzmann machine individually.
7. The learning device according to claim 1, wherein the learning unit updates the parameters so as to reduce an index value representing a difference between an empirical distribution of the learning data and a distribution of the one or more samples.
8. A learning method for a computer to learn a restricted Boltzmann machine using a quantum computer, comprising: inputting parameters of the restricted Boltzmann machine to the quantum computer, and acquiring one or more samples of the restricted Boltzmann machine from the quantum computer; estimating an inverse temperature of the restricted Boltzmann machine with respect to the quantum computer based on the acquired one or more samples; and updating the parameters of the restricted Boltzmann machine based on previously prepared learning data of the restricted Boltzmann machine and the acquired one or more samples.
9. A program for causing a computer to learn a restricted Boltzmann machine using a quantum computer, comprising: inputting parameters of the restricted Boltzmann machine to the quantum computer; acquiring one or more samples of the restricted Boltzmann machine from the quantum computer; estimating an inverse temperature of the restricted Boltzmann machine related to the quantum computer based on the acquired one or more samples; and updating the parameters of the restricted Boltzmann machine based on previously prepared learning data of the restricted Boltzmann machine and the acquired one or more samples.
Citation Information
Patent Citations
A hybrid quantum-classical computer system for implementing and optimizing quantum Boltzmann machines
JP2022511331A