In this paper, we propose a novel Hadamard Transform (HT)-based neural network layer for hybrid quantum-classical computing. It implements the regular convolutional layers in the Hadamard transform domain. The idea is based on the HT convolution theorem which states that the dyadic convolution between two vectors is equivalent to the element-wise multiplication of their HT representation. Computing the HT is simply the application of a Hadamard gate to each qubit individually, so the HT computations of our proposed layer can be implemented on a quantum computer. Compared to the regular Conv2D layer, the proposed HT-perceptron layer is computationally more efficient. Compared to a CNN with the same number of trainable parameters and 99.26\% test accuracy, our HT network reaches 99.31\% test accuracy with 57.1\% MACs reduced in the MNIST dataset; and in our ImageNet-1K experiments, our HT-based ResNet-50 exceeds the accuracy of the baseline ResNet-50 by 0.59\% center-crop top-1 accuracy using 11.5\% fewer parameters with 12.6\% fewer MACs.
翻译:本文提出了一种基于Hadamard变换(HT)的新型神经网络层,适用于混合量子-经典计算。该层在Hadamard变换域中实现常规卷积层,其核心思想源于HT卷积定理:两个向量间的二元卷积等价于其HT表示的逐元素相乘。由于计算HT仅需对每个量子比特单独施加Hadamard门,因此所提层的HT运算可在量子计算机上实现。与常规Conv2D层相比,所提HT感知层具有更高的计算效率。在MNIST数据集上,与具有相同可训练参数且测试准确率达99.26%的CNN相比,我们的HT网络在减少57.1%的MAC运算量后仍能达到99.31%的测试准确率;在ImageNet-1K实验中,基于HT的ResNet-50在参数减少11.5%、MAC运算量降低12.6%的情况下,其中心裁剪Top-1准确率超过基线ResNet-50达0.59%。