Random number generation device, random number generation method, and random number generation program
By generating a matrix with a probability distribution sample of zero mean and finite variance, linearly summing of independent normal random numbers is solved, and a complex problem of matrix generation in the prior art is realized, and a simplified and efficient process of generating approximately independent normal random numbers is realized.
Patent Information
- Application Number
- JP2022065876
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2025-04-16
- Estimated Expiration
- 2042-04-12
AI Technical Summary
When generating independent normal random numbers, the prior art depends on the linear summation of (quasi-) orthogonal matrix, and the matrix generation is complex and requires the use of existing normal random numbers samples, resulting in a cumbersome generation process.
A new method is adopted to generate an m×l matrix R sampled by a probability distribution of zero mean and finite variance, and use this matrix to linearly sum independent normal random number samples to generate an approximately independent normal random number sequence.
The process of generating approximately independent normal random numbers is simplified, making them more efficient and easy to implement, no longer requires complex (quasi-) orthogonal matrix generation, and the generated random number sequence is statistically approximately independent.
Smart Images

Figure 0007663532000066 
Figure 0007663532000067 
Figure 0007663532000068
Abstract
Description
[Technical field]
[0001] The present invention relates to a random number generation device, a random number generation method, and a random number generation program that reuse samples to generate mutually independent normal random numbers. [Background technology]
[0002] Assume that we want to generate independent normal random numbers by reusing samples of random random variables X that are independent of each other and follow an m-dimensional multivariate normal distribution with uniform variance.
[0003] [Multivariate normal distribution] m-dimensional random variable:
number
number
number
[0004] [Statistical independence] Also, the random variables X and Y have a probability density function f XY (x,y)=f X (x)f Y When (y) is satisfied, X and Y are said to be independent of each other.
[0005] [Uncorrelated normally distributed sequences] Where:
number
number
[0006] [Regeneration of Gaussian random numbers using (quasi-)orthogonal matrices] A linear transformation of the multivariate normal distribution is
number
number
number
number
number
[0007] In this way, by taking a linear sum of random random variables X that follow mutually independent m-dimensional multivariate normal distributions using a (quasi-)orthogonal matrix M, it is possible to generate random random variables that follow mutually independent l-dimensional multivariate normal distributions (for example, see Non-Patent Document 1).
[0008] Therefore, by using algorithm 1 shown in FIG. 7, it is possible to configure a random number generation device that generates normal random numbers that are independent of each other. The random number generator implementing Algorithm 1 generates a sequence of m mutually independent normal random samples:
number
number
number
number
[0009] [Non-Patent Document 1] Joan Of Arc, Proof that the unbiased variance follows a chi-square distribution with n-1 degrees of freedom, 2020, Internet (Retrieved January 10, 2022)<https: / / note.com / joan_of_arc / n / n64f83b63d540> Summary of the Invention [Problem to be solved by the invention]
[0010] However, the prior art algorithm 1 is limited to linear addition using (quasi-)orthogonal matrices. The implementation of the (quasi-)orthogonal matrix generation means is complicated, and the generation of the (quasi-)orthogonal matrix itself may require samples of normal random numbers.
[0011] An object of the present invention is to provide a random number generation device, a random number generation method, and a random number generation program that can easily generate a sequence of normally distributed variables that are approximately independent of each other. [Means for solving the problem]
[0012] The random number generation device according to the present invention includes an input unit that receives an input of a sequence X of m mutually independent normal random number samples with uniform variance, a matrix generation unit that generates a matrix R with m rows and l columns, the matrix R being composed of values sampled from a probability distribution χ with zero mean and finite and non-zero variance, and a linear sum R of X using the matrix R.T The apparatus includes a calculation unit that calculates X, and an output unit that outputs the calculation result by the calculation unit as a sequence of l mutually asymptotically independent normal random number samples.
[0013] The matrix generation unit may normalize R to obtain an asymptotic orthogonal matrix based on the variance of χ and m.
[0014] The matrix generator defines a bounded probability distribution χ, where log 2 / log m<γ'<γ<1 / 2, l=m γ’ and an upper bound of a Renyi divergence expressed using m as an approximation accuracy, and the output unit may output the approximation accuracy together with the l sequences of mutually asymptotically independent normal random number samples.
[0015] The matrix generator defines a bounded probability distribution χ, log 2 / log m<γ'<γ<1 / 2, l=(1+c)m γ’ The noise generation unit samples l mutually independent normal random noises Z whose variance is c times that of X and is uniform based on a positive constant c defined as: and an approximation accuracy calculation unit calculates an upper bound of the Renyi divergence expressed using γ' and m as the approximation accuracy. The calculation unit calculates R T X+Z, and the output unit may output the approximation accuracy together with the l asymptotically independent normal random number sample sequences.
[0016] The random number generation method according to the present invention includes an input step of receiving an input of a sequence X of m mutually independent normal random number samples with uniform variance, a matrix generation step of generating a matrix R with m rows and l columns, the matrix R being composed of values sampled from a probability distribution χ with zero mean and finite and non-zero variance, and a linear sum R of X using the matrix R. T A computer executes a calculation step of calculating X, and an output step of outputting the calculation result in the calculation step as a sequence of l mutually asymptotically independent normal random number samples.
[0017] A random number generation program according to the present invention causes a computer to function as the random number generation device. Effect of the Invention
[0018] According to the present invention, a sequence of normally distributed variables that are approximately mutually independent can be easily generated. [Brief description of the drawings]
[0019] [Figure 1] FIG. 2 is a diagram illustrating a functional configuration of a random number generation device in the first embodiment. [Diagram 2] FIG. 2 is a diagram showing an algorithm of a random number generation method in the first embodiment. [Diagram 3] FIG. 11 is a diagram illustrating a functional configuration of a random number generation device in a second embodiment. [Figure 4] FIG. 11 is a diagram showing an algorithm of a random number generation method in the second embodiment. [Diagram 5] FIG. 11 is a diagram illustrating a functional configuration of a random number generation device in a third embodiment. [Figure 6] FIG. 13 is a diagram showing an algorithm of a random number generation method in the third embodiment. [Figure 7] FIG. 1 is a diagram illustrating an algorithm of a conventional random number generation method. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020] Hereinafter, an embodiment of the present invention will be described by way of example. The random number generation method of the first to third embodiments described below is a technique for generating normally distributed variable sequences that are asymptotically independent of each other by taking a linear sum using matrices that are not (quasi-)orthogonal but are easier to generate for a wider class of matrices. In other words, by using a sequence of normally distributed variables that are not strictly independent but are asymptotically (approximately) independent, it becomes easier to generate random numbers than before.
[0021] [Asymptotic statistical independence] A random variable (column) X that depends on a natural number n n ,Y nThe probability density function of
number
[0022] [Asymptotic orthogonal matrix] Let the probability distribution χ on real numbers be E[χ]=0, and the variance of the sample be Var[X]=E[X 2 ]:=σ χ 2 Then, the matrix:
number
number
[0023] This can be proved as follows. First, let each row of R' be r i , Σ':=(R') T Let R'. When m is sufficiently large, by the central limit theorem, The diagonal elements are
number
number
number
number
[0024] Therefore,
number
number
number
number
[0025] [Asymptotically independent sample amplification] As mentioned before, asymptotically orthogonal matrices:
number
number
number
number
[0026] This can be proved as follows. That is, if R is an asymptotically orthogonal matrix, then as mentioned above, when m is sufficiently large,
number
number
[0027] [First embodiment] The random number generation device 10 of the first embodiment samples a random matrix from a probability distribution with a mean of zero and a finite, non-zero variance, and outputs an asymptotically independent normal random number sample sequence by taking a linear sum.
[0028] FIG. 1 is a diagram showing the functional configuration of a random number generation device 10 in this embodiment. The random number generation device 10 is an information processing device (computer) that includes a control unit 11, a storage unit 12, and various input / output interfaces.
[0029] The control unit 11 is a part that controls the entire random number generation device 10, and realizes each function in this embodiment by appropriately reading and executing various programs stored in the storage unit 12. The control unit 11 may be a CPU.
[0030] The storage unit 12 is a storage area for various programs for causing the hardware group to function as the random number generation device 10, various data, and the like, and may be a ROM, a RAM, a flash memory, a hard disk drive (HDD), or the like.
[0031] The control unit 11 includes an input unit 111 , a matrix generation unit 112 , a calculation unit 113 , and an output unit 114 . The input unit 111 receives an input of a sequence X of m mutually independent normal random number samples with uniform variance.
[0032] The matrix generation unit 112 generates a matrix R with m rows and l columns, which is made up of values sampled from a probability distribution χ whose mean is zero and whose variance is finite and non-zero. At this time, the matrix generation unit 112 may normalize R based on the variance of the probability distribution χ and m to make it an asymptotic orthogonal matrix, and may make the variance of the output normal random number sample sequence equal to that of the input.
[0033] The calculation unit 113 calculates a linear sum Y=R of X using the matrix R. T Calculate X. The output unit 114 outputs the sample sequence Y as a sequence of l mutually asymptotically independent normal random number samples.
[0034] FIG. 2 is a diagram showing algorithm 2 of the random number generation method in this embodiment. In Algorithm 2, we use a sequence of m mutually independent, uniformly distributed normal random samples.
number
number
[0035] Specifically, in step 1, the matrix generation unit 112 first defines a probability distribution χ that satisfies E[χ]=0,
number
[0036] Next, in step 2, the matrix generation unit 112 generates a normalized asymptotically orthogonal matrix
number
[0037] In step 3, the calculation unit 113 calculates the linear sum of X as follows:
number
[0038] For example, the matrix generation unit 112 generates uniform random numbers (E[χ]=0, E[χ 2 It is easy to generate an asymptotically orthogonal matrix R from any probability distribution χ that satisfies E[χ]=0, such as E[χ]=2 / 3, or any normal random number with mean 0. In addition, the normalization in step 2 can be omitted. In this case, the variance of the output asymptotically independent normal random sample sequence is mσ χ 2 σ 2 It becomes I.
[0039] According to this embodiment, when the dimensionality m of a given sample is sufficiently large, the random number generation device 10 can reproduce normal random number sequences that are sufficiently (approximately) independent of each other by linear summation using asymptotic orthogonal matrices obtained from any probability distribution χ that satisfies the mean E[χ] = 0. Therefore, in the past, a linear sum matrix had to be a (quasi) orthogonal matrix, which made its implementation complicated, whereas the random number generation device 10 can easily and quickly generate a sequence of normal random numbers that are asymptotically independent from each other, although they are not strictly independent, from an arbitrary probability distribution χ such as uniform random numbers. In addition, by using an arbitrary probability distribution, many variations can be adopted as the asymptotically orthogonal matrix, improving the degree of freedom of the linear sum.
[0040] [Second embodiment] In the first embodiment, asymptotic independence is used when the dimension number m of the given normal random number sample becomes infinite. In order to ensure approximate independence, it is necessary to prepare a sufficiently large number of mutually independent normal random number sample sequences as inputs in order to make m sufficiently large. However, there is a problem in that it is not possible to quantitatively evaluate how large m needs to be.
[0041] The random number generation device 20 of the second embodiment quantitatively evaluates the approximation accuracy with mutually independent normal random number sequences by restricting the probability distribution χ with zero mean and finite, non-zero variance used in the first embodiment to a bounded distribution.
[0042] Here, we use the Renyi divergence R, a broad distance function defined between two random variables, as the approximation accuracy. a is used. If the probability density functions of random variables P and Q are p(x) and q(x), respectively, for 1≦a, the Renyi divergence is defined as follows:
number
[0043] R a (P∥P)=1, and R a The closer (P∥Q) is to 1, the more similar the distributions of P and Q are.
[0044] In this embodiment, the probability distribution for sampling the elements of the asymptotic orthogonal matrix is a bounded distribution with a mean of 0. Specifically, for a certain real number β>0, β of,
number
[0045] In addition, let m be a natural number as a security parameter, and let γ' and γ be constants that do not depend on m as follows:
number
[0046] In this case, the matrix:
number
number
number
number
[0047] FIG. 3 is a diagram showing the functional configuration of the random number generation device 20 in this embodiment. The random number generation device 20 is an information processing device (computer) including a control unit 21, a storage unit 22, and various input / output interfaces.
[0048] The control unit 21 is a part that controls the entire random number generation device 20, and realizes each function in this embodiment by appropriately reading and executing various programs stored in the storage unit 22. The control unit 21 may be a CPU.
[0049] The storage unit 22 is a storage area for various programs for causing the hardware group to function as the random number generation device 20, various data, and the like, and may be a ROM, a RAM, a flash memory, a hard disk drive (HDD), or the like.
[0050] The control unit 21 includes an input unit 211 , a matrix generation unit 212 , a calculation unit 213 , an approximation accuracy calculation unit 214 , and an output unit 215 . The input unit 211 receives an input of a sequence of m mutually independent, uniformly distributed normal random number samples X. The input unit 211 also acquires the above-mentioned constants a, γ, and γ'.
[0051] The matrix generation unit 212 generates a bounded probability distribution χ β Generate an m -by- l matrix R consisting of sampled values from At this time, the matrix generation unit 212 calculates the probability distribution χ βBased on the variance of and m, R may be normalized to an asymptotic orthogonal matrix, so that the variance of the output normal random number sample sequence is equal to that of the input. The calculation unit 213 calculates a linear sum Y=R of X using the matrix R. T Calculate X.
[0052] The approximation accuracy calculation unit 214 calculates the upper bound of the Renyi divergence expressed using the constant γ′ defined as above and the security parameter m as the approximation accuracy.
[0053] The output unit 215 outputs the sample sequence Y as a sequence of l mutually asymptotically independent normal random number samples, and also outputs the calculated approximation accuracy.
[0054] FIG. 4 is a diagram showing algorithm 3 of the random number generation method in this embodiment. In Algorithm 3, similar to Algorithm 2 in the first embodiment, m mutually independent and uniformly distributed normal random number sample sequences are
number
number
[0055] Then, in Algorithm 3, we use a sequence of l mutually asymptotically independent normal random samples.
number
[0056] Specifically, in step 1, the matrix generation unit 212 first calculates the bounded probability distribution χβ Define
number
[0057] Next, in step 2, the matrix generation unit 212 generates a normalized asymptotically orthogonal matrix
number
[0058] In step 3, the calculation unit 213 calculates the linear sum of X as follows:
number
[0059] In step 4, the approximation accuracy calculation unit 214 calculates the approximation accuracy by using the upper bound of the Renyi divergence,
number
[0060] In step 5, the output unit 215 outputs the approximation accuracy R calculated in step 4 together with the l asymptotically independent normal random number sample sequence Y calculated in step 3. a ' is output.
[0061] The matrix generation unit 212 generates, for example, uniform random numbers on [-β, β] or arbitrary normal random numbers X to N(0, σ 2 ) and various bounded probability distributions χ β From this, we can easily generate the asymptotically orthogonal matrix R. Here, the normal distribution is given by, for a constant t>0,
number
[0062] Furthermore, the normalization in step 2 can be omitted as in the first embodiment if the variance does not need to be the same for the input and output.
[0063] According to this embodiment, the random number generation device 20 generates a random matrix R using values sampled from a bounded probability distribution, and generates a linear sum of m mutually independent normal random number samples X, Y:=R T Output X as a set of l asymptotically independent normal random numbers. In this case, the upper bound of the a-th order Renyi divergence between the output Y and mutually independent normal random number sequences can be expressed by m, γ'.
[0064] Therefore, in addition to the effect of the first embodiment, the random number generation device 20 can quantitatively evaluate the approximation accuracy between the obtained asymptotically independent normal random number samples and normal random numbers that are strictly independent from each other. The parameter a of the Renyi divergence can be arbitrarily selected within the range of [2,∞) and can be selected by the user according to the situation.
[0065] [Third embodiment] In the second embodiment, there is a problem that, for an original m-dimensional sample X, only an asymptotically independent normal random number sample Y of 1<√m dimension can be generated at most. The random number generation device 30 of the third embodiment adds mutually independent multidimensional normal random numbers to Y to generate normal random number samples of any dimension.
[0066] A security parameter is a natural number m, and is a constant that does not depend on m:
number
[0067] Also, the bounded random variable χ β The variance of Var[χ β ]:=σ χ 2 = O(1), and the matrix:
number
number
[0068] Then, for any a = O(1) ∈ [2,∞), with overwhelming probability,
number
number
number
[0069] FIG. 5 is a diagram showing the functional configuration of the random number generation device 30 in this embodiment. The random number generation device 30 is an information processing device (computer) that includes a control unit 31, a storage unit 32, and various input / output interfaces.
[0070] The control unit 31 is a part that controls the entire random number generation device 30, and realizes each function in this embodiment by appropriately reading and executing various programs stored in the storage unit 32. The control unit 31 may be a CPU.
[0071] The storage unit 32 is a storage area for various programs for causing the hardware group to function as the random number generation device 30, various data, and the like, and may be a ROM, a RAM, a flash memory, a hard disk drive (HDD), or the like.
[0072] The control unit 31 includes an input unit 311 , a matrix generation unit 312 , a noise generation unit 313 , a calculation unit 314 , an approximation accuracy calculation unit 315 , and an output unit 316 . The input unit 311 receives an input of a sequence of m mutually independent, uniformly distributed normal random number samples X. The input unit 311 also obtains the above-mentioned constants a, γ, and γ', and determines a constant c according to the degree l of the output.
[0073] The matrix generation unit 312 generates a bounded probability distribution χ β Generate an m -by- l matrix R consisting of sampled values from At this time, the matrix generation unit 312 calculates the probability distribution χ β Based on the variance of and m, R may be normalized to an asymptotic orthogonal matrix, so that the variance of the output normal random number sample sequence is equal to that of the input.
[0074] The noise generating unit 313 samples l mutually independent normal random noises Z that have a uniform variance c times that of X, based on the above-mentioned constant c.
[0075] The calculation unit 314 adds normal random noise Z to the linear sum of X using the matrix R, and obtains Y=R T Calculate X+Z.
[0076] The approximation accuracy calculation unit 315 calculates the upper bound of the Renyi divergence expressed using the constant γ′ defined as above and the security parameter m as the approximation accuracy.
[0077] The output unit 316 outputs the sample sequence Y as a sequence of l mutually asymptotically independent normal random number samples, and also outputs the calculated approximation accuracy.
[0078] FIG. 6 is a diagram showing algorithm 4 of the random number generation method in this embodiment. In Algorithm 4, similar to Algorithm 2 in the first embodiment and Algorithm 3 in the second embodiment, m mutually independent and uniformly distributed normal random number sample sequences are generated.
number
number
[0079] Then, in Algorithm 4, we use a sequence of l mutually asymptotically independent normal random samples.
number
[0080] Specifically, in step 1, the matrix generation unit 312 first calculates the bounded probability distribution χ β Define
number
[0081] Next, in step 2, the matrix generator 312 generates a standardized asymptotically orthogonal matrix
number
[0082] In step 3, the noise generator 313 generates Gaussian random noise:
number
[0083] In step 4, the calculation unit 314 calculates the linear sum of X plus normal random noise Z,
number
[0084] In step 5, the approximation accuracy calculation unit 315 calculates the approximation accuracy by using the upper bound of the Renyi divergence,
number
[0085] In step 6, the output unit 316 outputs the approximation accuracy R calculated in step 5 together with the l asymptotically independent normal random number sample sequence Y calculated in step 4. a ' is output.
[0086] In addition, the matrix generation unit 312 generates, for example, uniform random numbers on [-β, β] or arbitrary normal random numbers X to N(0, σ 2 ) and various bounded probability distributions χ β From this, we can easily generate the asymptotically orthogonal matrix R. Moreover, the normalization in step 2 can be omitted, as in the first and second embodiments, if an increase in the variance of the output samples is permitted.
[0087] According to this embodiment, the random number generation device 30 generates a random matrix R using values sampled from a bounded probability distribution, and further outputs l mutually asymptotically independent normal random number samples by adding normal random noise according to the output dimension l. In this case, the upper bound of the a-th order Renyi divergence between the output Y and mutually independent normal random number sequences can be expressed by m, γ'.
[0088] Therefore, in addition to the effect of the second embodiment, the random number generation device 30 can generate asymptotically independent normal random number samples of any dimension l>0 based on the linear sum of input samples, at the cost of the variance of the output samples increasing compared to the input.
[0089] The above-mentioned embodiment can generate a high-speed pseudorandom number generator, and can be expected to be applied to the proof of security of ciphertext in lattice cryptography. Therefore, it is possible to improve the security of the network, and contribute to the achievement of Goal 9 of the Sustainable Development Goals (SDGs) led by the United Nations, "Build resilient infrastructure, promote sustainable industrialization and foster innovation."
[0090] Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments. Furthermore, the effects described in the above-described embodiments are merely a list of the most preferable effects resulting from the present invention, and the effects of the present invention are not limited to those described in the embodiments.
[0091] The random number generation method by the random number generation device (10, 20, 30) is realized by software. When realized by software, the programs constituting this software are installed in an information processing device (computer). These programs may be recorded on removable media such as CD-ROMs and distributed to users, or may be distributed by being downloaded to the user's computer via a network. Furthermore, these programs may be provided to the user's computer as a Web service via a network without being downloaded. [Explanation of symbols]
[0092] 10 Random Number Generator 11 Control section 12 Storage section 20 Random Number Generator 21 Control section 22 Memory section 30 Random Number Generator 31 Control Unit 32 Storage section 111 Input section 112 Matrix generator 113 Arithmetic section 114 Output section 211 Input section 212 Matrix generator 213 Arithmetic section 214 Approximation accuracy calculation section 215 Output section 311 Input section 312 Matrix generator 313 Noise Generation Unit 314 Arithmetic section 315 Approximation accuracy calculation section 316 Output section
Claims
1. An input unit that receives an input of a sequence X of m mutually independent, uniformly distributed normal random number samples; a matrix generator for generating a matrix R with m rows and l columns, the matrix R being composed of values sampled from a probability distribution χ with zero mean and finite, non-zero variance; Linear sum R of X using matrix R T A calculation unit for calculating X; an output unit that outputs the calculation result by the calculation unit as a sequence of l mutually asymptotically independent normal random number samples.
2. 2. The random number generation device according to claim 1, wherein the matrix generation unit normalizes R to an asymptotically orthogonal matrix based on the variance of χ and m.
3. The matrix generation unit defines χ as a bounded probability distribution, log 2 / log m<γ'<γ<1 / 2, l=m γ’ and an approximation accuracy calculation unit that calculates an upper bound of a Renyi divergence expressed using m as an approximation accuracy; 3. The random number generating device according to claim 1, wherein the output unit outputs the approximation accuracy together with the l mutually asymptotically independent normal random number sample sequences.
4. The matrix generation unit defines χ as a bounded probability distribution, log 2 / log m<γ'<γ<1 / 2, l=(1+c)m γ’ A noise generator that samples l mutually independent Gaussian random noises Z that have a uniform variance c times that of X, based on a positive constant c defined as an approximation accuracy calculation unit that calculates an upper bound of the Renyi divergence expressed using γ′ and m as an approximation accuracy; The calculation unit calculates R by adding the normal random noise Z to the linear sum of X. T Calculate X+Z, 3. The random number generating device according to claim 1, wherein the output unit outputs the approximation accuracy together with the l mutually asymptotically independent normal random number sample sequences.
5. An input step of receiving an input of a sequence X of m mutually independent and uniformly distributed normal random number samples; A matrix generation step of generating a matrix R with m rows and l columns, the matrix R being composed of values sampled from a probability distribution χ with zero mean and finite, non-zero variance; Linear sum R of X using matrix R T A calculation step of calculating X; an output step of outputting the operation results in the operation step as a sequence of l mutually asymptotically independent normal random number samples.
6. A random number generating program for causing a computer to function as the random number generating device according to claim 1.
Citation Information
Patent Citations
Random number generator and random number generation method
JP2021018455A