量子模型在少样本语义推理中表现媲美经典模型,参数效率提升五倍。
Quantum NLP models on Natural Language Inference
- 用量子电路直接编码语言组合结构,构建可训练的量子模型。
- 量子模型参数量少但性能接近经典模型,测试误差更低。
- 适合低资源、依赖语法结构的任务,如小样本自然语言推理。
量子自然语言处理(QNLP)通过将组合结构直接嵌入量子电路,提供了一种新的语义建模方法。本文研究了QNLP模型在自然语言推理(NLI)任务中的应用,对比了量子、混合与经典Transformer模型在受限少样本设置下的表现。基于lambeq库和DisCoCat框架,我们为句子对构建参数化量子电路,并训练其完成语义相关性与推理分类任务。为评估效率,提出一种新的信息论指标——每参数信息增益(IGPP),独立于模型规模量化学习动态。结果表明,量子模型性能媲美经典基线,同时参数量显著减少。量子模型在推理任务上优于随机初始化的Transformer,且在相关性任务上测试误差更低。更重要的是,量子模型的每参数学习效率比经典模型高至五个数量级,凸显其在低资源、结构敏感场景中的潜力。为缓解电路层面隔离并促进参数共享,我们还提出一种基于聚类的新型架构,将门参数绑定至学习得到的词簇而非单个词元,从而提升泛化能力。
原文摘要 · Abstract (English)
Quantum natural language processing (QNLP) offers a novel approach to semantic modeling by embedding compositional structure directly into quantum circuits. This paper investigates the application of QNLP models to the task of Natural Language Inference (NLI), comparing quantum, hybrid, and classical transformer-based models under a constrained few-shot setting. Using the lambeq library and the DisCoCat framework, we construct parameterized quantum circuits for sentence pairs and train them for both semantic relatedness and inference classification. To assess efficiency, we introduce a novel information-theoretic metric, Information Gain per Parameter (IGPP), which quantifies learning dynamics independent of model size. Our results demonstrate that quantum models achieve performance comparable to classical baselines while operating with dramatically fewer parameters. The Quantum-based models outperform randomly initialized transformers in inference and achieve lower test error on relatedness tasks. Moreover, quantum models exhibit significantly higher per-parameter learning efficiency (up to five orders of magnitude more than classical counterparts), highlighting the promise of QNLP in low-resource, structure-sensitive settings. To address circuit-level isolation and promote parameter sharing, we also propose a novel cluster-based architecture that improves generalization by tying gate parameters to learned word clusters rather than individual tokens.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。