Calculation program, calculation method, and information processing device

By expanding discrete variables into continuous variables and controlling bias strength, the method addresses inefficient sampling from complex distributions, enhancing efficiency and reducing computational requirements.

JP2026041030APending Publication Date: 2026-03-10FUJITSU LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing methods struggle with appropriate sampling from complex probability distributions, particularly multi-peaked distributions, leading to biased and inefficient sampling.

Method used

The method involves expanding a discrete variable indicating 1 or 0 into a continuous variable ranging from 0 to 1, controlling the bias strength of this continuous variable during sampling, and using gradient-based Markov chain Monte Carlo methods with continuous relaxation to facilitate efficient transitions.

Benefits of technology

This approach enables appropriate sampling, reduces computational resources, and allows for high-speed transitions through the state space, improving sampling efficiency and applicability to complex distributions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026041030000001_ABST
    Figure 2026041030000001_ABST
Patent Text Reader

Abstract

A calculation program, a calculation method, and an information processing device that can realize appropriate sampling are provided. [Solution] The calculation program causes the computer to execute a process in which, when sampling from the probability distribution of a discrete variable, the discrete variable indicating 1 or 0 is expanded into a continuous variable ranging from 0 to 1, and during the sampling process, the strength of the bias of whether the expanded continuous variable resembles 1 / 2 or 0 or 1 is controlled.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a computing program, a computing method, and an information processing device. [Background technology]

[0002] Techniques for sampling complex probability distributions have been disclosed (see, for example, Patent Documents 1 to 3). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Special Publication No. 2024-513576 [Patent Document 2] U.S. Patent Publication No. 2009 / 0287623 [Patent Document 3] Japanese Patent Publication No. 2021-197189 Summary of the Invention [Problem to be solved by the invention]

[0004] However, if the probability distribution is complex, such as multi-peaked, there is a risk that appropriate sampling may not be achieved.

[0005] In one aspect, the present invention aims to provide a calculation program, a calculation method, and an information processing device that can realize appropriate sampling. [Means for solving the problem]

[0006] In one embodiment, the calculation program causes the computer to execute a process in which, when sampling from a probability distribution of a discrete variable, the discrete variable indicating 1 or 0 is expanded into a continuous variable ranging from 0 to 1, and during the sampling process, the strength of the bias of whether the expanded continuous variable resembles 1 / 2 or 0 or 1 is controlled. [Effects of the Invention]

[0007] Appropriate sampling can be achieved. [Brief explanation of the drawings]

[0008] [Figure 1] 1A is a diagram illustrating a probability distribution p(x), FIG. 1B is a diagram illustrating a static Monte Carlo method, and FIG. 1C is a diagram illustrating a Markov chain Monte Carlo method. [Figure 2] 10A is a diagram illustrating a case where a transition is made only to a state that is not very different from the immediately preceding state, and FIG. 10B is a diagram illustrating a case where a transition is made to a state that is as different as possible from the immediately preceding state. [Figure 3] FIG. 10 is a diagram illustrating a local transition. [Figure 4] This shows an example of the Metropolis method applied to a two-dimensional two-component Gaussian distribution. [Figure 5] 1A is a functional block diagram illustrating the overall configuration of an information processing apparatus according to a first embodiment, and FIG. 1B is a hardware configuration diagram of the information processing apparatus. [Figure 6] 10 is a flowchart illustrating an example of an operation of the information processing device. DETAILED DESCRIPTION OF THE INVENTION

[0009] Markov chain Monte Carlo (MCMC) methods are being applied to a wide range of statistical problems, such as large-scale numerical calculations of proteins and Bayesian statistics. Markov chain Monte Carlo methods are applied, for example, to many-body problems that arise in physics. This is because many-body problems that arise in physics are generally infeasible for analytical calculations, and it is necessary to sample the state of the physical system to investigate its properties. Markov chain Monte Carlo methods are also applied to Bayesian statistics for data analysis. This is because Bayesian statistics requires sampling from the posterior distribution when fitting experimental data to an effective model.

[0010] Sampling here means taking a specific sample from a probability distribution p(x) that is explicitly given by a mathematical formula. Figure 1(a) shows an example of a probability distribution p(x). Taking a sample is equivalent to generating random numbers from a given probability distribution.

[0011] The Monte Carlo method is a general term for methods of sampling from a probability distribution p(x). In a broader sense, the Monte Carlo method is a general term for methods of performing numerical calculations using random numbers.

[0012] The static Monte Carlo method is a general term for sampling methods that do not use Markov chains. A Markov chain is a stochastic process in which the current state depends only on the previous state. As illustrated in Figure 1(b), sampling is performed without depending on the state immediately before the sampling process. In Figure 1(b), each circle represents a sampling point, and they do not have any interdependence with each other. With this type of static Monte Carlo method, it is difficult to sample high-dimensional probability distributions.

