# US 2022/0292362 A1 · Secret softmax function calculation system, secret softmax calculation apparatus, secret softmax calculation method, secret neural network calculation system, secret neural network learning system, and program

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0292362 A1
- Document ID: US20220292362A1
- Status: Published application
- Kind: A1
- Application number: 17/632,509
- Filed: 2019-08-14
- Published: 2022-09-15
- Earliest claimed: 2019-08-14
- Assignees: Nippon Telegraph and Telephone Corporation
- Applicants: Nippon Telegraph and Telephone Corporation
- Inventors: Ibuki MISHINA; Dai IKARASHI; Koki HAMADA
- Web page: https://patentgrep.com/patent/US20220292362A1

## CPC

- G06F 21/6245: {Protecting personal data, e.g. for financial or medical purposes}
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06F 21/57: Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- G06N 3/048: Activation functions
- H04L 9/085: {Secret sharing or secret splitting, e.g. threshold schemes}
- H04L 2209/46: Secure multiparty computation, e.g. millionaire problem
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

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 (u1)]], . . . , [[softmax (uJ)]]) from a share ([[u1]], . . . , [[uJ]]) includes a subtraction means for calculating a share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−uJ]]), a first secure batch mapping calculation means for calculating, [[exp (u1−u1)]], [[exp (u2−u1)]], . . . , [[exp (uJ−uJ)]], an addition means for calculating a share ([[Σj=1J exp (uj−u1)]], . . . , [[Σj=1J exp (uj−uJ)]], and a second secure batch mapping calculation means for calculating a share ([[softmax (u1)], . . . , [[softmax (uJ)]]).

## Claims

### Claim 1

A secure softmax function calculation system for calculating a share ([[softmax (u1)]], . . . , [[softmax (uJ)]]) of a value (softmax (u1), . . . , softmax (uJ)) of a softmax function for an input vector (u1, . . . , uJ) from a share ([[u1]], . . . , [[uJ]]) of the input vector (u1, . . . , uJ) (where J is an integer greater than or equal to 1), the secure softmax function calculation system being constituted with three or more secure softmax function calculation apparatuses,
map1 being secure batch mapping defined by a parameter (a1, . . . , aK) 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, a1, . . . , aK are real numbers that meet a1< . . . <aK) of a function exp (x), and map2 being secure batch mapping defined by a parameter (b1, . . . , bL) 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, b1, . . . , bL are real numbers that meet b1< . . . <bL) of a function 1/x,
the secure softmax function calculation system comprising:
a subtraction means for calculating a share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]) from the share ([[u1]], . . . , [[uJ]]);
a first secure batch mapping calculation means for calculating map1 (([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]))=([[αf(1, 1)]], [[αf(2, 1)]], . . . , [[αf(J, 1)]], [[αf(1, 2)]], . . . , [[αf(J, 2)]], . . . , [[αf(1, J)]], . . . , [[αf(J, J)]]) from the share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]) (where f(i, j) (1≤i, j≤K) is p where ap≤ui−uj<ap+1) to make ([[exp (u1−u1)]], [[exp (u2−u1)]], . . . , [[exp (uJ−u1)]], [[exp (u1−u2)]], . . . , [[exp (uJ−u2)]], . . . , [[exp (u1−uJ)]], . . . , [[exp (uJ−uJ)]])=([[αf(1, 1)]], [[αf(2, 1)]], . . . , [[αf(J, 1)]], [[αf(1, 2)]], . . . , [[αf(J, 2)]], . . . , [[αf(1, J)]], . . . , [[αf(J, J)]]);
an addition means for calculating a share ([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]) from the share ([[exp (u1−u1)]], [[exp (u2−u1)]], . . . , [[exp (uJ−u1)]], [[exp (u1−u2)]], . . . , [[exp (uJ−u2)]], . . . , [[exp (u1−uJ)]], . . . , [[exp (uJ−uJ)]]); and
a second secure batch mapping calculation means for calculating map2 (([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]))=([[βg(1)]], [[βg(2)]], . . . , [[βg(J)]]) from the share ([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]) (where g(i) (1≤i≤L) is p where bp≤Σj=1J exp (uj−ui)<bp+1) to make ([[softmax (u1)]], [[softmax (u2)]], . . . , [[softmax (uJ)]]=([[βg(1)]], [[βg(2)]], . . . , [[βg(J)]]).

### Claim 2 (depends on 1)

The secure softmax function calculation system according to claim 1,
wherein the parameters α1 and αK representing the range of values of the secure batch mapping map1 are taken as α1=0 and αK=2b_y, respectively (where by represents the number of bits in a fractional portion of fixed point representing accuracy of an output of the softmax function).

### Claim 3

A secure softmax function calculation apparatus in a secure softmax function calculation system for calculating a share ([[softmax (u1)]], . . . , [[softmax (uJ)]]) of a value (softmax (u1), . . . , softmax (uJ)) of a softmax function for an input vector (u1, . . . , uJ) from a share ([[u1]], . . . , [[uJ]]) of the input vector (u1, . . . , uJ) (where J is an integer greater than or equal to 1), the secure softmax function calculation system being constituted with three or more secure softmax function calculation apparatuses,
map1 being secure batch mapping defined by a parameter (a1, . . . , aK) 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, a1, . . . , aK are real numbers that meet a1< . . . <aK) of a function exp (x), and map2 being secure batch mapping defined by a parameter (b1, . . . , bL) 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, b1, . . . , bL are real numbers that meet b1< . . . <bL) of a function 1/x,
the secure softmax function calculation apparatus comprising:
a subtraction means for calculating a share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]) from the share ([[u1]], . . . , [[uJ]]);
a first secure batch mapping calculation means for calculating map1 (([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]))=([[αf(1, 1)]], [[αf(2, 1)]], . . . , [[αf(J, 1)]], [[αf(1, 2)]], . . . , [[αf(J, 2)]], . . . , [[αf(1, J)]], . . . , [[αf(J, J)]]) from the share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]) (where f(i, j) (1≤i, j≤K) is p where ap≤ui−uj<ap+1) to make ([[exp (u1−u1)]], [[exp (u2−u1)]], . . . , [[exp (uJ−u1)]], [[exp (u1−u2)]], . . . , [[exp (uJ−u2)]], . . . , [[exp (u1−uJ)]], . . . , [[exp (uJ−uJ)]])=([[αf(1, 1)]], [[αf(2, 1)]], . . . , [[αf(J, 1)]], [[αf(1, 2)]], . . . , [[αf(J, 2)]], . . . , [[αf(1, J)]], . . . , [[αf(J, J)]]);
an addition means for calculating a share ([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]) from the share ([[exp (u1−u1]], [[exp (u2−u1)]], . . . [[exp (uJ−u1]], [[exp (u1−u2)]], . . . , [[exp (uJ−u2)]], . . . , [[exp (u1−uJ)]], . . . , [[exp (uJ−uJ)]]); and
a second secure batch mapping calculation means for calculating map2 (([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]))=([[βg(1)]], [[βg(2)]], . . . , [[βg(J)]]) from the share ([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]) (where g(i) (1≤i≤L) is p where bp≤Σj=1J exp (uj−ui)<bp+1) to make ([[softmax (u1)]], [[softmax (u2)]], . . . , [[softmax (uJ)]]=([[βg(1)]], [[βg(2)]], . . . , [[βg(J)]]).

### Claim 4

A secure softmax function calculation method in which a secure softmax function calculation system calculates a share ([[softmax (u1)]], . . . , [[softmax (uJ)]]) of a value (softmax (u1), . . . , softmax (uJ)) of a softmax function for an input vector (u1, . . . , uJ) from a share ([[u1]], . . . , [[uJ]]) of the input vector (u1, . . . , uJ) (where J is an integer greater than or equal to 1), the secure softmax function calculation system being constituted with three or more secure softmax function calculation apparatuses,
map1 being secure batch mapping defined by a parameter (a1, . . . , aK) 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, a1, . . . , aK are real numbers that meet a1< . . . <aK) of a function exp (x), and map2 being secure batch mapping defined by a parameter (b1, . . . , bL) 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, b1, . . . , bL are real numbers that meet b1< . . . <bL) of a function 1/x,
the secure softmax function calculation method comprising:
subtracting in which the secure softmax function calculation system calculates a share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]) from the share ([[u1]], . . . , [[uJ]]);
calculating in which the secure softmax function calculation system calculates map1 (([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]))=([[αf(1, 1)]], [[αf(2, 1)]], . . . , [[αf(J, 1)]], [[αf(1, 2)]], . . . , [[αf(J, 2)]], . . . , [[αf(1, J)]], . . . , [[αf(J, J)]]) from the share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]) (where f(i, j) (1≤i, j≤K) is p where ap≤ui−uj<ap+1) to make ([[exp (u1−u1)]], [[exp (u2−u1)]], . . . , [[exp (uJ−u1)]], [[exp (u1−u2)]], . . . , [[exp (uJ−u2)]], . . . , [[exp (u1−uJ)]], . . . , [[exp (uJ−uJ)]])=([[αf(1, 1)]], [[αf(2, 1)]], . . . , [[αf(J, 1)]], [[αf(1, 2)]], . . . , [[αf(J, 2)]], . . . , [[αf(1, J)]], . . . , [[αf(J, J)]]);
adding in which the secure softmax function calculation system calculates a share ([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]) from the share ([[exp (u1−u1)]], [[exp (u2−u1)]], . . . , [[exp (uJ−u1)]], [[exp (u1−u2)]], . . . , [[exp (uJ−u2)]], . . . , [[exp (u1−uJ)]], . . . , [[exp (uJ−uJ)]]); and
calculating in which the secure softmax function calculation system calculates map2 (([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]))=([[βg(1)]], [[βg(2)]], . . . , [[βg(J)]]) from the share ([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]) (where g(i) (1≤i≤L) is p where bp≤Σj=1J exp (uj−ui)<bp+1) to make ([[softmax (u1)]], [[softmax (u2)]], . . . , [[softmax (uJ)]]=([[βg(1)]], [[βg(2)]], . . . , [[βg(J)]]).

### Claim 5

A secure neural network calculation system for calculating a share [[YN+1]] of an output value YN+1 (N is an integer greater than or equal to 2) for input data X from a share [[X]] of the input data X, the secure neural network calculation system being constituted with three or more secure neural network calculation apparatuses,
map1 being secure batch mapping defined by a parameter (a1, . . . , aK) 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, a1, . . . , aK are real numbers that meet a1< . . . <aK) of a function exp (x), and map2 being secure batch mapping defined by a parameter (b1, . . . , bL) 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, b1, . . . , bL are real numbers that meet b1< . . . <bL) of a function 1/x, and
the secure neural network calculation system comprising:
an input layer calculation means for calculating a share [[Y1]] of an output value Y1 of an input layer from a share [[X]] by using a share [[W0]] of a parameter W0 of an input layer;
an n-th layer calculation means for calculating a share [[Yn+1]] of an output value Yn+1 of an n-th layer from a share [[Yn]] by using a share [[Wn]] of a parameter Wn of an n-th layer, where n=1, . . . , N−1; and
an output layer calculation means for calculating a share [[YN+1]] of an output value YN+1 of an output layer from a share [[YN]] by using a share [[WN]] of a parameter WN of an output layer,
wherein (u1, . . . , uJ) (where J is an integer greater than or equal to 1) is an intermediate output value UN+1 in the output layer, and
the output layer calculation means includes:
a subtraction means for calculating a share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]) from the share ([[u1]], . . . , [[uJ]]) of the intermediate output value UN+1;
a first secure batch mapping calculation means for calculating map1 (([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]))=([[αf(1, 1)]], [[αf(2, 1)]], . . . , [[αf(J, 1)]], [[αf(1, 2)]], . . . , [[αf(J, 2)]], . . . , [[αf(1, J)]], . . . , [[αf(J, J)]]) from the share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]) (where f(i, j) (1≤i, j≤K) is p where ap≤ui−uj<ap+1) to make ([[exp (u1−u1)]], [[exp (u2−u1)]], . . . , [[exp (uJ−u1)]], [[exp (u1−u2)]], . . . , [[exp (uJ−u2)]], . . . , [[exp (u1−uJ)]], . . . , [[exp (uJ−uJ)]])=([[αf(1, 1)]], [[αf(2, 1)]], . . . , [[αf(J, 1)]], [[αf(1, 2)]], . . . , [[αf(J, 2)]], . . . , [[αf(1, J)]], . . . , [[αf(J, J)]]);
an addition means for calculating a share ([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]) from the share ([[exp (u1−u1)]], [[exp (u2−u1)]], . . . , [[exp (uJ−u1)]], [[exp (u1−u2)]], . . . , [[exp (uJ−u2)]], . . . , [[exp (u1−uJ)]], . . . , [[exp (uJ−uJ)]]); and
a second secure batch mapping calculation means for calculating map2 (([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]))=([[βg(1)]], [[βg(2)]], . . . , [[βg(J)]]) from the share ([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]) (where g(i) (1≤i≤L) is p where bp≤Σj=1J exp (uj−ui)<bp+1) to make [[YN+1]]=([[softmax (u1)]], [[softmax (u2)]], . . . , [[softmax (uJ)]]=([[βg(1)]], [[βg(2)]], . . . , [[βg(J)]]).

### Claim 6

A secure neural network learning system for updating a share [[W0]] of a parameter W0 of an input layer, a share [[Wn]] of a parameter Wn of an n-th layer (n=1, . . . , N−1, N is an integer greater than or equal to 2), and a share [[Wn]] of a parameter WN of an output layer by using a share [[X]] of learning data X and a share [[T]] of a learning label T, the secure neural network learning system being constituted with three or more secure neural network learning apparatuses,
map1 being secure batch mapping defined by a parameter (a1, . . . , aK) 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, a1, . . . aK are real numbers that meet a1< . . . <aK) of a function exp (x), and map2 being secure batch mapping defined by a parameter (b1, . . . , bL) 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, b1, . . . , bL are real numbers that meet b1< . . . <bL) of a function 1/x, and
the secure neural network learning system comprising:
a forward propagation calculation means for calculating a share [[Y1]] of an output value Y1 of an input layer, a share [[Yn+1]] of an output value Yn+1 of an n-th layer [[Yn+1]] (n=1, . . . , N−1), and a share [[YN+1]] of an output value YN+1 of an output layer from the share [[X]] by using the share [[Wn]] (n=0, . . . , N);
a back propagation calculation means for calculating a share [[ZN+1]] of an error ZN+1 in an output layer, a share [[Zn+1]] of an error Zn+1 in an n-th layer (n=N−1, . . . , 1), and a share [[Z1]] of an error Z1 in an input layer from the share [[YN+1]] and the share [[T]] by using the share [[Wn]] (n=N, . . . , 1);
a gradient calculation means for calculating a share [[G0]] of a gradient G0 in the input layer, a share [[Gn]] of the gradient Gn in the n-th layer (n=1, . . . , N−1), and a share [[GN]] of a gradient GN in the output layer from the share [[Zn]] (n=1, . . . , N+1) by using the share [[X]] and the share [[Yn]] (n=1, . . . , N); and
a parameter update means for updating the share [[Wn]] (n=0, . . . , N) by using the share [[Gn]] (n=0, . . . , N),
wherein (u1, . . . , uJ) (where J is an integer greater than or equal to 1) is an intermediate output value UN+1 in the output layer, and
the forward propagation calculation means includes:
a subtraction means for calculating a share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]) from the share ([[u1]], . . . , [[uJ]]) of the intermediate output value UN+1;
a first secure batch mapping calculation means for calculating map1 (([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]))=([[αf(1, 1)]], [[αf(2, 1)]], . . . , [[αf(J, 1)]], [[αf(1, 2)]], . . . , [[αf(J, 2)]], . . . , [[αf(1, J)]], . . . , [[αf(J, J)]]) from the share ([[u1−u1]], [[u2−u1]], . . . , [[uJ−u1]], [[u1−u2]], . . . , [[uJ−u2]], . . . , [[u1−uJ]], . . . , [[uJ−uJ]]) (where f(i, j) (1≤i, j≤K) is p where ap≤ui−uj<ap+1) to make ([[exp (u1−u1)]], [[exp (u2−u1)]], . . . , [[exp (uJ−u1)]], [[exp (u1−u2)]], . . . , [[exp (uJ−u2)]], . . . , [[exp (u1−uJ)]], . . . , [[exp (uJ−uJ)]])=([[αf(1, 1)]], [[αf(2, 1)]], . . . , [[αf(J, 1)]], [[αf(1, 2)]], . . . , [[αf(J, 2)]], . . . , [[αf(1, J)]], . . . , [[αf(J, J)]]);
an addition means for calculating a share ([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]) from the share ([[exp (u1−u1)]], [[exp (u2−u1)]], . . . , [[exp (uJ−u1)]], [[exp (u1−u2)]], . . . , [[exp (uJ−u2)]], . . . , [[exp (u1−uJ)]], . . . , [[exp (uJ−uJ)]]); and
a second secure batch mapping calculation means for calculating map2 (([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]))=([[βg(1)]], [[βg(2)]], . . . , [[βg(J)]]) from the share ([[Σj=1J exp (uj−u1)]], [[Σj=1J exp (uj−u2)]], . . . , [[Σj=1J exp (uj−uJ)]]) (where g(i) (1≤i≤L) is p where bp≤Σj=1J exp (uj−ui)<bp+1) to make [[YN+1]]=([[softmax (u1)]], [[softmax (u2)]], . . . , [[softmax (uJ)]])=([[βg(1)]], [[βg(2)]], . . . , [[βg(J)]]).

### Claim 7 (depends on 3)

A nontransitory computer-readable storage medium storing a program causing a computer to function as the secure softmax function calculation apparatus according to claim 3.
