## 2 Safety and Security
Alongside intrusion detection, a wider level of _anomaly detection_ can be acquired using machine learning in IIoT systems, by applying unsupervised or supervised methods to identify outliers or abnormal behavior in the system [43; 44; 45]. Figure 3: Trustworthiness of an IIoT System as specified by the Industrial IoT Consortium [20]. The key characteristics of the trustworthy IoT system are security, privacy, reliability, safety and resilience. Strongly related to intrusion detection, _authentication_ can be supported by machine learning techniques. Machine learning algorithms alone are rarely used for authentication purposes; however, it can provide an additional security layer over classical authentication schemes. Authentication based on network traffic analysis is performed in [46], using ensemble learning techniques. WiFi-capable IoT devices can be authenticated through the actuation of daily activities, as shown in [47]. Bregman divergence combined with the k-nearest neighbour technique makes it possible to detect Man-in-the-Middle attacks during authentication [48]. Furthermore, using stacked autoencoders (SAE) and k-means clustering, a high accuracy was reached in detecting WiFi impersonation attacks [49]. Blockchains play an important role in IIoT systems security; they are applied for various purposes, e.g., for distributed secure databases. The authentication of users to access blockchain is often integrated with a deep learning method that is taught by transfer learning [50; 51]. Interestingly, authentication can be performed in the physical layer alone. [PERSON] [25] proposes a solution to authenticate IoT devices with RF fingerprinting, using a software-defined radio (SDR) solution. The paper investigates different machine learning methods, kNN, SVM and decision trees, and all are proved to be accurate enough to perform authentication based solely on RF information. _Privacy_ is mostly ensured by encryption (using cryptography); however, there are certain issues regarding IIoT systems. While a couple of machine learning methods have been applied (e.g., in intrusion detection, authentication, etc. ), the training of deep neural networks requires extensive datasets. Besides public datasets, it is commonly required to train the networks on distributed real datasets; however, this can result in the so called \"privacy leaking\". There are solution and works that propose methods to avoid privacy leaking, e.g., privacy-preserving asynchronous deep learning schemes (DeepPAR [52]) or differential privacy and federated learning [53]. There are other methods for ensuring IIoT privacy using differential privacy; a thorough review can be found in [54]. _Data integrity_ is a crucial part of a trustworthy IIoT system. Data integrity means that data are not modified over their lifetime; the data remain consistent and accurate. One of the most prevalent attacks against data integrity is false data injection (FDI); however, data integrity refers to all the possible combinations of data injection, data modification or even data relation disintegrity. The methods for data integrity checks commonly learn the distribution of valid data and identify outlier samples with a low likelihood. Data and the command injection were reviewed in [55], where a gas pipeline system remote terminal unit (RTU) was observed. Using six machine learning techniques (e.g., random forests, SVM, etc. ), the injection attacks were accurately identified. Using k-means clustering, ref. [56] proposes a method for recognizing data modification in programmable logic controllers (PLC). In [57], deep belief networks and restricted Boltzmann-machines were applied to identify data injection attacks in smart grids. Using smart sensor data from a complex hydraulic IIoT system, autoencoders were trained to help avoid false data attacks in [58]. A reliable trustworthy IIoT systems requires high _availability_, meaning, that the system is ready to provide services to users.