SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.05162 · EMNLP · 2024

Deciphering the Interplay of Parametric and Non-parametric Memory in Retrieval-augmented Language Models

Richard Johansson, Mehrdad Farahani

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 17 functions out of this paper's own repositories and ran 14 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
m3hrdadfi/rag-memory-interplay canonical 14 of 17
FunctionStatusWhere it lives
all_gather Ran m3hrdadfi/rag-memory-interplay/src/atlas/dist_utils.py
pointer only (licence: NONE) · get_code("59ea1420911ddd97")
deserialize_listdocs Ran m3hrdadfi/rag-memory-interplay/src/atlas/index.py
pointer only (licence: NONE) · get_code("a47d716bd6cdafab")
dict_to_args_list Ran m3hrdadfi/rag-memory-interplay/src/utils.py
pointer only (licence: NONE) · get_code("fbd05734c3267af1")
em Ran m3hrdadfi/rag-memory-interplay/src/atlas/evaluation.py
pointer only (licence: NONE) · get_code("38c3b1ee62b65838")
encode_passages Ran m3hrdadfi/rag-memory-interplay/src/atlas/atlas.py
pointer only (licence: NONE) · get_code("e4a21bc7a716330c")
f1 Ran m3hrdadfi/rag-memory-interplay/src/atlas/evaluation.py
pointer only (licence: NONE) · get_code("5e2f0b798a3d70d2")
gather_wgrad Ran m3hrdadfi/rag-memory-interplay/src/atlas/dist_utils.py
pointer only (licence: NONE) · get_code("094781db771538f0")
isfloat Ran m3hrdadfi/rag-memory-interplay/src/causal_trace.py
pointer only (licence: NONE) · get_code("bb1041c0bde2033c")
normalize_answer Ran m3hrdadfi/rag-memory-interplay/src/atlas/evaluation.py
pointer only (licence: NONE) · get_code("6205dd62c2627dde")
parse_attributes Ran m3hrdadfi/rag-memory-interplay/src/causal_trace.py
pointer only (licence: NONE) · get_code("c268b2c0da209fa9")
read_json_file Ran m3hrdadfi/rag-memory-interplay/src/utils.py
pointer only (licence: NONE) · get_code("07609cc6c26d3a72")
select_crossattention_scores Ran m3hrdadfi/rag-memory-interplay/src/atlas/atlas.py
pointer only (licence: NONE) · get_code("c4bca944bda65eb2")
serialize_listdocs Ran m3hrdadfi/rag-memory-interplay/src/atlas/index.py
pointer only (licence: NONE) · get_code("55955fc3f98f2a29")
varsize_all_gather Ran m3hrdadfi/rag-memory-interplay/src/atlas/dist_utils.py
pointer only (licence: NONE) · get_code("fc996bc980b83cab")
cross_attention_forward Not yet run m3hrdadfi/rag-memory-interplay/src/atlas/fid.py
pointer only (licence: NONE) · get_code("a94b66d049f10dc8")
load_or_initialize_index Not yet run m3hrdadfi/rag-memory-interplay/src/atlas/index_io.py
pointer only (licence: NONE) · get_code("4f77c9ee1641e1ec")
load_passages Not yet run m3hrdadfi/rag-memory-interplay/src/atlas/index_io.py
pointer only (licence: NONE) · get_code("af330ecdce90bbd8")

Repositories linked to this paper

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

Abstract

Generative language models often struggle with specialized or less-discussed knowledge. A potential solution is found in Retrieval-Augmented Generation (RAG) models which act like retrieving information before generating responses. In this study, we explore how the ATLAS approach, a RAG model, decides between what it already knows (parametric) and what it retrieves (non-parametric). We use causal mediation analysis and controlled experiments to examine how internal representations influence information processing. Our findings disentangle the effects of parametric knowledge and the retrieved context. They indicate that in cases where the model can choose between both types of information (parametric and nonparametric), it relies more on the context than the parametric knowledge. Furthermore, the analysis investigates the computations involved in how the model uses the information from the context. We find that multiple mechanisms are active within the model and can be detected with mediation analysis: first, the decision of whether the context is relevant, and second, how the encoder computes output representations to support copying when relevant. 1

For agents

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

get_harvested_code_for_paper("2410.05162")
get_code_for_paper("2410.05162")
have("2410.05162")

Connect an agent — have() is free.