Hybrid quantum--classical neural networks are often reported to be more robust to adversarial examples than classical networks, yet these claims are rarely tested against adapted attacks, and the source of the robustness is rarely identified. We introduce QShield, an analysis-guided framework for auditing such claims. QShield first establishes exactly what the quantum component computes, then uses this to derive adaptive attacks and matched classical controls, attribute any surviving gain to its source, compare it with adversarial training, and test the resulting design lessons in pre-specified experiments. At its core is a criterion that identifies when an entangling circuit produces classical measurement statistics. We apply QShield to two hybrid designs. The first, QShield-Net, adds a noise-aware quantum branch to a ResNet-18 and has a lower attack success rate than an identically initialized baseline CNN in 94 of 96 comparisons under standard attacks. QShield shows that part of this advantage is an evaluation artifact. Under 30 adaptive attacks, the advantage shrinks but persists, with worst-case robust accuracy 2.7 to 7.2 percentage points above the baseline on average. This gain stems from the Gaussian input noise, not from the classically simulable quantum circuit: a CNN trained with the same noise is equally robust. The second design, a trainable re-uploading quantum head, lies outside the simulable family. Here, QShield rules out gradient masking and shows that training leaves the head's contribution near zero, a failure mode that robust accuracy alone would not reveal. These results yield design principles and a practical guidelines for evaluating robustness claims about hybrid models.
翻译:暂无翻译