TL;DR
This paper introduces LogiCoT, a novel instruction-tuning dataset specifically designed to enhance logical reasoning capabilities in Large Language Models (LLMs). By leveraging GPT-4's chain-of-thought (CoT) generation abilities on existing logical reasoning datasets, LogiCoT aims to bridge the gap between general instruction tuning and complex logical inference, enabling smaller LLMs to achieve competitive reasoning performance.
What Problem Does This Paper Address?
While recent advancements in instruction tuning, like Alpaca, have improved LLMs' general proficiency, they often fall short in handling complex reasoning tasks. Specifically, the ability of LLMs to perform multi-step logical reasoning remains a significant challenge. Existing instruction tuning datasets are limited in scope and do not adequately cover diverse and complex reasoning scenarios. This paper addresses this gap by creating a specialized dataset to teach LLMs robust logical reasoning skills, moving beyond general task performance.
Methods
The core of this work is the creation of the LogiCoT dataset. This involved a multi-stage process using GPT-4 as an assistant. First, they selected "seminal" datasets known for their logical reasoning content (LOGICINFERENCE, EntailmentBank, FOLIO, ReClor, LogiQA). Then, they formulated clear, unambiguous prompts to elicit GPT-4's logical reasoning capabilities, specifically its chain-of-thought (CoT) generation. GPT-4 was then used to generate responses, including step-by-step rationales, for these tasks. The resulting instruction data combines symbolic reasoning and multi-step CoT reasoning. They also fine-tuned a LLaMA-7b model using this LogiCoT dataset.
Datasets
Training Data: * LOGICINFERENCE: A synthetic dataset for propositional and first-order logic inference. * EntailmentBank: A dataset of open-domain question answering with entailment trees. * FOLIO: A dataset with first-order logic annotations for logical reasoning. * ReClor: A dataset derived from verbal reasoning examinations requiring logical reasoning for multi-choice questions. * LogiQA: A dataset for machine reading comprehension with logical reasoning (specifically the Chinese version was used).
Evaluation Benchmarks: * LogiEval: A benchmark suite designed for testing logical reasoning capabilities of LLMs, comprising various logical reasoning tasks including multi-choice reading comprehension and natural language inference. * Massive Multitask Language Understanding (MMLU): A broad benchmark assessing LLM capabilities across diverse domains.
Key Insights and Ideas
- GPT-4 as a CoT Rationale Generator: The paper demonstrates the effectiveness of using a powerful model like GPT-4 to generate high-quality, step-by-step reasoning rationales for complex logical tasks, significantly reducing human annotation effort.
- Specialization for Logical Reasoning: Fine-tuning a smaller LLM (LLaMA-7b) on a specialized dataset like LogiCoT can lead to substantial improvements in logical reasoning abilities, even surpassing larger, more general instruction-tuned models on specific tasks.
- Diverse Instruction Types are Crucial: The LogiCoT dataset incorporates various instruction types (e.g., Language to Logic, One-Step Inference, Inference Chains, Reading Comprehension tasks like "Identify a Flaw in Arguments Reasoning") to cover different facets of logical reasoning, from basic inference to complex argumentation.
- Smaller Models Can Achieve Strong Reasoning: The results suggest that with targeted instruction tuning, smaller LLMs can achieve competitive logical reasoning performance, making advanced AI capabilities more accessible.
Key Results
- The fine-tuned LLaMA-7b model (LLaMA-7b-logicot) significantly outperformed the base LLaMA-7b model across all datasets in the LogiEval benchmark, with notable improvements in multi-choice reading comprehension.
- LLaMA-7b-logicot achieved state-of-the-art performance among the compared open-sourced models on most LogiEval datasets, often surpassing LLaMA-30b-supercot and Falcon-40b-instruct.
- On the MMLU benchmark, LLaMA-7b-logicot achieved an average accuracy of 43.3%, a significant boost from the LLaMA-7b base model's 31.8%, showing improved general knowledge across subjects.
- LLaMA-7b-logicot performed comparably to ChatGPT on several LogiEval datasets, demonstrating impressive capabilities for its size.
Limitations and Future Work
- Chinese Corpus Weakness: The paper notes a performance discrepancy on the Chinese version of LogiQA, suggesting potential weaknesses in handling Chinese corpus and passage-level texts.
- Gap with Proprietary Models: While competitive, LLaMA-7b-logicot still lags behind GPT-4 on most LogiEval datasets, indicating room for improvement.
- Faithfulness in Reasoning: Human evaluation showed high scores for relevance and coherence, but acknowledged room for improvement in the faithfulness of generated rationales.
- Future Work: The authors suggest integrating the LogiCoT dataset to enhance dialogue-oriented LLMs like Alpaca and further refining the generation process to improve rationale faithfulness. They also plan to explore the impact of different reasoning types more deeply through ablation studies.
Summary updated