Skip to main content
QUICK REVIEW

[论文解读] Adapting Pre-trained Language Models for Quantum Natural Language Processing

Qiuchi Li, Benyou Wang|arXiv (Cornell University)|Feb 24, 2023
Quantum Computing Algorithms and Architecture被引用 4
一句话总结

该论文通过预训练一个兼容量子线路的复值BERT类模型(QBert),首次提出了面向量子自然语言处理(QNLP)的类经典-量子迁移学习框架。通过将句子表征编码为量子态并采用量子兼容训练,QBert在GLUE基准上使端到端量子模型的准确率提升了50–60%,展示了通过预训练的量子编码实现显著性能提升。

ABSTRACT

The emerging classical-quantum transfer learning paradigm has brought a decent performance to quantum computational models in many tasks, such as computer vision, by enabling a combination of quantum models and classical pre-trained neural networks. However, using quantum computing with pre-trained models has yet to be explored in natural language processing (NLP). Due to the high linearity constraints of the underlying quantum computing infrastructures, existing Quantum NLP models are limited in performance on real tasks. We fill this gap by pre-training a sentence state with complex-valued BERT-like architecture, and adapting it to the classical-quantum transfer learning scheme for sentence classification. On quantum simulation experiments, the pre-trained representation can bring 50\% to 60\% increases to the capacity of end-to-end quantum models.

研究动机与目标

  • 通过在NLP中实现类经典-量子迁移学习,弥合预训练语言模型与量子NLP之间的差距。
  • 克服端到端量子模型的局限性,后者受限于线性量子操作且可扩展性差。
  • 设计一种复值BERT类架构,在保持高性能的同时兼容量子态表示。
  • 证明预训练的量子编码能显著增强量子NLP模型的表征能力。
  • 为现有张量网络-based QNLP模型提供一种可扩展、鲁棒且兼容量子的替代方案。

提出的方法

  • 通过单位归一化的[CLS]标记表征预训练复值BERT模型(QBert),以确保网络中全程兼容量子态。
  • 重新实现下一句预测(NSP)头,通过参数化酉变换模拟变分量子测量。
  • 施加数值约束以保持量子态保真度,包括具有酉约束的复值注意力与前馈层。
  • 使用自定义的复值AdamW优化器(CAdamW),以提升标准AdamW在复值训练中的收敛性与训练稳定性。
  • 通过训练具有参数化酉门的任务特定变分量子线路对模型进行微调,实现混合类经典-量子推理。
  • 使用Qiskit经典模拟量子线路行为,验证经典实现与完整量子实现的一致性。
Figure 1: Classical-quantum transfer learning pipeline Mari et al. ( 2020 ) .
Figure 1: Classical-quantum transfer learning pipeline Mari et al. ( 2020 ) .

实验结果

研究问题

  • RQ1预训练的语言表征能否通过复值架构适配到量子计算框架中,特别是在NLP中?
  • RQ2与标准的纯量子训练相比,类经典-量子迁移学习是否能显著提升端到端量子NLP模型的性能?
  • RQ3复值神经网络能否在不损失性能的前提下,被有效预训练并微调用于量子兼容的NLP任务?
  • RQ4对句子表征进行量子兼容的预训练,如何影响量子NLP模型的可扩展性与鲁棒性?
  • RQ5专用复值优化器(CAdamW)对量子兼容BERT模型的训练收敛性与模型质量有何影响?

主要发现

  • QBert-base在CoLA数据集上取得88.2%的GLUE分数,相较于端到端量子模型QCLS-end2end的相对准确率提升达61.8%。
  • QBert-base在多个GLUE数据集上使端到端量子模型的性能提升50–60%,显著增强了模型的表征能力。
  • 采用CAdamW优化器的复值BERT模型收敛速度更快,训练损失更低,证实其在复值训练中的优越性。
  • QBert-base保持了与同等规模实值BERT模型95%的性能,证明量子兼容性不会降低模型质量。
  • 经典模拟的量子微调电路与完整量子实现等价,验证了混合类经典-量子训练的可行性。
  • DisCoCat及其他端到端量子模型的表现显著劣于QBert-based模型,凸显了预训练量子编码的优势。
Figure 2: Mapping the classical-quantum transfer learning scheme to our complex-valued PLM. The MLM prediction head for PLM and the linear projection layer of the quantum model are omitted.
Figure 2: Mapping the classical-quantum transfer learning scheme to our complex-valued PLM. The MLM prediction head for PLM and the linear projection layer of the quantum model are omitted.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。