SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.20978 · ACL · 2024

Enhancing Noise Robustness of Retrieval-Augmented Language Models with Adaptive Adversarial Training

Xiaojun Chen, Min Yang, Ruifeng Xu, Shiwen Ni, Yuelin Bai, Feiteng Fang

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 9 functions out of this paper's own repositories and ran 9 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
calubkk/RAAT canonical 9 of 9
FunctionStatusWhere it lives
exact_match_score Ran calubkk/RAAT/tuner/metrics/em_f1.py
pointer only (licence: NONE) · get_code("0e88ab2d4fdaca3c")
extract_answer Ran calubkk/RAAT/tuner/utils/answer_processor.py
pointer only (licence: NONE) · get_code("fa90936b1f466162")
f1_score Ran calubkk/RAAT/tuner/metrics/em_f1.py
pointer only (licence: NONE) · get_code("a38180bf25a2409b")
generate_answer_wo_retrieval Ran calubkk/RAAT/tuner/utils/answer_processor.py
pointer only (licence: NONE) · get_code("971d489a6cc144e2")
load_data Ran calubkk/RAAT/tuner/utils/loader.py
pointer only (licence: NONE) · get_code("a774a791d4dee82a")
normalize_answer Ran calubkk/RAAT/tuner/metrics/em_f1.py
pointer only (licence: NONE) · get_code("5bfb8eaceb8fc0c1")
rerank_ctx Ran calubkk/RAAT/tuner/utils/select_retrieve.py
pointer only (licence: NONE) · get_code("ce5b6f1069f30c8c")
rerank_two_ctx Ran calubkk/RAAT/tuner/utils/select_retrieve.py
pointer only (licence: NONE) · get_code("30ba762e411ca569")
schedule_ctx Ran calubkk/RAAT/tuner/utils/select_retrieve.py
pointer only (licence: NONE) · get_code("24854ea4182bf3fc")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large Language Models (LLMs) exhibit substantial capabilities yet encounter challenges, including hallucination, outdated knowledge, and untraceable reasoning processes. Retrievalaugmented generation (RAG) has emerged as a promising solution, integrating knowledge from external databases to mitigate these challenges. However, inappropriate retrieved passages can potentially hinder the LLMs' capacity to generate comprehensive and high-quality responses. Prior RAG studies on the robustness of retrieval noises often confine themselves to a limited set of noise types, deviating from realworld retrieval environments and limiting practical applicability. In this study, we initially investigate retrieval noises and categorize them into three distinct types, reflecting real-world environments. We analyze the impact of these various retrieval noises on the robustness of LLMs. Subsequently, we propose a novel RAG approach known as Retrieval-augmented Adaptive Adversarial Training (RAAT). RAAT leverages adaptive adversarial training to dynamically adjust the model's training process in response to retrieval noises. Concurrently, it employs multi-task learning to ensure the model's capacity to internally recognize noisy contexts. Extensive experiments demonstrate that the LLaMA-2 7B model trained using RAAT exhibits significant improvements in F1 and EM scores under diverse noise conditions. For reproducibility, we release our code and data at: https://github.com/calubkk/RAAT.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2405.20978")
get_code_for_paper("2405.20978")
have("2405.20978")

Connect an agent — have() is free.