Secret softmax function calculation system, secret softmax function calculation apparatus, secret softmax function calculation method, secret neural network calculation system, secret neural network learning system, and program
Techniques for performing secure computing of softmax functions at high speed and with high accuracy are provided. A secure softmax function calculation system that calculates a share ([[softmax (u 1 )]], . . . , [[softmax (u J )]]) from a share ([[u 1 ]], . . . , [[u J ]]) includes a subtraction means for calculating a share ([[u 1 −u 1 ]], [[u 2 −u 1 ]], . . . , [[u J −u J ]]), a first secure batch mapping calculation means for calculating, [[exp (u 1 −u 1 )]], [[exp (u 2 −u 1 )]], . . . , [[exp (u J −u J )]], an addition means for calculating a share ( [ [ ∑ j = 1 J exp ( u j - u 1 ) ] ] , … , [ [ ∑ j = 1 J exp ( u j - u J ) ] ] , and a second secure batch mapping calculation means for calculating a share ([[softmax (u 1 )], . . . , [[softmax (u J )]]).
1 . A secure softmax function calculation system for calculating a share ([[softmax (u 1 )]], . . . , [[softmax (u J )]]) of a value (softmax (u 1 ), . . . , softmax (u J )) of a softmax function for an input vector (u 1 , . . . , u J ) from a share ([[u 1 ]], . . . , [[u J ]]) of the input vector (u 1 , . . . , u J ) (where J is an integer greater than or equal to 2), the secure softmax function calculation system being constituted with three or more secure softmax function calculation apparatuses,
map 1 being a secure batch mapping defined by a parameter (a 1 , . . . , a K ) representing a domain of definition and a parameter (α 1 , . . . , α K ) representing a range of values (where K is an integer greater than or equal to 2, a 1 , . . . a K are real numbers that meet a 1 < . . . <a K ) of a function exp (x), and map 2 being a secure batch mapping defined by a parameter (b 1 , . . . , b L ) representing a domain of definition and a parameter (β 1 , . . . , β L ) representing a range of values (where L is an integer greater than or equal to 2, b 1 , . . . , b L are real numbers that meet b 1 < . . . <b L ) of a function 1/x,
the secure softmax function calculation system comprising:
the three or more secure softmax function calculation apparatuses which each have a subtraction circuitry, a first secure batch mapping calculation circuitry, an addition circuitry, a second secure batch mapping calculation circuitry, and wiring, cabling, or a wireless communication device for communicating between the three or more secure softmax function calculation apparatuses through a network, such that:
the subtraction circuitry is configured to calculate a share ([[u 1 −u 1 ]], [[u 2 −u 1 ]], . . . , [[u J −u 1 ]], [[u 1 −u 2 ]], . . . , [[u J −u 2 ]], . . . , [[u 1 −u J ]], . . . , [[u J −u J ]]) from the share ([[u 1 ]], . . . , [[u J ]]);
the first secure batch mapping calculation circuitry is configured to calculate map 1 (([[u 1 −u 1 ]], [[u 2 −u 1 ]], . . . , [[u J −u 1 ]], [[u 1 −u 2 ]], . . . , [[u J −u 2 ]], . . . , [[u 1 −u J ]], . . . , [[u J −u J ]]))=([[α f(1, 1) ]], [[α f(2, 1) ]], . . . , [[α f(J, 1) ]], [[α f(1, 2) ]], . . . , [[α f(J, 2) ]], . . . , [[α f(1, J) ]], . . . , [[α f(J, J) ]]) from the share ([[u 1 −u 1 ]], [[u 2 −u 1 ]], . . . , [[u J −u 1 ]], [[u 1 −u 2 ]], . . . , [[u J −u 2 ]], [[u 1 −u J ]], . . . , [[u J −u J ]]) (where f(i, j) (1≤i, j≤K) is p where a p ≤u i −u j <a p+1 ) to make ([[exp (u 1 −u 1 )]], [[exp (u 2 −u 1 )]], . . . [[exp (u J −u 1 ]], [[exp (u 1 −u 2 )]], . . . , [[exp (u J −u 2 )]], . . . , [[exp (u 1 −u J )]], . . . , [[exp (u J −u J )]]=([[a f(1, 1) ]], [[α f(2, 1) ]], . . . , [[α f(J, 1) ]], [[α f(1, 2) ]], . . . , [[α f(J, 2) ]], . . . , [[α f(1, J) ]], . . . , [[α f(J, J) ]]);
the addition circuitry is configured to calculate a share
(
[
[
∑
j
=
1
J
exp
(
u
j
-
u
1
)
]
]
,
[
[
∑
j
=
1
J
exp
(
u
j
-
u
2
)
]
]
,
…
,
[
[
∑
j
=
1
J
exp
(
u
j
-
u
J
)
]
]
)
from the share ([[exp (u 1 −u 1 )]], [[exp (u 2 −u 1 )]], . . . , [exp (u J −u 1 )]], [[exp (u 1 −u 2 )]], . . . , [[exp (u J −u 2 )]], . . . , [[exp (u 1 −u J ]], . . . [[exp (u J −u J )]]); and
the second secure batch mapping calculation circuitry is configured to calculate map 2
(
(
[
[
∑
j
=
1
J
exp
(
u
j
-
u
1
)
]
]
,
[
[
∑
j
=
1
J
exp
(
u
j
-
u
2
)
]
]
,
…
,
[
[
∑
j
=
1
J
exp
(
u
j
-
u
J
)
]
]
)
=
(
[
[
β
g
(
1
)
]
]
,
[
[
β
g
(
2
)
]
]
,
…
,
[
[
β
g
(
J
)
]
]
)
from the share
(
[
[
∑
j
=
1
J
exp
(
u
j
-
u
1
)
]
]
,
[
[
∑
j
=
1
J
exp
(
u
j
-
u
2
)
]
]
,
…
,
[
[
∑
j
=
1
J
exp
(
u
j
-
u
J
)
]
]
)
(where g(i) (1≤i≤L) is p where
b
p
≤
∑
j
=
1
J
exp
(
u
j
-
u
i
)
<
b
p
+
1
)
to make ([[softmax (u 1 )]], [[softmax (u 2 )]], . . . ,) [[softmax (u J )]])=([[β g(1) ]], [[β g(2) ]], . . . , [[β g(J) ]]), wherein
the secure softmax function calculation system utilizes a coordinate calculation among the three or more secure function calculation apparatuses to secure computing of the softmax function through the network.
2 . The secure softmax function calculation system according to claim 1 ,
wherein the parameters of and a representing the range of values of the secure batch mapping map 1 are taken as α 1 =0 and α K =2 b_y , respectively (where b y represents the number of bits in a fractional portion of fixed point representing accuracy of an output of the softmax function).