# The Holistic Perspective of the INCISIVE Project--Artificial Intelligence in Screening Mammography
## 5 Description of AI Toolbox/Breast Cancer Tools
### Federated Learning--Data Exploitation
#### 5.1.1 How It Is Performed  
Federated learning is a kind of distributed machine learning technique which involves distributing the training process where the data is produced or stored. In this sense, the machines where the data are stored are used to train the required models. By doing so, the data are always kept at the institution premises and not shared externally, but can be used to build models. Inside INCISIVE, there are several components that manage the lifecycle of the learning process:  
* Orchestrator: in charge of receiving the training requests and deploying the required components in the central node and in the federated nodes.
* Model-as-a-service (MaaS): in charge of storing models and performing inference.
* AI federator: in charge of managing the federated learning process (send training requests, receive weights, and merge models).
* AI engine: in charge of performing the actual training at each federated node. This component is composed of auxiliary components to provide data and retrieve results from a standard machine learning application agnostic of the federated learning and the infrastructure.  
The process, illustrated in Figure 11, is as follows.  
Figure 10: The number of patients with DBT images in different numbers of TPs in the INCISIVE retrospective database.  
1. A train request is received in the UI.
2. The orchestrator analyzes the request, and a specific AI federator and AI engines of the federated nodes are deployed.
3. The AI federator initializes the model or loads a previously trained model from the MaaS, depending on if training from scratch or training from a pretrained model is requested.
4. The AI engine receives the model and trains it, using local data available.
5. The AI federator receives the trained models and merges them using a merging scheme, e.g., FedAvg [47].
6. In case another federated learning round is required, the process restarts from Step 4, sending the new merged model to the AI engines.
7. Finally, the model is stored in the MaaS.  
The iterative process of the federated learning rounds is required to converge in a solution that is satisfying for all the different data providers that participate in the federated learning process. Notice that if an excessive number of epochs is used in every federated learning training round, the federated nodes can produce models overfitted to the local data. This could mean that the merged model does not converge into a good and general solution.  
The work of [PERSON] et al. [48] on cardiovascular diseases shows that this kind of approach is well fitted for training deep learning models for image analysis. In particular, this work shows that the accuracy of the federated learning trained model is close to training in a single computer with all the data. In particular, in some cases, the results are better than the traditional training approach. This could be due to the regularizing effect of merging models studied in works such as [PERSON] et al. [49].  
Figure 11: Federated sharing overall process. C stands for containers (required containerized application, e.g., a docker image) and M for models. Notice that the container is only required to be sent once at each federated node. The code hosted in the container is run using the input model and the data is stored in the node, producing a new model as the output.