Internal Chain-of-Thought: Empirical Evidence for Layer-wise Subtask Scheduling in LLMs
Zhipeng Yang, Junzhuo Li, Siyu Xia, Xuming Hu
Abstract
We show that large language models (LLMs) exhibit an internal chain-of-thought: they sequentially decompose and execute composite tasks layer-by-layer. Two claims ground our study: (i) distinct subtasks are learned at different network depths, and (ii) these subtasks are executed sequentially across layers. On a benchmark of 15 two-step composite tasks, we employ layer-from context-masking and propose a novel cross-task patching method, confirming (i). To examine claim (ii), we apply LogitLens to decode hidden states, revealing a consistent layerwise execution pattern. We further replicate our analysis on the real-world TRACE benchmark, observing the same stepwise dynamics. Together, our results enhance LLMs transparency by showing their capacity to internally plan and execute subtasks (or instructions), opening avenues for fine-grained, instruction-level activation steering.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 037e0eab-c3b7-451d-a46a-134db5dd1ac6Cited by top-tier papers1
Ask how each one uses itBuilds on25
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
- Implicit In-context LearningZhuowei Li, Zihao Xu, Ligong Han, Yunhe Gao et al.ICLR 2025 · 1,989 citations
- Investigating Gender Bias in Language Models Using Causal Mediation AnalysisJesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian et al.NeurIPS 2020 · 851 citations
- Evaluating Large Language Models at Evaluating Instruction FollowingZhiyuan Zeng, Jiatong Yu, Tianyu Gao, Yu Meng et al.ICLR 2024 · 299 citations
Related papers
- How Far Ahead Do LLMs Plan? Uncovering the Latent Horizon in Chain-of-Thought ReasoningLiyan Xu, Mo Yu, Fandong Meng, Jie ZhouICML 2026 · 1 citation
- Chain-of-Thought Tuning: Masked Language Models can also Think Step By Step in Natural Language UnderstandingCaoyun Fan, Jidong Tian, Yitian Li, Wenqing Chen et al.EMNLP 2023 · 3 citations
- Everything Everywhere All at Once: LLMs can In-Context Learn Multiple Tasks in SuperpositionZheyang Xiong, Ziyang Cai, John Cooper, Albert Ge et al.ICML 2025
- Chain-of-Instructions: Compositional Instruction Tuning on Large Language ModelsShirley Anugrah Hayati, Taehee Jung, Tristan Bodding-Long, Sudipta Kar et al.AAAI 2025 · 14 citations
- Exploring Layer Activation Dynamic of CoT via Knowledge ProbeChuanxin Zhang, Jiajun Liu, Yao He, Wenjun Ke et al.ACL 2026
