Implicit Chain of Thought Reasoning via Knowledge Distillation

Yuntian Deng, Kiran Prasad, Roland Fernandez, Paul Smolensky, Vishrav Chaudhary +1 more
11/2/2023
cs.CLcs.AIcs.LG

Official code: da03/implicit_chain_of_thought (149 stars, last commit 2024-11-11).

Abstract

To augment language models with the ability to reason, researchers usually prompt or finetune them to produce chain of thought reasoning steps before producing the final answer. However, although people use natural language to reason effectively, it may be that LMs could reason more effectively with some intermediate computation that is not in natural language. In this work, we explore an alternative reasoning approach: instead of explicitly producing the chain of thought reasoning steps, we use the language model's internal hidden states to perform implicit reasoning. The implicit reasoning steps are distilled from a teacher model trained on explicit chain-of-thought reasoning, and instead of doing reasoning "horizontally" by producing intermediate words one-by-one, we distill it such that the reasoning happens "vertically" among the hidden states in different layers. We conduct experiments on a multi-digit multiplication task and a grade school math problem dataset and find that this approach enables solving tasks previously not solvable without explicit chain-of-thought, at a speed comparable to no chain-of-thought.

View on arXivView PDF

Code Implementations(1)

14926PythonSep 23, 20231 years ago

Similar Papers

Cite this paper

@article{deng2023implicit,
  title  = {Implicit Chain of Thought Reasoning via Knowledge Distillation},
  author = {Yuntian Deng and Kiran Prasad and Roland Fernandez and Paul Smolensky and Vishrav Chaudhary and Stuart Shieber},
  year   = {2023},
  eprint = {2311.01460},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.01460v1}
}

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

Discussion