[0013] The Markov chain Monte Carlo method is a general term for methods that use Markov chains for sampling. In the Markov chain Monte Carlo method, sampling is performed depending on the state immediately before the sampling process, as shown in Figure 1(c). In Figure 1(c), the starting point of the arrow represents the previous sampling point, and the end point of the arrow represents the next sampling point.

[0014] The Markov chain Monte Carlo method allows transitions to states that are as different as possible from the previous state. By transitioning to a state that is different from the previous state, the autocorrelation of the sample sequence is reduced, and the number of valid samples that can be considered independent increases. Furthermore, the Markov chain Monte Carlo method allows transitions to the entire space of random variables in a realistic amount of time.

[0015] For example, if transitions are made only to states that are not significantly different from the immediately preceding state, the sampling area may become biased, resulting in inefficient sampling, as shown in Figure 2(a).In contrast, if transitions are made to states that are as different as possible from the immediately preceding state, the sampling area will not become biased, improving sampling efficiency, as shown in Figure 2(b).

[0016] For a Markov chain to converge to a desired probability distribution, the transition probability K(X'|X) from a state X to a state X' must satisfy the following two necessary conditions: (1) Balance conditions ∫p(x)K(x´|x)dx=p(x´) (2) Ergodic conditions The transition probability between any two states X and X' is non-zero and can be expressed as the product of a finite number of non-zero transition probabilities.

[0017] It is difficult to construct a Markov chain that satisfies the balance condition (1) above. Therefore, instead, we construct the transition probabilities using the detailed balance condition p(x)K(x'|x)=p(x')K(x|x'), which is a stronger condition.

[0018] Next, we will explain the Metropolis method, which is a specific example of a Markov chain Monte Carlo method that satisfies the detailed balance condition above. First, x' is generated according to a certain proposal distribution q(x'|x). Next, x' is selected as the next state with the selection probability A(x', x) in the following equation (1).

number

