An emerging direction of quantum computing is to establish meaningful quantum applications in various fields of artificial intelligence, including natural language processing (NLP). Although some efforts based on syntactic analysis have opened the door to research in Quantum NLP (QNLP), limitations such as heavy syntactic preprocessing and syntax-dependent network architecture make them impracticable on larger and real-world data sets. In this paper, we propose a new simple network architecture, called the quantum self-attention neural network (QSANN), which can compensate for these limitations. Specifically, we introduce the self-attention mechanism into quantum neural networks and then utilize a Gaussian projected quantum self-attention serving as a sensible quantum version of self-attention. As a result, QSANN is effective and scalable on larger data sets and has the desirable property of being implementable on near-term quantum devices. In particular, our QSANN outperforms the best existing QNLP model based on syntactic analysis as well as a simple classical self-attention neural network in numerical experiments of text classification tasks on public data sets. We further show that our method exhibits robustness to low-level quantum noises and showcases resilience to quantum neural network architectures.
翻译:量子计算的一个新兴方向是在人工智能的各个领域建立有意义的量子应用,包括自然语言处理(NLP)。尽管基于句法分析的初步努力已为量子NLP(QNLP)研究打开了大门,但诸如繁重的句法预处理和依赖句法的网络架构等限制,使其在更大规模及真实数据集上难以实际应用。本文提出一种名为量子自注意力神经网络(QSANN)的新型简单网络架构,可弥补这些局限。具体而言,我们将自注意力机制引入量子神经网络,并利用高斯投影量子自注意力作为自注意力的合理量子版本。由此,QSANN在更大数据集上有效且可扩展,并具备可在近期量子设备上实现的理想特性。特别地,在公共数据集上的文本分类任务数值实验中,我们的QSANN性能优于现有基于句法分析的最佳QNLP模型及简单的经典自注意力神经网络。我们进一步证明,该方法对低层次量子噪声具有鲁棒性,并展现出对量子神经网络架构的适应性。