Client device, federated learning system, learning device, and federated learning method

The federated learning system addresses the accuracy loss in differential privacy methods by using a dynamic clipping threshold to manage noise levels, maintaining learning accuracy and privacy in federated learning systems.

WO2026009285A1PCT designated stage Publication Date: 2026-01-08NT T INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/023793
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2026-01-08

AI Technical Summary

Technical Problem

Federated learning techniques that employ differential privacy methods to protect user data by adding noise to models suffer from a reduction in learning accuracy.

Method used

A federated learning system that incorporates a dynamic clipping threshold to control the addition of noise based on the magnitude of gradients, ensuring that only necessary noise is applied, thereby maintaining learning accuracy while preserving data privacy.

Benefits of technology

The system effectively suppresses the decrease in learning accuracy by dynamically adjusting the noise level according to the gradient magnitude, ensuring both privacy and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024023793_08012026_PF_FP_ABST
    Figure JP2024023793_08012026_PF_FP_ABST
Patent Text Reader

Abstract

Provided is technology capable of suppressing deterioration in learning accuracy even when noise is added to a model. A client device 20-p is a device for performing federated learning by connecting to a server device 10 via a network 9. A plurality of client devices 20 are provided, and connected to the network 9. A first mini-batch extracting unit 21 of each client device 20-p extracts data of a first mini-batch size bC from a predetermined data set Dp that is accessible by the client device 20-p as a first data set Ir (p)C. A first gradient calculating unit 22 of each client device 20-p calculates a first gradient Gr (p), C by using the first data set Ir (p)C.
Need to check novelty before this filing date? Find Prior Art

Description

Client device, federated learning system, learning device, and federated learning method

[0001] The present disclosure relates to a technique for suppressing a decrease in learning accuracy.

[0002] Federated learning does not share data, but only shares models (learning gradients), making it possible to create a model that learns the characteristics of all data while protecting the data of users participating in federated learning. It is known that information can leak from the shared model in federated learning, and as a countermeasure, differential privacy methods that add noise to models such as DP-fedavg have been proposed (see, for example, Non-Patent Document 1). Figure 1 shows Algorithm 1 presented in Non-Patent Document 1.

[0003] K Wei, et al. "Federated Learning with Differential Privacy: Algorithms and Performance Analysis",<URL: https: / / doi.org / 10.48550 / arXiv.1911.00222>

[0004] However, the technique of Non-Patent Document 1 has a problem in that adding noise reduces learning accuracy. An object of the present disclosure is to provide a technique that can suppress the reduction in learning accuracy.

[0005] A client device according to one aspect of the present disclosure is a client device for performing federated learning by connecting to a server device via a network, and includes a first mini-batch extraction unit that extracts data of a first mini-batch size from a predetermined dataset as a first dataset, and a first gradient calculation unit that uses the first dataset to calculate a first gradient for calculating a clip threshold on the server device.

[0006] According to the federated learning system of the present disclosure, it is possible to suppress a decrease in learning accuracy.

[0007] FIG. 1 is a diagram showing algorithm 1 shown in Non-Patent Document 1. FIG. 2 is a diagram showing an example of the functional configuration of a federated learning system according to this embodiment. FIG. 3 is a diagram showing an example of the functional configuration of a server device according to this embodiment. FIG. 4 is a diagram showing an example of the functional configuration of a client device according to this embodiment. FIG. 5 is a diagram showing an example of the processing flow of the federated learning system according to this embodiment. FIG. 6 is a diagram showing the algorithm of the federated learning system according to this embodiment in the same format as Non-Patent Document 1. FIG. 7 is a diagram showing an example of the functional configuration of a computer.

[0008] Hereinafter, embodiments of the present disclosure will be described in detail. Note that components having the same functions are assigned the same numbers, and redundant explanations will be omitted.

