{"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/latent-chain-of-thought-decoding-the-depth","title":"Latent Chain-of-Thought? Decoding the Depth-Recurrent Transformer","arxiv_id":"2507.02199","date":"2025-07-02","proceeding":null,"authors":["Wenquan Lu","Yuechuan Yang","Kyle Lee","Yanshu Li","Enqi Liu"],"abstract":"Chain-of-thought (CoT) reasoning has enabled transformer-based language models to excel at complex mathematics and multi-step planning. However, in standard decoder-only architectures, these reasoning steps are externalized in natural language, improving interpretability at the cost of efficiency. To capture reasoning that is not easily represented in words, many works have explored recurrent architectures that aim to internalize reasoning in latent space, potentially supporting latent CoT. In this paper, we investigate whether such reasoning structures emerge in Huginn-3.5B, a depth-recurrent Transformer that reuses layers at inference time without increasing parameter count. We examine the model's internal behavior on arithmetic tasks using a suite of probing techniques including the Logit Lens and Coda Lens. Our findings reveal limited evidence of interpretable latent CoT by tracking rank trajectories of final and intermediate result tokens. Furthermore, we uncover significant probing inconsistencies across recurrent blocks, where the interpretability of hidden states depends heavily on both the layer index and the decoding method. Finally, we empirically show that increasing recurrence depth yields only marginal gains and falls well short of models that explicitly externalize reasoning steps. The code is available at https://github.com/wenquanlu/huginn-latent-cot.","url_abs":"https://arxiv.org/abs/2507.02199v1","url_pdf":"https://arxiv.org/pdf/2507.02199v1.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":"latent-chain-of-thought-decoding-the-depth","repo_url":"https://github.com/wenquanlu/huginn-latent-cot","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2507.02199","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2507.02199"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/wenquanlu/huginn-latent-cot","reach":{"status":"ok"}}],"summary":{"unverified":11},"by_repo_kind":{"official":{"samples":11,"ran":0,"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":11,"samples":[{"code_sha256_prefix":"d5b72c13e150ef82","entry":"apply_rotary_emb_complex_like","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"huginn-predrank/raven_modeling_minimal.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/huginn-predrank/raven_modeling_minimal.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d5b72c13e150ef82"}},{"code_sha256_prefix":"633babd6ef2a0581","entry":"compute_std_ranks","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"rank_analysis_inter_combined.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/rank_analysis_inter_combined.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"633babd6ef2a0581"}},{"code_sha256_prefix":"259364a9505ced11","entry":"get_final_predicted_logit","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"coda_lens_exp.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/coda_lens_exp.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"259364a9505ced11"}},{"code_sha256_prefix":"fc8d88e3e0f20956","entry":"get_intermediate","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"filter_dataset.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/filter_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fc8d88e3e0f20956"}},{"code_sha256_prefix":"790bef835ff3efd0","entry":"is_signed_numeric","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"frequency_analysis_combined.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/frequency_analysis_combined.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"790bef835ff3efd0"}},{"code_sha256_prefix":"13869bcb8c96fc73","entry":"logit_coda_intermediate_rank_lens","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"logit_lens_exp_inter.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/logit_lens_exp_inter.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"13869bcb8c96fc73"}},{"code_sha256_prefix":"2e37e08ffcc4bd2b","entry":"logit_coda_rank_lens","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"logit_lens_exp.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/logit_lens_exp.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2e37e08ffcc4bd2b"}},{"code_sha256_prefix":"e894012ac830ab50","entry":"operator","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"filter_dataset.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/filter_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e894012ac830ab50"}},{"code_sha256_prefix":"db336122f09999c7","entry":"precompute_freqs_cis","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"huginn-predrank/raven_modeling_minimal.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/huginn-predrank/raven_modeling_minimal.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"db336122f09999c7"}},{"code_sha256_prefix":"05a3210b118e5e83","entry":"single_digit_test","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"filter_dataset.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/filter_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"05a3210b118e5e83"}},{"code_sha256_prefix":"79f09692d8de2b4d","entry":"trim_output","repo":"wenquanlu/huginn-latent-cot","repo_kind":"official","path":"coda_lens_exp.py","file_url":"https://github.com/wenquanlu/huginn-latent-cot/blob/HEAD/coda_lens_exp.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"79f09692d8de2b4d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}