## 1 Introduction
The integration of native AI into the network architecture increases the potential for misuse or manipulation, which could lead to unforeseen security breaches and unchecked proliferation of fraudulent activity throughout the network [5]. These technologies' intricacy and continually evolving nature stresses the need for comprehensive and adaptable precautions to defend against both present and future threats. Although the incorporation of AI into various aspects of 6G presents substantial risks, it also offers significant potential to enhance and secure new use cases. However, this potential is accompanied by challenges that need to be addressed for AI to fulfill its promise effectively. The primary challenge arises from the inherent lack of transparency in AI decision-making processes, which may erode confidence. This confidence is crucial for the successful deployment of advanced IoT-6G applications [15]. Transparency within security systems is vital for understanding how decisions are made and ensuring the fairness of security protocols [16]. Users find it hard to independently verify threat assessments as well as comprehend the rationale behind security measures, given that they lack clear visibility into AI algorithms [17]. The absence of transparency not only hampersaccountability and collaboration but also heightens the risk of overlooking critical threats or misinterpreting security alerts [18]. Incorporating AI within transparent frameworks while maintaining strict human oversight is crucial for effectively addressing these imminent problems and safeguarding the emerging 6G and IoT ecosystem [19]. A significant method to boost transparency in security-related decision-making in IoT and 6G environments involves using explainable AI (XAI). By establishing the role of AI in security procedures and ensuring accountability for any breaches or failures, XAI helps security professionals comprehend and manage the dangers connected to AI-driven decisions [20; 21]. The broader safety framework of the 6G and IoT ecosystem is reinforced by this transparency, which boosts confidence in AI systems and strengthens the efficacy of security measures [17]. By adopting XAI, organizations can ensure that AI technologies positively contribute to security, enhancing the resilience and reliability of next-generation communications. Several significant problems remain despite the notable accomplishments described in past studies, as presented in Section 2. It is observed that new datasets, that can significantly improve security evaluations in actual IoT contexts, are often not being utilized [22]. Due to their propensity for imbalance or lack of balance across subcategories within classes, these datasets frequently provide skewed distributions and inaccurate forecasts [23]. Not all of the benefits of feature refinement have been thoroughly explored. With the help of XAI insights, models could be refined and accuracy improved [24; 25]. Furthermore, thorough research comparing model predictions with the knowledge gained from XAI techniques is noticeably lacking as far as confirming the accuracy and consistency of forecasts is concerned. Lastly, there are still a lot of gaps in the thorough assessment and verification of outcomes from various XAI approaches. Our study is primarily motivated by the need to address these issues in order to create secure and effective IoT security solutions. This study addresses the difficulties in 6G networks by implementing practical techniques to improve security in novel ways. Although the methods are well-established, their customized application to the intricate and changing requirements of 6G and IoT contexts presents a fresh viewpoint. We hope to build a more robust and flexible security framework that tackles particular security flaws and undiscovered threats by combining these tactics with the most recent advancements in network technology. First, we utilize comprehensive datasets that cover a broad spectrum of IoT attacks, incorporating data from over a hundred IoT devices.