## 4 Data Silos and Fragmentation:
### Mathematical Model  
To provide a mathematical model based on the paper \"Unlocking Medical Insights: Blockchain Empowered Federated Learning with Electronic Medical Records\", we can outline the key components and their interactions within the proposed framework. Although the model will be high-level and conceptual, it will help illustrate the relationships and processes involved [33]. Let us denote the following variables:  
* \(N\): The total number of participating institutions or organizations in the federated learning process. * \(M\): The number of patient records or EMRs available for training the machine learning model. * \(D_{i}\): The dataset of institution \(i\), where \(i\in\{1,2,\ldots,N\}\). * \(w\): The global model or weight parameters that are shared and updated among the participating institutions. * \(w_{i}\): The local model or weight  
- Initialize the global model \(w\) with random weights or pre-trained values. - Distribute the initial global model \(w\) to each institution. * For each round \(t\):
- Each institution \(i\) updates its local model \(w_{i}\) by minimizing its local loss function: \[w_{i}^{(t+1)}=w_{i}^{(t)}-\eta\cdot\
abla\mathcal{L}_{i}(w_{i}^{(t)})\] Here, \(\
abla\mathcal{L}_{i}(w_{i}^{(t)})\) represents the gradient of the local loss function with respect to the local model parameters. - Each institution securely aggregates the local model updates and contributes to the global model: \[w^{(t+1)}=\frac{1}{N}\sum_{i=1}^{N}w_{i}^{(t+1)}\] The aggregation can be performed using secure aggregation protocols that protect the privacy of local updates. - The updated global model \(w^{(t+1)}\) is distributed to all institutions for the next round. * The iterative process continues until a convergence criterion is met, such as reaching a maximum number of rounds or achieving a desired level of performance improvement [42]. * Each institution records the model updates on the blockchain ledger in a secure and transparent manner [38]. - Smart contracts are employed to enforce data usage policies, ensuring that only authorized entities can access specific data or models. It captures the core steps involved in the federated learning process and the integration of blockchain technology. Further mathematical details, such as the specific loss functions, optimization algorithms, and privacy-preserving mechanisms, are included in the respective components' detailed algorithms and protocols [25]. To establish a threat security model for the proposed framework \"Unlocking Medical Insights: Blockchain Empowered Federated Learning with Electronic Medical Records\", we need to identify potential threats and vulnerabilities that could compromise the security and integrity of the system [40]. Here is an outline of the threat security model:  
1. Data Privacy Threats: 1. Unauthorized Access: Adversaries may attempt to gain unauthorized access to EMRs or sensitive patient data, either through direct attacks or by exploiting vulnerabilities in the system [43]. 2. Data Leakage: There is a risk of unintentional or intentional data leakage during the federated learning process, where sensitive patient information may be exposed to unauthorized entities [44]. 2. Blockchain Security Threats: 1. A 51% Attack: An attacker or group of attackers may control the majority of the computational power within the blockchain network, enabling them to manipulate transactions, disrupt consensus, or tamper with the stored data. 2. Smart Contract Vulnerabilities: Smart contracts utilized for enforcing data usage policies may contain vulnerabilities that could be exploited by malicious actors to gain unauthorized access or alter permissions. Communication and Network Threats:  
* Man-in-the-Middle Attacks: Adversaries may intercept or alter communication between institutions or with the blockchain network, potentially gaining access to sensitive data or injecting malicious code.