[0009] <Character notation> In this disclosure, for example, "σ C ", the "C" in the upper right corner of the letter is the clip threshold C r (See below) For example, "I r (p)C ", the (p) at the top right of the character indicates the number of the client device 20 (described later). P indicates the total number of client devices 20. P is an integer of 2 or more, and p is an integer of 1 or more and P or less. For example, "I k (p) ", the k at the bottom right of the character is an integer indicating the number of times the repetition process (inner loop process) is performed in each client device 20-1, ..., 20-P. In the inner loop process, the process is repeated K times. K is an integer equal to or greater than 2, and k is an integer equal to or greater than 1 and equal to or less than K. For example, "I r (p)C ", the r at the bottom right of the character is an integer indicating the number of times the inner loop process (outer loop process) is repeated in the entire associative learning system 1. In the outer loop process, the process is repeated R times. R is an integer equal to or greater than 2, and r is an integer equal to or greater than 1 and equal to or less than R. In the following explanation, the "C" at the top right of the character represents the clip threshold C. rindicates that it is used for the following purpose. Similarly, the "(p)" in the upper right corner of the character indicates the number of the client device. The "k" in the lower right corner of the character indicates the number of iterations in the inner loop process. The "r" in the lower right corner of the character indicates the number of iterations in the outer loop process. Note that in the text of the specification, the characters in the lower right and the characters in the upper right cannot be written in the same horizontal position, so they are written offset from each other. On the other hand, in the mathematical formulas and figures in the specification, they can be written, so they are written in the same horizontal position.

[0010] In this disclosure, for example, the "~" at the top left of a character, such as "~ν", is originally positioned above the character, but in the text of the specification, symbols that should be placed above the character are written shifted to the left. On the other hand, in the mathematical formulas and figures in the specification, symbols are written above the character because they can be written there. - "x" or "^G" in the upper left corner of the character. - The same applies to " and "^".

[0011] <Embodiment> FIG. 2 is a diagram showing an example of the functional configuration of a federated learning system according to this embodiment. FIG. 3 is a diagram showing an example of the functional configuration of a server device according to this embodiment. FIG. 4 is a diagram showing an example of the functional configuration of a client device according to this embodiment. FIG. 5 is a diagram showing an example of the processing flow of the federated learning system according to this embodiment. FIG. 6 is a diagram showing the algorithm of the federated learning system according to this embodiment in a format similar to that of Non-Patent Document 1. As shown in FIG. 2, the federated learning system 1 of this embodiment includes a server device 10 and P client devices 20-1, 20-2, ..., 20-P. The server device 10 and each client device 20-p (p = 1, 2, ..., P) are connected via a network 9. However, FIG. 2 is merely an example, and the network configuration and the number of client devices P can be determined arbitrarily.

[0012] As shown in FIG. 3, the server device 10 includes a noise parameter setting unit 11, a clip threshold calculation unit 12, a noise parameter calculation unit 13, and a model parameter summarization unit 14.

[0013] As shown in FIG. 4, each of the client devices 20-p includes a first mini-batch extraction unit 21, a first gradient calculation unit 22, an initialization unit 23, a second mini-batch extraction unit 24, a second gradient calculation unit 25, and a model parameter update unit 26.

[0014] The federated learning system 1 performs the federated learning method of this embodiment by implementing the processing flow illustrated in Fig. 5. Hereinafter, an example of the processing flow of the federated learning method in the federated learning system 1 will be described in the order of procedures with reference to Fig. 5.

[0015] In step S11, the noise parameter setting unit 11 of the server device 10 sets the first noise parameter σ C and the second noise parameter σ is set to a predetermined initial value. C is the clipping threshold C r The second noise parameter σ is a parameter used to calculate the model parameter x. The first noise parameter σ C and the second noise parameter σ is the standard deviation.

[0016] In step S21, the first mini-batch extraction unit 21 of each client device 20-p extracts a predetermined data set D p to the first mini-batch size b C The data of the first data set I r (p)C The extracted first data set I r (p)C is transmitted to the first gradient calculation unit 22.

