Shipped: Hybrid Quantum Neural Networks — Adversarial AI Defense
An open-source adversarial AI security proof of concept investigating how hybrid classical-quantum neural networks can be trained to withstand adversarial attacks on image classification systems.
The project combines a Convolutional Neural Network (CNN) with a simulated Quantum Neural Network (QNN) implemented using Google's Cirq framework. Classical neural network features are integrated with quantum rotation and entanglement operations to construct a hybrid model for handwritten digit recognition.
The framework evaluates compounded white-box adversarial attacks, including FGSM, Projected Gradient Descent (PGD), Carlini-Wagner (CW), Basic Iterative Method (BIM), and DeepFool combinations. It then applies adversarial training to improve classification performance under these attack conditions.
In reported MNIST experiments, undefended classification accuracy dropped from 98% to 20% under combined FGSM and PGD attacks, while the adversarially trained model achieved 98% accuracy in the tested defense scenario. Similar improvements were reported for FGSM + CW and CW + PGD combinations.
Built with Python, PyTorch, TorchAttacks, and Cirq, the project provides executable experiments, model evaluations, quantum circuit implementations, and adversarial training results.
Designed for AI security researchers, quantum machine learning developers, and educators exploring hybrid architectures and adversarial robustness. The findings are experimental and do not establish a general quantum advantage or universal robustness against adaptive attacks.






0 comments