Abstract
Recent advances in Natural Language Processing have been predominantly driven by transformer-based architectures, which rely heavily on self-attention mechanisms to model relationships between tokens in a sequence. Similarly, the field of Quantum Natural Language Processing, which seeks to leverage quantum principles to address challenges in language understanding and generation tasks, has seen the recent development of quantum self-attention mechanisms. We propose a classical quantum-inspired self-attention (QISA) mechanism and integrate it into the full autoregressive language modeling pipeline of GPT-1. To the best of our knowledge, this is the first integration of this kind, as previous quantum self-attention mechanisms have been primarily tested on text classification. In our experiments, QISA achieves better performance when compared to standard self-attention on the metrics character error rate ($15.5\times$ better), word error rate ($4.7 \times $) and cross-entropy loss ($13 \times$). This is achieved while only requiring a $ 2.6\times$ longer inference time.
Abstract (translated)
最近的自然语言处理(NLP)进展主要由基于变压器架构的技术推动,这些技术依赖于自注意力机制来建模序列中词汇单元之间的关系。同样,在量子自然语言处理领域——旨在利用量子原理解决语言理解和生成任务中的挑战——人们近期开发出了量子自注意力机制。我们提出了一种受量子启发的经典自注意力(QISA)机制,并将其集成到了GPT-1的完整自回归语言建模管道中。据我们所知,这是此类集成的首次尝试,因为之前的量子自注意力机制主要在文本分类任务上进行了测试。在我们的实验中,QISA相较于标准自注意力机制,在字符错误率(低15.5倍)、单词错误率(低4.7倍)和交叉熵损失(低13倍)这些指标上取得了更好的表现。同时,这仅需要2.6倍的推理时间。 翻译为中文如下: 最近在自然语言处理方面的进展主要由基于变换器架构的技术推动,这些技术依赖于自注意力机制来建模序列中词汇单元之间的关系。同样,在量子自然语言处理领域——旨在利用量子原理解决语言理解和生成任务中的挑战——人们近期开发出了量子自注意力机制。我们提出了一种受量子启发的经典自注意力(QISA)机制,并将其集成到了GPT-1的完整自回归语言建模管道中。据我们所知,这是首次此类集成,因为之前的量子自注意力机制主要在文本分类任务上进行了测试。在我们的实验中,与标准自注意力相比,QISA在字符错误率(降低15.5倍)、单词错误率(降低4.7倍)和交叉熵损失(降低13倍)这些指标上取得了更好的表现,并且只需要增加2.6倍的推理时间。
URL
https://arxiv.org/abs/2603.03318