## 4 Proposed System Design Overview
### Optimised FTL-Assisted Edge IDS Learning
#### 4.3.3 SGD-TL-Based Local Model Optimisation  
The FT-CID model uses global model knowledge and logits to optimise the local learning model with partial retraining on the local learning model. During local model optimisation, the new logits comprise the global knowledge of unknown attacks of the various RPL-IIoT networks. Moreover, the FT-CID model selects the relevant source domain to build the pretrained FTL model with the aid of the SGD method. The FT-CID inputs the new logits to the softmax layer of each local CNN and partially retrains the local learning model based on global knowledge, resulting in high intrusion detection accuracy. The TL model of the FT-CID between the server and sensor edge of the IIoT network utilises the SGD model to optimise the local learning model. To address the constraints of bandwidth-limited networks, the FT-CID aims to apply the standard optimisation methods of the SGD to the local models rather than using the SGD iterations to update the global model. In the FT-CID model, sensor updating relies on the results from the multiple SGD iterations on its local datasets and then establishes communication with the server with reference to the local models, with the intention of reducing the number of communication rounds. SGD is an iterative method that optimises the local learning model based on the measure of variance between the server and the specified edge. The variance (\(\mathrm{D_{V}}\)) reflects the difference between the source and target domain datasets in the concept of TL, in which the data pretrained on the server refer to the source domain, and the local data on the IIoT network refer to the target domain. In Equation (6), \(\mathrm{L_{S_{s}}}\) and \(\mathrm{IIoT_{T}(E)}\) denote the new logits in the Sth source domain and local data in the Tth target domain of the IIoT network, respectively. Finally, the FT-ID appends the distance value in the computation of the loss function of RPL IDS learning (\(\mathrm{L_{LIDS}}\)) to build the customised learning model for the IDS.  
\[\mathrm{L_{LIDS}(E)=L(LM_{E})+\lambda D^{2}V\left(L_{S_{s}},\mathrm{IIoT_{T}(E)}\right)} \tag{6}\]  
The FT-CID model customises each local learning model for the IIoT network based on the loss function or gradient of the learning model during the adaptation of the new logits of the global learning model in the local learning model. In Equation (6), '\(\lambda\)' balances the task of intrusion detection between the distance of the source and the target data, and \(\mathrm{L(LM_{E})}\) refers to the loss of the individual Eth local learning model, which is used to update the loss value of the learning model. The FT-CID can then optimise the learning process of the local CNN of the IIoT network with the relevant global knowledge. The learning process of the FTL-enabled IDS is outlined in the process flow diagram shown in Box 1.  
In the subsequent CNN local model optimisation, the FT-ID model initiates the intrusion detection task for the corresponding local datasets in the heterogeneous IIoT networks. By learning the patterns of the upcoming testing traffic data with the customised local learning model, the FT-CID model first classifies the data as normal and abnormal samples as intrusions. By implicitly exploiting the global attack knowledge in customised IDS learning, the proposed FT-CID model detects and classifies the intrusions over a heterogeneous IIoT environment. With the potential advantage of the global knowledge of various unknown attacks on different RPL-IIoTs, the FT-CID model significantly improves the quality of intrusion detection without compromising the RPL network performance.