## 1 Introduction
The IoT's ability to connect objects to the internet and enable autonomous decisions in smart environments highlights its significant impact [8]. This connectivity has introduced new paradigms, such as the internet of spatial things, focusing on everyday objects in the IoT era [9]. As the number of IoT devices continues to increase, they generate massive amounts of data, leading to concerns regarding data privacy and network costs in the  
Figure 1: IoT architecture. current cloud-centric approach for extensive data analysis [10]. As the data transmission between cloud services and devices increase, service providers require the expansion of infrastructure, leading to system vulnerabilities for attacks. EC-IoT has gained attention for enhancing IoT services by leveraging edge computing capabilities to help mitigate the growing data generation of these IoT networks. Edge computing processes data closer to end users, improving response times, reducing latency, and offloading computational tasks to edge nodes near IoT devices [11]. This integration has led to innovative strategies such as edge intelligence-aided IoT networks, which accelerate IoT services by deploying edge intelligence near IoT devices [12; 13; 14; 15]. A key advantage of EC-IoT is providing location-aware services and optimizing resource allocation by offloading tasks from resource-limited IoT devices to powerful edge servers [16]. Edge computing also facilitates collaborative computing using a range of heterogeneous smart devices, enhancing overall IoT network efficiency [17]. This integration enables smart IoT devices at the edge of wireless networks to perform collaborative ML tasks using locally collected data, leading to the edge learning paradigm [18; 19]. EC-IoT systems are designed to address security and privacy challenges in IoT networks. Researchers have proposed decentralized and reliable trust measurement mechanisms for EC-IoT to enhance data and network security [20]. Security frameworks have been developed to ensure secure communication and data processing in IoT-enabled healthcare systems [21; 22]. Additionally, various approaches have been explored to improve EC-IoT services. These include IoT service slicing and task offloading for edge computing [23], IoT ecosystem modeling for design quality metrics [24], autonomic blockchain-based services for IoT device integration and payment [22], and service discovery approaches for IoT [25]. Further research into accountable anonymous access architectures for IoT networks [26], elastic IoT fog frameworks for AI services [27], and multi-perspective trust management frameworks for crowdsourced IoT services [27] could provide valuable insights into enhancing IoT services. In this survey, we aim to provide a review of recent techniques related to the security of EC-IoT systems, specifically focusing on AI-based approaches. Due to growing concerns about the power and infrastructure needed to host large AI models on centralized servers, leading AI companies are moving towards smaller models that can run on microcontrollers or SoC-based systems. These systems can be placed closer to data-generating devices like IoT devices, making edge computing a strong candidate for such deployments. Therefore, it is imperative to begin researching improved security infrastructure for these EC-IoT systems to stay ahead of potential threats. This article aims to provide a detailed explanation of the current security concerns of EC-IoT and the countermeasures proposed in the literature. In summary, this paper has the following contributions:  
* Classification of current threats to EC-IoT systems. * Analysis of the current countermeasures. * Analysis of the AI-based countermeasures. * Challenges in incorporating AI in protecting EC-IoT systems. The survey is organized as follows. Section 2 discusses the related work on EC-IoT security. Section 3 explores edge computing and related paradigms. Section 4 explores the integration of edge computing with IoT, highlighting its advantages and applications.