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

Authors: Yuntian Deng, Yejin Choi, Stuart Shieber.

Uses a curriculum that progressively removes intermediate reasoning steps during fine-tuning, teaching a model to internalize an explicit chain of thought.

First public: 2024-05-23.
ArXiv initial submission: 2024-05-23.

[Original paper](https://arxiv.org/abs/2405.14838) · [Reading-list entry](https://latent-implicit-thinking.github.io/papers/2405.14838/)
[Preprint BibTeX](https://latent-implicit-thinking.github.io/papers/2405.14838/citation.bib) · [Preprint CSL-JSON](https://latent-implicit-thinking.github.io/papers/2405.14838/citation.csl.json) · [JSON record](https://latent-implicit-thinking.github.io/papers/2405.14838/record.json)
[Code](https://github.com/da03/Internalize_CoT_Step_by_Step)

Related terms: implicit CoT, latent reasoning, latent chain-of-thought, latent CoT.

## Method comparisons

**Distillation and stepwise internalization**

Deng et al. (2023) introduced implicit CoT as reasoning through hidden states rather than written steps; distillation is the paper's implementation of that proposal. It learns to predict a teacher's intermediate hidden states, which help a student produce the answer. Stepwise Internalization instead repeatedly shortens the written solution and fine-tunes the same model on what remains. Both use worked solutions during training; neither requires writing the removed steps at inference. Their reported experiments focus on multiplication and grade-school math, not a guarantee of general reasoning ability.

Sources: [Implicit CoT proposal, §2.3](https://arxiv.org/html/2311.01460v1#S2.SS3) · [Distillation implementation, §3](https://arxiv.org/html/2311.01460v1#S3) · [Stepwise internalization, §3](https://arxiv.org/html/2405.14838v1#S3)

Paper details: [Implicit Chain of Thought Reasoning via Knowledge Distillation](https://latent-implicit-thinking.github.io/papers/2311.01460/) · [From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Step](https://latent-implicit-thinking.github.io/papers/2405.14838/)

**From stepwise internalization to Coconut**

Coconut explicitly credits Deng et al. (2024) as the inspiration for its multistage training curriculum. Stepwise internalization gradually removes written CoT tokens until the model answers directly. Coconut instead replaces removed steps with continuous hidden-state inputs, retaining a sequence of internal reasoning steps before the answer. It also follows the earlier work in resetting the optimizer between training stages.

Sources: [Deng et al. (2024), §3](https://arxiv.org/html/2405.14838v1#S3) · [Coconut, §3](https://arxiv.org/html/2412.06769v3#S3)

Paper details: [From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Step](https://latent-implicit-thinking.github.io/papers/2405.14838/) · [Training Large Language Models to Reason in a Continuous Latent Space](https://latent-implicit-thinking.github.io/papers/2412.06769/)

**Changing generation order or removing written steps**

Diffusion of Thought changes how a chain of thought is generated: it refines the solution through denoising rather than committing to words strictly from left to right. This changes the generation schedule, not necessarily the visibility of the reasoning. The resulting chain can still be text, unlike methods that only emit the final answer.

Sources: [Diffusion of Thought](https://proceedings.neurips.cc/paper_files/paper/2024/hash/be30024e7fa2c29cac7a6dafcbb8571f-Abstract-Conference.html) · [Deng et al. (2024), §3](https://arxiv.org/html/2405.14838v1#S3)

Paper details: [Diffusion of Thoughts: Chain-of-Thought Reasoning in Diffusion Language Models](https://latent-implicit-thinking.github.io/papers/2402.07754/) · [From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Step](https://latent-implicit-thinking.github.io/papers/2405.14838/)


## Demos

Demo: [Multiplication without written steps](https://huggingface.co/spaces/yuntian-deng/gpt2-multiplication)

Compare GPT-2 models using implicit CoT, explicit CoT, or no CoT on two numbers of up to 20 digits each.

The models can make mistakes, including on valid inputs. The implicit model writes answer digits, not intermediate steps.

[Model details](https://huggingface.co/yuntian-deng/gpt2-implicit-cot-multiplication-20-digits)

Implements: [From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Step](https://latent-implicit-thinking.github.io/papers/2405.14838/).

Related method, not implemented by this demo: [Implicit Chain of Thought Reasoning via Knowledge Distillation](https://latent-implicit-thinking.github.io/papers/2311.01460/).

Demo: [Math word problems without written steps](https://huggingface.co/spaces/yuntian-deng/implicit-cot-math)

Try a Mistral-7B model trained with stepwise internalization on grade-school math word problems.

Answers can be wrong. This model is trained for grade-school math word problems, not general conversation. It still generates the answer token by token.

[Model details](https://huggingface.co/yuntian-deng/implicit-cot-math-mistral7b)

Implements: [From Explicit CoT to Implicit CoT: Learning to Internalize CoT Step by Step](https://latent-implicit-thinking.github.io/papers/2405.14838/).

Related method, not implemented by this demo: [Implicit Chain of Thought Reasoning via Knowledge Distillation](https://latent-implicit-thinking.github.io/papers/2311.01460/).


## Approaches

- [Internalized reasoning](https://latent-implicit-thinking.github.io/topics/internalized-reasoning/): Learn from worked solutions so that some or all of the reasoning can later happen without writing those steps. Training may use a separate teacher model or progressively remove written steps from the model being trained.

Summary and categories are editorial. Read the original paper to verify claims and limitations. A citation to a paper does not, by itself, establish that a later method builds on it.

Reading-list version 0.9.4; literature checked through 2026-10-18.
