From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Step

Yuntian Deng, Yejin Choi, Stuart Shieber
5/23/2024
cs.CLcs.AIcs.LG

No official code found. Best implementation: da03/Internalize_CoT_Step_by_Step (208 stars, MIT, last commit 2025-04-19). 1 more below.

Abstract

When leveraging language models for reasoning tasks, generating explicit chain-of-thought (CoT) steps often proves essential for achieving high accuracy in final outputs. In this paper, we investigate if models can be taught to internalize these CoT steps. To this end, we propose a simple yet effective method for internalizing CoT steps: starting with a model trained for explicit CoT reasoning, we gradually remove the intermediate steps and finetune the model. This process allows the model to internalize the intermediate reasoning steps, thus simplifying the reasoning process while maintaining high performance. Our approach enables a GPT-2 Small model to solve 9-by-9 multiplication with up to 99% accuracy, whereas standard training cannot solve beyond 4-by-4 multiplication. Furthermore, our method proves effective on larger language models, such as Mistral 7B, achieving over 50% accuracy on GSM8K without producing any intermediate steps.

View on arXivView PDF

Code Implementations(2)

MIT
20821PythonMay 22, 20241 years agoMIT

This is a close implementation of the paper 'From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Step.'

20PythonOct 18, 20241 years ago

Similar Papers

Cite this paper

@article{deng2024from,
  title  = {From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Step},
  author = {Yuntian Deng and Yejin Choi and Stuart Shieber},
  year   = {2024},
  eprint = {2405.14838},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.14838v1}
}

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/2405.14838.svg)](https://codeofpaper.com/paper/2405.14838)

Discussion