Federated learning
Some embodiments are directed to a federated learning system. A federated model is trained on respective local training datasets of respective multiple edge devices. In an iteration, an edge device obtains a current federated model, determines a model update for the current federated model based on the local training dataset, and sends out the model update. The edge device determines the model update by applying the current federated model to a training input to obtain at least a model output for the training input; if the model output does not match a training output corresponding to the training input, include the training input in a subset of filtered training inputs to be used in the iteration; and determining the model update by training the current federated model on only the subset of filtered training inputs.
1 . An edge device for use in a federated learning system for training a federated model, the edge device being comprised in a set of multiple edge devices, wherein the federated model is trained on respective local training datasets of the multiple edge devices, the edge device comprising:
a storage interface for accessing the local training dataset of the edge device, the local training dataset comprising multiple training inputs and corresponding training outputs; and
a processor system configured to iteratively train the federated model by, in an iteration: obtaining a current federated model, determining a model update for the current federated model based on the local training dataset, and sending the model update to one or more other devices of the federated learning system, wherein determining the model update in the iteration comprises:
applying the current federated model to a training input to obtain at least a model output for the training input;
when the model output does not match a training output corresponding to the training input, include the training input in a subset of filtered training inputs to be used in the iteration; and
determining the model update by training the current federated model on only the subset of filtered training inputs, wherein the subset of filtered training inputs to be used in the iteration is smaller than a subset of filtered training inputs to be used in a previous iteration.
2 . The edge device of claim 1 , wherein the processor system is configured to perform one or more iterations in which a model update is determined by training on the local training dataset in full, followed by one or more iterations in which a model update is determined by training on only the subset of filtered training inputs.
3 . The edge device of claim 1 , wherein the edge device is an IoT device.
4 . The edge device of claim 1 , wherein the processor system is configured to train the current federated model by applying multiple training epochs to the subset of filtered training inputs.
5 . The edge device of claim 1 , wherein the processor system is further configured to determine a confidence score of the current federated model for the training input; and, when the confidence score does not exceed a threshold, include the training input in the subset of filtered training inputs.
6 . The edge device of claim 1 , wherein the processor system is configured to train the current federated model in a forward pass in which the current federated model is applied to training inputs to determine model outputs, and a backward pass in which the model update is determined based on the determined model outputs; and wherein the processor system is configured to determine the subset of filtered training inputs to be used in the iteration based on the model outputs determined in the forward pass.
7 . The edge device of claim 1 , wherein the processor system is configured to include a training input in the subset of filtered training inputs that was not included in a subset of filtered training inputs of a previous iteration.
8 . The edge device of claim 1 , wherein the processor system is configured to receive the current federated model from an aggregation device of the federated learning system and to send the model update to the aggregation device.
9 . The edge device of claim 1 , wherein the processor system is configured to determine an initial federated model by training on the local training dataset, and to send the initial federated model to one or more other devices of the federated learning system.
10 . The edge device of claim 1 , wherein the model update comprises an updated set of parameters for the current federated model or a gradient for updating the current federated model.
11 . A federated learning system for training a federated model, the federated learning system comprising multiple edge devices and an aggregation device, wherein the federated model is trained on respective local training datasets of the multiple edge devices,
wherein an edge device of the multiple edge devices is configured to iteratively train the federated model by, in an iteration: receiving a current federated model from the aggregation device, determining a model update for the current federated model based on the local training dataset, and sending the model update to the aggregation device, wherein determining the model update in the iteration comprises:
applying the current federated model to a training input to obtain at least a model output for the training input;
when the model output does not match a training output corresponding to the training input, include the training input in a subset of filtered training inputs to be used in the iteration; and
determining the model update by training the current federated model on only the subset of filtered training inputs, wherein the subset of filtered training inputs to be used in the iteration is smaller than a subset of filtered training inputs to be used in a previous iteration; and
wherein the aggregation device is configured to iteratively train the federated model by, in an iteration: sending a current federated model to one or more edge devices; receiving model updates from the one or more edge devices, and updating the current federated model by aggregating the model updates.
12 . A computer-implemented edge method of participating in a federated learning system for training a federated model, the federated learning system comprising multiple edge devices, wherein the federated model is trained on respective local training datasets of the multiple edge devices, the method comprising:
accessing a local training dataset of an edge device of the multiple edge devices, the local training dataset comprising multiple training inputs and corresponding training outputs;
iteratively training the federated model by, in an iteration: obtaining a current federated model, determining a model update for the current federated model based on the local training dataset, and sending the model update to one or more other devices of the federated learning system, wherein determining the model update in the iteration comprises:
applying the current federated model to a training input to obtain at least a model output for the training input;
when the model output does not match a training output corresponding to the training input, including the training input in a subset of filtered training inputs to be used in the iteration; and
determining the model update by training the current federated model on only the subset of filtered training inputs, wherein the subset of filtered training inputs to be used in the iteration is smaller than a subset of filtered training inputs to be used in a previous iteration.
13 . A computer-implemented federated learning method of training a federated model by a federated learning system, the federated learning system comprising multiple edge devices, wherein the federated model is trained on respective local training datasets of the respective-multiple edge devices, the method comprising iteratively training the federated model by:
at each edge device: obtaining a current federated model, determining a model update for the current federated model based on the local training dataset in an iteration, and sending the model update to one or more other devices of the federated learning system, wherein determining the model update in the iteration comprises:
applying the current federated model to a training input to obtain at least a model output for the training input;
when the model output does not match a training output corresponding to the training input, including the training input in a subset of filtered training inputs to be used in the iteration; and
determining the model update by training the current federated model on only the subset of filtered training inputs, wherein the subset of filtered training inputs to be used in the iteration is smaller than a subset of filtered training inputs to be used in a previous iteration;
at one or more devices of the federated learning system, receiving one or more model updates from the multiple edge devices of the federated learning system and updating the current federated model by aggregating said model updates.
14 . A non-transitory computer-readable medium storing—instructions which, when executed by a processor system, cause the processor system to perform the method according to claim 12 .
15 . The method of claim 13 , further comprising:
performing at least one iteration in which a model update is determined by training on the local training dataset in full.
16 . The method of claim 13 , wherein training the current federated model comprises applying multiple training epochs to the subset of filtered training inputs.
17 . The method of claim 13 , further comprising:
determining a confidence score of the current federated model for the training input; and
when the confidence score does not exceed a threshold, including the training input in the subset of filtered training inputs.
18 . The method of claim 13 , further comprising:
receiving the current federated model from an aggregation device; and
sending the model update to the aggregation device.
19 . The method of claim 13 , further comprising:
determining an initial federated model by training on the local training dataset; and
sending the initial federated model to at least one other edge device of the federated learning system.
20 . The method of claim 13 , wherein the model update comprises an updated set of parameters for the current federated model or a gradient for updating the current federated model.