Artiﬁcial Intelligence Techniques for Cognitive Sensing in Future IoT: State-of-the-Art, Potentials, and Challenges

: Smart, secure and energy-e ﬃ cient data collection (DC) processes are key to the realization of the full potentials of future Internet of Things (FIoT)-based systems. Currently, challenges in this domain have motivated research e ﬀ orts towards providing cognitive solutions for IoT usage. One such solution, termed cognitive sensing (CS) describes the use of smart sensors to intelligently perceive inputs from the environment. Further, CS has been proposed for use in FIoT in order to facilitate smart, secure and energy-e ﬃ cient data collection processes. In this article, we provide a survey of di ﬀ erent Artiﬁcial Intelligence (AI)-based techniques used over the last decade to provide cognitive sensing solutions for di ﬀ erent FIoT applications. We present some state-of-the-art approaches, potentials, and challenges of AI techniques for the identiﬁed solutions. This survey contributes to a better understanding of AI techniques deployed for cognitive sensing in FIoT as well as future research directions in this regard


Introduction
The Internet of Things (IoT) is a technology describing a network of resource-constrained cyber-physical systems. Through seamless connectivity, IoT aims to revolutionize the world with the use of heterogeneous smart devices [1,2] deployed in areas such as energy, transportation, healthcare, agriculture, home and city life, to name a few [3,4]. IoT creates such a system by automating processes with little or no human intervention. Specifically, the end goal of IoT is to increase efficiency in systems and provide an environment that positively improves various aspects of business and daily life [1]. However, to achieve this goal, IoT requires technical innovations in several fields ranging from sensor and communication networks to nanotechnology [5]. More so, IoT nodes are made up of sensors/actuators, computing resources to process collected data, and a network to communicate with other nodes or transmit collected data to a remote location for storage or further processing.
Recent advancements in the development of different IoT technologies have led to the availability of cheaper sensors, robust processing resources, and ubiquitous network coverage, nevertheless, without the presence of improved cognitive capabilities, many noteworthy IoT applications may remain limited [5,6]. Cognition is a term used to describe the mental activities of thinking, recollecting information, judging, drawing inference and problem-solving which are required for acquiring knowledge and understanding. A key area of IoT that would benefit from the integration of cognitive computing methodologies is data collection (DC). Data collection is one of the major reasons for the deployment of many IoT applications and it is a major energy-consuming task. Hence, recently, research efforts are channeled towards improving DC in IoT applications with an end goal to provide secure and energy-efficient DC processes for IoT systems. In achieving this, the concept of cognitive sensing (CS) was proposed for use in future IoT (FIoT) systems. It describes the special capability of nodes to intelligently perceive the world around them via the use of cognitive sensors. CS leverages data and other techniques to achieve the much-desired intelligent DC operations for IoT systems. Figure 1 outlines the IoT research focus areas over the last decade.
J. Sens. Actuator Netw. 2020, 9, x FOR PEER REVIEW sensing (CS) was proposed for use in future IoT (FIoT) systems. It describes the special capability of nodes to intelligently perceive the world around them via the use of cognitive sensors. CS leverages data and other techniques to achieve the much-desired intelligent DC operations for IoT systems. Figure 1 outlines the IoT research focus areas over the last decade. The acceptance of artificial intelligence (AI) as a tool for improving systems has increased in recent times. This is evidenced in the integration of AI in technologies such as healthcare, data analysis, websites, security, etc. which have led to better and innovative systems. These new milestones motivate the research community to provide CS solutions that leverage AI tools and methodologies [7]. A survey of the literature reveals that there is a lack of a comprehensive study that reviews the contributions of AI specifically to CS solutions in the IoT domain. Table 1 summarizes some studies we identified to have reviewed the use of AI in other IoT related concepts.
Thus, to highlight the contributions and further motivate new studies leveraging the capabilities of AI in CS solutions, our article provides a review of the state-of-the-art, potentials and challenges of AI in CS solutions. Specifically, we provide a classification for different CS solutions and AI techniques, followed by state-of-the-art approaches, and the different potentials of each classification. We identified some challenges in using AI techniques in CS and suggested the way forward. The organization of the paper is as follows: In Section 2, we present the classification of CS solutions and the surveyed AI techniques. Sections 3, 4, 5 and 6 presents the state-of-the-art and application areas of AI for each of the classification. Section 7 discusses the surveyed AI techniques and highlights contributions from the literature. The challenges and the way forward for AI in CS are discussed in section 8 while the concluding remarks are presented in Section 9.

Classification of the Cognitive Sensing Solutions and Surveyed AI Techniques
We surveyed the literature over the last decade (2011-2020) and provide a classification of AIbased solutions that address the data collection challenges peculiar to the IoT domain. Specifically, we targeted solutions from Google Scholar, Scopus, and Web of Science core collection databases. Some of the combined keywords for our queries include "Artificial Intelligence", "Machine Learning", "Metaheuristics", "Internet of Things", "energy-efficiency", "data perception", "data

References
Review He, Bae [8] AI techniques as applied to the cognitive radio Mahdavinejad, Rezvan [9] Machine learning (ML) methods for IoT data analytics Zaheer, Othman [10] Decision-theoretic models in Cognitive IoT Al-Garadi, Mohamed [11] ML and Deep Learning (DL) methods solutions for IoT security Mohammadi, Al-Fuqaha [12] DL in data analytics and learning in the IoT domain The acceptance of artificial intelligence (AI) as a tool for improving systems has increased in recent times. This is evidenced in the integration of AI in technologies such as healthcare, data analysis, websites, security, etc. which have led to better and innovative systems. These new milestones motivate the research community to provide CS solutions that leverage AI tools and methodologies [7]. A survey of the literature reveals that there is a lack of a comprehensive study that reviews the contributions of AI specifically to CS solutions in the IoT domain. Table 1 summarizes some studies we identified to have reviewed the use of AI in other IoT related concepts. Table 1. Summary of related works.

References Review
He, Bae [8] AI techniques as applied to the cognitive radio Mahdavinejad, Rezvan [9] Machine learning (ML) methods for IoT data analytics Zaheer, Othman [10] Decision-theoretic models in Cognitive IoT Al-Garadi, Mohamed [11] ML and Deep Learning (DL) methods solutions for IoT security Mohammadi, Al-Fuqaha [12] DL in data analytics and learning in the IoT domain Thus, to highlight the contributions and further motivate new studies leveraging the capabilities of AI in CS solutions, our article provides a review of the state-of-the-art, potentials and challenges of AI in CS solutions. Specifically, we provide a classification for different CS solutions and AI techniques, followed by state-of-the-art approaches, and the different potentials of each classification. We identified some challenges in using AI techniques in CS and suggested the way forward.
The organization of the paper is as follows: In Section 2, we present the classification of CS solutions and the surveyed AI techniques. Sections 3-6 presents the state-of-the-art and application areas of AI for each of the classification. Section 7 discusses the surveyed AI techniques and highlights contributions from the literature. The challenges and the way forward for AI in CS are discussed in Section 8 while the concluding remarks are presented in Section 9.

