This application claims priority to European Patent Application Number 22306437.7, filed 30 Aug. 2023, the specification of which is hereby incorporated herein by reference.
At least one embodiment of the invention relates to a method for performing privacy-preserving federated learning in the framework of object detection.
At least one embodiment of the invention further relates to a computer program and a framework.
At least one embodiment of the invention applies to the field of computer science, and more specifically to artificial intelligence for image processing.
It is known to perform federated learning, that is to say to collect knowledge from various heterogeneous sources of data (hereinafter called “local data”), generally scattered across different geographical locations, and to incorporate this knowledge into a central artificial intelligence model.
However, known methods for federated learning are not entirely satisfactory.
Indeed, such methods are generally unable to avoid data leakage when extracting knowledge from local data to teach the central artificial intelligence model. In this case, data leakage may result from either direct transfer of local data or indirect leakages, such as through sharing model parameters or gradients. In other words, such methods do not guarantee that the local data remain private, which may be a major concern in the case of, for instance, data that should always physically stay at customers' premises, such as patients' medical data.
Moreover, known methods for federated learning are not suitable for federated learning in the framework of object detection.
A purpose of at least one embodiment of the invention is to overcome at least one of these drawbacks.
Another purpose of at least one embodiment of the invention is to provide a method suitable for privacy-preserving federated learning in the framework of object detection.
To this end, at least one embodiment of the invention concerns a computer-implemented method of the aforementioned type, comprising the following steps:
Indeed, since each private training dataset is stored in a respective local node, and since only the outputs of the local models are shared to the central node, privacy of the data contained in each private training dataset is preserved. On the other hand, using such outputs enables an efficient knowledge transfer to the central node, and, consequently, allows to obtain a central model that is reliable.
Furthermore, the combination of prediction vectors and attention maps enables reliable and efficient knowledge distillation between local nodes with large domain gaps. The claimed method, by way of one or more embodiments, therefore allows to leverage not only the direct outputs of teachers' models (prediction vectors) but also the way these models reason when performing object detection (thanks to the attention maps).
According to one or more embodiments of the invention, the method includes one or several of the following features, taken alone or in any technically possible combination:
According at least one embodiment of the invention, it is proposed a computer program comprising instructions, which when executed by a computer, cause the computer to carry out the steps of the method as defined above.
The computer program may be in any programming language such as C, C++, JAVA, Python, etc.
The computer program may be in machine language.
The computer program may be stored, in a non-transient memory, such as a USB stick, a flash memory, a hard-disc, a processor, a programmable electronic chop, etc.
The computer program may be stored in a computerized device such as a smartphone, a tablet, a computer, a server, etc.
According to one or more embodiments of the invention, it is proposed a framework for performing privacy-preserving federated learning for object detection, the framework comprising a public server, a central node, and N local nodes, N being an integer greater than or equal to 1,
the public server being configured to store a predetermined public dataset, each local node being configured to:
Each of the central node and the local nodes may be a personal device such as a smartphone, a tablet, a smartwatch, a computer, any wearable electronic device, etc, according to one or more embodiments.
Each of the central node and the local nodes according to at least one embodiment of the invention may execute one or several applications to carry out the method according to one or more embodiments of the invention.
Each of the central node and the local nodes may be loaded with, and configured to execute, the computer program according to one or more embodiments of the invention.
Other advantages and characteristics will become apparent on examination of the detailed description of an embodiment which is in no way limitative, and the attached figures, where:
It is well understood that the one or more embodiments that will be described below are in no way limitative. In particular, it is possible to imagine variants of the one or more embodiments of the invention comprising only a selection of the characteristics described hereinafter, in isolation from the other characteristics described, if this selection of characteristics is sufficient to confer a technical advantage or to differentiate the one or more embodiments of the invention with respect to the state of the prior art. Such a selection comprises at least one, preferably functional, characteristic without structural details, or with only a part of the structural details if this part alone is sufficient to confer a technical advantage or to differentiate the one or more embodiments of the invention with respect to the prior art.
In the FIGURES, elements common to several figures retain the same reference.
A framework 2 according to one or more embodiments of the invention is shown on
The framework 2 is designed to perform privacy-preserving federated learning for object detection.
The framework 2 includes a public server 4, a central node 6, and N local nodes 8, N being an integer greater than or equal to 1.
The public server 4 is configured to store a public dataset 10. Moreover, the public server 4 is configured so that the central node 6 and each local node 8 can access and read the public dataset 10.
The public dataset 10 includes at least one predetermined image.
Moreover, the central node 6 may be configured to store a central training dataset 12.
The central training dataset 12 is suitable for the training of an object detection model. For instance, the central training dataset 12 includes a set of predetermined images, each image being annotated to define, for each object shown in said image, respective bounding box and class.
Alternatively, in at least one embodiment, the central training dataset 12 is stored in a data storing unit (not shown) of the framework 2, distinct from the central node 6 and the local nodes 8. In this case, the data storing unit is preferably configured so that the central training dataset 12 can be accessed and read at least by the central node 6.
Furthermore, each local node 8 is configured to store a respective private training dataset 14.
Each private training dataset 14 is suitable for the training of an object detection model. For instance, each private training dataset 14 includes a set of predetermined images, each image being annotated to define, for each object shown in said image, respective bounding box and class.
For instance, each private training dataset 14 is representative of data collected from one or more source(s) associated with the respective local node 8.
Advantageously, in at least one embodiment, each private training dataset 14 can only be read by the respective local node 8. This feature is advantageous, as it prevents data leakage, thereby enhancing privacy.
Preferably, in at least one embodiment, the private training datasets 14 differ from one another other.
The remaining features of the framework 2 will be better understood through the description of the operation of the framework 2, provided below with reference to the figures.
The framework 2 is configured to perform a method 20, shown on
The method 20 includes an initial training step 22, a local training step 24, an output generation step 26, an output aggregation step 28 and an optimization step 30.
During the initial training step 22, an object detection model is trained to obtain an intermediate model 40 as a result of the training, by way of at least one embodiment.
For instance, the object detection model is a convolutional neural network. The object detection model may also be a vision transformer, or any other object detection model known to the person skilled in the art.
More specifically, the object detection model is trained based on the central training dataset 12.
Moreover, once the intermediate model 40 is obtained, a copy of the intermediate model 40 is stored in the central node 6 and in each local node 8.
Then, during the local training step 24, the intermediate model 40 stored in each local node 8 is trained based on the respective private training dataset 14, resulting in a respective local model 42.
Then, during the output generation step 26, for each local node 8, a set of outputs is determined based on the public dataset 10 stored in the public server 4. Specifically, for each local node 8, the corresponding set of outputs is obtained using the respective local model 42, i.e., is a result of processing the public dataset 10 by the local model 42.
More precisely, for any given local node 8, and for each image of the public dataset 10:
For instance, each prediction vector is an output of the local model 42, an output of a predetermined layer of the local model 42, or even a result of applying a predetermined function to an output of one or more predetermined layer(s) of the local model 42.
Preferably, in at least one embodiment, each prediction vector includes coordinates of the respective bounding box, an objectness probability Pobj, and class probabilities PCL1, PCL2, . . . , PCLn.
Objectness probability is representative of a probability that an object is actually present in the corresponding bounding box.
Furthermore, in at least one embodiment, class probability is representative of a probability that an object present in the bounding box belongs to a given class among a predetermined set of classes.
Preferably, in at least one embodiment, for each local model 42, the respective local node 8 computes, for each image of the public dataset 10, each corresponding attention map by implementing an Eigen-CAM algorithm or a Grad-CAM algorithm.
More precisely, in one or more embodiments, in the case where the local node 8 is configured to implement the Grad-CAM algorithm, then, for any given image of the public dataset 10, in order to compute the attention map, the local node 8 selects the corresponding prediction vectors that have an objectness probability Pobj that is greater than a predetermined objectness threshold Pmin.
Then, the local node 8 computes a gradient of a target function T, with respect to parameters of a last convolutional layer of the local model 42.
The target function T is defined as:
where m is the number of selected prediction vectors, i.e., the number of prediction vectors that fulfill the aforementioned objectness probability requirement (i.e., Pobj≥Pmin); and
and li is a scalar associated with the ith selected prediction vector, and equal to a result of multiplying the objectness probability Pobj of said selected prediction vector with the highest corresponding class probability PCL1, PCL2, . . . , PCLn.
Then, the local node 8 computes a weight for each activation map of the local model 42, as:
where ak is the weight associated with the kth activation map of the local model 42,
Z is the number of pixels of the kth activation map, and
summation over i, j corresponds to global average pooling over the width and height of the kth activation map, and
and Aijk is the pixel having coordinates (i,j) of the kth activation map.
By “kth activation map of a computer vision model”, it is meant, in the context of at least one embodiment of the invention, a 2-dimensional map obtained by forward propagation of an input image throughout the computer vision model up to the kth layer.
Then, the local node 8 computes the attention map as
where Amap is the attention map for said image of the public dataset 10 and said local model 42, and
ReLU is a rectified linear unit function.
Alternatively, in one or more embodiments, in the case where the local node 8 is configured to implement the Eigen-CAM algorithm, then, for any given image of the public dataset 10, in order to compute the attention map, the local node 8 forward propagates said image through the corresponding local model 42 up to a layer of interest N. Then, the local node 8 further factorizes an output of layer N using singular value decomposition to obtain eigen vectors and eigen values.
In this case, in at least one embodiment, the local model 42 is preferably a convolutional neural network. More precisely, after local training 24 based on the respective private training dataset 14, the obtained local model 42 is used in inference mode to generate a feature map corresponding to the layer of interest N, which is then further factorized with singular value decomposition.
Then, the local node 8 computes the corresponding attention map as a projection of the output layer N on the first eigenvector.
Then, during the output aggregation step 28, the sets of outputs generated by each local node 8 for each image of the public dataset 10 are transferred to the central node 6 for processing.
Then, for each image of the public dataset 10, the central node 6 generates a corresponding aggregated set of outputs.
More precisely, in at least one embodiment, for each image of the public dataset 10, the aggregated set of outputs includes:
Preferably, in one or more embodiments, for each image of the public dataset 10, in order to aggregate the corresponding prediction vectors so as to obtain the aggregated prediction vector, the central node 6 computes a mean of said prediction vectors.
Alternatively, or in addition, in one or more embodiments, for each image of the public dataset 10, in order to aggregate the corresponding attention maps so as to obtain the aggregated attention map, the central node 6 computes:
Then, during the optimization step 30, the central node 6 modifies parameters of the intermediate model 40 stored in said central node 6 to obtain a central model.
More precisely, in at least one embodiment, to obtain the central model, the local node 6 modifies parameters of the intermediate model 40 to minimize a difference between:
More precisely, in at least one embodiment, the local node 6 is configured to use the lower and upper bound aggregated attention maps to train the intermediate 40 model in such a way that encourages pixels in the output of the intermediate model 40 to get activated inside the lower bound (intersection) and penalizes their activation outside the upper bound (union).
Preferably, in one or more embodiments, to obtain the central model, the central node 6 is configured to perform a gradient descent method.
Of course, the one or more embodiments of the invention is not limited to the examples detailed above.
| Number | Date | Country | Kind |
|---|---|---|---|
| 23306437.7 | Aug 2023 | EP | regional |