A hybrid quantum–classical neural network for learning transferable visual representation

State-of-the-art quantum machine learning (QML) algorithms fail to offer practical advantages over their notoriously powerful classical counterparts, due to the limited learning capabilities of QML algorithms, the constrained computational resources available on today’s noisy intermediate-scale quantum (NISQ) devices, and the empirically designed circuit ansatz for QML models. In this work, we address these challenges by proposing a hybrid quantum–classical neural network (CaNN), which we call QCLIP, for Quantum Contrastive Language-Image Pre-Training. Rather than training a supervised QML model to predict human annotations, QCLIP focuses on more practical transferable visual representation learning, where the developed model can be generalized to work on unseen downstream datasets. QCLIP is implemented by using CaNNs to generate low-dimensional data feature embeddings followed by quantum neural networks to adapt and generalize the learned representation in the quantum Hilbert space. Experimental results show that the hybrid QCLIP model can be efficiently trained for representation learning. We evaluate the representation transfer capability of QCLIP against the classical Contrastive Language-Image Pre-Training model on various datasets. Simulation results and real-device results on NISQ IBM_Auckland quantum computer both show that the proposed QCLIP model outperforms the classical CLIP model in all test cases. As the field of QML on NISQ devices is continually evolving, we anticipate that this work will serve as a valuable foundation for future research and advancements in this promising area.

[1]  M. Swany,et al.  IQGAN: Robust Quantum Generative Adversarial Network for Image Synthesis On NISQ Devices , 2022, ICASSP 2023 - 2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP).

[2]  Nai-Hui Chia,et al.  QMLP: An Error-Tolerant Nonlinear Quantum MLP Architecture using Parameterized Two-Qubit Gates , 2022, ISLPED.

[3]  Tirthak Patel,et al.  OPTIC: A Practical Quantum Binary Classifier for Near-Term Quantum Computers , 2022, 2022 Design, Automation & Test in Europe Conference & Exhibition (DATE).

[4]  Jordan S. Cotler,et al.  Quantum advantage in learning from experiments , 2021, Science.

[5]  D. Pan,et al.  QuantumNAT: quantum noise-aware training with noise injection, quantization and normalization , 2021, DAC.

[6]  S. Kadry,et al.  Quantum Machine Learning Architecture for COVID-19 Classification Based on Synthetic Data Generation Using Conditional Adversarial Neural Network , 2021, Cognitive Computation.

[7]  Madhava Syamlal,et al.  Quantum Sensing for Energy Applications: Review and Perspective , 2021, Advanced Quantum Technologies.

[8]  H. Neven,et al.  Entangling Quantum Generative Adversarial Networks. , 2021, Physical review letters.

[9]  Samuel Albanie,et al.  Quantum self-supervised learning , 2021, Quantum Science and Technology.

[10]  Ilya Sutskever,et al.  Learning Transferable Visual Models From Natural Language Supervision , 2021, ICML.

[11]  Joonho Lee,et al.  Even More Efficient Quantum Computations of Chemistry Through Tensor Hypercontraction , 2020, PRX Quantum.

[12]  H. Neven,et al.  Power of data in quantum machine learning , 2020, Nature Communications.

[13]  Xiao Yuan,et al.  Hybrid Quantum-Classical Algorithms and Quantum Error Mitigation , 2020, Journal of the Physical Society of Japan.

[14]  Francesco Locatello,et al.  A Sober Look at the Unsupervised Learning of Disentangled Representations and their Evaluation , 2020, J. Mach. Learn. Res..

[15]  Christopher D. Manning,et al.  Contrastive Learning of Medical Visual Representations from Paired Images and Text , 2020, MLHC.

[16]  Frank J. Fabozzi,et al.  Quantum Option Pricing and Quantum Finance , 2020 .

[17]  Maria Schuld,et al.  Effect of data encoding on the expressive power of variational quantum-machine-learning models , 2020, Physical Review A.

[18]  Elham Kashefi,et al.  Quantum versus classical generative modelling in finance , 2020, Quantum Science and Technology.

[19]  Geoffrey E. Hinton,et al.  Big Self-Supervised Models are Strong Semi-Supervised Learners , 2020, NeurIPS.