Classification of the Cognitive Sensing Solutions and Surveyed AI Techniques
We surveyed the literature over the last decade (2011-2020) and provide a classification of AI-based solutions that address the data collection challenges peculiar to the IoT domain. Specifically, we targeted solutions from Google Scholar, Scopus, and Web of Science core collection databases. Some of the combined keywords for our queries include "Artificial Intelligence", "Machine Learning", "Metaheuristics", "Internet of Things", "energy-efficiency", "data perception", "data collection", "Architecture", "security", "device Management", "optimization". Using binary search, result filtering and sorting techniques on these databases, we obtained a total of 1437 documents. We further used skimming and scanning techniques to reduce the returned articles to a total of 354 documents. The dropped documents were those leveraging AI in IoT outside of the DC operations e.g., data analytics and those applying AI and IoT to optimize systems such as manufacturing, transportation, energy, etc. Our focus is on the application of AI to the IoT DC processes.
Based on the aim of some selected articles, we classified CS solutions into four groups as illustrated in Figure 2. These include (i) smart energy management (ii) self-management (iii) cognitive security and (iv) smart data collection. Even though they perform different tasks, they all contribute towards achieving smart, secure and energy-efficient data collection processes for future IoT systems. From our analysis, we observed that there is a recent rise in the use of AI in CS solutions, and this is shown in Figure 3. Furthermore, Figure 4 shows a classification of the AI techniques used for the various CS solutions. In the next section, we present some state-of-the-art and use of AI techniques in smart energy management.
J. Sens. Actuator Netw. 2020, 9, x FOR PEER REVIEW collection", "Architecture", "security", "device Management", "optimization". Using binary search, result filtering and sorting techniques on these databases, we obtained a total of 1437 documents. We further used skimming and scanning techniques to reduce the returned articles to a total of 354 documents. The dropped documents were those leveraging AI in IoT outside of the DC operations e.g., data analytics and those applying AI and IoT to optimize systems such as manufacturing, transportation, energy, etc. Our focus is on the application of AI to the IoT DC processes.
Based on the aim of some selected articles, we classified CS solutions into four groups as illustrated in Figure 2. These include (i) smart energy management (ii) self-management (iii) cognitive security and (iv) smart data collection. Even though they perform different tasks, they all contribute towards achieving smart, secure and energy-efficient data collection processes for future IoT systems. From our analysis, we observed that there is a recent rise in the use of AI in CS solutions, and this is shown in Figure 3. Furthermore, Figure 4 shows a classification of the AI techniques used for the various CS solutions. In the next section, we present some state-of-the-art and use of AI techniques in smart energy management.   J. Sens. Actuator Netw. 2020, 9, x FOR PEER REVIEW collection", "Architecture", "security", "device Management", "optimization". Using binary search, result filtering and sorting techniques on these databases, we obtained a total of 1437 documents. We further used skimming and scanning techniques to reduce the returned articles to a total of 354 documents. The dropped documents were those leveraging AI in IoT outside of the DC operations e.g., data analytics and those applying AI and IoT to optimize systems such as manufacturing, transportation, energy, etc. Our focus is on the application of AI to the IoT DC processes.
Based on the aim of some selected articles, we classified CS solutions into four groups as illustrated in Figure 2. These include (i) smart energy management (ii) self-management (iii) cognitive security and (iv) smart data collection. Even though they perform different tasks, they all contribute towards achieving smart, secure and energy-efficient data collection processes for future IoT systems. From our analysis, we observed that there is a recent rise in the use of AI in CS solutions, and this is shown in Figure 3. Furthermore, Figure 4 shows a classification of the AI techniques used for the various CS solutions. In the next section, we present some state-of-the-art and use of AI techniques in smart energy management.

Smart Energy Management in the Future IoT
The smart energy management (SEM) group, comprises solutions aimed at directly minimizing or recharging the energy consumed during the data collection process. The goal of SEM is to ensure that nodes replenish or maximize the use of the available energy resources. In the following subsections, we briefly describe four SEM approaches observed from the reviewed literature. We further identify and suggest new application areas for AI in these approaches.

AI-Enabled Energy Harvesting in IoT Devices
Energy harvesting (EH) describes a technique for capturing and converting energy from the environment to electrical energy. This technique is explored in ref. [13] for its potential usage for IoT nodes and authors identified costs, miniaturization, harvesting efficiency, operating frequency, and protocols as some of the challenges against EH technologies in IoT. Further investigation of this concept is carried out in refs. [14][15][16], where authors modeled, simulated and optimized the use of solar EH in sensor nodes. The challenges associated with conventional EH techniques necessitate the use of AI to improve existing techniques. For example, nodes are deployed based on their application areas which imply that the availability of energy sources is not certain, especially if nodes are deployed in locations with limited access to renewable energy sources. This challenge can be mitigated using AI to predict energy availability [17], thereby scheduling the node's major energy-consuming tasks to the predicted period.
Furthermore, AI can be used to develop energy consumption plans or analytics [18] that can provide insight into other avenues for conserving energy. In an EH-based IoT system, the total amount of harvested energy in a node until time t is given by e(t) shown in Equation (1) while the total amount of energy required to transmit collected data until time t is given by d(t) as in Equation (2) [17]. Thus, the total available system energy is shown in Equation (3). Research efforts in the field of IoT energy harvesting are aimed at maximizing the former while minimizing the latter.
where P captured (t) and P used (t) are the harvested and consumed energy between time t and ∆t respectively, C is the total energy storage capacity. Some algorithms with potential usage in EH-based IoT related tasks are the regression models commonly used to predict a continuous value. Figure 5 lists some of the required data and other potential usage areas when combined with AI algorithms.
where ( ) and ( ) are the harvested and consumed energy between time t and ∆t respectively, is the total energy storage capacity. Some algorithms with potential usage in EH-based IoT related tasks are the regression models commonly used to predict a continuous value. Figure 5 lists some of the required data and other potential usage areas when combined with AI algorithms.

AI-Enabled Duty Cycling in IoT Devices
In duty cycling, battery-powered devices in their mode of operation are designed to alternate between an active and idle state with the main objective of conserving energy [19]. The ideal operating mode is for nodes to be active only when there is data to be collected [20]. In the absence of useful data, the device enters an idle mode characterized by extremely low energy consumption. However, the challenge with this mode of operation is that nodes lack the knowledge of data arrival

AI-Enabled Duty Cycling in IoT Devices
In duty cycling, battery-powered devices in their mode of operation are designed to alternate between an active and idle state with the main objective of conserving energy [19]. The ideal operating mode is for nodes to be active only when there is data to be collected [20]. In the absence of useful data, the device enters an idle mode characterized by extremely low energy consumption. However, the challenge with this mode of operation is that nodes lack the knowledge of data arrival time. Using AI with duty cycling techniques, IoT devices can be made to conserve energy with a better degree of performance due to the predictive capability of AI algorithms. By leveraging on collected data, nodes can be made to predict and synchronize their active state with the data arrival time resulting in the much-desired ideal mode of operation. Related work was done in ref. [21] where the Bayesian model was used to predict events in an IoT environment.
Furthermore, equipping nodes with the ability to dynamically modify their duty cycling parameters for the availability of ambient energy is another potential usage of AI in duty cycling. However, such capability will pose serious obstacles for networks such as those with IEEE 802.15.4 MAC due to challenges like packet loss, resources, and synchronization issues [22] that are common in such networks. As a result, novel solutions that can mitigate this and other challenges are needed from the literature. Figure 6 shows some input data and their potential usage with AI algorithms. J. Sens. Actuator Netw. 2020, 9, x FOR PEER REVIEW time. Using AI with duty cycling techniques, IoT devices can be made to conserve energy with a better degree of performance due to the predictive capability of AI algorithms. By leveraging on collected data, nodes can be made to predict and synchronize their active state with the data arrival time resulting in the much-desired ideal mode of operation. Related work was done in ref. [21] where the Bayesian model was used to predict events in an IoT environment.
Furthermore, equipping nodes with the ability to dynamically modify their duty cycling parameters for the availability of ambient energy is another potential usage of AI in duty cycling. However, such capability will pose serious obstacles for networks such as those with IEEE 802.15.4 MAC due to challenges like packet loss, resources, and synchronization issues [22] that are common in such networks. As a result, novel solutions that can mitigate this and other challenges are needed from the literature. Figure 6 shows some input data and their potential usage with AI algorithms.

