{"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/atm-adversarial-tuning-multi-agent-system","title":"ATM: Adversarial Tuning Multi-agent System Makes a Robust Retrieval-Augmented Generator","arxiv_id":"2405.18111","date":"2024-05-28","proceeding":null,"authors":["Junda Zhu","Lingyong Yan","Haibo Shi","Dawei Yin","Lei Sha"],"abstract":"Large language models (LLMs) are proven to benefit a lot from retrieval-augmented generation (RAG) in alleviating hallucinations confronted with knowledge-intensive questions. RAG adopts information retrieval techniques to inject external knowledge from semantic-relevant documents as input contexts. However, since today's Internet is flooded with numerous noisy and fabricating content, it is inevitable that RAG systems are vulnerable to these noises and prone to respond incorrectly. To this end, we propose to optimize the retrieval-augmented Generator with an Adversarial Tuning Multi-agent system (ATM). The ATM steers the Generator to have a robust perspective of useful documents for question answering with the help of an auxiliary Attacker agent through adversarially tuning the agents for several iterations. After rounds of multi-agent iterative tuning, the Generator can eventually better discriminate useful documents amongst fabrications. The experimental results verify the effectiveness of ATM and we also observe that the Generator can achieve better performance compared to the state-of-the-art baselines.","url_abs":"https://arxiv.org/abs/2405.18111v3","url_pdf":"https://arxiv.org/pdf/2405.18111v3.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":"atm-adversarial-tuning-multi-agent-system","repo_url":"https://github.com/chuhac/atm-rag","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"information-retrieval","task_name":"Information Retrieval"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"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=2405.18111","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.18111"}},"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/chuhac/atm-rag","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/chuhac/ATM-RAG","reach":{"status":"ok"}}],"summary":{"ran":6,"unverified":4},"by_repo_kind":{"official":{"samples":10,"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":10,"samples":[{"code_sha256_prefix":"6d352198e5317f00","entry":"build_tokenized_answer","repo":"chuhac/ATM-RAG","repo_kind":"official","path":"atm_train/attacker_dpo/dpo_utils.py","file_url":"https://github.com/chuhac/ATM-RAG/blob/HEAD/atm_train/attacker_dpo/dpo_utils.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":"6d352198e5317f00"}},{"code_sha256_prefix":"7f301966b623a001","entry":"extract_feat","repo":"chuhac/ATM-RAG","repo_kind":"official","path":"atm_train/attacker_build_data/fab_merge.py","file_url":"https://github.com/chuhac/ATM-RAG/blob/HEAD/atm_train/attacker_build_data/fab_merge.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":"7f301966b623a001"}},{"code_sha256_prefix":"6160179f5bd871ff","entry":"format_split","repo":"chuhac/ATM-RAG","repo_kind":"official","path":"atm_train/attacker_build_data/fab_merge.py","file_url":"https://github.com/chuhac/ATM-RAG/blob/HEAD/atm_train/attacker_build_data/fab_merge.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":"6160179f5bd871ff"}},{"code_sha256_prefix":"d8e3a84ceeffb458","entry":"get_minmax","repo":"chuhac/ATM-RAG","repo_kind":"official","path":"atm_train/attacker_dpo/build_compare_dpo_data.py","file_url":"https://github.com/chuhac/ATM-RAG/blob/HEAD/atm_train/attacker_dpo/build_compare_dpo_data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d8e3a84ceeffb458"}},{"code_sha256_prefix":"fa484907e7a9d47d","entry":"post_replace","repo":"chuhac/ATM-RAG","repo_kind":"official","path":"atm_train/attacker_build_data/fab_merge.py","file_url":"https://github.com/chuhac/ATM-RAG/blob/HEAD/atm_train/attacker_build_data/fab_merge.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fa484907e7a9d47d"}},{"code_sha256_prefix":"d669eabd24581a7c","entry":"tokenize_row","repo":"chuhac/ATM-RAG","repo_kind":"official","path":"atm_train/attacker_dpo/dpo_utils.py","file_url":"https://github.com/chuhac/ATM-RAG/blob/HEAD/atm_train/attacker_dpo/dpo_utils.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":"d669eabd24581a7c"}},{"code_sha256_prefix":"3df45990990f233a","entry":"get_prompt","repo":"chuhac/ATM-RAG","repo_kind":"official","path":"atm_train/attacker_build_data/prompting_for_rag.py","file_url":"https://github.com/chuhac/ATM-RAG/blob/HEAD/atm_train/attacker_build_data/prompting_for_rag.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":"3df45990990f233a"}},{"code_sha256_prefix":"8c73808563540e74","entry":"get_prompt_template","repo":"chuhac/ATM-RAG","repo_kind":"official","path":"atm_train/attacker_build_data/prompting_for_rag.py","file_url":"https://github.com/chuhac/ATM-RAG/blob/HEAD/atm_train/attacker_build_data/prompting_for_rag.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":"8c73808563540e74"}},{"code_sha256_prefix":"52fc805b3f39c687","entry":"process_data","repo":"chuhac/ATM-RAG","repo_kind":"official","path":"atm_train/generator_sft/generator_sft_data_prepare.py","file_url":"https://github.com/chuhac/ATM-RAG/blob/HEAD/atm_train/generator_sft/generator_sft_data_prepare.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":"52fc805b3f39c687"}},{"code_sha256_prefix":"758b28b1b0e93e94","entry":"process_str_to_input_ids","repo":"chuhac/ATM-RAG","repo_kind":"official","path":"atm_train/generator_sft/generator_sft_data_prepare.py","file_url":"https://github.com/chuhac/ATM-RAG/blob/HEAD/atm_train/generator_sft/generator_sft_data_prepare.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":"758b28b1b0e93e94"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}