[20]  Justin Johnson,et al.  VirTex: Learning Visual Representations from Textual Annotations , 2020, 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).

[21]  D. Poulin,et al.  Resource estimate for quantum many-body ground-state preparation on a quantum computer , 2020, Physical Review A.

[22]  Patrick J. Coles,et al.  Variational quantum state eigensolver , 2020, npj Quantum Information.

[23]  Ryan LaRose,et al.  Robust data encodings for quantum classifiers , 2020, Physical Review A.

[24]  Geoffrey E. Hinton,et al.  A Simple Framework for Contrastive Learning of Visual Representations , 2020, ICML.

[25]  Nathan Killoran,et al.  Transfer learning in hybrid classical-quantum neural networks , 2019, Quantum.

[26]  Patrick J. Coles,et al.  An Adaptive Optimizer for Measurement-Frugal Variational Algorithms , 2019, Quantum.

[27]  A. Perdomo-Ortiz,et al.  Classical versus quantum models in machine learning: insights from a finance application , 2019, Mach. Learn. Sci. Technol..

[28]  Jos'e I. Latorre,et al.  Data re-uploading for a universal quantum classifier , 2019, Quantum.

[29]  R Devon Hjelm,et al.  Learning Representations by Maximizing Mutual Information Across Views , 2019, NeurIPS.

[30]  Peter D. Johnson,et al.  Expressibility and Entangling Capability of Parameterized Quantum Circuits for Hybrid Quantum‐Classical Algorithms , 2019, Advanced Quantum Technologies.

[31]  Craig Gidney,et al.  How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits , 2019, Quantum.

[32]  Jie Jiang,et al.  Accelerated Discovery of Efficient Solar-cell Materials using Quantum and Machine-learning Methods. , 2019, Chemistry of materials : a publication of the American Chemical Society.

[33]  Edward Grant,et al.  An initialization strategy for addressing barren plateaus in parametrized quantum circuits , 2019, Quantum.

[34]  Nicolas P. D. Sawaya,et al.  Quantum Chemistry in the Age of Quantum Computing. , 2018, Chemical reviews.

[35]  Alán Aspuru-Guzik,et al.  Potential of quantum computing for drug discovery , 2018, IBM J. Res. Dev..

[36]  Ashley Montanaro,et al.  Applying quantum algorithms to constraint satisfaction problems , 2018, Quantum.

[37]  Alán Aspuru-Guzik,et al.  Quantum computational chemistry , 2018, Reviews of Modern Physics.

[38]  R. Devon Hjelm,et al.  Learning deep representations by mutual information estimation and maximization , 2018, ICLR.

[39]  Radu Soricut,et al.  Conceptual Captions: A Cleaned, Hypernymed, Image Alt-text Dataset For Automatic Image Captioning , 2018, ACL.

[40]  Jascha Sohl-Dickstein,et al.  Adversarial Reprogramming of Neural Networks , 2018, ICLR.

[41]  Kristan Temme,et al.  Supervised learning with quantum-enhanced feature spaces , 2018, Nature.

[42]  Seth Lloyd,et al.  Quantum Generative Adversarial Learning. , 2018, Physical review letters.

[43]  Nathan Killoran,et al.  Quantum generative adversarial networks , 2018, Physical Review A.

[44]  M. Schuld,et al.  Circuit-centric quantum classifiers , 2018, Physical Review A.

[45]  Sabre Kais,et al.  Quantum machine learning for electronic structure calculations , 2018, Nature Communications.

[46]  Maria Schuld,et al.  Quantum Machine Learning in Feature Hilbert Spaces. , 2018, Physical review letters.

[47]  Rupak Biswas,et al.  Quantum Machine Learning , 2018 .

[48]  Nikos Komodakis,et al.  Unsupervised Representation Learning by Predicting Image Rotations , 2018, ICLR.

[49]  John Preskill,et al.  Quantum Computing in the NISQ era and beyond , 2018, Quantum.

[50]  Dmitri Maslov,et al.  Toward the first quantum simulation with quantum speedup , 2017, Proceedings of the National Academy of Sciences.