AI-Enabled Battery Optimization in IoT Devices
Depending on the application area, sometimes, primary (non-rechargeable) batteries are the perfect choice for low drain IoT devices [23]. When this happens, there is a need to optimize their batteries with techniques that can prolong their usage. Some of these techniques include the use of high capacity batteries with a long shelf life and the use of battery management strategies that prevent unnecessary battery discharge. Other approaches include the use of low-rate wireless personal area networks (LR-WPANs) transmission techniques such as ZigBee, BLE, 6LoWPAN, WirelessHART, etc. which makes data communication energy efficient. Some of the factors that influence the rate of energy depreciation in a battery-powered sensor node include the type of load, battery model, operating temperature, transmission rate and type [24]. In general, the total power consumption of an IoT node can be described in Equation (4) as where is the total power consumed, is the power consumed during data reception, Figure 6. Some input data and their potential usage with AI algorithms.

AI-Enabled Battery Optimization in IoT Devices
Depending on the application area, sometimes, primary (non-rechargeable) batteries are the perfect choice for low drain IoT devices [23]. When this happens, there is a need to optimize their batteries with techniques that can prolong their usage. Some of these techniques include the use of high capacity batteries with a long shelf life and the use of battery management strategies that prevent unnecessary battery discharge. Other approaches include the use of low-rate wireless personal area networks (LR-WPANs) transmission techniques such as ZigBee, BLE, 6LoWPAN, WirelessHART, etc. which makes data communication energy efficient. Some of the factors that influence the rate of energy depreciation in a battery-powered sensor node include the type of load, battery model, operating temperature, transmission rate and type [24]. In general, the total power consumption of an IoT node can be described in Equation (4) as P tot = P rec + P trans + P sleep + P idle (4) where P tot is the total power consumed, P rec is the power consumed during data reception, P trans is power consumed during data transmission, P sleep is the power consumed during sleep and P idle is the power consumed when there is no data to be sent or received. For an ideal case, P idle tend toward zero i.e., the device is only active when there is data to be collected or sent. AI can be used to minimize the power consumed by the individual components of Equation (3). For example, P rec can be minimized by leveraging AI in data prediction [25], reduction, and compression schemes [26]. In the case of P trans , an effort is still ongoing in the research community on how to integrate cognitive capabilities in LPWAN with the aim of further improving performance and energy efficiency. For example, authors in ref. [27] propose a cognitive LPWAN architecture that safeguards stable and energy-efficient communications in a heterogeneous IoT. The proposed architecture uses an AI-enabled LPWA hybrid method to provide the smart control of wireless-communication technology and intelligent services for heterogeneous IoT devices. Furthermore, the use of cognitive radios to support the operations of LPWAN is a new research area with the potential for promoting energy-efficient communications [28].

AI-Enabled Wireless Energy Transfer in IoT Devices
Wireless energy transfer (WET) in IoT networks is based on the magnetic resonant coupling principle. This principle states that in magnetic resonant coils operating at the same resonant frequency, energy is transferred from one source coil to a receiver coil via a nonradioactive electromagnetic field [29]. According to Friis's free space equation, the received power P r of a signal, d meters away from the source power P 0 is shown in Equation (5) [30] as where G s is the source antenna gain, G r is the receive antenna gain and λ is the wavelength. Hence, an empirical model of WET for IoT nodes can be given in Equation (6) [30] as where L p is the polarization loss, η is the rectifier efficiency, and β is a parameter for adjusting the Friis' free space equation for short-distance transmission. In an attempt to investigate the feasibility of integrating this technology in IoT networks, authors in ref. [31] used a mobile charger (MC) to wirelessly charge the battery of sensor nodes periodically and thereby proved the feasibility of the technique. Some MC related concepts include demand timeliness, the number of charging devices, control system and charging points [32]. Demand timeliness describes the state of the MC when it receives a charging request while the number of charging devices describes the number of MC and nodes being charged simultaneously. The control system is the entity that determines the optimal travel path for the MC. Common challenges with WET, especially in an IoT network that underscores the need for AI techniques are the need for multiple chargers, optimized traveling path, visit time and charging period of the MCs. Table 2 summarizes the application areas of AI in the SEM group. In the next section, we present the second group of CS solutions. Table 2. Summary of the usage of AI in IoT smart energy management.

Self-Management in the Future IoT
The self-management (SM) group comprises solutions that give IoT devices the ability to adapt to changes in the environment with the end goal of promoting a better data collection process. SM further gives nodes the ability to automatically detect and remove compromised peers from the network while maintaining a desired operational benchmark [47]. Specifically, with this feature, IoT nodes can self-configure, self-heal and self-optimize to achieve an optimal DC process. The majority of the approaches for self-management in IoT networks are based on the MAPE-K (Monitor-Analyze-Plan-Execute over a shared Knowledge) control loop [48] that details an architectural blueprint for autonomic and self-adaptive systems. In the following subsections, we briefly describe three IoT SM behaviors.

Self-Configuring IoT Nodes
The main objective of self-configuration is to promote scalability and further enhance dynamic adaptation to the changing environmental conditions [49]. The vast and dynamic nature of IoT deployments underscores the need for devices to intelligently and autonomously react to a wide range of different conditions without human interventions [50]. With self-organization capability, nodes are empowered with the autonomic ability to interact with other nodes and carry out self-controlling activities according to their state and that of its immediate environment. An IoT applicable self-organizing scheme should support a decentralized infrastructure based on autonomy as well as provide efficient collaboration based on ubiquitous data exchanging and sharing. Others include intelligent service discovery based on adaptive response to the demands, neighbor discovery and medium access control [50]. When AI is integrated into IoT for self-configuration tasks, devices can dynamically configure their parameters to suit the operating environment, basically turning them into plug and play devices [51,52]. Figure 7 shows some CS self-configuration tasks that have benefited from integration with AI [53][54][55][56].
J. Sens. Actuator Netw. 2020, 9, x FOR PEER REVIEW Plan-Execute over a shared Knowledge) control loop [48] that details an architectural blueprint for autonomic and self-adaptive systems. In the following subsections, we briefly describe three IoT SM behaviors.

Self-Configuring IoT nodes
The main objective of self-configuration is to promote scalability and further enhance dynamic adaptation to the changing environmental conditions [49]. The vast and dynamic nature of IoT deployments underscores the need for devices to intelligently and autonomously react to a wide range of different conditions without human interventions [50]. With self-organization capability, nodes are empowered with the autonomic ability to interact with other nodes and carry out selfcontrolling activities according to their state and that of its immediate environment. An IoT applicable self-organizing scheme should support a decentralized infrastructure based on autonomy as well as provide efficient collaboration based on ubiquitous data exchanging and sharing. Others include intelligent service discovery based on adaptive response to the demands, neighbor discovery and medium access control [50]. When AI is integrated into IoT for self-configuration tasks, devices can dynamically configure their parameters to suit the operating environment, basically turning them into plug and play devices [51,52]. Figure 7 shows some CS self-configuration tasks that have benefited from integration with AI.

Self-Healing IoT Nodes
Self-healing (SH) behavior describes the ability of a system to recover from damage, failure or malfunction without direct intervention from an external agent. With SH capability, IoT nodes possess the ability to automatically recover from faults, attacks and other forms of miscellaneous

