{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/implicit-chain-of-thought-reasoning-via","title":"Implicit Chain of Thought Reasoning via Knowledge Distillation","arxiv_id":"2311.01460","date":"2023-11-02","proceeding":null,"authors":["Yuntian Deng","Kiran Prasad","Roland Fernandez","Paul Smolensky","Vishrav Chaudhary","Stuart Shieber"],"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.","url_abs":"https://arxiv.org/abs/2311.01460v1","url_pdf":"https://arxiv.org/pdf/2311.01460v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"implicit-chain-of-thought-reasoning-via","repo_url":"https://github.com/da03/implicit_chain_of_thought","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"},{"task_slug":"math","task_name":"Math"}],"methods":[{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2311.01460","atlas_url":"https://app.syntology.ai/?focus=2311.01460","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.01460"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/da03/implicit_chain_of_thought","reach":{"status":"ok"}}],"summary":{"ran":4},"by_repo_kind":{"official":{"samples":4,"ran":4,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":4,"samples":[{"code_sha256_prefix":"7844ac0a6705ad28","entry":"evaluate","repo":"da03/implicit_chain_of_thought","repo_kind":"official","path":"src/train_thought_emulator.py","file_url":"https://github.com/da03/implicit_chain_of_thought/blob/HEAD/src/train_thought_emulator.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7844ac0a6705ad28"}},{"code_sha256_prefix":"4d589052839e4a5e","entry":"extract_answer","repo":"da03/implicit_chain_of_thought","repo_kind":"official","path":"src/data.py","file_url":"https://github.com/da03/implicit_chain_of_thought/blob/HEAD/src/data.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4d589052839e4a5e"}},{"code_sha256_prefix":"fd73f5140dce9d47","entry":"extract_cot","repo":"da03/implicit_chain_of_thought","repo_kind":"official","path":"src/data.py","file_url":"https://github.com/da03/implicit_chain_of_thought/blob/HEAD/src/data.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fd73f5140dce9d47"}},{"code_sha256_prefix":"e18b8299c845a237","entry":"get_sep_position","repo":"da03/implicit_chain_of_thought","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/da03/implicit_chain_of_thought/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e18b8299c845a237"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}