SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.01460 · 2023

Implicit Chain of Thought Reasoning via Knowledge Distillation

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 4 functions out of this paper's own repositories and ran 4 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
da03/implicit_chain_of_thought canonical 4 of 4
FunctionStatusWhere it lives
evaluate Ran da03/implicit_chain_of_thought/src/train_thought_emulator.py
pointer only (licence: NONE) · get_code("7844ac0a6705ad28")
extract_answer Ran da03/implicit_chain_of_thought/src/data.py
pointer only (licence: NONE) · get_code("4d589052839e4a5e")
extract_cot Ran da03/implicit_chain_of_thought/src/data.py
pointer only (licence: NONE) · get_code("fd73f5140dce9d47")
get_sep_position Ran da03/implicit_chain_of_thought/src/utils.py
pointer only (licence: NONE) · get_code("e18b8299c845a237")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2311.01460")
get_code_for_paper("2311.01460")
have("2311.01460")

Connect an agent — have() is free.