[51]  Siddharth Krishna Kumar,et al.  On weight initialization in deep neural networks , 2017, ArXiv.

[52]  J. Gambetta,et al.  Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets , 2017, Nature.

[53]  Allan Jabri,et al.  Learning Visual N-Grams from Web Data , 2016, 2017 IEEE International Conference on Computer Vision (ICCV).

[54]  Ramprasaath R. Selvaraju,et al.  Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization , 2016, International Journal of Computer Vision.

[55]  Jure Leskovec,et al.  node2vec: Scalable Feature Learning for Networks , 2016, KDD.

[56]  J. Schulman,et al.  InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets , 2016, NIPS.

[57]  Alexei A. Efros,et al.  Colorful Image Colorization , 2016, ECCV.

[58]  Allan Jabri,et al.  Learning Visual Features from Large Weakly Supervised Data , 2015, ECCV.

[59]  Alán Aspuru-Guzik,et al.  The theory of variational hybrid quantum-classical algorithms , 2015, 1509.04279.

[60]  Alexei A. Efros,et al.  Unsupervised Visual Representation Learning by Context Prediction , 2015, 2015 IEEE International Conference on Computer Vision (ICCV).

[61]  E. Farhi,et al.  A Quantum Approximate Optimization Algorithm , 2014, 1411.4028.

[62]  Matthieu Guillaumin,et al.  Food-101 - Mining Discriminative Components with Random Forests , 2014, ECCV.

[63]  Stefan Carlsson,et al.  CNN Features Off-the-Shelf: An Astounding Baseline for Recognition , 2014, 2014 IEEE Conference on Computer Vision and Pattern Recognition Workshops.

[64]  Rob Fergus,et al.  Visualizing and Understanding Convolutional Networks , 2013, ECCV.

[65]  S. Lloyd,et al.  Quantum algorithms for supervised and unsupervised machine learning , 2013, 1307.0411.

[66]  Alán Aspuru-Guzik,et al.  A variational eigenvalue solver on a photonic quantum processor , 2013, Nature Communications.

[67]  B. Terhal Quantum error correction for quantum memories , 2013, 1302.3428.

[68]  Nitish Srivastava,et al.  Multimodal learning with deep Boltzmann machines , 2012, J. Mach. Learn. Res..

[69]  M. Mariantoni,et al.  Surface codes: Towards practical large-scale quantum computation , 2012, 1208.0928.

[70]  Pascal Vincent,et al.  Representation Learning: A Review and New Perspectives , 2012, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[71]  C. V. Jawahar,et al.  Cats and dogs , 2012, 2012 IEEE Conference on Computer Vision and Pattern Recognition.

[72]  Donald F. Parsons,et al.  Possible Medical and Biomedical Uses of Quantum Computing , 2011 .

[73]  Trevor Darrell,et al.  Learning Visual Representations using Images with Captions , 2007, 2007 IEEE Conference on Computer Vision and Pattern Recognition.

[74]  Lov K. Grover A fast quantum mechanical algorithm for database search , 1996, STOC '96.

[75]  Shor,et al.  Scheme for reducing decoherence in quantum computer memory. , 1995, Physical review. A, Atomic, molecular, and optical physics.

[76]  Peter W. Shor,et al.  Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer , 1995, SIAM Rev..

[77]  Liu Liu,et al.  Gaussian initializations help deep variational quantum circuits escape from the barren plateau , 2022, ArXiv.

[78]  Phillip Isola,et al.  Visual Prompting: Modifying Pixel Space to Adapt Pre-trained Models , 2022, ArXiv.

[79]  Percy Liang,et al.  Prefix-Tuning: Optimizing Continuous Prompts for Generation , 2021, ACL.

[80]  Jinsung Yoon,et al.  GENERATIVE ADVERSARIAL NETS , 2018 .

[81]  Guigang Zhang,et al.  Deep Learning , 2016, Int. J. Semantic Comput..

[82]  Alex Krizhevsky,et al.  Learning Multiple Layers of Features from Tiny Images , 2009 .

[83]  Yann LeCun,et al.  The mnist database of handwritten digits , 2005 .