LogicPro: Improving Complex Logical Reasoning via Program-Guided Learning

TL;DR

LogicPro synthesizes complex logical reasoning data using program-guided learning, enhancing model performance.

cs.CL 🔴 Advanced 2024-09-20 2 views
Jin Jiang Yuchen Yan Yang Liu Jianing Wang Shuai Peng Xunliang Cai Yixin Cao Mengdi Zhang Liangcai Gao
logical reasoning data synthesis program-guided machine learning large-scale dataset

Key Findings

Methodology

LogicPro synthesizes complex logical reasoning data by leveraging LeetCode algorithm problems and their program solutions. It first synthesizes reasoning problems using source algorithm problems and test cases. Then, it obtains standard answers and intermediate variable outputs using standard Python solutions. Finally, it synthesizes the text reasoning process guided by code intermediate variables.

Key Results

  • On the BBH27 dataset, LogicPro achieved a 50.9% accuracy, improving approximately 4.7% over existing baselines.
  • On the LogicBench dataset, LogicPro outperformed all baselines except when LogicBench itself was used as the training set.
  • On OOD benchmarks like DROP and AR-LSAT, LogicPro demonstrated superior performance, validating its out-of-distribution task capabilities.

Significance

LogicPro significantly enhances model performance across various datasets by synthesizing high-quality logical reasoning data. This approach not only addresses the challenge of acquiring high-quality reasoning data but also opens new possibilities for training logical reasoning models.

Technical Contribution

LogicPro introduces a novel approach in data synthesis, generating high-quality logical reasoning data through program-guided methods, significantly improving model reasoning capabilities and accuracy.

Novelty

This is the first method to synthesize complex logical reasoning data using program guidance, offering a more practical solution compared to traditional propositional logic-based methods.

Limitations

  • Performance on the FOLIO dataset is inferior to some baselines, possibly due to these baselines being generated based on first-order logic.
  • For certain tasks, the complexity of synthesized data may not sufficiently challenge large models.

Future Work

Future research directions include further optimizing data synthesis methods, enhancing the diversity and complexity of synthesized data, and exploring applications in more domains.

AI Executive Summary

In the field of artificial intelligence, logical reasoning is a crucial yet challenging task. Existing datasets often fall short of meeting the training needs of large-scale models. LogicPro synthesizes high-quality logical reasoning datasets using program-guided methods, leveraging LeetCode algorithm problems and solutions.

The core of this approach lies in obtaining intermediate variables through program solutions and using them to guide the synthesis of text reasoning processes. Experimental results show that LogicPro significantly improves model performance across multiple datasets, particularly on benchmarks like BBH27 and LogicBench.

Although LogicPro underperforms on some datasets compared to baselines, its outstanding performance on out-of-distribution tasks highlights its broad application potential. Future research will continue to optimize data synthesis methods, enhancing data diversity and complexity.

Deep Analysis

Background

Logical reasoning is a vital component of AI, gaining attention with the development of large-scale language models. Traditional datasets like LogicBench and BBH27 provide a foundation but struggle to meet the demands of complex reasoning tasks.

Core Problem

The scale and quality of existing logical reasoning datasets limit model training effectiveness. Synthesizing high-quality and challenging reasoning data is a pressing issue.

Innovation

LogicPro synthesizes logical reasoning data through program guidance, using algorithm problems and program solutions to generate high-quality data. This method not only improves data quality but also enhances model reasoning capabilities.

Methodology

  • �� Data Collection: Gather LeetCode algorithm problems and solutions.
  • �� Synthesize Reasoning Problems: Combine algorithm problems and test cases to generate text reasoning problems.
  • �� Obtain Intermediate Variables: Run Python code to get intermediate variable outputs.
  • �� Synthesize Reasoning Process: Use intermediate variables to guide the synthesis of text reasoning processes.

Experiments

Experiments used multiple benchmark datasets, including BBH27, LogicBench, and DROP. Comparisons with existing baselines verified LogicPro's effectiveness.

Results

On the BBH27 dataset, LogicPro achieved a 50.9% accuracy, improving approximately 4.7% over existing baselines. On LogicBench, it outperformed all baselines except when LogicBench itself was used as the training set.

Applications

LogicPro can enhance the training of logical reasoning models, particularly in scenarios requiring high-quality reasoning data, such as academic research and industrial applications.

Limitations & Outlook

While LogicPro performs well on multiple datasets, it underperforms on some first-order logic-based datasets compared to certain baselines. Future work should further optimize data synthesis methods.

Plain Language Accessible to non-experts

Imagine you're playing a puzzle game where each piece represents a logical problem. LogicPro acts like a smart assistant, creating new puzzle pieces based on existing ones, making the game more challenging. This approach not only makes the game more interesting but also helps improve your problem-solving skills.

ELI14 Explained like you're 14

Hey there! Imagine you're playing a super complex puzzle game. Each piece is a logic problem, and LogicPro is your secret weapon! It helps you create new puzzle pieces, making the game more fun and challenging. Isn't that cool?

Glossary

LeetCode

An online platform offering various algorithm problems for users to practice.

Used to generate algorithm problems and program solutions.

Logical Reasoning

The process of deriving conclusions through analysis and deduction.

The core task of the research.

Program-Guided Learning

A method that uses program execution results to guide the learning process.

The core method of LogicPro.

Intermediate Variable

Data generated during program execution.

Used to guide the synthesis of text reasoning processes.

Synthetic Data

Data generated artificially to supplement real datasets.

Used to enhance model training effectiveness.

Open Questions Unanswered questions from this research

  • 1 How to further enhance the diversity and complexity of synthesized data?
  • 2 What is the potential of applying LogicPro in more domains?

Applications

Immediate Applications

Academic Research

Researchers can use datasets generated by LogicPro for training and testing logical reasoning models.

Long-term Vision

Industrial Applications

LogicPro can provide crucial support in industrial scenarios requiring high-quality reasoning data.

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.

cs.CL