[0017] In step S22, the first gradient calculation unit 22 of each client device 20-p calculates the first data set I r (p)C For example, the first gradient G r (p),C Calculate.

[0018] where ^G is the clipping threshold C ris the upper limit of the z (x r-1 ) || 2 , ^G 2 ) is ||∇l z (x r-1 ) || 2 The value of ^G 2 If it is larger than ^G 2 The value of ||∇l is output. z (x r-1 ) || 2 The value of ^G 2 In the following case ||∇l z (x r-1 ) || 2 The calculated first gradient G r (p),C is transmitted to the server device 10. z (x r-1 ) is the learning gradient.

[0019] In step S1a, the federated learning system 1 calculates the first gradient G r (p),C It is determined whether the calculation of has been completed. This determination may be made by the server device 10, or a function that delegates the determination to a device separate from the server device 10 may be provided. Alternatively, the client devices 20-p may be configured to make the determination in cooperation with each other. This also applies to steps S1b and S1c described later.

[0020] The first gradient G of all the client devices 20-p r (p),C If the calculation of has not been completed (No in step S1a), the process returns to step S21.

[0021] The first gradient G of all the client devices 20-p r (p),C When the calculation of the first gradient G has been completed (Yes in step S1a), in step S12, the clip threshold calculation unit 12 of the server device 10 calculates the first gradient G r (p),C and the first noise parameter σ C and, for example, the clip threshold C rCalculate. where τ and ^G are arbitrary values. r C is centered at 0, and (σ C ) 2 is the noise normalized with variance . If the value calculated in the √ part is larger than ^G, the clip threshold C r is the value of ^G, and if the value calculated in the √ part is less than ^G, the clip threshold C r is the value calculated in the √ part. The calculated clip threshold C r is transmitted to the initialization unit 23.

[0022] In step S23, the initialization unit 23 of each client device 20-p initializes the model parameter x using, for example, the following equation: 0 (p) Calculate. Calculated model parameters x 0 (p) is sent to the second mini-batch extractor 24.

[0023] In step S24, the second mini-batch extraction unit 24 of each client device 20-p extracts a predetermined data set D p The data of the second mini-batch size b is taken from the second dataset I k (p) The extracted second data set I k (p) is transmitted to the second gradient calculation unit 25.

