Papers › Deciphering the Interplay of Parametric and Non-parametric Memory in...

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

7 Oct 2024arXiv:2410.05162archive 2025-07-28

Mehrdad Farahani, Richard Johansson

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 \textsc{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 non-parametric), it relies more on the context than the parametric knowledge. Furthermore, the analysis investigates the computations involved in \emph{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 \emph{whether the context is relevant}, and second, how the encoder computes output representations to support copying when relevant.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.05162")

Code

Syntology Ran 14 of 17 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 12 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 14 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

m3hrdadfi/rag-memory-interplay officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 14 ran; 1 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
12ran
3unverified

Licence: 17 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from m3hrdadfi/rag-memory-interplay. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

all_gather m3hrdadfi/rag-memory-interplay/src/atlas/dist_utils.py official repository ran fingerprinted no licence file found · pointer only · 59ea1420911ddd97 · report
deserialize_listdocs m3hrdadfi/rag-memory-interplay/src/atlas/index.py official repository ran no licence file found · pointer only · a47d716bd6cdafab · report
dict_to_args_list m3hrdadfi/rag-memory-interplay/src/utils.py official repository ran no licence file found · pointer only · fbd05734c3267af1 · report
em m3hrdadfi/rag-memory-interplay/src/atlas/evaluation.py official repository ran no licence file found · pointer only · 38c3b1ee62b65838 · report
encode_passages m3hrdadfi/rag-memory-interplay/src/atlas/atlas.py official repository ran · our draft was wrong no licence file found · pointer only · e4a21bc7a716330c · report
f1 m3hrdadfi/rag-memory-interplay/src/atlas/evaluation.py official repository ran no licence file found · pointer only · 5e2f0b798a3d70d2 · report
gather_wgrad m3hrdadfi/rag-memory-interplay/src/atlas/dist_utils.py official repository ran fingerprinted no licence file found · pointer only · 094781db771538f0 · report
isfloat m3hrdadfi/rag-memory-interplay/src/causal_trace.py official repository ran no licence file found · pointer only · bb1041c0bde2033c · report
normalize_answer m3hrdadfi/rag-memory-interplay/src/atlas/evaluation.py official repository ran fingerprinted no licence file found · pointer only · 6205dd62c2627dde · report
parse_attributes m3hrdadfi/rag-memory-interplay/src/causal_trace.py official repository ran fingerprinted no licence file found · pointer only · c268b2c0da209fa9 · report
read_json_file m3hrdadfi/rag-memory-interplay/src/utils.py official repository ran no licence file found · pointer only · 07609cc6c26d3a72 · report
select_crossattention_scores m3hrdadfi/rag-memory-interplay/src/atlas/atlas.py official repository ran · honoured contract no licence file found · pointer only · c4bca944bda65eb2 · report
serialize_listdocs m3hrdadfi/rag-memory-interplay/src/atlas/index.py official repository ran no licence file found · pointer only · 55955fc3f98f2a29 · report
varsize_all_gather m3hrdadfi/rag-memory-interplay/src/atlas/dist_utils.py official repository ran fingerprinted no licence file found · pointer only · fc996bc980b83cab · report
cross_attention_forward m3hrdadfi/rag-memory-interplay/src/atlas/fid.py official repository unverified no licence file found · pointer only · a94b66d049f10dc8 · report
load_or_initialize_index m3hrdadfi/rag-memory-interplay/src/atlas/index_io.py official repository unverified no licence file found · pointer only · 4f77c9ee1641e1ec · report
load_passages m3hrdadfi/rag-memory-interplay/src/atlas/index_io.py official repository unverified no licence file found · pointer only · af330ecdce90bbd8 · report

Tasks

RAGRetrievalRetrieval-augmented Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBARTBERTBPEDense ConnectionsDropoutLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionRAGResidual ConnectionSoftmaxWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections