CUMULATIVE CALCULATION APPARATUS, CUMULATIVE CALCULATION METHOD, AND PROGRAM

Information

  • Patent Application
  • 20240281208
  • Publication Number
    20240281208
  • Date Filed
    June 14, 2021
    3 years ago
  • Date Published
    August 22, 2024
    6 months ago
Abstract
A cumulative calculation device according to an embodiment is a cumulative calculation device that, with respect to a column v=(v1, . . . , vn) of n values divided into groups, calculates cumulation for each of the groups through an associative binary operation. The cumulative calculation device includes: a value conversion unit configured to convert v into v′=(v1′, . . . , vn′) (where v1′=(v1, ci)) when c=(c1, . . . , cn) is a column of values in which 1 corresponds to a head element of the group and 0 corresponds to elements other than the head element among elements v1, . . . , vn of v; a binary operation generation unit configured to generate a new binary operation for calculating a new pair (p, q) for two pairs (w, x) and (y, z) (where x, z ∈ {0, 1} using the binary operation; a cumulative calculation unit configured to calculate cumulation s1′ (where si′ is cumulation from v1′ to vi′ from the new binary operation) by the new binary operation for i=1, . . . , n; and an output unit configured to extract a column u=(u1, . . . , un) of values indicating the cumulation for said each of the groups from each si′ (where i=1, . . . , n) and output the extracted u.
Description
TECHNICAL FIELD

The present invention relates to a cumulative calculation device, a cumulative calculation method, and a program.


BACKGROUND ART

As a method of obtaining a specific calculation result without restoring an encrypted numerical value, a method called secret calculation is known from the related art. For example, NPL 1 discloses a three-party secret sharing technique.


A technique for totalizing grouped data is known as one of the data processing techniques in the related art. For example, NPL 2 discloses a method of calculating statistical values (an average value, a maximum value, totalization, and the like) of grouped data for each group through secret calculation. Note that these statistical values are implemented by cumulating associative binary operations.


CITATION LIST
Non Patent Literature



  • [NPL 1] Koji Chida, Koki Hamada, Dai Ikarashi, and Katsumi Takahashi, “Reconsideration of Lightweight Verifiable Three-Party Secret Function Calculation”, in CSS, 2010.

  • [NPL 2] Dai ikarashi, Koji Chida, Koki Hamada, and Katsumi Takahashi, Efficiency of Lightweight Verifiable Three-Party Secret Function Computation and Secure Database Processing Using the Same. in SCIS, pp. 1 to 8, 2011



SUMMARY OF INVENTION
Technical Problem

However, the conventional method is designed exclusively to perform calculation of statistical values for an individual group (that is, calculation of accumulation of binary arithmetic operations) while concealing the group for secret calculation, and the efficiency is low because the accumulation calculation method used in normal data processing, which is not secret calculation, cannot be used as it is for secret calculation.


An embodiment of the present invention has been made in view of the foregoing points, and an object of the present invention is to perform cumulative calculation for an individual group efficiently.


Solution to Problem

in order to achieve the foregoing object, a cumulative calculation device according to an embodiment is a cumulative calculation device that, with respect to a column v=(v1, . . . , vn) of n values divided into groups, calculates cumulation for each of the groups through an associative binary operation. The cumulative calculation device includes: a value conversion unit configured to convert v into v′=(v1′, . . . , vn′) (where v1′=(vi, ci)) when c=(c1, . . . , cn) is a column of values in which 1 corresponds to a head element of the group and 0 corresponds to elements other than the head element among elements v1, . . . , vn of v; a binary operation generation unit configured to generate a new binary operation for calculating a new pair (p, q) for two pairs (w, x) and (y, z) (where x, z∈{0, 1}) using the binary operation; a cumulative calculation unit configured to calculate cumulation si′ (where si′ is cumulation from vi′ to vi′ through the new binary operation) through the new binary operation for i=1, . . . , n; and an output unit configured to extract a column u=(u1, . . . , un) of values indicating the cumulation for said each of the groups from each si′ (where i=1, . . . , n) and output the extracted u. The new binary operation sets an operation result of w and y by the binary operation to p when z=0, sets y to p when z=1, and sets a logical sum of x and z to q.


Advantageous Effects of Invention

it is possible to perform the cumulative calculation for each group efficiently.





BRIEF DESCRIPTION OF DRAWINGS


FIG. 1 is a diagram illustrating an example of a hardware configuration of a cumulative calculation device according to an embodiment.



FIG. 2 is a diagram illustrating an example of a functional configuration of the cumulative calculation device according to the embodiment.



FIG. 3 is a flowchart illustrating an example of a flow of cumulative calculation processing according to the embodiment.





DESCRIPTION OF EMBODIMENTS

Hereinafter, an embodiment of the present invention will be described. In the embodiment, a cumulative calculation device 10 capable of performing cumulative calculation for each group efficiently will be described.


Here, a column of n values is denoted as v=(v1, . . . , vn), and each element vi (where i=1, . . . , n) of v is divided into several groups. It is assumed that elements in the same group are arranged to have consecutive indexes (element numbers).


For example, when the column is divided into three groups, there are certain i′ and i″ (where 1≤i′<i″<n), v1 to v1′ form a first group, vi′+1 to vi″ form a second group, and vi″+1 to vn form a third group.








o



[

Math
.

1

]







The above expression is assumed to be a binary operation.


At this time, when the cumulative calculation is performed by the binary operation in each group, the cumulative calculation device 10 according to the present embodiment generates a new binary operation in which cumulation for each group can be calculated by the foregoing binary operation by cumulative calculation on the entire data (that is, all n values v1′, . . . , vn′ to be described later) and calculates cumulation of the entire data by the new binary operation. Since the cumulative calculation of the entire data is used in normal data processing, the cumulative calculation device 10 according to the present embodiment can perform the calculation efficiently, for example, even when the cumulative calculation for each group is performed by secret calculation.


<Hardware Configuration of Cumulative Calculation Device 10>


FIG. 1 illustrates a hardware configuration of the cumulative calculation device 10 according to the embodiment. As illustrated in FIG. 1, the cumulative calculation device 10 according to the embodiment is implemented with a hardware configuration of a general computer or a computer system, and includes an input device 101, a display device 102, an external I/F 103, a communication i/F 104, a processor 105, and a memory device 106. These hardware components are connected to be capable of communicating with each other via a bus 107.


The input device 101 is, for example, a keyboard, a mouse, a touch panel, various physical buttons, or the like. The display device 102 is, for example, a display or the like. Note that the cumulative calculation device 10 may not include, for example, at least one of the input device 101 and the display device 102.


The external I/F 103 is an interface with an external device such as the recording medium 103a. The cumulative calculation device 10 can perform reading or writing of the recording medium 103a via the external I/F 103. Note that examples of the recording medium 103a include a compact disc (CD), a digital versatile disk (DVD), a secure digital memory card (SD memory card), and a Universal Serial Bus (USB) memory card.


The communication I/F 104 is an interface that connects the cumulative calculation device 10 to a communication network. The processor 105 is, for example, any of various calculation devices such as a central processing unit (CPU) and a graphics processing unit (GPU). The memory device 106 is, for example, any of various storage devices such as a hard disk drive (HDD), a solid-state drive (SSD), a flash memory, a random access memory (RAM), and a read-only memory (ROM).


The cumulative calculation device 10 according to the embodiment has the hardware configuration illustrated in FIG. 1, and thus is capable of implementing various types of processing to be described below. Note that the hardware configuration illustrated in FIG. 1 is exemplary, and the cumulative calculation device 10 may include, for example, a plurality of processors 105 or may include a plurality of memory devices 106. The cumulative calculation device 10 may have various types of hardware components other than the illustrated hardware components.


<Functional Configuration of Cumulative Calculation Device 10>


FIG. 2 illustrates a functional configuration of the cumulative calculation device 10 according to the embodiment. As shown in FIG. 2, the cumulative calculation device 10 according to the embodiment includes a value conversion unit 201, a binary operation generation unit 202, a cumulative calculation unit 203, an output unit 204, and a storage unit 205. The value conversion unit 201, the binary operation generation unit 202, the cumulative calculation unit 203, and the output unit 204 are implemented by, for example, processing which the processor 105 is caused to execute by one or more programs installed on the cumulative calculation device 10. The storage unit 205 is implemented by, for example, the memory device 106. Note that the storage unit 205 may be implemented by, for example, a storage device or the like connected to the cumulative calculation device 10 via a communication network.


The value conversion unit 201 converts v into v′=(v1′, . . . , vn′) (where v1′=(vi, ci)) when c=(c1, . . . , cn) is a column of values in which 1 corresponds to the head element of a group and 0 corresponds to elements other than the head element among elements v1, . . . , vn of v.


The binary operation generation unit 202 generates a new binary operation capable of calculating cumulation for each group through an original binary operation by cumulative calculation on the entire data.


The cumulative calculation unit 203 performs cumulative calculation by the new binary operation on all v′=(v1′, . . . , vn′).


The output unit 204 extracts a result of the cumulative calculation for each group by the original binary operation from the result of the cumulative calculation by the new binary operation and outputs the extracted result.


The storage unit 205 stores a column v=(v1, . . . , vn) of n values as cumulative calculation targets, intermediate results of the cumulative calculation, a cumulative calculation result, and the like.


<Flow of Cumulative Calculation Processing>

A flow of the cumulative calculation processing according to the embodiment will be described with reference to FIG. 3.


First, the value conversion unit 201 converts a column of values in which 1 corresponds to the head element in a group and 0 corresponds to other elements among elements of v into c=(c1, . . . , cn), and converts v into v′=(v1′, . . . , vn′) (where v1′=(v1, ci) (step S101)).


Subsequently, the binary operation generation unit 202 generates a new binary operation denoted as follows that is capable of calculating cumulation for each group by the original binary operation by cumulative calculation on the entire data (that is, all n values v1′, . . . , vn′).









o





[

Math
.

2

]







The binary operation is defined as follows (step S102).











(

w
,
x

)




o


(

y
,
z

)


=

(


zy
+


(

1
-
z

)



(

w

y

)



,
xORz

)





[

Math
.

3

]







where w and y are variables which can have any values, x and z are variables which can have values of 0 or 1, and OR is an operator which is 1 when at least one of x and z is 1 and 0 otherwise (that is, an operator indicating a logical sum).


Subsequently, the cumulative calculation unit 203 calculates cumulation by the new binary operation on all v′=(v1′, . . . , vn′) (step S103). That is, the cumulative calculation unit 203 calculates the cumulation s′=(s1′, . . . , sn′) of v′ by the new binary operation. Here, for i=1, . . . , n, the following cumulation is obtained.










s
i


=


v
1




o




v
2




o








o




v
i







[

Math
.

4

]







Then, with setting each si′ as si′=(ui, di), the output unit 204 extracts a column u=(u1, . . . , un) of the values, and outputs the column u as a cumulative result of the original binary operation (step S104). At this time, each ui is the result of the cumulative calculation of v1, . . . , vi by the original binary operation. For each i=1, . . . , n, di=1.


Note that although the output destination for the output unit 204 may be set discretionarily, for example, the output may be stored in the storage unit 205, or may be transmitted to another device or apparatus, or the like can be considered.


EXAMPLES

Hereinafter, examples of the foregoing cumulative calculation processing will be described.


<<Example 1

In this example, a case will be described in which a column v=(3, 5, 1, 2, 4, 6, 1, 3, 2, 8) of values that is divided into four groups of four, two, one, and three elements from the head is given, and cumulative calculation for each group is performed through a binary operation max(x, y).


Note that max(x, y) is a binary operation of outputting the maximum values of x and y.


First, in the foregoing step S101, a column c=(1, 0, 0, 0, 1, 0, 1, 1, 0, 0) of values in which 1 corresponds to the head element of the group and 0 corresponds to the other elements is generated, and v is converted into the following v′.


v′=((v1, c1), . . . , (v10, c10)=((3, 1), (5, 0), (1, 0), (2, 0), (4, 1), (6, 0) (1, 1), (3, 1), (2, 0), (8, 0)) In the foregoing step S102, a new binary operation defined by the foregoing Math. 3 is generated. In the foregoing step S103, cumulation is calculated on all v′=((v1, ci), . . . , (v10, c10)) by the new binary operation.


For example,










s
1




o




s
2




o








o




s
10






[

Math
.

5

]







By using a cumulative calculation method of calculating the above expression in order from the left, s′=(s1′, . . . , s10′) can be calculated as follows.













s
1


=

(

3
,
1

)








s
2


=



s
1




o




(

5
,
0

)


=

(

5
,
1

)









s
3


=



s
2




o




(

1
,
0

)


=

(

5
,
1

)









s
4


=



s
3




o




(

2
,
0

)


=

(

5
,
1

)









s
5


=



s
4




o




(

4
,
1

)


=

(

4
,
1

)









s
6


=



s
5




o




(

6
,
0

)


=

(

6
,
1

)









s
7


=



s
6




o




(

1
,
1

)


=

(

1
,
1

)












s
8


=


s
7




o



3


,
1

)

=

(

3
,
1

)








s
9


=



s
8




o




(

2
,
0

)


=

(

3
,
1

)









s
10


=



s
9




o




(

8
,
0

)


=

(

8
,
1

)









[

Math
.

6

]







Accordingly, in the foregoing step S104, u=(3, 5, 5, 5, 4, 6, 1, 3, 3, 8) is extracted and output. From this u, it can be understood that the cumulative calculation for each group by the original binary operation max(x, y) (that is, the calculation of a maximum value of the cumulation until each element in the group) is performed.


<<Example 2

In the foregoing Example 1, s1′, . . . , s10′ are calculated in order from the left by the new binary operation in step S103. However, instead, s1′, . . . , s10′ are calculated in parallel in this embodiment. Accordingly, it is possible to execute cumulative calculation more efficiently than in Example 1.


Note that it has been known that an associative binary operation can be calculated in parallel.


<Conclusion>

As described above, the cumulative calculation device 10 according to the present embodiment assigns flags in which a head element of a group is 1 and other elements are 0 to values to be cumulated when cumulative calculation is executed by the binary operation in each group, defines a new binary operation, and performs cumulative calculation on the entire data (that is, all the pairs of values and flags) by the new binary operation. This new binary operation uses the fact that the value of cumulation has already been calculated for the head element of a group to regard the flag as indicating whether the calculation has been done, and thereby, is an extension of the original binary operation to a binary operation for the pairs of values and flags.


Accordingly, the cumulative calculation device 10 according to the embodiment can perform secret calculation efficiently even when cumulative calculation is performed for each group by, for example, secret calculation (including secret sharing). This is because by using any method of applying binary operations with which the cumulative calculation is desired in a determined order, the cumulative calculation for each group can be performed by secret calculation in the same order. Therefore, for example, by using max or min as the binary operation, a group by max or a group by min s or the like in the secret calculation can be efficiently implemented.


Accordingly, the cumulative calculation device 10 according to the embodiment is not only used for normal data processing but is also applicable to, for example, a case where data processing and data analysis are performed while keeping data contents secret. As a specific example, the cumulative calculation device 10 according to the embodiment can generate training data of a machine learning model that implements a predetermined task (for example, certain prediction, classification, or the like) while keeping data contents secret. In addition, the cumulative calculation device 10 according to the embodiment may be able to perform various predictions and classifications by a machine learning model learned by the training data, and also control another device, apparatus, system, and the like based on results of the predictions or classifications.


The present invention is not limited to the specifically disclosed embodiments, and various modifications, changes, combinations with known techniques, and the like can be made without departing from the scope of the claims.


REFERENCE SIGNS LIST





    • Cumulative calculation device


    • 101 Input device


    • 102 Display device


    • 103 External I/F


    • 103
      a Recording medium


    • 104 Communication I/F


    • 105 Processor


    • 106 Memory device


    • 107 Bus

    • Value Conversion unit


    • 202 Binary operation generation unit


    • 203 Cumulative calculation unit


    • 204 Output unit


    • 205 Storage unit




Claims
  • 1. A cumulative calculation device that, with respect to a column v=(v1, . . . , vn) of n values divided into groups, calculates cumulation for each of the groups through an associative binary operation, the cumulative calculation device comprising: a memory; anda processor configured to:form c=(c1, . . . , cn) as a column of values in which 1 corresponds to a head element of a group and 0 corresponds to elements other than the head element among elements v1, . . . , vn of v;convert v into v′=(v1′, . . . , vn′) (where vi′=(vi, ci));generate a new binary operation for calculating a new pair (p, q) for two pairs (w x) and (y, z) (where x, z ∈ {0, 1}) using the binary operation;calculate cumulation si′ (where si′ is cumulation from vi′ to vi′ by the new binary operation) by the new binary operation for i=1, . . . , n; andextract a column u=(u1, . . . , un) of values indicating the cumulation for said each of the groups from each si′ (where i=1, . . . , n), and output the extracted u,wherein the new binary operation sets an operation result of w and y by the binary operation to p when z=0, sets y to p when z=1, and sets a logical sum of x and z to q.
  • 2. The cumulative calculation device according to claim 1, wherein the processor generates the new binary operation by defining an operational result of (w, x) and (y, z) by the new binary operation as (zy+(1−z)r, xORz), where r is an operational result of w and y by the binary operation, and OR is an operator indicating the logical sum.
  • 3. The cumulative calculation device according to claim 1, wherein the processor extracts u=(u1, . . . , un) as si′=(ui, di), and outputs the extracted u.
  • 4. A cumulative calculation method performed by a cumulative calculation device including a memory and a processor that, with respect to a column v=(v1, . . . vn) of n values divided into groups, calculates cumulation for each of the groups through an associative binary operation, the method comprising: forming c=(c1, . . . , cn) as a column of values in which 1 corresponds to a head element of a group and 0 corresponds to elements other than the head element among elements v1, . . . , vn of v:converting v into v′=(v1′, . . . , vn′) (where vi′=(vi, ci))generating a new binary operation for calculating a new pair (p, q) for two pairs (w, x) and (y, z) (where x, z ∈ {0, 1}) using the binary operation;calculating a cumulative si′ (where si′ is cumulation from v1′ to vi′ from the new binary operation) by the new binary operation for i=1, . . . , n; andextracting a column u=(u1, . . . , un) of values indicating the cumulation for said each of the groups from each si′ (where i=1, . . . , n) and outputting the extracted u,wherein the new binary operation sets an operation result of w and y by the binary operation to p when z=0, sets y to p when z=1, and sets a logical sum of x and z to q.
  • 5. A non-transitory computer-readable recording medium having computer-readable instructions stored thereon, which, when executed, cause a computer to execute a method that, with respect to a column v=(v1, . . . , vn) of n values divided into groups, calculates cumulation for each of the groups through an associative binary operation, the method comprising:forming c=(c1, . . . , cn) as a column of values in which 1 corresponds to a head element of a group and 0 corresponds to elements other than the head element among elements v1, . . . , vn of v:converting v into v′=(v1′, . . . , vn) (where v1′=(v1, ci)):generating a new binary operation for calculating a new pair (p, q) for two pairs (w, x) and (y, z) (where x, z ∈ {0, 1}) using the binary operation:calculating a cumulative si′ (where si′ is cumulation from v1′ to vi′ from the new binary operation) by the new binary operation for i=1, . . . , n; andextracting a column u=(u1, . . . , un) of values indicating the cumulation for said each of the groups from each si′ (where i=1, . . . , n) and outputting the extracted u,wherein the new binary operation sets an operation result of w and y by the binary operation to p when z=0, sets y to p when z=1, and sets a logical sum of x and z to q.
PCT Information
Filing Document Filing Date Country Kind
PCT/JP2021/022586 6/14/2021 WO