Self-Healing IoT Nodes
Self-healing (SH) behavior describes the ability of a system to recover from damage, failure or malfunction without direct intervention from an external agent. With SH capability, IoT nodes possess the ability to automatically recover from faults, attacks and other forms of miscellaneous activities that negatively impacts its DC operations [57]. Some of the fault situations in IoT systems that can trigger an SH action include malfunction of node hardware, traffic bottleneck, energy outage, or attacks from intruders. A functional SH IoT system detects, diagnose, recover and where possible, learn to prevent future occurrence.
Several approaches can be used to achieve SH in the IoT. One such approach is to leverage on the IPV6 routing protocol for low power and lossy network (RPL) that allows for the redirection of data traffic using multiple directed acyclic graphs. Attempts from the literature to achieve AI-based self-healing in IoT systems include the use of runtime verification techniques [58], substitute nodes [59] and SH architecture [60].

Self-Optimizing IoT Nodes
During DC operations, and due to their resource-constrained nature, IoT nodes can become susceptible to the shortage of necessary operational resources. To avoid this, periodic or continuous self-optimization is essential for the smooth running of DC operations. In more specific terms, IoT self-optimization encompasses tasks carried out by nodes during operation which are aimed at improving efficiency, general performance or meeting end-user/application requirements [61]. The optimization tasks involve tuning of device operation parameters or reallocating excess (idle) resources to other areas that could benefit from their usage. Figure 8 [55,[61][62][63][64] shows some CS self-optimization tasks that have benefited from AI integration while Table 3 presents a summary of the application areas of AI in IoT self-management.
J. Sens. Actuator Netw. 2020, 9, x FOR PEER REVIEW tasks that have benefited from AI integration while Table 3 presents a summary of the application areas of AI in IoT self-management.

Cognitive Security in the Future IoT
Data collection is one of the major energy-consuming tasks and a vulnerable state when they become susceptible to attacks from intruders. Thus, the cognitive security (CSC) group encompasses solutions that give nodes the ability to learn, understand and evolve using data to proactively predict, detect and prevent threats [74]. Apart from the ability to learn, CSC also aims to provide an improved incidence response time and reduces false positives during threat detection. There are two  Table 3. Summary of the usage of AI in IoT self-management.

Cognitive Security in the Future IoT
Data collection is one of the major energy-consuming tasks and a vulnerable state when they become susceptible to attacks from intruders. Thus, the cognitive security (CSC) group encompasses solutions that give nodes the ability to learn, understand and evolve using data to proactively predict, detect and prevent threats [74]. Apart from the ability to learn, CSC also aims to provide an improved incidence response time and reduces false positives during threat detection. There are two peculiarities of IoT nodes that make them susceptible to attacks [75]. Firstly, they cannot use advanced security algorithms and secondly, they have a wide attack vector due to their usually large-scale deployments [76,77]. According to O'Connor [78], the three (3) key elements for cognitive security are device and data protection, proactive threat intelligence, and cognitive risk management. The first element ensures that only authenticated and authorized users/applications have access to the network, device or data service provided by the IoT system. The second element describes the use of automated response tools to visualize and prioritize threats while the last element describes the use of cognitive tools to adaptively manage threats using information from acquired data.
To achieve CSC, authors in ref. [74] proposed the use of cognitive firewalls and supervisors with embedded ML/AI. In this approach, a hardened cloud act as a proxy that handles data request, commands and responses between nodes to provide a scalable security system. The weakness of this system, however, is the trust assumption it makes on some system elements which might not always be realistic. In a related study, authors in ref. [79] proposed a three-layer CSC model comprising of knowledge, information, and cognitive domains. The model carries out five major objectives that include modeling mental maps, knowledge generation, data fusion, data security handling, automated threat handling. Other attempts at developing a CSC solution for IoT can be found in ref. [80].
However, irrespective of the approach used to achieve CSC, a fact which remains immutable is that all viable solutions must collect, have access, and learn from security-related data. Table 4 summarizes the usage of AI-based techniques for IoT cognitive security. In the next section, the fourth group of CS solutions is presented. Table 4. Summary of the usage of AI in IoT cognitive security.

Smart Data Collection in the Future IoT
The FIoT devices will collect real-time data such as weather, health vitals, machine, image, videos, etc., which size varies in the higher multiples of kilobytes and use the same to provide immediate insights about events and systems. Hence, the last group deals with CS solutions that promote these tasks. From the surveyed works, we observed the use of approaches such as approximate sensory DC [91], data aggregation and fusion [92], cognitive radios [93], smart data collection protocols [94,95] and architectures [96,97] to promote smart DC processes.
Data aggregation is a technique for eliminating data redundancy to reduce energy consumption in nodes [98]. In data aggregation, nodes send data to an appointed cluster-head, where the collected data undergoes aggregation before been forwarded to the sink. On the other hand, data fusion is a technique that combines and derives inference from data gathered from multiple sources with the aim of making the collected data more efficient, reliable and accurate than data from a single source [98,99]. The three major data aggregation mechanisms in IoT are the tree, central and cluster-based mechanisms. Common deficiencies with these mechanisms include difficulty in encrypted data processing, high energy usage, reliability, computational complexity, fault tolerance and compatibility issues [100]. In addressing some of these issues, AI has been used to optimize the cluster head selection process [101], detect data outliers [102] and provide fault-tolerant data aggregation process [103].
The approximate sensory DC (ASDC) is based on the idea that most sensory data are spatially and temporally correlated due to the continuously varying space and time nature of the physical world [104]. Thus, it collects and transmits partial data to the upper layers. Proposed ASDC algorithms can be grouped into model-based, the compressive sensing based, and the query-driven [91]. In the model-based approach, prediction models are built using correlated sensor data and later used to predict future data. Compressed sensing (CSen) methodology describes the capture of few and scattered signals below the Nyquist rate and is explored by authors in ref. [105]. They identified adaptive measurements, weighted measurements, CSen-based data gathering, and routing protocols, sparse network construction as some of the approaches for the usage of CSen for IoT data sensing. The third approach uses sub-queries to provide partial results from the sensory dataset.
The development of a novel and the optimization of existing data collection protocols and architecture using AI is an exploratory area for promoting a smarter data collection process in the future IoT. For example, the Message Queue Telemetry Transport (MQTT) and Extensible Messaging and Presence Protocol (XMPP) protocol are known to suffer from unreliability, mobility issues and lack of a service guarantee, which becomes a problem when used for reliable and time-critical applications [106,107]. Solutions leveraging AI to improve the efficiency of these protocols are still needed from the literature. The use of AI to optimize the various edge and cloud DC architectures is also worth exploration. Furthermore, utilizing AI for data preprocessing during DC will allow nodes to pre-process and drop packets that are corrupt, incomplete or not useful. By doing this, the energy wasted on the transmission and further processing of the dropped packets is conserved [108,109]. Despite the viability of this concept, it is yet to be fully explored in the literature for its practicability in the IoT. Table 5 summarizes the usage of AI-based techniques for IoT data collection tasks. In the next section, we present the classification for the AI techniques used in cognitive sensing solutions. Table 5. Summary of the usage of AI in IoT smart data collection.

Machine Learning Techniques
Machine Learning is a popular subfield of AI responsible for allowing machines to learn from data. It gives devices the capability to learn and perform tasks without being explicitly programmed. ML techniques can be divided into three. Supervised, unsupervised and reinforcement learning (RL).
In the following subsection, we present the state-of-the-art of some machine learning techniques in cognitive sensing solutions.

Supervised Learning Techniques
In supervised learning (SL), algorithms are trained using labeled datasets. During the training process, algorithms evaluate an estimate based on the input dataset and continually updates the estimate until it achieves a predefined degree of accuracy. An SL algorithm adjusts and satisfies a cost function that measures the error between a labeled and predicted output [118]. They are majorly used for classification and regression-based tasks.
In classification tasks, data are grouped into a predetermined and distinct number of labeled classes. Popular algorithms include Naïve Bayes (NB), K-Nearest Neighbor (KNN), Support Vector Machines (SVM), Decision Trees (DT), Random Forests (RF), Artificial Neural Networks (ANN), and Ensembles. Some algorithms are fast, accurate and easy to implement, e.g., NB, RF which makes them usable on resource-constrained nodes while others like KNN and SVM tend toward computational complexity, especially with large datasets. For example, authors in ref. [119] successfully RF on a constrained node to classify collected data before transmission and further demonstrated that the energy consumption of the AI-based process was three times lower than the normal sense and transmit approach. Other algorithms like DT, ANN and SVM suffer from overfitting when datasets are not well pruned or regularized. Common classification tasks in CS include threat classification [83], device/user classification [120], data and request classification [121].
The operational technique of algorithms, the type of data (size, kind, features, state, etc.) and the CS task influences the choice of a selected algorithm. For example, a Naive Bayes classifier assumes that data attributes are statistically uncorrelated, thus, given a vector of attributes t, NB evaluates the probability that the vector belongs to a class using the Bayes Theorem in Equation (7) p( t|x 1 It then uses the naïve assumption given as Subsequently, for all i, this relationship is then simplified as shown in Equation (9) as This simplified process makes an NB model easy, fast and capable of real-time processing in CS tasks with massive datasets having large or irrelevant features.
Given an independent variable, algorithms such as linear regression, SVM and ANN are used to predict a continuous value. Hence, they are useful for forecasting or establishing a relationship between variables of interest. Common prediction-based tasks in CS include data/event prediction [122], energy consumption/availability forecast [17], application load prediction [123], and predicting threats [124]. For an independent variable y in Equation (10) the goal of a linear regression algorithm is to find the best value for b 0 and b 1 . This can be achieved using a minimization problem that minimizes the error between the predicted value and the actual value. The mean squared error (MSE) function is obtained when the error difference is squared and summed over all the data points, then divided by the total number of data points. It is given as A gradient descent approach is then systematically used to update the values of b 0 and b 1 to reduce the MSE.
Convolutional Neural Networks (CNN) are a class of deep neural networks commonly applied to vision-based analysis, image and video recognition systems, recommender systems, and image classification. CNN consists of an input, output and a hidden layer that comprises a series of convolutional layers. Some of the obstacles of using CNN in IoT nodes include high computational complexity, lack of sufficient data sets, high energy and memory usage [125]. However, these obstacles can be mitigated by scaling a large model down or by using a simplified model designed for resource-constrained environments. For example, authors in ref. [126] proposed a simple but efficient CNN model suitable for IoT devices. The simplified model achieves its state-of-the-art performance by factorizing standard 3 × 3 convolutions into pairs of 1 × 3 and 3 × 1 standard convolutions, instead of performing depth-wise convolutions.
Authors in ref. [127] proposed a streaming hardware accelerator for achieving image detection using CNN in IoT nodes. To promote energy efficiency, the accelerator avoids unnecessary data movement and uses a unique filter decomposition technique to support arbitrary convolution window size. Also, to improve throughput, the accelerator uses an external pooling module to provide a pooling function. The validity testing of the accelerator showed that it can support popular CNNs and it is suitable to be integrated with the IoT devices. Authors in ref. [128] present a CNN and RNN based network traffic classifier for classifying IoT traffic. The proposed method provided a better detection result than alternative algorithms without the added feature engineering technique common in other models.
In a related study, authors in ref. [129] applied the compressed sensing scheme at the input layer of a CNN model for image classification to reduce the resources consumption and the required number of training samples. The proposed technique was then evaluated using the public data sets, MINST and CIFAR-10, with results showing reduced training and inference time. Further, the model achieved a higher classification accuracy when compared with the traditional large CNN models. In ref. [130], a CNN indoor localization framework based on RSSI measurements was developed using a 3D radio image-based region recognition process. It aims to localize a sensor node accurately by determining its location region. To achieve this, 3D radio images are constructed based on the Received Signal Strength Indicator (RSSI) fingerprints. The RSSI measurements and the kurtosis values are then used to provide new information to the network. The proposed method solved the problem of the high computational complexity of the traditional methods and ensured a good localization accuracy. Authors in ref. [131] developed a general-purpose CNN for image and video classification in IoT systems. To overcome the high computational cost of CNNs, the developed system distributes their computation onto the units of the IoT system which is then formalized as an optimization problem of minimizing the latency between the data-gathering and the decision-making phase. The strength of the proposed CNN lies in its ability to supports multiple IoT sources of data as well as parallel execution on the same IoT system.

Unsupervised Learning
The goal of unsupervised learning algorithms is to find unknown patterns or reduce features in unlabeled datasets. These two tasks are carried out using clustering and dimensionality reduction (DR) techniques. Popular clustering techniques include K-means, hierarchical, Density-based spatial clustering of applications with noise (DBSCAN), and cluster analysis while DR tasks majorly use principal component analysis (PCA), linear discriminant analysis (LDA), non-negative matrix factorization (NNMF) and autoencoder methods. Clustering algorithms are extremely useful in CS-related tasks due to their ability to work with unlabeled data and their ability to automate the difficult sensor data annotation process [132,133]. On the other hand, DR techniques are useful for selecting and extracting features from collected data before transmission due to bandwidth limitations, or as a precursor to a supervised learning task [134,135]. Other application areas include density estimation, outlier, and anomaly detection [136]. Data clustering is a process of grouping unlabeled datasets into clusters of the same features. For example, given a set of measurements (m 1 , m 2 , . . . m n ), where each measurement is a g-dimensional real vector, k-mean clustering will partition the n measurements into k(≤ n) sets S = (S 1 , S 2 , . . . S k ) to minimize the within-cluster sum of square. The objective is shown in Equation (12)  |s i |Var S i (12) where µ i is the mean of points in S i . In hierarchical clustering, the objective is to build a hierarchy of clusters using either a bottom-up or a top-down approach. In the bottom-up approach, each observation starts in its cluster and pairs of clusters are merged as one moves up the hierarchy whereas in the top-down approach, all observations start in one cluster, and splits are performed recursively as one moves down the hierarchy. Common metrics used to determine whether clusters are to be Dimensionality reduction techniques derive their importance in CS solutions due to the difficulty encountered by some supervised learning algorithms when working with large datasets and the bandwidth/energy limitation problem in sensor data transmission. PCA is an algorithm used majorly for DR and it operates by performing a linear mapping of the data to a lower-dimensional space in such a way that the variance of the data in the lower dimensional space is maximized. A review of the DR techniques applicable to the IoT domain can be found in ref. [137].
To recover missing IoT sensor data, authors in ref. [138] propose the use of a probabilistic method and data from related sensors. The proposed method uses a K-mean algorithm to measure and split data into different clusters based on the idea that sensors within one group will have similar patterns of measurement. After this, a probabilistic matrix factorization (PMF) is carried within the cluster to recover missing sensor data by analyzing measurement patterns of neighboring sensors. The performance of the PMF algorithm is further enhanced by normalizing the data and limiting the probabilistic distribution of random feature matrices. Unlike other approaches that use SVM and DNN, the proposed method achieved a better recovery accuracy and lower root mean square error. The method, however, suffers from scalability issues due to the increased difficulty of determining the correlation between sensors data on large datasets.
In ref. [139], the authors proposed a node-density-based clustering and mobile collection (NDCMC) approach that combines the hierarchical routing and mobile element (ME) data collection techniques. In the approach, cluster heads (CH) collect data from members after which mobile elements aggregate these data by visiting the CHs. To achieve this, the work proposes a CH selection scheme based on the node density clustering algorithm to make nodes surrounded by more deployed nodes become CHs. This aims to improve the efficiency of the intracluster routing and ME data collection process. The ME then uses a low-complexity traveling track planning algorithm to collect data from all CHs. The strength of the proposed approach lies in its ability to provide a more uniformed power consumption among nodes. However, the difficulty in scheduling the traveling paths of the ME is an observed disadvantage. Further in ref. [140], the authors propose a recursive principal component analysis (R-PCA)-based data analysis framework that aggregates redundant data and detects outliers. To achieve this, the principal components of aggregated sensor data are extracted at the CH which makes it suffer from increased energy consumption at the CH nodes.

Reinforcement Learning
RL deals with how an agent learns while interacting with an environment via the use of a reward system. The agent receives a delayed reward in the next time step based on which it evaluates its previous action. There are two variants of RL. The model-based and model-free RL. In the model-based approach, a transition probability maps a current state with an action and a resulting next state [141]. Thus, an agent's task is to learn an optimal policy that maximizes its reward or reduces its cost as it navigates through the environment [56]. Examples of such algorithms are Dyna Q and Monte Carlo methods. On the other hand, an agent in model-free RL relies on trial-and-error actions to update its knowledge about the environment, e.g., temporal difference learning and Q-learning. An RL problem is modeled using the Markov decision process (MDP) framework. An MDP is a 5-tuple [S, A, P, R, S 0 ] where S is the set of possible states, A is the set of corresponding actions, P(St+1|St, At) represents the dynamics and R(St, At, St+1) is the reward, R(s, a, S 0 ) represents the reward given to the agent at state s, after performing an action a and terminating in state S 0 [142]. The objective of MDPs is to find an optimal control policy that can maximize a given average reward per unit time or, a policy that minimizes the average cost per unit time. The value of a policy π (V π ), (i.e., the expected discounted reward if starting in some state and following a policy π) can be expressed using the Bellman equation given as V π (s) = R(s) + γ s ε S P(s |s, a)V π (s ) (13) whereas the optimal value function (value function of an optimal policy π * a policy with the highest value) can be obtained using In CS tasks, RL is used to solve planning, control, optimization, and learning-related problems e.g., retransmission scheduling in 802.15.4e LLDN [143], intrusion detection system [144], self-learning power control [145], power consumption scheduling in an EH IoT node [146,147], sampling rate configuration of EH sensors [148].
A major challenge when using RL techniques for cognitive sensing tasks is the difficulty in training active agents whose drop in performance could adversely affect the overall system. Another difficulty encountered is the memory-intensive nature of some RL algorithms as well as the need to limit exploratory moves during learning where the agent's safety is paramount. The large and continuous state and action spaces of some sensing tasks is also a challenge that needs to be addressed efficiently [149].
In ref. [150], authors develop three RL-based methods that address the user access control and battery prediction problems in a multiuser EH-based IoT system. The LSTM-DQN-based scheduling algorithm uses causal information about the channel and node battery states to find an optimal policy that maximizes the long-term discounted uplink sum rate. The battery state prediction algorithm uses deep LSTM to minimize prediction loss. The efficiency of the algorithms was tested under different conditions with results showing they were efficient in mitigating the addressed problems. In ref. [151], the authors formulate the resource allocation problem of IoT fog nodes using a Markov decision process (MDP) framework. For each request from an IoT user, the node decides whether to serve it locally at the edge using its resources or to refer it to the cloud to conserve its valuable resources. The formulated MDP problem is then solved using several RL methods, namely Q-learning, SARSA, Expected SARSA, and Monte Carlo by learning the optimal decision-making policies. The performance and adaptivity of the RL methods are then compared with the performance of the network slicing approach with various slicing thresholds. The evaluation results showed that the RL algorithms can be adapted to various IoT environments. Table 6 presents some ML algorithms and selected works detailing their strength and weaknesses for cognitive sensing tasks. • Good trade-off performance between energy consumption and task execution delay • Uses only numerical simulation to demonstrate the viability of the technique

Metaheuristics
The nature of some CS problems makes metaheuristics a suitable analysis tool for its domain. Most CS problems have conflicting objectives to be satisfied e.g., throughput maximization and energy consumption minimization. Hence, most of these problems are frequently treated as single-objective optimization problems by converting all but one objectives into constraints [157]. A metaheuristic is a higher-level heuristic algorithm that uses one or more low-level heuristics processes to generate or find a solution to an optimization problem [158]. In the following subsections, we briefly discuss some types of metaheuristics and their application for CS tasks.

Single Solution Based Metaheuristics
These are metaheuristics that iteratively apply the generation and replacement procedures to modify and improve a single candidate solution for an optimization problem. During the generation phase, a local search transformation of the solution space [159] is carried out to obtain a set of candidate solutions C(s). This is followed by a replacement phase, where a solution is selected from the set of candidate solutions to replace the previous solution. This process is repeated until a given stopping criteria are met. Common examples of such algorithms include tabu search (TS), simulated annealing (SA), local search and variable neighborhood search. In IoT, they are potentially useful for optimization tasks. For instance, using these metaheuristics, parameters like the transmission and channel characteristics could be modeled in the solution space while the candidate solutions are sought, selected and evaluated for their optimality.
In an attempt to promote self-optimization and reduce end-to-end communication delay in an IoT dynamic multi-user mission-critical system, authors in ref. [160] proposed a tabu search-based algorithm to facilitate the placement and deployment of service chained virtual network functionalization in a network cloud infrastructure. A similar TS algorithm is used in ref. [161] for balancing network traffic between cloud and fog nodes. The work uses a convex combination technique to combine the multiple objectives into a single objective to simplify the optimization task. Further, authors in ref. [162] used simulated annealing to study how scheduling optimization techniques can be adapted to a workload of processes with low parallelism but with high arrival rates and highly variant run-times in a multi-cloud system. Using a discrete event simulator, the performance and the cost of the system was evaluated with results proving the viability of the algorithm. Moreover, the authors in ref. [163] proposed an SA-based load-balanced clustering algorithm for maintaining adequate sensing coverage in unbalanced data traffic with an end goal of increasing network lifetime. The authors further introduced a novel clustering cost function that can account for the sensor node traffic load and the communication cost over physical distances. The performance of the algorithm was compared with leading state-of-the-art clustering approaches via simulations with results showing that the algorithm can improve the network lifetime and coverage by keeping more sensor nodes alive for longer periods at a reduced computational cost.

Population-Based Metaheuristics
Population-based approaches focus on maintaining and improving multiple candidate solutions, and often use population characteristics to guide the solution search process; population-based metaheuristics include evolutionary algorithms, swarm intelligence and bio-inspired algorithms.

Evolutionary Algorithms
EAs are a set of algorithms that uses biologically inspired mechanisms such as reproduction, mutation, crossover, recombination, natural selection, and survival of the fittest to find a solution to an optimization problem. It then uses a fitness function to evaluate the quality of the proposed solution.
If not satisfied, the algorithm repeats the process until it gets an acceptable solution to the optimization task which leads to an evolution of the population [158]. Popular examples include genetic algorithm (GA), genetic programming, evolutionary programming, differential evolution. The strength of these classes of algorithms over the single solution-based class is their ease of dealing with multi-objective optimization problems prevalent in IoT systems.
In ref. [164], GA is used to optimize the node selection process in a clustering-based IoT system and its performance was compared with the dynamic clustering relay node clustering algorithm. The GA algorithm performed better in terms of slot utilization, throughput and standard deviation in data transmission. Furthermore, a GA-based adaptive offloading technique is proposed in ref. [165] for handling traffic in an IoT-infrastructure-cloud environment. The GA uses a distributed fitness process between the gateways and infrastructure to handle the requests while ensuring various communication metrics are satisfied. In other studies, a multi-objective PSO is used for detecting malicious activities in IoT network traffic [166] and for avoiding the energy-hole problem using a novel hierarchical data aggregation technique [167].

Swarm Intelligence Algorithms
These are the collection of algorithms that mimic the behavior of decentralized, self-organized natural systems. It is based on a principle that simple creatures in a group following simple rules possess the ability to carry out a high degree of intelligent activities [168]. This principle is obvious in the wide disparity between what can be achieved by a single ant and a colony of an ant or a single bee and a colony of bees. Popular examples are ant colony optimization (ACO), and artificial bee colony (ABC). Based on this principle, nodes could be made to carry out sensing tasks collectively and intelligently. For example, sensors with adequate energy resources could be made to share part of their energy with sensors having low energy [169]. Moreover, data routing between nodes could be optimized with SI algorithms. Other possible use case includes collective decision making and self-healing activities. In ref. [170], the authors used a modified ant colony algorithm to evaluate the selection processes of trustable objects to improve privacy in the IoT while authors in ref [171] utilizes the ABC algorithm to generate proper spanning trees that provides for a reliable data gathering in emergency applications.

Bio-Inspired Algorithms
These are optimization algorithms based on the principles and inspiration of the biological evolution of nature to develop new and robust competing techniques. In ref. [54], the authors propose a bio-inspired metaheuristic canonical particle multiswarm optimization (CPMSO) algorithm for the optimal deployment of sensors in the IIoT. The algorithm operates by building a κ-connected network to tolerate failure while ensuring the quality of service (QoS) criteria in terms of energy consumption, delay, and throughput is satisfied. The performance of the algorithm is compared with the conventional canonical particle swarm optimization (CPSO) and fully particle multiswarm optimization (FPMSO) algorithms with results showing that the CPMSO and FPMSO improve the throughput by approximately 95.23% while minimizing the energy consumption by 87.5%, and the delay by 5.00% as compared with CPSO.

Hybrid Metaheuristics
These are metaheuristics that combine strength and minimize weaknesses of various algorithms to form an improved hybrid algorithm that outperforms the individual algorithms either in terms of speed, accuracy, computational complexity or general performance. Authors in ref. [64] propose a hybrid (k-means and search economics) metaheuristic algorithm for addressing the IoT resource allocation problem. The algorithm uses k-means clustering to create an initial solution for the SE algorithm. In ref. [85], authors use PSO, ACO, ABC to select the most relevant feature set for identifying network attacks while KNN and SVM are used to classify the performance of the feature selection algorithms. The work uses the NSL-KDD dataset for training and testing and used different metrics to determine the best algorithms that provide better overall performance when used for feature selection in intrusion detection. Results of the evaluation show that PSO, ACO and ABC algorithms perform better than other approaches in feature selection with a 98.9% accuracy rate and 0.78% false alarm with the KNN algorithm as the classifier. Other hybrid techniques used to address various cognitive sensing tasks include GA and deep belief networks (intrusion detection) [86], Search Economics, K-means and SVM (Intrusion detection system) [172], GA and K-Medoids (sensor allocation) [173], GA and Fuzzy logic (node selection and placement) [174]. Table 7 presents some of the reviewed metaheuristics and selected works detailing their strength and weaknesses for cognitive sensing tasks. Table 7. Some metaheuristics and selected works detailing their strength and weaknesses for cognitive sensing tasks.

Single Solution Search
Tabu Search • VNF placement optimization at the IoT edge and cloud [160] • Optimal load balancing between fog and cloud nodes [161] • Complex event processing [175] • The possibility of a direct search through the solution space without gradient information • Flexible memory for a thorough search • Not practical in problem with a large solution space • Not easy to use for multi-objective tasks • Increased computational cost • Mono objectivity Simulated Annealing • Scheduling for IoT applications on clouds [162] • Uses a probability function to select a solution which prevents working through the entire space Evolutionary Algorithms GA • Elect the most preferred nodes in the cluster [164] • Adaptive offloading for IoT traffic [165] • Fast convergence • Efficient at complex uncertain and nonlinear problems • Suitable for multi-objective tasks • Easy to fall into local optimum in high-dimensional space • A low convergence rate PSO • Botnet detection [166] • Transmission power allocation [176] • Hierarchical data aggregation for IoT nodes [167] Swarm Intelligence Algorithms ACO • Energy consumption optimization [177] • Supports parallel search techniques • Guaranteed convergence • Complex and slow • Guaranteed but uncertain convergence time ABC • Task scheduling for energy-efficiency [178] • Optimal data transfer in a wireless power transfer network [179] • Reliable data gathering on the Internet of Things [171] Hybrid Methods

GA+DBN
• Intrusion detection [86] • Combines the strength and diversity of multiple heuristics to provide for a faster and more efficient operations • Identifying the right heuristics for the hybridization process is not a straightforward process.
• The setting of the newly introduced hybrid parameters is a complex process [180] GA+K-Medoids • Sensor Allocation in a Hybrid Star-Mesh IoT Network [173] GA + Fuzzy Logic • IoT node selection and placement [70,174] PSO + Fuzzy Logic • selection of an optimal Bluetooth communication mode that allows the best energy efficiency [181]

Fuzzy Models
Fuzzy models are mathematical formulations capable of representing, manipulating and interpreting vague data or information. In AI, they can be used to model a cognitive decision-making process that involves all intermediate possibilities between true and false values. A typical fuzzy model architecture comprises of a knowledge base, a fuzzifier, an inference engine, and a de-fuzzifier. In ref. [182], authors present an adaptive neuro-fuzzy inference system (ANFIS) model that uses data such as traffic flow, energy level, packet size, packet rate, source-destination address, source-destination ports, etc. to determine the current security state of an IoT network. The performance of the model is evaluated and compared with other approaches that are based on the confusion matrix, mean square error and accuracy measurement with results showing the proposed model had a better performance.
Authors in ref. [183] propose a suppressed fuzzy clustering algorithm and a PCA algorithm for intrusion detection in the IoT. The algorithm operated by initially classifying data into high-risk and low risk using high and low frequency and performs a self-adjustment of the detection frequency. In ref. [88], authors employ fuzzy and fast fuzzy pattern tree methods for malware detection and categorization in the edge computing-based IoT. Their technique achieved a high degree of accuracy during reasonable run-times, especially for the fast-fuzzy pattern tree. Both techniques used robust feature extraction and fuzzy classification approaches to achieve a more powerful edge computing malware detection and categorization method.

Probabilistic Models
Probabilistic modeling techniques are also proving to be useful in the field of AI for purposes such as learning, data mining, and pattern recognition. They are techniques that incorporate random variables and probability distributions into the analysis of an event. In more specific terms, they provide a means for modeling events influenced by factors beyond the control of an agent. Examples include the Bayesian model and the Gaussian Mixture Model. In ref. [45], authors deployed a multi transducer platform for photovoltaic and piezoelectric energy harvesting and further collected raw data about the harvested power in commonly-encountered outdoor and indoor scenarios. The goal of the work was to provide data-driven probability models that characterize the energy production process, to facilitate the coupling of energy harvesting statistics with energy consumption models in future IoT deployments. Figure 9 shows the trend of the four groups of solutions over the last decade while Figure 10 provides a classification of the AI Techniques used for providing the solutions. The trend in Figure 9 shows more solutions are addressing the IoT management issues and followed by smart data collection, cognitive security, and smart energy management respectively. In terms of the techniques, Figure 10 shows SL and RL have been used majorly for providing SEM related solutions while metaheuristics have been used majorly for self-management and smart data collection related solutions. This trend implies that there are more research efforts in the IoT self-management domain as compared to other cognitive sensing research domain. Figure 11 maps common CS tasks to the AI techniques used in the literature and further lists some of their input datasets.
J. Sens. Actuator Netw. 2020, 9, x FOR PEER REVIEW as compared to other cognitive sensing research domain. Figure 11 maps common CS tasks to the AI techniques used in the literature and further lists some of their input datasets.

Challenges of AI for Cognitive Sensing Solutions
The integration of AI techniques with various cognitive sensing solutions can revolutionize the data collection process in FIoT. However, for this to happen, some challenges must be overcome for the full realization of AI potentials in CS. Some of these challenges include: (i) Modeling Difficulties: IoT systems have the requirements of usability in real-time, low latency and high availability. Hence, in such systems, developing parameterized models for application or research purposes is difficult.
(ii) Lack of Needed/Quality Data: Poor quality of data or its lack thereof reduces the efficiency of predictive models or knowledge base used by cognitive systems. Such models are used for tasks like forecasting, analysis, decision making, etc. Thus, it becomes a problem when such tasks are carried out using faulty models. (iii) Irregular data usage pattern: Cognitive systems use various planning and optimization models built based on their usage patterns to optimize resource consumption. Hence, developing such models become difficult when nodes receive irregular requests or commands from users/applications (iv) Resource Limitation: The energy and computational requirement of some AI algorithms can sometimes be high for the resource-deprived nodes. Algorithms such as SVM, KNN, ANN are known to be computationally complex and using them on a resource-starved node becomes a difficult task.
(v) Improved Algorithms: Currently, some algorithms are sensitive to data outliers while others lack accuracy and are prone to overfitting. Thus, using these algorithms without addressing the aforementioned issues might yield undesired results. Recent trends adopt the use of ensemble models to mitigate some of these issues.

Challenges of AI for Cognitive Sensing Solutions
The integration of AI techniques with various cognitive sensing solutions can revolutionize the data collection process in FIoT. However, for this to happen, some challenges must be overcome for the full realization of AI potentials in CS. Some of these challenges include: (i) Modeling Difficulties: IoT systems have the requirements of usability in real-time, low latency and high availability. Hence, in such systems, developing parameterized models for application or research purposes is difficult. (ii) Lack of Needed/Quality Data: Poor quality of data or its lack thereof reduces the efficiency of predictive models or knowledge base used by cognitive systems. Such models are used for tasks like forecasting, analysis, decision making, etc. Thus, it becomes a problem when such tasks are carried out using faulty models. (iii) Irregular data usage pattern: Cognitive systems use various planning and optimization models built based on their usage patterns to optimize resource consumption. Hence, developing such models become difficult when nodes receive irregular requests or commands from users/applications (iv) Resource Limitation: The energy and computational requirement of some AI algorithms can sometimes be high for the resource-deprived nodes. Algorithms such as SVM, KNN, ANN are known to be computationally complex and using them on a resource-starved node becomes a difficult task. (v) Improved Algorithms: Currently, some algorithms are sensitive to data outliers while others lack accuracy and are prone to overfitting. Thus, using these algorithms without addressing the aforementioned issues might yield undesired results. Recent trends adopt the use of ensemble models to mitigate some of these issues. (vi) Data Privacy: In IoT systems, data privacy emphasizes the proper handling of data in terms of consent, notice, and regulatory obligations. As a result, some of the data needed by AI algorithms might become unavailable due to privacy violation concerns or their outright sensitive nature. Apart from this, some of the data privacy-related technologies such as protection and encryption further complicate the data availability challenge for AI algorithms. Hence, a serious effort is needed from the research community on how to make these data available without compromising privacy and its associated concerns.

The Way Forward
To mitigate some of the identified challenges, the following concepts can be explored by the research community for their potential application in CS solutions: (i) Data Warehousing: This concept describes the use of a central database to integrate data from multiple heterogeneous sources to support FIoT operations. Historical weather data, threat/attack data, user data, and other applicable IoT data are required by AI algorithms but sometimes these are not available due to new installations having insufficient data or outright data loss. As a result, keeping these datasets in locations where they can be accessed on demand by FIoT nodes when needed for their operation becomes a valuable approach. (ii) Computational offloading: This is a technique that can help alleviate the resource constrain problem in IoT nodes by transferring complex computations to more resourceful devices and receiving the results back from these devices [184]. It has been used in mobile device clouds and mobile edge for task execution but yet to be fully exploited for IoT operations. (iii) Energy Neutral Operation: This is a mode of operation of an IoT device where the energy consumed during operation is always less or equal to the energy harvested from the environment. In this mode, devices can theoretically operate infinitely without energy constraint. Hence, this concept is worth further exploration of its usage in the FIoT. (iv) Lightweight AI Algorithms: Due to the computationally intense nature of some algorithms which make them difficult for use in IoT devices, resource-efficient AI algorithms that can run seamlessly on FIoT nodes are needed from the research community. (v) Effective Data Management Policies: Data privacy describes the interwoven relationship between data collection, transmission, usage, user's privacy, and the legal issues surrounding them. Hence, if not managed well, data privacy poses a threat to data availability for AI algorithms. Furthermore, data abuse or leaks could result in unwanted scandals that negatively affect individuals, businesses and organizational processes [185]. Some of the existing data management solutions or policies like the general data protection regulation [186], the databox project [187], and the IBM data privacy protection framework [188], could be leveraged or extended to provide customized solutions for the IoT domain. (vi) AI-assisted Data Collection: Over the years, AI/ML systems have proven to be far more accurate than other systems at a variety of tasks such as automation, diagnostics, analytics, etc. hence, using AI to assist the data collection process is a potential research direction for the future. This, however, is likely to raise the issue of its effect on human rights and ethics. For example, how can such a system understand the human right to data consent, access, protection, privacy or fair processing? Will it understand the thin line between private and public data?

Conclusions
This article surveys the state-of-the-art, potentials and challenges of AI techniques for providing cognitive sensing (CS) solutions in future IoT (FIoT) systems. The CS concept will be used in the FIoT to facilitate a smart, secure and energy-efficient data collection process. Based on research efforts over the last decade, four approaches to the cognitive sensing (CS) problem were identified. They include smart energy management (SEM), self-management (SM), cognitive security and smart data collection (SDC). In the SEM approach, the focus of research effort has been the use of machine learning (ML) to (i) forecast energy availability, (ii) predict events for optimizing duty cycling schedule and (iii) develop energy management models for IoT nodes. By leveraging AI, LPWANs can be designed to further optimize its performance, yet few works have explored this potential. For the SM approach, metaheuristics are used majorly for optimization tasks and efforts in this area are currently skewed towards optimizing data traffic between the node and the edge/cloud system. Furthermore, hybrid metaheuristics have proven to be more suitable and widely used for solving the multi-objective CS challenges due to their ability to combine the strengths of multiple algorithms.
For cognitive security, the scarcity of structured threats/attack data is still a major obstacle in the advancement of its concept while approximate sensory DC, data aggregation and fusion, cognitive radios, smart data collection protocols, and architectures are some of the observed approaches used to promote smart DC processes in the literature. Further, we identified data availability, data privacy, modeling difficulties, resource limitation, and efficient algorithms as some of the challenges mitigating against the use of AI techniques in CS solutions. Moreover, it is observed that supervised learning techniques are used majorly for SEM solutions whereas metaheuristics are used for self-management and smart data collection solutions.
Future research direction suggests the need for effective data management strategies that provide for privacy in IoT data. This is due to the problem that could arise when collected data are improperly managed. Hence, the development of effective data management solutions, policies or architectures that provides data owners with much-needed privacy while making such data available for AI tools are still needed from the literature. Other research directions worth exploring include data warehousing, computational offloading, energy-neutral nodes and lightweight algorithms that can run effectively on resource-constrained nodes.
Author Contributions: All the authors have equally contributed to this article. All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.

Conflicts of Interest:
The authors declare no conflict of interest.