Table of Contents
Fetching ...

ProgCo: Program Helps Self-Correction of Large Language Models

Xiaoshuai Song, Yanan Wu, Weixun Wang, Jiaheng Liu, Wenbo Su, Bo Zheng

TL;DR

ProgCo tackles the challenge of intrinsic self-correction in large language models by introducing Program-driven Verification (ProgVe) and Program-driven Refinement (ProgRe). ProgVe enables the model to self-generate and self-execute verification pseudo-programs to assess initial responses, while ProgRe performs dual refinement on both the response and the verification programs to avoid feedback misguidance. Across instruction-following and mathematical benchmarks (IFEval, GSM8K, MATH), ProgCo consistently outperforms baselines, with additional gains when integrating symbolic tools such as a Python executor. The work highlights the importance of structured, executable verification logic and dual optimization to improve reliability of self-correction in complex tasks, and provides open-source code for replication and extension.

Abstract

Self-Correction aims to enable large language models (LLMs) to self-verify and self-refine their initial responses without external feedback. However, LLMs often fail to effectively self-verify and generate correct feedback, further misleading refinement and leading to the failure of self-correction, especially in complex reasoning tasks. In this paper, we propose Program-driven Self-Correction (ProgCo). First, program-driven verification (ProgVe) achieves complex verification logic and extensive validation through self-generated, self-executing verification pseudo-programs. Then, program-driven refinement (ProgRe) receives feedback from ProgVe, conducts dual reflection and refinement on both responses and verification programs to mitigate misleading of incorrect feedback in complex reasoning tasks. Experiments on three instruction-following and mathematical benchmarks indicate that ProgCo achieves effective self-correction, and can be further enhance performance when combined with real program tools. We release our code at https://github.com/songxiaoshuai/progco.

ProgCo: Program Helps Self-Correction of Large Language Models

TL;DR

ProgCo tackles the challenge of intrinsic self-correction in large language models by introducing Program-driven Verification (ProgVe) and Program-driven Refinement (ProgRe). ProgVe enables the model to self-generate and self-execute verification pseudo-programs to assess initial responses, while ProgRe performs dual refinement on both the response and the verification programs to avoid feedback misguidance. Across instruction-following and mathematical benchmarks (IFEval, GSM8K, MATH), ProgCo consistently outperforms baselines, with additional gains when integrating symbolic tools such as a Python executor. The work highlights the importance of structured, executable verification logic and dual optimization to improve reliability of self-correction in complex tasks, and provides open-source code for replication and extension.

Abstract

Self-Correction aims to enable large language models (LLMs) to self-verify and self-refine their initial responses without external feedback. However, LLMs often fail to effectively self-verify and generate correct feedback, further misleading refinement and leading to the failure of self-correction, especially in complex reasoning tasks. In this paper, we propose Program-driven Self-Correction (ProgCo). First, program-driven verification (ProgVe) achieves complex verification logic and extensive validation through self-generated, self-executing verification pseudo-programs. Then, program-driven refinement (ProgRe) receives feedback from ProgVe, conducts dual reflection and refinement on both responses and verification programs to mitigate misleading of incorrect feedback in complex reasoning tasks. Experiments on three instruction-following and mathematical benchmarks indicate that ProgCo achieves effective self-correction, and can be further enhance performance when combined with real program tools. We release our code at https://github.com/songxiaoshuai/progco.
Paper Structure (21 sections, 5 equations, 14 figures, 4 tables)

This paper contains 21 sections, 5 equations, 14 figures, 4 tables.

Figures (14)

  • Figure 1: Illustration of a typical workflow of LLM’s intrinsic self-correction.
  • Figure 2: Illustration of generating verification pseudo-program for input tasks.
  • Figure 3: The overall framework of ProgCo, achieving self-correction through iterative ProgVe and ProgRe.
  • Figure 4: Recall and F1 scores of self-verification methods for incorrect responses on GPT-3.5.
  • Figure 5: Score variation with the maximum number of self-correction rounds on GPT-3.5. The program's ACC measures the consistency accuracy between the execution results of ProgVe and ground-truth scores.
  • ...and 9 more figures