LogicPro: Improving Complex Logical Reasoning via Program-Guided Learning

Jin Jiang, Yuchen Yan, Yang Liu, Jianing Wang, Shuai Peng +4 more
9/19/2024
cs.CL

Official code: jiangjin1999/LogicPro (9 stars, Apache-2.0, last commit 2025-08-04).

Abstract

In this paper, we propose a new data synthesis method called \textbf{LogicPro}, which leverages LeetCode-style algorithm \underline{Pro}blems and their corresponding \underline{Pro}gram solutions to synthesize Complex \underline{Logic}al Reasoning data in text format. First, we synthesize complex reasoning problems through source algorithm problems and test cases. Then, standard answers and intermediate variable outputs are obtained for each problem based on standard python solutions and test cases. Finally, with the guidance of code intermediate variables, we synthesize the text reasoning process for each reasoning problems. Through this method, we can synthesize data that is difficult, scalable, effective, and comes with golden standard answers and high-quality reasoning processes. As a result, with our 540K synthesized dataset constructed solely from 2,360 algorithm problems, our approach \footnote{Code and data are publicly available at https://github.com/jiangjin1999/LogicPro} achieves significant improvements in multiple models for the datasets \textit{BBH$^{27}$}, \textit{LogicBench}, \textit{DROP}, \textit{AR-LSAT}, and \textit{GSM8K}, etc. outperforming a wide range of existing reasoning datasets.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[ACL2025] A novel complex reasoning enhancement method that utilizes widely available algorithmic questions and their codes to generate logical reasoning data.

90Aug 1, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{jiang2024logicpro,
  title  = {LogicPro: Improving Complex Logical Reasoning via Program-Guided Learning},
  author = {Jin Jiang and Yuchen Yan and Yang Liu and Jianing Wang and Shuai Peng and Xunliang Cai and Yixin Cao and Mengdi Zhang and Liangcai Gao},
  year   = {2024},
  eprint = {2409.12929},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.12929v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.12929.svg)](https://codeofpaper.com/paper/2409.12929)

Discussion