Combining large language models with logical reasoning enhances their capacity to address problems in a robust and reliable manner. Nevertheless, the intricate nature of logical reasoning poses challenges to gathering reliable data from the web for building comprehensive training datasets, subsequently affecting the performance on downstream tasks. To address this, we introduce a novel logic-driven data augmentation approach, AMR-LDA. AMR-LDA converts the original text into an Abstract Meaning Representation (AMR) graph, a structured semantic representation that encapsulates the logic structure of the sentence, upon which operations are performed to generate logically modified AMR graphs. The modified AMR graphs are subsequently converted back into text to create augmented data. Notably, our methodology is architecture-agnostic and enhances both generative large language models, such as GPT-3.5 and GPT-4, through prompt augmentation, and discriminative large language models through contrastive learning with logic-driven data augmentation. Empirical evidence underscores the efficacy of our proposed method with improvement in performance across seven downstream tasks, such as reading comprehension requiring logical reasoning, textual entailment, and natural language inference. Furthermore, our method leads on the ReClor leaderboard (https://eval.ai/web/challenges/challenge-page/503/leaderboard/1347). The source code and data are publicly available https://bit.ly/3OWKe8r.
翻译:将大语言模型与逻辑推理相结合,可增强其以稳健可靠方式处理问题的能力。然而,逻辑推理的复杂性给从网络收集可靠数据以构建全面训练数据集带来了挑战,进而影响下游任务的性能。为解决这一问题,我们提出了一种新颖的逻辑驱动数据增强方法AMR-LDA。AMR-LDA将原始文本转换为抽象语义表示(AMR)图——一种封装句子逻辑结构的结构化语义表征,并在此基础上执行操作以生成逻辑修改后的AMR图。随后将修改后的AMR图转换回文本,从而创建增强数据。值得注意的是,我们的方法与架构无关,既能通过提示增强提升生成式大语言模型(如GPT-3.5和GPT-4)的性能,也能通过对比学习结合逻辑驱动数据增强改进判别式大语言模型。实验证据表明,我们提出的方法在七个下游任务(如需要逻辑推理的阅读理解、文本蕴含和自然语言推理)中均表现出性能提升。此外,我们的方法在ReClor排行榜(https://eval.ai/web/challenges/challenge-page/503/leaderboard/1347)上处于领先地位。源代码和数据已公开于https://bit.ly/3OWKe8r。