LLMs become their own code reviewers by writing verification programs to catch mistakes
ProgCo enables LLMs to verify and fix their own mistakes through self-generated programs, significantly improving accuracy across complex tasks.
-----
https://arxiv.org/abs/2501.01264
π€ Original Problem:
LLMs struggle with self-correction, especially in complex reasoning tasks. Current methods fail to effectively detect errors and often provide misleading feedback, leading to incorrect revisions.
-----
π‘ Solution in this Paper:
β ProgCo introduces program-driven verification (ProgVe) that generates and executes verification pseudo-programs to validate model outputs
β These programs can express complex verification logic beyond simple checklists
β Program-driven refinement (ProgRe) performs dual optimization of both responses and verification programs
β The system uses contrast-based refinement to avoid misleading feedback
β Integration with Python tools enhances verification capabilities for numerical operations
-----
π― Key Insights:
β Programs are more effective than natural language for expressing verification logic
β LLMs can act as program executors while incorporating their knowledge
β Dual refinement of responses and programs improves accuracy
β Contrast-based refinement helps avoid error propagation
-----
π Results:
β Improved GPT-3.5 performance by 4.62% on IFEval(Pr), 3.23% on IFEval(Ins)
β Enhanced mathematical reasoning with 5.84% gain on GSM8K, 5.8% on MATH
β Consistently outperformed baseline methods across all benchmarks
β Further improvements when combined with Python executor tools










