Adversarial attacks, specialized attacks, pose a severe threat to AI model performance in various applications, including the Internet of Things (IoT). Various defense mechanisms have been proposed to counter these attacks. However, their primary limitation lies in their inability to effectively handle broader datasets derived from diverse applications. In this study, we utilize multiple AI models with adaptive weights applied at different neural network layers to achieve enhanced performance and more robust results. This study introduces a novel AI-based deep learning model to detect adversarial threats within IoT systems, optimizing data preprocessing, feature extraction, and classification through a holistic approach. A three-stage filtering technique featuring Adaptive Weights was applied to enhance the data preprocessing efficiency. A two-level adaptive feature extraction strategy was utilized to maximize feature learning performance. This is refined using adaptive dilated enriched convolution operations, whereas statistical attributes are optimized through a Quantum-inspired Coati Optimization Algorithm (Q-COA). A dual system based on self-attention combines a Restricted Boltzmann Machine (RBM) with a Recurrent Convolutional Neural Network (RCNN). This configuration effectively identifies adversarial attacks by linking classifiers via a self-attention-driven weight-sharing mechanism. The proposed two-level weight-sharing approach surpasses conventional classifiers and achieves superior classification accuracy. This comprehensive Artificial Intelligence (AI) model significantly improves the preprocessing efficiency, feature learning performance, and classification accuracy, offering an innovative and robust solution for adversarial attack detection in IoT systems. The performance metric, Area Under the Curve (AUC), achieves values of 0.95 and 0.97 for two datasets using the proposed model, highlighting its effectiveness compared to the models in the comparison.