{"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/a-thought-efficient-reasoning-via","title":"A*-Thought: Efficient Reasoning via Bidirectional Compression for Low-Resource Settings","arxiv_id":"2505.24550","date":"2025-05-30","proceeding":null,"authors":["Xiaoang Xu","Shuo Wang","Xu Han","Zhenghao Liu","Huijia Wu","Peipei Li","Zhiyuan Liu","Maosong Sun","Zhaofeng He"],"abstract":"Large Reasoning Models (LRMs) achieve superior performance by extending the thought length. However, a lengthy thinking trajectory leads to reduced efficiency. Most of the existing methods are stuck in the assumption of overthinking and attempt to reason efficiently by compressing the Chain-of-Thought, but this often leads to performance degradation. To address this problem, we introduce A*-Thought, an efficient tree search-based unified framework designed to identify and isolate the most essential thoughts from the extensive reasoning chains produced by these models. It formulates the reasoning process of LRMs as a search tree, where each node represents a reasoning span in the giant reasoning space. By combining the A* search algorithm with a cost function specific to the reasoning path, it can efficiently compress the chain of thought and determine a reasoning path with high information density and low cost. In addition, we also propose a bidirectional importance estimation mechanism, which further refines this search process and enhances its efficiency beyond uniform sampling. Extensive experiments on several advanced math tasks show that A*-Thought effectively balances performance and efficiency over a huge search space. Specifically, A*-Thought can improve the performance of QwQ-32B by 2.39$\\times$ with low-budget and reduce the length of the output token by nearly 50% with high-budget. The proposed method is also compatible with several other LRMs, demonstrating its generalization capability. The code can be accessed at: https://github.com/AI9Stars/AStar-Thought.","url_abs":"https://arxiv.org/abs/2505.24550v1","url_pdf":"https://arxiv.org/pdf/2505.24550v1.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":"a-thought-efficient-reasoning-via","repo_url":"https://github.com/ai9stars/astar-thought","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"math","task_name":"Math"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2505.24550","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.24550"}},"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":"deterministic:regex_extraction","url":"https://github.com/AI9Stars/AStar-Thought","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ai9stars/astar-thought","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":1,"ran_honours":2,"ran":1},"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":"796e03f0a9c30ea5","entry":"load_jsonl_file","repo":"ai9stars/astar-thought","repo_kind":"official","path":"long_cot_compress_v1.py","file_url":"https://github.com/ai9stars/astar-thought/blob/HEAD/long_cot_compress_v1.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"796e03f0a9c30ea5"}},{"code_sha256_prefix":"e0d678bc97025b40","entry":"parse_angle_threshold_deg","repo":"ai9stars/astar-thought","repo_kind":"official","path":"long_cot_compress_v2.py","file_url":"https://github.com/ai9stars/astar-thought/blob/HEAD/long_cot_compress_v2.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":2,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e0d678bc97025b40"}},{"code_sha256_prefix":"e4bab7d5853f504f","entry":"AStar","repo":"ai9stars/astar-thought","repo_kind":"official","path":"astarthought/a_star.py","file_url":"https://github.com/ai9stars/astar-thought/blob/HEAD/astarthought/a_star.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":"e4bab7d5853f504f"}},{"code_sha256_prefix":"306b51d1e7a36385","entry":"flags_from_trajectory_cache_row","repo":"ai9stars/astar-thought","repo_kind":"official","path":"long_cot_compress_v2.py","file_url":"https://github.com/ai9stars/astar-thought/blob/HEAD/long_cot_compress_v2.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"306b51d1e7a36385"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}