{"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/imagination-augmented-generation-learning-to","title":"Awakening Augmented Generation: Learning to Awaken Internal Knowledge of Large Language Models for Question Answering","arxiv_id":"2403.15268","date":"2024-03-22","proceeding":null,"authors":["Huanxuan Liao","Shizhu He","Yao Xu","Yuanzhe Zhang","Kang Liu","Shengping Liu","Jun Zhao"],"abstract":"Retrieval-Augmented-Generation and Generation-Augmented-Generation have been proposed to enhance the knowledge required for question answering with Large Language Models (LLMs) by leveraging richer context. However, the former relies on external resources, and both require incorporating explicit documents into the context, which increases execution costs and susceptibility to noise data during inference. Recent works indicate that LLMs model rich knowledge, but it is often not effectively activated and awakened. Inspired by this, we propose a novel knowledge-augmented framework, $\\textbf{Awakening-Augmented-Generation}$ (AAG), which mimics the human ability to answer questions using only thinking and recalling to compensate for knowledge gaps, thereby awaking relevant knowledge in LLMs without relying on external resources. AAG consists of two key components for awakening richer context. Explicit awakening fine-tunes a context generator to create a synthetic, compressed document that functions as symbolic context. Implicit awakening utilizes a hypernetwork to generate adapters based on the question and synthetic document, which are inserted into LLMs to serve as parameter context. Experimental results on three datasets demonstrate that AAG exhibits significant advantages in both open-domain and closed-book settings, as well as in out-of-distribution generalization. Our code will be available at \\url{https://github.com/Xnhyacinth/IAG}.","url_abs":"https://arxiv.org/abs/2403.15268v5","url_pdf":"https://arxiv.org/pdf/2403.15268v5.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":"imagination-augmented-generation-learning-to","repo_url":"https://github.com/xnhyacinth/iag","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"open-domain-question-answering","task_name":"Open-Domain Question Answering"},{"task_slug":"out-of-distribution-generalization","task_name":"Out-of-Distribution Generalization"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"retrieval-augmented-generation","task_name":"Retrieval-augmented Generation"}],"methods":[{"method_slug":"adapter","method_name":"Adapter"},{"method_slug":"hypernetwork","method_name":"HyperNetwork"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2403.15268","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.15268"}},"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/xnhyacinth/iag","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":5,"ran_fixture":1,"unverified":6},"by_repo_kind":{"official":{"samples":12,"ran":6,"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":"eb1bd9941fe77289","entry":"att_mse_loss","repo":"xnhyacinth/iag","repo_kind":"official","path":"model/losses.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/model/losses.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"eb1bd9941fe77289"}},{"code_sha256_prefix":"10af7cdbc53df7e5","entry":"best_subspan_em","repo":"xnhyacinth/iag","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/src/metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"10af7cdbc53df7e5"}},{"code_sha256_prefix":"6bef6bdd6eb44070","entry":"cross_attention_forward","repo":"xnhyacinth/iag","repo_kind":"official","path":"ft_llama/model.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/ft_llama/model.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6bef6bdd6eb44070"}},{"code_sha256_prefix":"f6311afebc735eee","entry":"find_number_sequences","repo":"xnhyacinth/iag","repo_kind":"official","path":"pred.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/pred.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f6311afebc735eee"}},{"code_sha256_prefix":"40443594fb77d42a","entry":"kd_ce_loss","repo":"xnhyacinth/iag","repo_kind":"official","path":"model/losses.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/model/losses.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"40443594fb77d42a"}},{"code_sha256_prefix":"a6de986aee092cb5","entry":"kd_mse_loss","repo":"xnhyacinth/iag","repo_kind":"official","path":"model/losses.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/model/losses.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a6de986aee092cb5"}},{"code_sha256_prefix":"7a4988952dd3a127","entry":"calculate_matches","repo":"xnhyacinth/iag","repo_kind":"official","path":"model/evaluation.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/model/evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7a4988952dd3a127"}},{"code_sha256_prefix":"637b51b8df78832a","entry":"check_answer","repo":"xnhyacinth/iag","repo_kind":"official","path":"model/evaluation.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/model/evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"637b51b8df78832a"}},{"code_sha256_prefix":"29e31466888b16c0","entry":"download_model_retry","repo":"xnhyacinth/iag","repo_kind":"official","path":"ft_llama/model_download.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/ft_llama/model_download.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"29e31466888b16c0"}},{"code_sha256_prefix":"fa4ecbff4b9a354b","entry":"has_answer","repo":"xnhyacinth/iag","repo_kind":"official","path":"model/evaluation.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/model/evaluation.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fa4ecbff4b9a354b"}},{"code_sha256_prefix":"9706a9a0b961096b","entry":"normalize_answer","repo":"xnhyacinth/iag","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/src/metrics.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9706a9a0b961096b"}},{"code_sha256_prefix":"3cd7263c50c21a23","entry":"parse_args","repo":"xnhyacinth/iag","repo_kind":"official","path":"pred.py","file_url":"https://github.com/xnhyacinth/iag/blob/HEAD/pred.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3cd7263c50c21a23"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}