Arithmetic Reasoning with LLM: Prolog Generation & Permutation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yang, Xiaocheng, Chen, Bingsen, Tam, Yik-Cheung
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911891084804096
author Yang, Xiaocheng
Chen, Bingsen
Tam, Yik-Cheung
author_facet Yang, Xiaocheng
Chen, Bingsen
Tam, Yik-Cheung
contents Instructing large language models (LLMs) to solve elementary school math problems has shown great success using Chain of Thought (CoT). However, the CoT approach relies on an LLM to generate a sequence of arithmetic calculations which can be prone to cascaded calculation errors. We hypothesize that an LLM should focus on extracting predicates and generating symbolic formulas from the math problem description so that the underlying calculation can be done via an external code interpreter. We investigate using LLM to generate Prolog programs to solve mathematical questions. Experimental results show that our Prolog-based arithmetic problem-solving outperforms CoT generation in the GSM8K benchmark across three distinct LLMs. In addition, given the insensitive ordering of predicates and symbolic formulas in Prolog, we propose to permute the ground truth predicates for more robust LLM training via data augmentation.
format Preprint
id arxiv_https___arxiv_org_abs_2405_17893
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Arithmetic Reasoning with LLM: Prolog Generation & Permutation
Yang, Xiaocheng
Chen, Bingsen
Tam, Yik-Cheung
Computation and Language
Artificial Intelligence
Instructing large language models (LLMs) to solve elementary school math problems has shown great success using Chain of Thought (CoT). However, the CoT approach relies on an LLM to generate a sequence of arithmetic calculations which can be prone to cascaded calculation errors. We hypothesize that an LLM should focus on extracting predicates and generating symbolic formulas from the math problem description so that the underlying calculation can be done via an external code interpreter. We investigate using LLM to generate Prolog programs to solve mathematical questions. Experimental results show that our Prolog-based arithmetic problem-solving outperforms CoT generation in the GSM8K benchmark across three distinct LLMs. In addition, given the insensitive ordering of predicates and symbolic formulas in Prolog, we propose to permute the ground truth predicates for more robust LLM training via data augmentation.
title Arithmetic Reasoning with LLM: Prolog Generation & Permutation
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2405.17893