Skip to main content
QUICK REVIEW

[Paper Review] A Hybrid Quantum-Classical Approach based on the Hadamard Transform for the Convolutional Layer

Hongyi Pan, Xin Zhu|arXiv (Cornell University)|May 27, 2023
Neural Networks and Reservoir ComputingComputer Science3 citations
TL;DR

This paper proposes a hybrid quantum-classical HT-perceptron layer that replaces standard Conv2D layers by leveraging the Hadamard Transform (HT) convolution theorem, enabling element-wise multiplication in the HT domain for reduced computational cost. The method achieves 99.31% test accuracy on MNIST with 57.1% fewer MACs and 0.59% higher top-1 accuracy on ImageNet-1K than ResNet-50, using 11.5% fewer parameters and 12.6% fewer MACs.

ABSTRACT

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.

Motivation & Objective

  • To design a hybrid quantum-classical neural network layer that replaces traditional Conv2D operations using the Hadamard Transform (HT) for improved computational efficiency.
  • To exploit the HT convolution theorem, which equates dyadic convolution to element-wise multiplication in the HT domain, enabling faster computation.
  • To enable quantum-compatible computation by mapping HT operations to single-qubit Hadamard gates, making the layer natively implementable on near-term quantum hardware.
  • To reduce model parameters and multiply-accumulate operations (MACs) while maintaining or improving accuracy on benchmark datasets like MNIST, CIFAR-10, and ImageNet-1K.
  • To integrate trainable soft-thresholding for denoising in the transform domain, enhancing feature extraction and model robustness.

Proposed method

  • The HT-perceptron layer performs convolution via element-wise multiplication of the Hadamard-transformed input and kernel tensors, based on the HT convolution theorem.
  • The Hadamard Transform is computed using a quantum circuit where each qubit applies a Hadamard gate, enabling O(1) computation time on a quantum computer.
  • The layer is trained using standard backpropagation, allowing it to be trained in a classical framework while retaining quantum-computable operations.
  • A 3-path architecture is used in ResNet-50 variants, combining standard 3×3 Conv2D and HT-perceptron layers to extract multi-scale features.
  • Zero-padding is applied before HT-perceptron layers when input dimensions are not powers of two, ensuring compatibility with the HT’s requirement for size-2^n inputs.
  • Trainable soft-thresholding is applied in the HT domain to suppress noise and enhance feature learning, similar to wavelet-based denoising techniques.
Figure 1: Structure of the proposed HT-perceptron layer for a tensor in $\mathbb{R}^{C\times W\times H}$ . The HT2D and IHT2D are implemented using the quantum computer 2 (or the classical fast approach) and multiplications and soft-thresholding operations of the network are implemented using the cl
Figure 1: Structure of the proposed HT-perceptron layer for a tensor in $\mathbb{R}^{C\times W\times H}$ . The HT2D and IHT2D are implemented using the quantum computer 2 (or the classical fast approach) and multiplications and soft-thresholding operations of the network are implemented using the cl

Experimental results

Research questions

  • RQ1Can the Hadamard Transform be used to replace standard convolutional layers in CNNs while maintaining or improving model accuracy?
  • RQ2How does the computational cost (MACs) and parameter count of HT-based networks compare to standard Conv2D-based models on image classification benchmarks?
  • RQ3To what extent can quantum-compatible HT operations be integrated into classical deep learning frameworks without sacrificing training efficiency?
  • RQ4Does the combination of classical Conv2D and HT-perceptron layers in a 3-path architecture improve feature representation and generalization on large-scale datasets like ImageNet-1K?
  • RQ5Can denoising via trainable soft-thresholding in the HT domain enhance model performance and robustness?

Key findings

  • On the MNIST dataset, the HT-based network achieves 99.31% test accuracy, outperforming the baseline CNN with 99.26% accuracy while reducing MACs by 57.1%.
  • In ImageNet-1K experiments, the HT-ResNet-50 model achieves a center-crop top-1 accuracy of 94.14% with 256×256 input, exceeding the baseline ResNet-50 by 0.59%.
  • The HT-ResNet-50 uses 11.5% fewer parameters and 12.6% fewer MACs than the standard ResNet-50, demonstrating significant efficiency gains.
  • The 3-path HT-ResNet-50 architecture with 256×256 input reduces MACs by 14.9% and parameters by 11.5% compared to baseline, while achieving higher accuracy.
  • The training error curves on ImageNet-1K show consistent convergence with lower top-1 error for HT-ResNet-50, indicating improved optimization stability.
  • The integration of trainable soft-thresholding in the HT domain contributes to improved feature learning and robustness, as evidenced by higher accuracy on both MNIST and ImageNet-1K.
Figure 2: Procedure of each path in the HT-Perceptron layer. Each entry along the width and the height is processed individually in the Hadamard domain, so we don’t need to apply the permutation as the Walsh-Hadamard transform.
Figure 2: Procedure of each path in the HT-Perceptron layer. Each entry along the width and the height is processed individually in the Hadamard domain, so we don’t need to apply the permutation as the Walsh-Hadamard transform.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.