用量子计算加速图像分类,提升性能并降低资源消耗
HQViT: Hybrid Quantum Vision Transformer for Image Classification
- 将图像整体编码为量子态,避免额外位置编码
- 量子处理关键注意力计算,经典部分精简,节省算力
- 适合在小规模量子设备上运行,对图像分类有显著提升
基于Transformer的架构已革新深度学习。在计算机视觉中,视觉Transformer表现优异,甚至超越卷积神经网络。然而,其自注意力机制的二次计算复杂度给经典计算带来挑战,尤其在处理高维图像数据时成本高昂。为此,我们提出混合量子视觉Transformer(HQViT),利用量子计算加速训练并提升性能。HQViT采用幅度编码进行整图处理,更好保留全局信息,无需额外位置编码。通过仅在关键步骤使用量子计算,其余部分经典处理,显著降低量子资源开销:所需量子比特仅为 $O(log_2N)$,参数化量子门数仅 $O(log_2d)$,适用于噪声中等规模量子设备。将计算密集的注意力矩阵生成移至量子框架,使经典计算负载减少 $O(T^2d)$。在多个视觉数据集上的实验表明,HQViT优于现有模型,在MNIST十分类任务上最高提升达10.9%。本工作展示了量子与经典计算结合应对复杂图像分类的巨大潜力。
原文摘要 · Abstract (English)
Transformer-based architectures have revolutionized the landscape of deep learning. In computer vision domain, Vision Transformer demonstrates remarkable performance on par with or even surpassing that of convolutional neural networks. However, the quadratic computational complexity of its self-attention mechanism poses challenges for classical computing, making model training with high-dimensional input data, e.g., images, particularly expensive. To address such limitations, we propose a Hybrid Quantum Vision Transformer (HQViT), that leverages the principles of quantum computing to accelerate model training while enhancing model performance. HQViT introduces whole-image processing with amplitude encoding to better preserve global image information without additional positional encoding. By leveraging quantum computation on the most critical steps and selectively handling other components in a classical way, we lower the cost of quantum resources for HQViT. The qubit requirement is minimized to $O(log_2N)$ and the number of parameterized quantum gates is only $O(log_2d)$, making it well-suited for Noisy Intermediate-Scale Quantum devices. By offloading the computationally intensive attention coefficient matrix calculation to the quantum framework, HQViT reduces the classical computational load by $O(T^2d)$. Extensive experiments across various computer vision datasets demonstrate that HQViT outperforms existing models, achieving a maximum improvement of up to $10.9\%$ (on the MNIST 10-classification task) over the state of the art. This work highlights the great potential to combine quantum and classical computing to cope with complex image classification tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。