Deep Learning for IoT Security: Leveraging GNNs and Attention Networks