## 3 Methodology
### Ontology-Integrated Federated Unlearning (OFU-Ontology) Algorithm
#### 3.2.3 Workflow of OFU-Ontology
Calibration Training Phase: The central server intervenes if any unlearned data maintains any kind of impact on the model by performing a calibration. The calibration uses past versions of a model to finalize the final adjustments to the model. \[M_{calibrated}=M+\alpha\cdot(M_{historic}-M_{unlearned}) \tag{12}\]  
where \(M_{historic}\) is the model before unlearning, \(M_{unlearned}\) is the model immediately after unlearning, and \(\alpha\) is calibration factor used to adjust the global model. During calibration, the full decoupling of the impact of unlearned data is effectuated to enhance robustness of the model against any unintended consequences of unlearning. The ontology module within the OFU-Ontology Algorithm 2 constitutes the kernel of the relevance score calculation and the selective unlearning phase. It guarantees some intelligent prioritizing of data points to unlearn to enable efficient data removal while still maintaining model quality. Ontology-derived relevance scores help to inform decisions across the workflow, thus achieving a trade-off between data-privacy requests and model performance. In brief, the gains of OFU-Ontology could be listed as follows:  
1. By considering low-relevance data points as applying for unlearning, the computational overhead and communication overhead are decreased. 2. The ontology-based approach does not allow important data to be needlessly exposed or removed, thereby retaining federated learning's privacy-preserving properties. 3 Calibration using historical updates mitigates knowledge permeation by ensuring that the unlearned data's influence is correctly removed from all clients. 4. By allowing updates of the ontology module with changes in data relevance, the system could be made to adapt to changing privacy and regulatory requirements. ```
Input: Local datasets \(\{D_{i}\}\) for each client \(i\), Target data point \(T\) to be unlearned, Number of communication rounds \(R\) Output: Updated global model without influence from T
1. Initialize global model \(M_{0}\)
2. For each communication round \(r\ =\ 1,\ 2,\...,\ R\) do:
3. Each client \(i\) receives the global model \(M_{r}\) from the server
4. Each client checks if \(T\ \in\ D_{i}\)

a. If \(T\) is in \(D_{i}\):

i. Recalculate local updates by removing \(T\) from \(D_{i}\)

ii. Train the local model \(M_{i}\) using \(D_{i}\backslash T\)

b. Else:

i. Train the local model \(M_{i}\) using \(D_{i}\)

5. Send local model updates \(\Delta M_{i}\) to the server
6. Server aggregates local updates to compute the new global model:

\(M_{-}(r+1)\) = Aggregate (\(\Delta M_{i}\) for all \(i\))
7. Return the updated global model \(M_{R}\)
```  
**Algorithm 2**Pseudocode for OFU-Ontology  
The OFU-Ontology pseudocode Algorithm 2 describes the unlearning process in the context of federated learning using ontology-based relevance. First is local training at each federated node where models are trained separately on local data. After that, ontology integration is executed for data relevance evaluation while assigning a relevance score to each point of data depending on its contextual importance. Afterward, a gradient is computed, and the relevance scores are used to weight the gradients to highlight the importance of high-value data. Then it performs ontology-based relevance filtering to determine if unlearning needs to happen on lower importance data. If it is to be unlearned, by using selective gradient negation, the impact of this data on the model will be suppressed [16]. Then, gradient aggregation is performed at a central server and a global model update is generated. The updated global model is then sent back to the federated nodes for more training. This structured way guarantees that the system will have low-value data to unlearn while most importantly keeping valuable information intact, complying with both privacy regulations and additional company policies.