arXiv:2409.16461cs.CL2024-09被引 10

用纠错数据提升小模型的自然语言到逻辑表达式翻译能力

Strategies for Improving NL-to-FOL Translation with LLMs: Data Generation, Incremental Fine-Tuning, and Verification

  • 构建纠错数据集,通过扰动生成验证样本
  • 小模型经微调后性能超越大模型如LLaMA-2 70B
  • 适合逻辑推理与低资源场景的模型优化

逻辑推理是自然语言处理中的基础任务,对大语言模型(LLMs)构成挑战。由于逻辑推理天然适合一阶逻辑(FOL)等符号表示,研究利用GPT-4o在ProofWriter数据集上构建了高质量的FOL标注子集ProofFOL。该银标准数据使小型模型(如LLaMA-2 13B和Mistral 7B)在微调后性能显著提升,甚至超过大型模型(如LLaMA-2 70B)。为应对数据稀缺问题,提出增量式框架:通过谓词拆分实现数据增强,并引入验证器修正语法和语义错误。基于错误分析生成的扰动数据集训练验证器,有效减少翻译错误。该方法在ProofWriter和ProntoQA数据集上实现当前最优性能。

原文摘要 · Abstract (English)

Logical reasoning is a fundamental task in natural language processing that presents significant challenges to Large Language Models (LLMs). The inherent characteristics of logical reasoning makes it well-suited for symbolic representations such as first-order logic (FOL). Research in symbolic logical reasoning explored FOL generation using state-of-the-art LLMs (i.e., GPT-4) to produce FOL translations of natural language (NL) statements, but errors in translation are usually not the focus. We address this by categorizing the translation errors in FOL statements generated by LLMs. To make progress towards improving the quality of FOL translations for smaller language models such as LLaMA-2 13B and Mistral 7B, we create ProofFOL, a high-quality FOL-annotated subset of ProofWriter dataset using GPT-4o. The models fine-tuned on this silver standard data achieve a significant gain in performance when compared to larger language models such as LLaMA-2 70B. In addition to improving the model using large data, we also tackle the issue of data scarcity and introduce an incremental framework encompassing of data augmentation and verification steps. In the augmentation process, a single pair of (premises, conclusion) is split into multiple new instances based on the predicates and FOLs. This data is used for fine-tuning, and the inference on this model generates FOLs with fewer errors over the model trained on the original data. Our investigation on the translation errors leads to generation of a perturbation dataset, which is used to train a verifier that corrects potential syntactic and semantic FOL translation errors. We demonstrate an efficient method for making the most of a limited existing human-annotated dataset. Our results show state-of-the-art performance for ProofWriter and ProntoQA datasets using ProofFOL on LLaMA-2 and Mistral models.

逻辑推理小模型优化数据增强验证器

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。