Application of Quantum Density Matrix in Classical Question Answering and Classical Image Classification

Xingqiang Zhao, Hai Wan, Hao Chen, Li-Ling Su, Zi-Ling Huang, Lv-Zhou LiarXiv 2022 · DOI

Introduction

This research introduces a Quantum Inspired Mechanism (QIM) designed to enhance the performance of classical Convolutional Neural Networks (CNNs). By integrating the concept of a "density matrix" from quantum mechanics, the authors propose a novel framework for representing and processing relationships between image features. This approach leads to significant accuracy improvements across various standard benchmarks by capturing complex correlations that traditional architectures might overlook.

The Challenge in Classical Feature Extraction

In the domain of computer vision, CNNs are the standard for feature extraction. However, the authors argue that standard CNNs may fail to fully capture the intricate relationships and "hidden" information between disparate features. While quantum-inspired methods—specifically density matrices—have proven effective in Natural Language Processing (NLP) for managing linguistic ambiguity, their application in Computer Vision (CV) has remained relatively unexplored. This paper bridges that gap, investigating whether the mathematical framework of quantum mechanics can improve how classical neural networks perceive correlations in image data.

Methodology: The Quantum Inspired Mechanism (QIM)

The core innovation, the QIM, functions as an augmentation to the standard CNN pipeline. The process involves several key stages:

  1. Feature Extraction: A standard CNN backbone (e.g., VGG, AlexNet) extracts initial feature maps.
  2. Flattening and Density Matrix Generation: The 2D feature maps are flattened into vectors ($\vec{m}_i$). For each vector, the model calculates an outer product ($\vec{m}_i \cdot \vec{m}_i^T$), representing the self-correlation of that feature. These are weighted and summed to create a global "quantum density matrix" ($\rho$).
  3. Correlation Convolution: The model applies a 2D convolution directly to this density matrix to extract patterns from the feature correlations.
  4. Dual-Axis Pooling: Final feature vectors are generated via row-wise and column-wise max-pooling for classification.
Comparison of classical CNN (a) and QIM-augmented (b) architectures for image classification.

The use of the outer product is a mathematically elegant method to force the model to analyze how every pixel or feature relates to every other feature in a map, rather than focusing solely on local neighborhoods.

Detailed process of transforming CNN feature maps into density matrices through flattening and outer product operations.

Experimental Results and Insights

The authors evaluated QIM-enhanced models across five diverse datasets: MNIST, Fashion-MNIST, CIFAR-10, CIFAR-100, and the Intel Image Dataset.

Performance Gains

The QIM module provided substantial benefits, particularly for shallower or less optimized models:

  • StandardCNN on CIFAR-10: Accuracy improved from 67.54% to 75.92%.
  • AlexNet on Intel Dataset: Accuracy rose from 77.68% to 84.75% (+7.07%).
  • VGG on Intel Dataset: Accuracy rose from 76.24% to 82.86% (+6.62%).
  • MNIST: Accuracy pushed from 97.26% to 99.11%.

The ResNet Paradox

Interestingly, QIM resulted in a slight performance decrease on ResNet-18 (-0.63%). The authors hypothesize that because ResNet is already highly efficient at extracting detailed information through skip-connections, the additional complexity of QIM may introduce redundancy or noise that hinders final classification.

Conclusion and Future Work

The Quantum Inspired Mechanism serves as a successful proof-of-concept for applying quantum mechanical frameworks to classical computer vision tasks. While it significantly boosts the performance of standard architectures, its interaction with deep residual networks requires further study. Future research will focus on optimizing the computational overhead of generating large density matrices and exploring QIM's utility in more complex tasks like object detection and segmentation.

Summary updated

BibTeX
@misc{zhao2022application,
  author = {Xingqiang Zhao and Hai Wan and Hao Chen and Li-Ling Su and Zi-Ling Huang and Lv-Zhou Li},
  title = {{Application of Quantum Density Matrix in Classical Question Answering and Classical Image Classification}},
  year = {2022},
  eprint = {2203.11155},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.11155},
}
Figure