[0019] Typically, local transitions are used. For example, a local proposal distribution is used for the proposal distribution q(x'|x). In the binary case, the dimension of x is randomly selected and the value of the selected x is inverted. For example, as shown in Figure 3, the fourth "1" from the top of x is inverted to "0" in x'. In this case, if A(x', x) becomes smaller, x' is adopted and x is rejected.

[0020] The challenges of local transitions are as follows. First, if a large transition is made from the previous state, most states will not be adopted. For example, if all of the x variables in Figure 3 are inverted, no state will be adopted. Also, in the case of discrete probability distributions, gradient information cannot be used. Furthermore, for certain problems, such as multi-peak distributions, the probability of transitioning to a certain state becomes small, which may result in no transition being made, leading to erroneous results. For example, Figure 4 shows an example of the Metropolis method applied to a two-dimensional, two-component Gaussian distribution. The broken line represents the first 150 transitions. In the example in Figure 4, sampling is performed around one peak (the peak in the upper right), but not around the other peak (the peak in the lower left).

[0021] Therefore, in the following embodiment, an example in which sampling can be performed appropriately will be described. [Example]

[0022] First, the principle of this embodiment will be explained. In the first embodiment, a continuously relaxed extended ensemble system is defined, and an efficient Markov chain Monte Carlo method is realized by exchange within the ensemble and gradient-based local transition.

[0023] First, the discrete state space x∈{0,1} N The probability distribution defined by the real random variable w∈R N p(x) → p(σ(w)) ≡ p(w) is transformed using the above equation. Here, x is a discrete variable vector represented by 0 and 1, and has N elements. σ is a vector of R N →R N It represents the element-wise sigmoid operation of and takes a continuous value from 0 to 1.

[0024] One example is the conversion of the following equation (2) for a system with energy in QUBO format. Note that QUBO stands for Quadratic Unconstrained Binary Optimization, which is a format that allows binary optimization without quadratic constraints.

number

[0025] Next, we introduce a term into the probability distribution p(w) that represents the strength of the bias, i.e., whether the continuous variable expanded from the discrete variable resembles 1 / 2 or 0 or 1. For example, we define the probability distribution of the following formula (3) that takes into account continuous relaxation annealing. In the following formula (3), by setting γ to -∞, σ(w)=1 N / 2. By setting γ to +∞, σ(w)∈{0,1} N Support is concentrated at the extreme points of . Therefore, γ represents the strength of the bias of whether the continuous variable expanded from the discrete variable resembles 1 / 2 or 0 or 1. While controlling γ during the sampling process, sampling of local transitions is repeated.

number

[0026] Next, we define the distribution of the following formula (4). By defining the distribution of the following formula (4), we can define γ from small to large. By executing gradient-based Markov chain Monte Carlo (Langevin, Hamiltonian MCMC) on the distribution of the following formula (4) and exchanging a randomly selected i with j at an appropriate timing, we can quickly transition through the state space. Note that gradient-based Markov chain Monte Carlo determines state transitions based on the probability based on the rate of change of the gradient of the probability distribution.

number

[0027] The method of exchanging i and j is not particularly limited, but may be designed to satisfy the detailed balance condition during the exchange. For example, i ,w j One method is to exchange them with the probability given by the following formula (5).

number

[0028] As described above, in this embodiment, when sampling from the discrete probability distribution of a discrete variable, the discrete variable indicating 1 or 0 is expanded to a continuous variable ranging from 0 to 1, and in the sampling process, the strength of the bias of whether the expanded continuous variable resembles 1 / 2 or 0 or 1 is controlled. By controlling the strength of the bias in this way, gradient-based local transition becomes possible, and appropriate sampling becomes possible. If sampling can be performed appropriately, the computational resources of the computer can be reduced, thereby realizing an improvement in the computer. In addition, in the sampling process, γ i and γ j By exchanging the state space with the state space, it becomes possible to transition the state space at high speed.

[0029] Next, we will explain how to apply this to mathematical optimization. Mathematical optimization is an optimization problem formulated as in the following equation (6). In the following equation (6), x is a vector represented by 0 and 1, and has N elements.

number

[0030] For this function, for example, the exponential distribution of the following formula (7) is defined. In p(x;β) in the following formula (7), x represents a variable and β represents a constant. This exponential distribution converges to a uniform distribution on optimization in the limit of β → ∞.

number

[0031] The probability distribution where β is sufficiently large is sampled using the gradient-based Markov chain Monte Carlo method using continuous relaxation in this embodiment. The sampled x becomes a sample sequence near the minimum value of E(x). In this way, this embodiment can be applied to mathematical optimization.

[0032] Next, we will explain how to apply this technology to applications. ChatOpt is an expert-free chat application that leverages the ability to formulate problems promptly using a large-scale language model and collaborates with external solvers. A challenge with ChatOpt is that the formulation performed by the large-scale language model often results in a nonlinear cost function. A nonlinear cost function can potentially render existing optimization solvers (such as linear programming methods like Gurobi or quadratic forms like Digital Annealer) unusable. In contrast, an extended ensemble using continuous relaxation annealing, as in this embodiment, can handle any format, making it easy to connect to a large-scale language model. For example, the cost function obtained by the formulation performed by the large-scale language model described above can be treated as a probability distribution, and this probability distribution can be sampled using the gradient-based Markov chain Monte Carlo method with continuous relaxation in this embodiment. Even if the probability distribution is nonlinear, it can be formulated by sampling using the gradient-based Markov chain Monte Carlo method with continuous relaxation in this embodiment. This allows the probability distribution to be provided to an external solver. The large-scale language model is, for example, a trained language model composed of a neural network. Furthermore, a large-scale language model is a language model that performs learning using, for example, a large amount of calculation, data, and parameters, and that receives natural language as input, executes the learned processing, and returns a response.

[0033] Next, a device configuration for realizing the above solution principle will be described. Fig. 5(a) is a functional block diagram showing the overall configuration of an information processing device 100 according to the first embodiment. The information processing device 100 is a sampling server or the like. As illustrated in Fig. 5(a), the information processing device 100 functions as a probability distribution storage unit 10, a bias generation unit 20, a sampling unit 30, an output unit 40, and the like.

[0034] For example, when sampling from the probability distribution of a discrete variable, the sampling unit 30 expands the discrete variable, which indicates 1 or 0, into a continuous variable ranging from 0 to 1, and during the sampling process, controls the strength of the bias of whether the expanded continuous variable resembles 1 / 2 or 0 or 1.

[0035] Furthermore, when the probability distribution expanded to a continuous variable is p(w), the bias strength is γ, and σ is a sigmoid operation, the sampling unit 30 performs sampling by controlling γ using the following formula.

number

[0036] Furthermore, the sampling unit 30 defines γ from small to large in the following formula, and exchanges i and j during sampling.

number

[0037] Furthermore, the sampling unit 30 uses a cost function obtained by formulation performed by a large-scale language model as a probability distribution of a discrete variable, and provides the cost function obtained by sampling to the external solver.

[0038] Fig. 5(b) is a hardware configuration diagram of the information processing device 100. As illustrated in Fig. 5(b), the information processing device 100 includes a CPU 101, a RAM 102, a storage device 103, an input device 104, a display device 105, and the like.

[0039] The CPU (Central Processing Unit) 101 is a central processing unit. The CPU 101 includes one or more cores. The RAM (Random Access Memory) 102 is a volatile memory that temporarily stores programs executed by the CPU 101, data processed by the CPU 101, and the like. The storage device 103 is a non-volatile storage device. Examples of the storage device 103 include a read-only memory (ROM), a solid-state drive (SSD) such as a flash memory, and a hard disk driven by a hard disk drive. The storage device 103 stores a calculation program. The input device 104 is a device for a user to input necessary information, such as a keyboard or a mouse. The display device 105 is a display device that displays the sampling results output by the output unit 40 on a screen. The CPU 101 executes the calculation program to realize each unit of the information processing device 100. Each unit of the information processing device 100 may be implemented using hardware such as a dedicated circuit.

[0040] Fig. 6 is a flowchart illustrating an example of the operation of the information processing device 100. As illustrated in Fig. 6, the bias generation unit 20 generates Path γ of the above formula (4) for the probability distribution stored in the probability distribution storage unit 10 (step S1).

[0041] Next, the sampling unit 30 sets the initial state of the Markov chain Monte Carlo method (step S2). For example, the sampling unit 30 sets each parameter of the Markov chain Monte Carlo method to a predetermined initial value.

[0042] Next, the sampling unit 30 performs gradient local transitions of each γi M (≧2) times using the probability distribution of the above equation (3) (step S3).

[0043] Next, the sampling unit 30 calculates (γ i ,γ i+1 ) is exchanged (step S4).

[0044] Next, the sampling unit 30 determines whether a stopping condition is satisfied (step S5). For example, the sampling unit 30 determines the degree of convergence of a statistical quantity by detecting whether the amount of change in the statistical quantity, such as the mean value, median value, variance, or standard deviation at each sampling point, is equal to or less than a threshold value.

[0045] If the determination in step S5 is "No," the process is executed again from step S3. If the determination in step S5 is "Yes," the output unit 40 outputs the sampling result (step S6). For example, the display device 105 displays the sampling result output by the output unit 40. Thereafter, the execution of the flowchart ends.

[0046] Although the embodiments of the present invention have been described in detail above, the present invention is not limited to such specific embodiments, and various modifications and variations are possible within the scope of the gist of the present invention as defined in the claims. (Appendix 1) On the computer, A computing program characterized by executing a process in which, when sampling from the probability distribution of a discrete variable, a discrete variable that indicates 1 or 0 is expanded into a continuous variable ranging from 0 to 1, and during the sampling process, the strength of the bias of the expanded continuous variable is controlled to determine whether it is similar to 1 / 2 or 0 or 1. (Appendix 2) The calculation program according to appendix 1, characterized in that, when the probability distribution expanded to a continuous variable is p(w), the strength of the bias is γ, and σ is a sigmoid operation, sampling is performed by controlling γ using the following formula.

number

number

number

number

number

number

[0047] 10 Probability distribution storage section 20 Bias generation unit 30 Sampling section 40 Output section 100 Information processing device 101 CPU 102 RAM 103 Storage device 104 Input Device 105 Display device

Claims

1. On the computer, A computational program characterized by executing a process in which, when sampling from a probability distribution of a discrete variable, a discrete variable indicating 1 or 0 is expanded into a continuous variable ranging from 0 to 1, and during the sampling process, the strength of the bias of the expanded continuous variable is controlled to determine whether it is similar to 1 / 2 or similar to 0 or 1.

2. The calculation program according to claim 1, characterized in that, when the probability distribution expanded to a continuous variable is p(w), the strength of the bias is γ, and σ is a sigmoid operation, sampling is performed by controlling γ using the following formula: [0016]

3. 3. The calculation program according to claim 2, wherein γ is defined from small to large by the following formula, and i and j are exchanged during the sampling. [Equation 17]

4. A cost function obtained by formulation performed by a large-scale language model is used as the probability distribution of the discrete variables, 2. The computing program according to claim 1, wherein the computer is caused to execute a process of providing the cost function obtained by sampling to an external solver.

5. The computer A computational method characterized by performing a process in which, when sampling from a probability distribution of a discrete variable, a discrete variable that indicates 1 or 0 is expanded into a continuous variable ranging from 0 to 1, and during the sampling process, the strength of the bias of the expanded continuous variable is controlled based on whether it is similar to 1 / 2 or similar to 0 or 1.

6. An information processing device characterized by comprising a sampling unit that, when sampling from a probability distribution of a discrete variable, expands a discrete variable that indicates 1 or 0 into a continuous variable ranging from 0 to 1, and controls the strength of bias of whether the expanded continuous variable resembles 1 / 2 or 0 or 1 during the sampling process.

Citation Information

Patent Citations

  • Execution of time-series prediction of computer-controlled system

    JP2021197189A

  • SYSTEM AND METHOD FOR IMPROVING COMPUTATIONAL EFFICIENCY OF PROCESSOR-BASED DEVICES IN SOLVING CONSTRAINED QUADRATIC MODELS - Patent application

    JP2024513576A

  • Method and apparatus for using bayesian networks for localization

    US20090287623A1