## 1 Introduction
This dataset captures the complexity and variety of traffic patterns typically encountered in 5G and is expected to persist in 6G networks, providing a solid foundation for machine learning (ML) classifiers [22]. This diverse dataset helps the classifiers better adapt to the dynamic and multifaceted nature of IoT environments, ensuring more accurate and reliable threat detection in next-generation network infrastructures. Second, we implement robust data balancing techniques to ensure that all attack subcategories are sufficiently represented within the training dataset, improving the model's ability to learn and generalize effectively across different scenarios [26]. To enhance model transparency and interpretability, our approach incorporates explainable AI (XAI) techniques, such as LIME and SHAP, which provide detailed, intuitive explanations for model predictions. These explanations help bridge the gap between complex machine learning outputs and human understanding, fostering greater trust in the system, even for stakeholders without technical expertise. In addition, we employ a robust feature elimination strategy that integrates insights from XAI techniques and feature importance scores derived from the model [27]. This process not only optimizes the model by identifying and removing redundant or less impactful features but also ensures that high-impact features are given appropriate focus. By aligning model refinement with XAI insights, we enhance the model's accuracy while maintaining transparency in decision making. A key innovation lies in cross-verifying predictions and high-impact features across the XAI methods. This ensures consistency and reliability in the explanations, offering a multi-faceted understanding of the model's behavior. Unlike many existing studies (refer to Section 2.1), our approach does not stop at providing predictions; it validates the consistency of outcomes across varying scenarios taking different data instances, ensuring robustness in diverse and dynamic IoT environments. Furthermore, we carefully analyze the model's predictions with XAI methods to ensure alignment and consistency for both benign and attack traffic samples. This cross-analysis ensures that the model behaves consistently across both types of traffic, adding another layer of trustworthiness to the system. These advancements collectively establish a foundation for developing trustworthy, AI-powered security solutions tailored to the dynamic requirements of 6G-IoT networks. By emphasizing transparency, reliability, and adaptability, our method not only addresses current IoT security challenges but also sets a precedent for future research in explainable and effective AI-driven frameworks. In conclusion, the contributions of this paper include the following:  
* Develop a robust and practical model using an advanced dataset that reflects the complexities of modern wireless networks, aiding in the prediction and mitigation of emerging threats in 6G. * Apply the SMOTE balancing technique to correct class imbalances in the dataset and ensure fair representation of subcategories, thereby enhancing the reliability and accuracy of forecasts for any type of data. * Provide understandable justifications for the predictions made by XAI techniques like LIME and SHAP, which improve model interpretability. * Cross-validate the outcomes of XAI methods to increase the model's decision-making dependability and transparency. * Analyze the model's predictions with the XAI method to ensure alignment and consistency for both benign and attack traffic samples. * Refine the model's accuracy through the feature elimination technique by leveraging insights gained from both XAI methods and the model itself. This is the structure of the rest of the paper: A review of relevant work is given in Section 2. The security considerations in the context of 6G-IoT are examined in Section 3. The proposed method is described in depth in Section 4. Experiments and performance results of the suggested method are shown in Section 5.