## 1 Introduction  
The rapid proliferation of communication, cloud computing, and the internet of things (IoT) has ushered in an era of unprecedented connectivity and data-driven innovations [1]. IoT networks have become ubiquitous, permeating various sectors such as healthcare, transportation, manufacturing, and smart cities. While IoT offers immense benefits in terms of efficiency and automation, it also brings forth intricate cybersecurity challenges [2]. The interconnectivity and heterogeneity of IoT devices exposes these networks to sophisticated cyber threats, demanding robust defined mechanisms to safeguard sensitive data and preserve operational continuity [3].  
Among the fundamental security measures, intrusion detection systems (IDSs) play a crucial role in detecting and thwarting potential cyberattacks. An IDS continuously monitors network traffic, scrutinizing data streams for anomalous patterns and malicious activities. However, ensuring the efficacy of an IDS in the dynamic and evolving landscape of IoT requires innovative and adaptive approaches that can accurately identify both known and previously unseen cyber threats [4].  
This research paper presents a cutting-edge AI-driven intrusion detection system, tailor-made for the unique challenges posed by IoT environments. The primary objective of this study is to fortify the cybersecurity posture of IoT networks by proactively detecting and mitigating cyber threats, bolstering data integrity, and safeguarding critical infrastructures.  
To achieve this objective, we leverage the power of long short-term memory (LSTM), a specialized variant of recurrent neural networks renowned for its exceptional ability to model sequential data. In the context of IoT network traffic, which often exhibits temporal dependencies and intricate dynamics, LSTM's capacity to retain long-term contextual information proves invaluable. By harnessing LSTM-based deep learning, our IDS demonstrates superior performance in recognizing subtle and time-sensitive anomalies, enabling the early detection of advanced and persistent cyberattacks [5; 6; 7].  
However, the imbalance in class distribution within the dataset is a persistent challenge in IDS development. In the context of IoT networks, normal network traffic vastly outnumbers actual attacks, leading to imbalanced datasets that can undermine the IDS's accuracy. To address this issue, we employ the synthetic minority over-sampling technique (SMOTE). SMOTE intelligently generates synthetic instances of the minority class (attacks), effectively balancing the dataset and empowering the IDS to identify rare intrusion patterns with precision [8; 9].  
Furthermore, the selection of informative features significantly impacts the IDS's overall performance. To optimize feature selection, we integrate the random forest classifier with recursive feature elimination (RFE). RFE iteratively selects and eliminates features, enhancing the IDS's efficiency, reducing computational complexity, and improving detection accuracy. This meticulous feature selection process ensures that the IDS focuses on the most relevant and discriminative attributes, enhancing its ability to discern meaningful patterns amidst noise and irrelevant data [10; 11; 12].  
Our proposed AI-driven IDS undergoes comprehensive evaluation using three widely adopted public datasets: the Intrusion Detection Evaluation dataset (CIC-IDS2017) [13], NSL-KDD [14], and the UNSW-NB15 dataset [15]. These datasets encompass diverse and realistic attack scenarios, making them suitable benchmarks to assess the IDS's robustness and effectiveness. Through rigorous experimentation, we demonstrate that our AI-enhanced IDS outperforms existing intrusion detection methods, validating its efficacy in safeguarding IoT networks against sophisticated cyber threats.