{"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/atomr-atomic-operator-empowered-large","title":"AtomR: Atomic Operator-Empowered Large Language Models for Heterogeneous Knowledge Reasoning","arxiv_id":"2411.16495","date":"2024-11-25","proceeding":null,"authors":["Amy Xin","Jinxin Liu","Zijun Yao","Zhicheng Lee","Shulin Cao","Lei Hou","Juanzi Li"],"abstract":"Recent advancements in large language models (LLMs) have led to significant improvements in various natural language processing tasks, but it is still challenging for LLMs to perform knowledge-intensive complex question answering due to LLMs' inefficacy in reasoning planning and the hallucination problem. A typical solution is to employ retrieval-augmented generation (RAG) coupled with chain-of-thought (CoT) reasoning, which decomposes complex questions into chain-like sub-questions and applies iterative RAG at each sub-question. However, prior works exhibit sub-optimal reasoning planning and overlook dynamic knowledge retrieval from heterogeneous sources. In this paper, we propose AtomR, a novel heterogeneous knowledge reasoning framework that conducts multi-source reasoning at the atomic level. Drawing inspiration from the graph modeling of knowledge, AtomR leverages large language models (LLMs) to decompose complex questions into combinations of three atomic knowledge operators, significantly enhancing the reasoning process at both the planning and execution stages. We also introduce BlendQA, a novel evaluation benchmark tailored to assess complex heterogeneous knowledge reasoning. Experiments show that AtomR significantly outperforms state-of-the-art baselines across three single-source and two multi-source reasoning benchmarks, with notable performance gains of 9.4% on 2WikiMultihop and 9.5% on BlendQA.","url_abs":"https://arxiv.org/abs/2411.16495v2","url_pdf":"https://arxiv.org/pdf/2411.16495v2.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":"atomr-atomic-operator-empowered-large","repo_url":"https://github.com/THU-KEG/AtomR","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"hallucination","task_name":"Hallucination"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"rag","task_name":"RAG"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"retrieval-augmented-generation","task_name":"Retrieval-augmented Generation"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bart","method_name":"BART"},{"method_slug":"bert","method_name":"BERT"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"rag","method_name":"RAG"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2411.16495","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2411.16495"}},"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/THU-KEG/AtomR","reach":{"status":"ok"}}],"summary":{"unverified":13},"by_repo_kind":{"official":{"samples":13,"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":13,"samples":[{"code_sha256_prefix":"195f8f58bad34ea5","entry":"calculate_em","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/calculate_metrics.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/calculate_metrics.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":"195f8f58bad34ea5"}},{"code_sha256_prefix":"06bd0fab42352980","entry":"calculate_f1","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/calculate_metrics.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/calculate_metrics.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":"06bd0fab42352980"}},{"code_sha256_prefix":"d8246404fe3d07ac","entry":"extract_function_parameters","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/utils.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":"d8246404fe3d07ac"}},{"code_sha256_prefix":"d416633bc4a27d59","entry":"extract_json_tree","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/utils.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":"d416633bc4a27d59"}},{"code_sha256_prefix":"fc0dde79121e724b","entry":"extract_ref_indices","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/utils.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":"fc0dde79121e724b"}},{"code_sha256_prefix":"0e84913598fcef69","entry":"format_direct_answer_prompt_2wiki","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/prompts/answer_formulation_prompts.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/prompts/answer_formulation_prompts.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":"0e84913598fcef69"}},{"code_sha256_prefix":"e3d56dc72fde480c","entry":"format_direct_answer_prompt_hotpotqa","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/prompts/answer_formulation_prompts.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/prompts/answer_formulation_prompts.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":"e3d56dc72fde480c"}},{"code_sha256_prefix":"0c95c3f6f273a570","entry":"format_kb_retrieval_answers","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/global_reasoner.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/global_reasoner.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":"0c95c3f6f273a570"}},{"code_sha256_prefix":"c8789437204b7582","entry":"format_knowledge_source_selection_prompt","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/prompts/answer_formulation_prompts.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/prompts/answer_formulation_prompts.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":"c8789437204b7582"}},{"code_sha256_prefix":"cc1c3b57c07cc796","entry":"format_text_retrieval_answers","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/global_reasoner.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/global_reasoner.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":"cc1c3b57c07cc796"}},{"code_sha256_prefix":"d4c571e9d833c51e","entry":"format_web_retrieval_answers","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/global_reasoner.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/global_reasoner.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":"d4c571e9d833c51e"}},{"code_sha256_prefix":"702b1281050dbc40","entry":"normalize_answer","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/calculate_metrics.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/calculate_metrics.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":"702b1281050dbc40"}},{"code_sha256_prefix":"c499bbf79b863287","entry":"overlap_coefficient","repo":"THU-KEG/AtomR","repo_kind":"official","path":"src/knowledge_sources.py","file_url":"https://github.com/THU-KEG/AtomR/blob/HEAD/src/knowledge_sources.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":"c499bbf79b863287"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}