Research
Can Quantum Layers offer Performance and Security Advantages in Vision-Language Models?
Overview Research area: Quantum machine learning applied to vision-language models (VLMs), combining multimodal AI, variational quantum circuits, and adversarial robustness. Technical level: Intermedi

- arXiv
- 2610.28964
- Published
- 2026-10-20
- Authors
- Md Khalid Syfullah, Alvi Ataur Khalil
AI summary
Overview
Research area: Quantum machine learning applied to vision-language models (VLMs), combining multimodal AI, variational quantum circuits, and adversarial robustness.
Technical level: Intermediate. Readers should know what a transformer decoder block, a projector, and a parameter-efficient fine-tuning method like LoRA are, plus basic familiarity with qubits and parameterized quantum circuits. The paper is empirical rather than mathematical.
Scope: A single-backbone, single-dataset, single-seed empirical study of whether inserting or substituting classically simulated quantum layers inside LLaVA-OneVision changes accuracy, parameter count, training cost, and adversarial robustness.
What This Paper Is About
Vision-language models such as LLaVA answer questions about images, but they are expensive to train and remain vulnerable to adversarial attacks. Meanwhile, quantum machine learning is often claimed to offer accuracy or efficiency advantages, though no one has systematically tested where a quantum layer should sit inside a large multimodal model. This paper places small simulated quantum circuits at specific points in a VLM, both by adding them and by swapping out classical parts, and measures whether anything actually improves.
Key Contributions
- A placement study for quantum layers in a VLM. The authors define four insertion points (before the visual projector, after the visual projector, after decoder block 5, and after the final decoder normalization) and four replacement points (the complete visual projector, and the MLPs of decoder blocks 0, 11, and 23), evaluated with four circuits: 4- and 8-qubit basic-ring (BR4, BR8) and 4- and 8-qubit strongly entangling (SE4, SE8).
- A joint accuracy-versus-cost comparison. Quantum configurations are compared against five classical baselines (zero-shot/full-frozen, head-only, projector-only, LoRA, and full fine-tuning) on trainable parameters, training time, and peak memory, not accuracy alone.
- A shared-protocol adversarial evaluation. Six untargeted image-perturbation attacks spanning gradient access (FGSM, PGD-CE, PGD-margin), score-only access (SPSA), label-only access (HSJ), and surrogate-model transfer (T-PGD) are run against hybrid and classical models with identical perturbation budgets.
- A public artifact. Code and configurations are released at the TITANS-Lab-Artifacts/QuantumVLM repository.
Main Findings
- The best result comes from a late insertion. Inserting the SE8 circuit after the visual projector (position q2) reaches 80.7% development accuracy and 80.7% balanced accuracy under full fine-tuning, which the authors report as 2.28 percentage points above classical full fine-tuning (78.4%).
- Most quantum insertions are roughly neutral. Under full-backbone training, insertion configurations cluster at approximately 78% to 81% accuracy, and increasing the qubit count or switching circuit family does not consistently help at other positions.
- Training only the quantum module is weak. Updating the quantum layer alone yields 56.4% to 64.2% accuracy; the gains appear only when the quantum module is trained jointly with LoRA or the full backbone.
- Early replacements are destructive. Substituting the complete visual projector (r1) or the decoder-block-0 MLP (r2) drops accuracy to approximately 51% to 55%; the intermediate MLP replacement (r3) holds around 76% to 77%.
- The final MLP replacement preserves accuracy with fewer parameters. BR4 at position r4 reaches 79.22% accuracy with approximately 880.61 million trainable parameters, removing roughly 13.07 million parameters relative to the 893.68 million-parameter classical full fine-tuning model.
- Parameter savings do not translate into compute savings. Training times span 3.22 to 7.20 hours for insertion and 3.24 to 7.81 hours for replacement, against 6.60 hours for the classical baseline; peak RAM spans 5.75 to 7.49 GiB (insertion) and 4.92 to 8.14 GiB (replacement) against 6.29 GiB classical. The authors caution that the classical baseline used early-stopping patience 5 while full quantum runs used patience 2, so these totals do not demonstrate a speedup.
- No consistent robustness benefit. PGD-CE, PGD-margin, and the six-attack union drive robust accuracy to 0% for every model. Under FGSM the classical model holds 50.0% while SE8 at q2 holds 40.0%; under transfer PGD the classical model holds 25.0% while SE8 at q2 holds 17.5% — so the highest-clean-accuracy model is less robust than the baseline.
- High HSJ numbers are unreliable. The authors state that comparatively high HopSkipJump results require caution because of initialization failures and limited queries, and that gradient diagnostics remain unresolved for 29 of the 33 models, so a failed attack search does not by itself prove robustness.
- Classical baselines for context. Zero-shot/full-frozen reaches 54.2% accuracy, head-only 64.9%, projector-only 58.5%, LoRA 79.0% with 0.541 million parameters, and full fine-tuning 78.4% with 893.676 million parameters.
Methodology in Plain English
The researchers take one open vision-language model, LLaVA-OneVision with the Qwen2-0.5B single-image variant, and turn the visual question answering task into a binary decision: given an image and a statement, predict True or False. They use the Visual Spatial Reasoning dataset, split into 7,680 training and 1,097 development examples, and keep preprocessing, prompts, and the task identical across classical and quantum runs so that any difference comes from the quantum component.
The quantum layer itself is small: a classical network projects a token's features down to a handful of rotation angles (4 or 8, one per qubit), those angles are encoded into a quantum state with Y-rotations, a trainable circuit is applied, and each qubit's Pauli-Z expectation is read out and projected back to the model's feature dimension. The circuits are simulated exactly with a differentiable PyTorch state-vector simulator, with no shot sampling and no hardware noise.
Two integration strategies are tested. Insertion leaves the classical model intact and adds the quantum output through a residual connection scaled by a trainable factor initialized to 0.1, so pretrained features are disturbed only slightly at first. Replacement swaps a classical component for the quantum module, wrapping it in linear input and output projections so the surrounding model still sees matching dimensions; the rest of the block, including attention, normalization, and residual paths, is untouched.
Training happens on a single NVIDIA RTX PRO 6000 Blackwell GPU (96 GB) with seed 0, up to 20 epochs, AdamW, weight decay 0.01, gradient clipping at 1.0, 5% warm-up, effective batch size 16, learning rates of 10⁻⁵ for projector and full-backbone training and 10⁻⁴ otherwise, and LoRA with rank 8, scaling 16, and dropout 0.05. Reported results include accuracy, balanced accuracy, True recall, False recall, and robust accuracy, with 95% confidence intervals from 1,000 image-clustered bootstrap resamples. Attacks are run on the first 40 development examples with a maximum pixel change of 4/255, perturbing only the image while the text and weights stay fixed.
Why This Matters
Research impact. The paper reframes the quantum-machine-learning question from "does a quantum layer help?" to "where does a quantum layer help, and at what cost?" Its most useful negative result is that a quantum layer can raise clean accuracy yet lower adversarial robustness in the same model, which undercuts the common assumption that architectural novelty buys both. The systematic grid of placement and qubit-count variants gives other groups a map of which regions of a VLM tolerate substitution and which do not.
Real-world applications (the paper motivates VQA by its use in these domains):
- Education, where image-and-text question answering supports instructional material and diagram understanding.
- Finance, where document and chart interpretation must be reliable before deployment.
- Healthcare, where image-based queries involve sensitive patient data and high error costs.
- Privacy-sensitive deployment generally, since the paper frames VLM vulnerabilities as including privacy breaches, model extraction, data extraction, and reverse engineering.
Industry relevance. The parameter-reduction result is directly relevant to teams trying to fit multimodal models into constrained budgets: replacing the final decoder MLP with a 4-qubit circuit removed roughly 13.07 million parameters while holding accuracy in that run. The simultaneous finding that this did not shorten training or reduce memory is an equally practical warning — in simulation at least, fewer parameters did not mean cheaper computation. For anyone weighing quantum hardware investment, the paper offers a concrete negative: simulated quantum layers did not deliver a compute advantage here.
Future Directions
- Held-out evaluation across multiple seeds. The development split was used both to select the best checkpoint and to report results, and the winning configuration was chosen from many candidates, so the 80.7% figure needs confirmation on held-out data and across seeds.
- Parameter-matched classical controls and matched training budgets. A classical module with the same parameter count as the quantum layer, trained with identical early-stopping patience, would separate the circuit's contribution from the effect of simply adding parameters or training longer.
- Stronger robustness validation. Larger attack subsets than 40 examples, and resolution of the gradient diagnostics that remained unresolved for 29 of the 33 models, are needed before any robustness conclusion — positive or negative — can be trusted.
- Beyond image perturbations and ideal simulation. The study covers classical simulation of ideal circuits under image attacks only; shot noise, hardware noise, privacy attacks, and performance on real quantum devices remain untested, as does generalization to other backbones and datasets.
Target Audience
Graduate students and researchers in quantum machine learning and multimodal AI who want an empirical, skepticism-forward baseline before building hybrid VLM architectures; practitioners evaluating whether quantum layers are worth integrating into a production vision-language pipeline; and adversarial-robustness researchers interested in whether architectural novelty changes attack surfaces. Readers seeking a theoretical treatment of quantum advantage will not find it here, and readers new to transformers will need background reading on projector and decoder-block structure first.
Authors’ abstract
As quantum computing moves from the noisy intermediate-scale quantum (NISQ) era toward early fault-tolerant quantum computing (EFTQC), quantum-enhanced AI is shifting from a conceptual idea to experimental research. Quantum components are expected to extend the capabilities of existing AI systems, yet it remains unclear how such components will help within large multimodal models. In this study, we try to answer that question for vision-language models (VLMs) using classically simulated quantum layers. With LLaVA-OneVision as the backbone, we evaluate 4- and 8-qubit basic-ring and strongly entangling circuits at four insertion and four replacement locations. Insertion adds quantum layers to the classical model, while replacement substitutes them for classical components. Using the same setup, we compare performance and computational cost between classical and quantum-classical hybrid models. On the Visual Spatial Reasoning dataset, inserting a quantum layer after the visual projector reaches 80.7% development accuracy, 2.28 percentage-points above classical full fine-tuning. Replacing the final decoder feed-forward sublayer retains 79.22% accuracy with 13.07 million fewer trainable parameters. Quantum insertion can thus improve accuracy, and selective replacement can reduce parameters. These benefits depend strongly on where the quantum layer is inserted or which classical component it replaces: earlier replacements lower accuracy, and fewer parameters do not reliably shorten training or reduce computation. To assess potential security benefits, we evaluated the robustness of quantum-classical hybrid models under six attack settings. Overall, our study maps where quantum layers help and hurt within VLMs, offering a starting point for hybrid VLM design; whether these gains generalize remains open. The code is available at https://github.com/TITANS-Lab-Artifacts/QuantumVLM.