{"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/arxiv-2510-05069","title":"SwiReasoning: Switch-Thinking in Latent and Explicit for Pareto-Superior Reasoning LLMs","arxiv_id":"2510.05069","date":"2025-10-06","proceeding":"ICLR","authors":["Dachuan Shi","Abedelkadir Asi","Keying Li","Xiangchi Yuan","Leyan Pan","Wenke Lee","Wen Xiao"],"abstract":"Recent work shows that, beyond discrete reasoning through explicit chain-of-thought steps, which are limited by the boundaries of natural languages, large language models (LLMs) can also reason continuously in latent space, allowing richer information per step and thereby improving token efficiency. Despite this promise, latent reasoning still faces two challenges, especially in training-free settings: 1) purely latent reasoning broadens the search distribution by maintaining multiple implicit paths, which diffuses probability mass, introduces noise, and impedes convergence to a single high-confidence solution, thereby hurting accuracy; and 2) overthinking persists even without explicit text, wasting tokens and degrading efficiency. To address these issues, we introduce SwiReasoning, a training-free framework for LLM reasoning which features two key innovations: 1) SwiReasoning dynamically switches between explicit and latent reasoning, guided by block-wise confidence estimated from entropy trends in next-token distributions, to balance exploration and exploitation and promote timely convergence. 2) By limiting the maximum number of thinking-block switches, SwiReasoning curbs overthinking and improves token efficiency across varying problem difficulties. On widely used mathematics, STEM, coding, and general benchmarks, SwiReasoning consistently improves average accuracy by 1.8%-3.1% across reasoning LLMs of different model families and scales. Furthermore, under constrained budgets, SwiReasoning improves average token efficiency by 57%-79%, with larger gains as budgets tighten.","url_abs":"https://arxiv.org/abs/2510.05069","url_pdf":"https://arxiv.org/pdf/2510.05069","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2510.05069","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2510.05069"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/sdc17/SwiReasoning","reach":null}],"summary":{"ran_violates":2,"ran_honours":1,"ran_fixture":1,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":6,"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":0,"samples":[{"code_sha256_prefix":"d5bcdf294542e440","entry":"_needs_layerwise_batch_select","repo":"sdc17/SwiReasoning","repo_kind":"found_in_text","path":"generation_utils.py","file_url":"https://github.com/sdc17/SwiReasoning/blob/HEAD/generation_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d5bcdf294542e440"}},{"code_sha256_prefix":"a189bd15ee4e1ff7","entry":"_select_tensor_batch","repo":"sdc17/SwiReasoning","repo_kind":"found_in_text","path":"generation_utils.py","file_url":"https://github.com/sdc17/SwiReasoning/blob/HEAD/generation_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"a189bd15ee4e1ff7"}},{"code_sha256_prefix":"967ff3ce2cc35de8","entry":"apply_sampling_filter","repo":"sdc17/SwiReasoning","repo_kind":"found_in_text","path":"generation_utils.py","file_url":"https://github.com/sdc17/SwiReasoning/blob/HEAD/generation_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"967ff3ce2cc35de8"}},{"code_sha256_prefix":"e82cd21aaa74d27a","entry":"batch_select_hybrid_cache","repo":"sdc17/SwiReasoning","repo_kind":"found_in_text","path":"generation_utils.py","file_url":"https://github.com/sdc17/SwiReasoning/blob/HEAD/generation_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"e82cd21aaa74d27a"}},{"code_sha256_prefix":"13ab7ac2f6980b29","entry":"_batch_select_cache_layer","repo":"sdc17/SwiReasoning","repo_kind":"found_in_text","path":"generation_utils.py","file_url":"https://github.com/sdc17/SwiReasoning/blob/HEAD/generation_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"13ab7ac2f6980b29"}},{"code_sha256_prefix":"dc5158e1746be759","entry":"generate_swir","repo":"sdc17/SwiReasoning","repo_kind":"found_in_text","path":"generation_utils.py","file_url":"https://github.com/sdc17/SwiReasoning/blob/HEAD/generation_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"dc5158e1746be759"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_api"},"syntology_extracted_results":null}