Not All Votes Count! Programs as Verifiers Improve Self-Consistency of Language Models for Math Reasoning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Toh, Vernon Y. H., Ghosal, Deepanway, Poria, Soujanya
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917870705836032
author Toh, Vernon Y. H.
Ghosal, Deepanway
Poria, Soujanya
author_facet Toh, Vernon Y. H.
Ghosal, Deepanway
Poria, Soujanya
contents Large language models (LLMs) have shown increasing competence in solving mathematical reasoning problems. However, many open-source LLMs still struggle with errors in calculation and semantic understanding during intermediate reasoning steps. In this work, we introduce Prove, a simple yet effective framework that leverages translated programs derived from natural language solutions as a verification mechanism to filter out potentially incorrect reasoning paths before aggregating final answers. Unlike vanilla majority voting, our approach filters out solutions whose corresponding program output is inconsistent with the generated solution, aggregating only those that pass verification. We conducted extensive experiments using 13 open-source LLMs from various model families and sizes, ranging from 0.5B to 13B parameters, across eight mathematical benchmarks. Our results show that Prove consistently outperforms vanilla majority voting as a heuristic for solving mathematical reasoning tasks across all model sizes and datasets, achieving improvements of up to 18% on GSM8K and 8% on MATH-500. Our codes are available at https://github.com/declare-lab/prove.
format Preprint
id arxiv_https___arxiv_org_abs_2410_12608
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Not All Votes Count! Programs as Verifiers Improve Self-Consistency of Language Models for Math Reasoning
Toh, Vernon Y. H.
Ghosal, Deepanway
Poria, Soujanya
Computation and Language
Large language models (LLMs) have shown increasing competence in solving mathematical reasoning problems. However, many open-source LLMs still struggle with errors in calculation and semantic understanding during intermediate reasoning steps. In this work, we introduce Prove, a simple yet effective framework that leverages translated programs derived from natural language solutions as a verification mechanism to filter out potentially incorrect reasoning paths before aggregating final answers. Unlike vanilla majority voting, our approach filters out solutions whose corresponding program output is inconsistent with the generated solution, aggregating only those that pass verification. We conducted extensive experiments using 13 open-source LLMs from various model families and sizes, ranging from 0.5B to 13B parameters, across eight mathematical benchmarks. Our results show that Prove consistently outperforms vanilla majority voting as a heuristic for solving mathematical reasoning tasks across all model sizes and datasets, achieving improvements of up to 18% on GSM8K and 8% on MATH-500. Our codes are available at https://github.com/declare-lab/prove.
title Not All Votes Count! Programs as Verifiers Improve Self-Consistency of Language Models for Math Reasoning
topic Computation and Language
url https://arxiv.org/abs/2410.12608