[0024] In step S25, the second gradient calculation unit 25 calculates the second data set I k (p) and the clip threshold C r Using the above, the second gradient g can be calculated from the following equation: k (p) Calculate. Here, Clip (∇l z (x k-1 (p) ), C r ) is ∇l z (x k-1 (p)) is the clip threshold C r If it is larger than (∇l z (x k-1 (p) )) x C r / |∇l z (x k-1 (p) ) | value, and ∇l z (x k-1 (p) ) is the clip threshold C r In the following cases, ∇l z (x k-1 (p) The calculated second gradient g k (p) is transmitted to the model parameter update unit 26.

[0025] In step S26, the model parameter update unit 26 calculates the second gradient g k (p) For example, the model parameter x is updated using the following equation: k (p) Calculate. Here, η is a predetermined learning rate.

[0026] In step S27, each client device 20-p determines whether the inner loop has been completed. That is, it determines whether learning has been completed K times. If the inner loop has not been completed (No in step S27), the process returns to step S24. If the inner loop has been completed (Yes in step S27), the final value (value for the Kth time) of the model parameter x K (p) is transmitted to the server device 10. In addition, the federated learning system 1 uses the model parameter x K (p) Instead of the above, the model parameters are averaged as follows: - x (p) may be configured to transmit the above to the server device 10.

[0027] In step S1b, the federated learning system 1 performs a process in which all the client devices 20-p transmit x to the server device 10. K(p) or - x (p) It is determined whether the transmission of x of all the client devices 20-p is completed. K (p) or - x (p) If the transmission of the message has not been completed (No in step S1b), the process returns to step S23.

[0028] The model parameters x of all the client devices 20-p K (p) or model parameters - x (p) When the transmission of the clip threshold C is completed (Yes in step S1b), in step S13, the noise parameter calculation unit 13 of the server device 10 r and the second noise parameter σ, the aggregate noise parameter σ is calculated from the following equation, for example: r Calculate. where η is the learning rate. The calculated aggregate noise parameter σ r is transmitted to the model parameter aggregating unit 14.

[0029] In step S14, the model parameter aggregating unit 14 of the server device 10 aggregates the trained model parameters x K (p) and the aggregate noise parameter σ in each of the client devices 20-p. r For example, the model parameters are aggregated using the following equation to obtain the model parameter x r Calculate. where ξ r is centered at 0, and σ r 2 The noise is normalized with variance x. r Instead of the above, for example, the model parameter x r (out) may be configured to use

[0030] In step S1c, the associative learning system 1 determines whether or not the processing of all outer loops (the processing of the outer loops R times) has been completed.

[0031] If the processing of all the outer loops has not been completed (No in step S1c), the process returns to step S21.

[0032] When the processing of all outer loops has been completed (Yes in step S1c), the associative learning system 1 outputs the result of the associative learning in step S1d. That is, the associative learning system 1 outputs the model parameter x r The model parameters x R The federated learning system 1 outputs the model parameter x R Alternatively, the model parameter x R and the model parameter x (out) may be configured to output as the learning result of the federated learning system 1.

[0033] The federated learning system 1 of the present disclosure employs a so-called differential privacy method because it adds noise to the model. r is given by the above-mentioned formula (8) and formula (9), but formula (7) and formula (2) are used for the calculation. r The noise level dynamically changes according to the magnitude of the gradient learned in federated learning. Therefore, the federated learning system of the present disclosure can suppress a decrease in learning accuracy, thereby efficiently ensuring safety.

[0034] ξ used in the federated learning system 1 of the present disclosure r In formula (1) used to calculate formula (2), clipping is performed. That is, the parameters to which noise is added are clipped, and then the noise is added. This prevents unnecessary excessive noise from being added, and prevents deterioration of accuracy due to noise.

[0035] The federated learning system 1 of the present disclosure performs clipping during learning as shown in equations (4)-(6). The clipping threshold C r is not a fixed value, but dynamically changes in accordance with the model parameter x as shown in equation (2). This also makes it possible to suppress a decrease in learning accuracy.

[0036] <First Modification> The above-described associative learning system 1 uses a clip threshold C r , or the model parameters x r , x r (out) The noise in the calculation of ξ r C and ξ r However, the associative learning system 1 of the present disclosure is not limited to this, and may be an associative learning system 1B that does not use such noise.

[0037] In the federated learning system 1B, for example, the server device 10 of the federated learning system 1 is replaced with a server device 10B. The server device 10B includes a clip threshold calculation unit 12 and a model parameter aggregating unit 14. However, when the noise ξ r C and ξ r Since only the part that does not use the above is different, the configuration of the client device is the same as that of the client device 20-p already described.

[0038] In an example of the processing flow of associative learning system 1B, the processing of steps S11 and S13 is not performed in Fig. 5. The rest is the same as Fig. 5. Note that associative learning system 1B has the same configuration as associative learning system 1, and the noise ξ r C and ξ r Alternatively, the calculation may be performed by substituting 0 (zero) for

[0039] The associative learning system 1B can also suppress a decline in learning accuracy.

[0040] <Second Modification> The above-described associative learning system 1 has been described as having a configuration in which P is an integer greater than or equal to 2, but the associative learning system of the present disclosure is not limited to this, and P may be 1. In this case, since it is not a form of associative learning, it will be referred to as learning system 1C here.

[0041] An example of the processing flow of the learning system 1C is the same as that in the case of P = 1 in Figure 5. That is, in Figure 5, the processing of steps S1a and S1b is not performed. The rest is the same as that in Figure 5. Note that, since P = 1, the model parameter aggregating unit 14 may not be provided, and the processing of step S14 may be made unnecessary. The learning system 1C can also suppress a decrease in learning accuracy.

[0042] <Third Modification> The learning system 1C is configured to r C and ξ r However, a learning system 1D that does not use noise may also be used.

[0043] That is, in the learning system 1D, the server device 10 of the learning system 1C is replaced with the server device 10B already described.

[0044] The learning system 1D can also suppress a decrease in learning accuracy.

[0045] Although the learning system 1C is configured with one server device 10 and one client device 20, the functions of each may be integrated into a single device, namely, a learning device 10E. The learning device 10E includes a noise parameter setting unit 11, a clip threshold calculation unit 12, a noise parameter calculation unit 13, a first mini-batch extraction unit 21, a first gradient calculation unit 22, an initialization unit 23, a second mini-batch extraction unit 24, a second gradient calculation unit 25, and a model parameter update unit 26.

[0046] An example of the processing flow of the learning device 10E is the same as the processing flow of the learning system 1C in Fig. 5, excluding step S14, performed only by the learning device 10E. The learning device 10E can also suppress a decrease in learning accuracy.

[0047] The above describes the embodiments and modifications of the present disclosure. The various processes in the above-described embodiments may not only be executed in chronological order as described, but may also be executed in parallel or individually depending on the processing capabilities of the devices that execute the processes or as needed. It goes without saying that other modifications are possible without departing from the spirit of the present disclosure.

[0048] The present disclosure may further include a device (terminal) for using the device of the present disclosure or the method of the present disclosure via a network (telecommunications line). The "device (terminal) for use" may be provided with functions (e.g., control function, decoding function, restoration function, input / output function, etc.) necessary to obtain the effects of implementing the device of the present disclosure or the method of the present disclosure.

[0049] [Processor, Program, Recording Medium] The functions performed by the components described herein may be implemented in circuitry or processing circuitry, including general-purpose processors, application-specific processors, integrated circuits, ASICs (Application Specific Integrated Circuits), a CPU (a Central Processing Unit), conventional circuits, and / or combinations thereof, programmed to perform the described functions. A processor includes transistors and other circuits and is considered to be circuitry or processing circuitry. A processor may also be a programmed processor that executes a program stored in a memory.

[0050] In this specification, a circuitry, unit, or means is hardware that is programmed to realize or performs the described functions, which may be any hardware disclosed herein or any hardware known to be programmed to realize or perform the described functions.

[0051] If the hardware is a processor considered to be a type of circuitry, the circuitry, means, or unit is a combination of the hardware and software used to configure the hardware and / or processor.

[0052] The various processes described above can be implemented by loading a program that executes each step of the above method into the recording unit 2020 of the computer 2000 shown in Figure 7, and operating the control unit 2010, input unit 2030, output unit 2040, display unit 2050, etc.

[0053] The program describing the processing contents can be recorded on a computer-readable recording medium, which may be, for example, a magnetic recording device, an optical disk, a magneto-optical recording medium, a semiconductor memory, or any other suitable recording medium.

[0054] The program may be distributed by, for example, selling, transferring, lending, etc. portable recording media such as DVDs and CD-ROMs on which the program is recorded. Furthermore, the program may be stored in a storage device of a server computer, and then transferred from the server computer to other computers via a network, thereby distributing the program.

[0055] A computer that executes such a program may first temporarily store the program recorded on a portable recording medium or transferred from a server computer in its own storage device. Then, when executing a process, the computer reads the program stored on its own recording medium and executes the process in accordance with the read program. Alternatively, the computer may read the program directly from a portable recording medium and execute the process in accordance with the program. Furthermore, the computer may execute the process in accordance with the received program each time a program is transferred from a server computer to the computer. Alternatively, the server computer may not transfer the program to the computer, but may instead execute the process through a so-called ASP (Application Service Provider) service, which realizes the processing function by issuing an execution instruction and obtaining the results. Furthermore, the server computer may execute the process at the terminal using a so-called SaaS (Software as a Service) service, which allows users to use part of a server computer along with the program. In this embodiment, the program includes information used for processing by an electronic computer that is equivalent to a program (such as data that is not a direct instruction to a computer but has properties that dictate computer processing).

[0056] Furthermore, in this embodiment, the device is configured by executing a predetermined program on a computer, but at least a part of the processing contents may be realized by hardware.

Claims

1. A client device for performing federated learning by connecting to a server device via a network, the client device having: a first mini-batch extraction unit that extracts data of a first mini-batch size from a predetermined dataset as a first dataset; and a first gradient calculation unit that uses the first dataset to calculate a first gradient for calculating a clip threshold on the server device.

2. A federated learning system in which a server device and a plurality of client devices are connected via a network, wherein a first noise parameter and a second noise parameter are set to respective predetermined initial values, and each client device has: a first mini-batch extraction unit that extracts data of a first mini-batch size from a predetermined dataset as a first dataset; a first gradient calculation unit that calculates a first gradient using the first dataset; an initialization unit that initializes model parameters; a second mini-batch extraction unit that extracts data of a second mini-batch size from the predetermined dataset as a second dataset; a second gradient calculation unit that calculates a second gradient using the second dataset and a clip threshold; and a model parameter update unit that updates the model parameters using the second gradient, and the server device has: a clip threshold calculation unit that calculates the clip threshold using the first gradient and the first noise parameter; and a noise parameter calculation unit that calculates an aggregate noise parameter using the clip threshold and the second noise parameter. a model parameter aggregator that aggregates model parameters using the updated model parameters for each of the client devices and the aggregate noise parameters for each of the client devices.

3. A learning device comprising: a first mini-batch extraction unit that extracts data of a first mini-batch size from a predetermined dataset as a first dataset; a first gradient calculation unit that calculates a first gradient using the first dataset; a clip threshold calculation unit that calculates a clip threshold using the first gradient and a predetermined first noise parameter; an initialization unit that initializes model parameters; a second mini-batch extraction unit that extracts data of a second mini-batch size from the dataset as a second dataset; a second gradient calculation unit that calculates a second gradient using the second dataset and the clip threshold; a model parameter update unit that updates the model parameters using the second gradient; a noise parameter calculation unit that calculates an aggregate noise parameter using the clip threshold and a predetermined second noise parameter; and a model parameter aggregation unit that aggregates model parameters using the updated model parameters and the aggregate noise parameter.

4. A federated learning method performed by a federated learning system in which a server device and a plurality of client devices are connected via a network, wherein a first noise parameter and a second noise parameter are set to respective predetermined initial values, and each of the client devices has: a first mini-batch extraction unit that extracts data of a first mini-batch size from a predetermined dataset as a first dataset; a first gradient calculation unit that calculates a first gradient using the first dataset; an initialization unit that initializes model parameters; a second mini-batch extraction unit that extracts data of a second mini-batch size from the predetermined dataset as a second dataset; a second gradient calculation unit that calculates a second gradient using the second dataset and a clip threshold; and a model parameter update unit that updates the model parameters using the second gradient; and in the server device, a clip threshold calculation unit that calculates the clip threshold using the first gradient and the first noise parameter; and a noise parameter calculation unit that calculates an aggregate noise parameter using the clip threshold and the second noise parameter. a model parameter aggregator aggregating model parameters using the updated model parameters for each of the client devices and the aggregated noise parameters for each of the client devices.

Citation Information

Patent Citations

  • Asynchronous federated learning method and system for adaptive differential privacy adjustment

    CN118036711A