## 3 Problem Formulation
### System Model
**Adaptive aggregation function** (\(f:\mathbb{R}^{d}\times[0,1]\times[0,1]\rightarrow\mathbb{R}^{d}\)): A completely novel function that dynamically weighs each edge device's contribution according to measures for data quality and reliability. It is defined as follows: \[w_{g}=f(\{w_{i}\}_{i=1}^{N},\{q_{i}\}_{i=1}^{N},\{r_{i}\}_{i=1}^{N})\] (1) where \(r_{i}\) denotes the device \(e_{i}\)'s reliability and \(q_{i}\) denotes the data quality measure. 8. **Blockchain Security Layer (BSL)**\(\mathcal{B}\) To ensure the security, integrity, and traceability of the federated learning process [20], our system incorporates a BSL. This decentralized ledger system, denoted as \(\mathcal{B}=(B,T,\sigma,V)\), consists of a chain of blocks \(B=\{b_{1},b_{2},\ldots,b_{K}\}\), each containing a set of verified transactions. The function \(T:\mathcal{E}\cup\mathcal{S}\cup\{\mathcal{C}\}\to B\) maps entities to transactions recorded in blocks, while the cryptographic hash function \(\sigma:B\rightarrow\{0,1\}^{*}\) ensures the immutability of the blockchain. A validation function \(V:B\times\mathcal{E}\cup\mathcal{S}\cup\{\mathcal{C}\}\rightarrow\{0,1\}\) verifies the legitimacy of transactions and blocks. Each model update and aggregation operation is recorded as a transaction in the blockchain, ensuring the integrity and traceability of the learning process: \[b_{k+1}=\sigma(b_{k}\parallel T(w_{g}^{l+1})\parallel T(\{w_{i}^{l+1}\}_{i \in\mathcal{E}_{i}}))\] (2) where the symbol \(parallel\) denotes concatenation. This blockchain layer gives our system a higher level of security by providing an editable and tamper-proof record of all learning activities inside the IoMT network. 9. **Quality assessment module** (\(QA:\mathcal{DS}\rightarrow[0,1]\)): A new module that grades the quality of a local dataset based on various criteria, such as data distribution, label accuracy, and task relevance, around the world. The quality score that is derived for every local dataset is \(q_{i}=Q(D_{i})\). 10. **Reliability evaluation function** (\(REL:\mathcal{ED}\times\mathbb{T}\rightarrow[0,1]\)): The feature that scores the reliability of the edge devices over time, accounting for the needs of hardware, uptime, and consistency of contributions. For each device at time \(t\) it returns a reliability score \(Rel_{i}=REL(ed_{i},t)\). In the complex ecosystem, the adaptive federated learning scheme requires a series of communication rounds. For each round \(t\), we choose a subset of edge devices \(\mathcal{ED}_{t}\subseteq\mathcal{ED}\). Based on their own datasets, this subset of edge devices computes local updates: \[w_{i}^{t+1}=w_{i}^{t}-\eta\
abla LF(w_{i}^{t},DS_{i})\] (3) where \(LF\) denotes the loss function and \(\eta\) represents the learning rate. Subsequently, using our adaptive aggregation function, the central server aggregates these updates: \[w_{g}^{t+1}=f(\{w_{i}^{t+1}\}_{i\in\mathcal{ED}_{t}},\{q_{i}^{t}\}_{i\in \mathcal{ED}_{t}},\{r_{i}^{t}\}_{i\in\mathcal{ED}_{t}})\] (4) In this dynamic aggregation technique by IoMT, worldwide learning depends not just on the volume of data but on the goodness of data along with the credibility of origin. This, in turn, opens up the gates for an even more adaptive and robust learning process.