Saved in:
Bibliographic Details
Main Authors: Chen, Jiajun, Tam, Yik-Cheung
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2412.04110
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916509117317120
author Chen, Jiajun
Tam, Yik-Cheung
author_facet Chen, Jiajun
Tam, Yik-Cheung
contents We propose utilizing background operators for mathematical reasoning in large language models (LLMs). To achieve this, we define a set of fundamental mathematical predicates as the basic building blocks. For each mathematical problem, we develop a Prolog solution that includes problem-specific predicates and intermediate predicates derived from these background operators, ensuring that each solution adheres to the defined operator set. We introduce the MATH-Prolog corpus, which is derived from the counting and probability categories of the MATH corpus. For efficient data augmentation, we apply K-fold cross-validated self-training. This method incrementally generates new Prolog solutions for each fold, incorporating those verified as correct into the training set throughout the model training process. Our experimental results demonstrate that 5-fold crossvalidated self-training effectively identifies new, accurate Prolog solutions, achieving an accuracy of 84.6% on the cross-validated set, and 84.8% on the test set during fine-tuning the Meta-Llama-3.1-8B-Instruct model. This approach successfully uncovers new solutions with fully computable inference steps for previously unseen problems. Additionally, incorporating the background mathematical predicates into the prompt enhances solution coverage.
format Preprint
id arxiv_https___arxiv_org_abs_2412_04110
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Enhancing Mathematical Reasoning in LLMs with Background Operators
Chen, Jiajun
Tam, Yik-Cheung
Artificial Intelligence
We propose utilizing background operators for mathematical reasoning in large language models (LLMs). To achieve this, we define a set of fundamental mathematical predicates as the basic building blocks. For each mathematical problem, we develop a Prolog solution that includes problem-specific predicates and intermediate predicates derived from these background operators, ensuring that each solution adheres to the defined operator set. We introduce the MATH-Prolog corpus, which is derived from the counting and probability categories of the MATH corpus. For efficient data augmentation, we apply K-fold cross-validated self-training. This method incrementally generates new Prolog solutions for each fold, incorporating those verified as correct into the training set throughout the model training process. Our experimental results demonstrate that 5-fold crossvalidated self-training effectively identifies new, accurate Prolog solutions, achieving an accuracy of 84.6% on the cross-validated set, and 84.8% on the test set during fine-tuning the Meta-Llama-3.1-8B-Instruct model. This approach successfully uncovers new solutions with fully computable inference steps for previously unseen problems. Additionally, incorporating the background mathematical predicates into the prompt enhances solution coverage.
title Enhancing Mathematical Reasoning in LLMs with Background Operators
topic Artificial Intelligence
url https://arxiv.org/abs/2412.04110