How Do Multilingual Language Models Remember Facts? (2025)

Abstract: Large Language Models (LLMs) store and retrieve vast amounts of factual knowledge acquired during pre-training. Prior research has localized and identified mechanisms behind knowledge recall; however, it has only focused on English monolingual models. The question of how these mechanisms generalize to non-English languages and multilingual LLMs remains unexplored. In this paper, we address this gap by conducting a comprehensive analysis of three multilingual LLMs. First, we show that previously identified recall mechanisms in English largely apply to multilingual contexts, with nuances based on language and architecture. Next, through patching intermediate representations, we localize the role of language during recall, finding that subject enrichment is language-independent, while object extraction is language-dependent. Additionally, we discover that the last token representation acts as a Function Vector (FV), encoding both the language of the query and the content to be extracted from the subject. Furthermore, in decoder-only LLMs, FVs compose these two pieces of information in two separate stages. These insights reveal unique mechanisms in multilingual LLMs for recalling information, highlighting the need for new methodologies—such as knowledge evaluation, fact editing, and knowledge acquisition—that are specifically tailored for multilingual LLMs.

## introduction large language models (llms) learn extensive factual knowledge during pre-training, including propositional facts like "the capital of france is __" @xcite . while multilingual models also acquire such knowledge, their performance varies significantly across languages @xcite in propositional factual statements, e.g. "paris is the capital of", the last token representation contains the function that solves the task. this function is formed in two stages: first, the relation to extract is encoded (green), and then the language is composed into the function (purple). finally, the function is applied to the subject, and the predicted object is resolved (blue). mechanistic interpretability research has begun uncovering how models store and retrieve knowledge internally, with recent studies identifying specific components for knowledge storage @xcite and retrieval mechanisms @xcite . however, they have focused exclusively on english llms, mainly autoregressive ones. 2 encoder-decoder architectures, which could enable better cross-lingual representations @xcite , remain underexplored. additionally, recent studies have shown that llms share circuits across languages for specific tasks @xcite , but these are limited to syntactic tasks and do not address how concepts are represented or recalled cross-lingually. while @xcite examined how disentangled language is from concepts using a translation task, here we analyze fact recall, which allows us to offer broader insights into how language is encoded. in this paper, we study the mechanisms of factual recall in multilingual llms, focusing on two architectures: decoder-only (xglm and eurollm) and @xcite . we analyze a simple form of information extraction, where the input contains a subject and a relation, and the model predicts the corresponding object (e.g. "paris" in the earlier example). our analysis centers on three key questions: (1) does the localization of factual knowledge in english llms extend to multilingual llms? (2) are the factual recall mechanisms found for english llms also present in multilingual llms? (3) when does language play a role in the recall mechanism? to address the first question, we use causal tracing analysis to assess if early mlp modules processing the final subject token are as decisive in multilingual models as in english-centric ones @xcite . our results ( §4) show that eurollm and mt5 exhibit strong causal effects for the last subject token-eurollm in earlier layers, and mt5 across all encoder layers. additionally, in all models, both mlps and mhsas in later layers play a decisive role in recovering factual information-unlike in @xcite , where only mhsas were active at the late site. next, we investigate the second question by analyzing the three-step process described by @xcite : the relation information flows to the final token, followed by subject information, and finally, the attention layers extract the object ( §5). we find that in multilingual llms, subject information flows similarly to monolingual ones, but nonsubject token flow differs, and this analysis alone cannot determine the path of relation information. regarding the final extraction, both feed-forward and attention sublayers contribute in decoder-only llms-unlike in english autoregressive llms, where attention modules dominate. in mt5, this mechanism is primarily handled by cross-attention. overall, our findings indicate that some of the localization ( §4) and mechanisms ( §5) of fact retrieval in english llms generalize to multilingual llms, but with key variations. finally, to address the third question, we investigate where language plays a role within the threestep process, to characterize how and where factual knowledge cross-lingual transfer may occur. using activation patching @xcite we insert the intermediate representation of the last token from an english forward pass into the forward pass of another language ( §6). our results reveal that the last token acts as a function vector (fv) @xcite , encoding both the relation and the output language, which is then applied to the subject in the context. crucially, the fact that the fv formed in one language can be used with an input in another language demonstrates that the subject and relation representations are largely language-independent, while the extraction event is language-specific. furthermore, in decoder-only llms, the fv is constructed in two distinct phases: first, it encodes only the relation, and later, the language is incorporated (figure 1 ). these findings advance our understanding of factual recall, with implications for cross-lingual knowledge transfer, knowledge editing, and trustworthiness in multilingual llms. our results on language flow open new avenues for studying whether models 'think' in english @xcite , by examining how the fv is altered across languages. additionally, the late-site causal effect of mlps and their dominance in the extraction phase suggest that fact editing techniques and knowledge evaluations must extend beyond early mlps and attention layers @xcite . ## related work factual knowledge recall @xcite analyzed factual knowledge in pre-trained language models using the lama dataset, which pairs clozetest templates with wikidata triplets. 3 this was extended to multilingual settings by translating lama @xcite . @xcite evaluated the consistency of such knowledge by manually curating paraphrases of lama to create pararel. further work examined factual consistency cross-lingually @xcite , using machine-translated pararel templates and wikidata-based subject/object translations to produce mpararel. ## experimental setup we focus on a simple form of factual knowledge recall, where lms are tasked with predicting the correct object o for a given subject s and a relation r. these (s, r, o) triplets are obtained from wikidata, and natural language templates are used to describe the relation, with placeholders for the subject and object. 4 for our analysis, we select 10 typologically diverse languages representing various scripts, families, and word orders: english (en), spanish (es), vietnamese (vi), turkish (tr), russian (ru), ukrainian (uk), japanese (ja), korean (ko), hebrew (he), persian (fa), and arabic (ar). see ## causal tracing we first analyze which hidden states in the model's computation are more important than others when recalling a fact. following @xcite , we trace the causal effects of hidden states using causal mediation analysis @xcite . let p(o) be the probability of the predicted object token, and ls(o) its logit score. we corrupt the input by adding gaussian noise to the subject tokens, 7 and observe the corrupted probability p(o) of the originally predicted token. then, we run inference again on the corrupted input, but this time, we restore a specific hidden state in the model and track the probability prestored (o). we study the indirect effect of such component as ie @xmath0, or if using logits ie @xmath1. specifically, we restore a state by setting hl t ← h l t , where h l t is the hidden state from the clean run and hl t that of the corrupted run; and similarly, we restore the self-attention layers contribution by setting sl ← s l for all the attention modules in a window of size w (analogous for c and f ). 8 we restore windows of 12% consecutive layers, so @xmath2, @xmath3, and @xmath4. 7 we follow @xcite and add ϵ ∼ n (0, (3σ) 2 ), with σ being the standard deviation of the subjects tokens embeddings from the data used. we repeat the experiment ten times with different noise samples, and report the average. 8 we use windows because, generally, the contributions of the sub-layers are gradual @xcite . in other words, multiple layers contribute the same behavior to the residual, and their sum produces the observed effect. we compare our results in multilingual llms to those of @xcite , who analyzed the factual recall of gpt-2 xl in english and reached two key conclusions: (1) they identified an "early site", where the mlps processing the last subject token in the early and middle layers play a crucial role in recovering from input corruption; and (2), they found a "late site", where the attention modules processing the last token in the later layers also significantly contribute to prediction recovery. 9 we present the average causal analysis results in figure 2 (results per language in appendix b). 10 our results indicate that the early site in mlpscentered on the last subject token-is also present in multilingual llms. we observe this causal effect in both eurollm and mt5. in mt5, the first subject token also shows causal relevance, though marginally less so, and the early site spans all encoder layers. across languages, the patterns are highly consistent. interestingly, we do not observe an mlp early site in xglm, either for english or in the mhsas. as for the late site, we find a strong causal effect in both mlp and mhsa layers just before the final layers in all models. the position of the late site is consistent across languages, with only slight variation in its endpoint for eurollm. these findings suggest that some conclusions 9 while they consider the late site unsurprising, as it directly precedes the final prediction, this observation primarily applies to hidden state restoration, not necessarily attention restoration. we, however, interpret the late-site attention as aligning with what geva et al. (2023) referred to as the extraction event ( §5). 10 in line with @xcite we find that analyzing the ie p overestimates the causal effect of some tokens over others. for example, in eurollm the last subject token mhsa seem more relevant than the last token mlps (see figure 17 vs figure 15 ). so we base our main observations using iels. from english llms generalize to multilingual ones, but not all. the early mlp site is consistent across models, while at the late site, both mlps and mhsa are important in multilingual llms-unlike in english llms, where mhsa dominates. this has implications for knowledge localization and fact editing, which should consider both early and late mlps in multilingual contexts. 5 factual recall components geva et al. (2023) described the process of factual knowledge recall in english autoregressive models as a three-step mechanism: (a) the subject representation is enriched (i.e., related attributes are encoded); (b) the relation and subject information are propagated to the last token; and (c) the final predicted attribute is extracted by attention layers. we analyze the information flow to the last token, and then the extraction of the predicted attribute. information flow we use attention knockout @xcite to analyze how information propagates to the final token. this method involves intervening in the attention mechanism: for xglm and eurollm, we modify the last token's self-attention, while for mt5, we intervene in the decoder's cross-attention for the final token. we knock out attention connections by setting the attention scores to zero between the final token and a token set {t}, which can be: subject tokens, non-subject tokens, or the last token itself. follow-ing geva et al. ( 2023 ) we apply this intervention across consecutive layers within a window of size w centered on layer l, covering 18% of the total layers (@xmath5, @xmath6, and @xmath7. the relative probability change is given by ( p(o) -p(o))/p(o), where p(o) is the probability of the originally predicted token o after attention knockout .a significant drop indicates that the knocked-out tokens contribute critically to the final token's prediction at that layer. in figure 3 we present average results, plots per language can be found in appendix c. the results show that in each model the information flows fairly similarly for all the languages, and somewhat similar patterns to those in english gpt2-xl. on the one hand, the subject information flows to the last token most critically at the later layers in all models. on the other hand, the non-subject tokens information flows throughout all the layers, with eurollm and mt5 having more similar curves. nevertheless, we note two differences from the conclusions reached with english gpt @xcite : (1) the propagation of non-subject tokens to the last token does not strictly precedes the subject propagation, in xglm the drop is the highest in the earlier layers but it continues to be important until the end, and in mt5 and eurollm this information has two peaks, in the early and later layers; and (2) the last token of mt5 encodes critical information that flows from one layer to the next through the cross-attention (as opposed to the negligible flow of the last token in decoder-only models). 11 prediction extraction following geva et al. (2023), we measure extraction events at each layer. let h l be the representation of the last token at layer l, and let e be the embedding matrix; the predicted token is @xmath8. an extraction event occurs at layer l if arg max(es l ) = o (similarly for c l and f l ). the extraction rate is the proportion of examples for which an extraction event occurs at a given layer. our results demonstrate that extraction events can be detected in multilingual llms (figure 4 ), though rates vary across languages (appendix d). 12 a key finding is the prominence of mlp modules in object extraction for multilingual decoder-only models (xglm and eurollm). to rule out the possibility that mlps simply forward extracted objects from preceding attention layers, we measure how often mlps perform an extraction without prior attention extraction (figure 30 ). we find that mlps indeed perform the extraction for most languages, though in english, attention modules dominate, aligning with gpt2-xl results. in mt5, cross-attention layers drive the extraction, with mlps playing a secondary role, resembling gpt's behavior. additionally, in mt5 the extraction events occur in later layers, with peaks in 19 and 22. 11 we hypothesize this may occur because the last token encodes which sentinel token is being generated, indicating where to fill in the input. since we see an almost identical curve when the last token cannot attend to the sentinel token in the decoder (figure 26 ). 12 this variance may result from the strict criteria applied during the extraction event analyses, where only top-1 matches were considered. the results show that in multilingual llms the extraction mechanism is more complex, involving both attention and mlp modules. this implies that editing techniques should focus not only on early mlps enhancing subject representations but also on the later mlps that extract the object. ## language information flow previous analyses do not provide insights into how the language is included and used during recall. in this section, we use activation patching, similarly to @xcite , to: (1) disentangle when the relation information flows to the last token and when the language information flows, (2) identify which tokens contribute the language information, and (3) interpret the last token representation as a function vector @xcite 13 . let h l t be the representation at layer l of the last token in the input. for a given input p, we take h l t,p and patch it into the forward pass of another input c at the same layer; that is, we set h l t,c ← h l t,p , and then continue the forward pass. we refer to the example p as the patch example, and c as the context example ( figure 5 ). by patching the last token representation in each layer and observing the model's predicted output, we can study when the representation contains the information about relation, language, and predicted object, and how cross-lingual these representations are. in all experiments, english is used as the patch language. an input example expresses a relation r and a subject s in language l, which we note (l(r), l(s)). we conduct three experiments where the p and c examples share certain input characteristics: (1) {= l, ̸ = r, ̸ = s}, the language is the same but the relation and subject differ; let the patch input be (l p (r p ), l p (s p )) and the context input be (l c (r c ), l c (s c )). without intervention, the model correctly predicts l p (o rp,sp ) and l c (o rc,sc ) respectively. 14 to analyze patching effects, we examine both output probabilities and predicted tokens. for probabilities, we aggregate across examples by calculating the change relative to the original (unpatched) probability, as in §5. for predicted tokens, we check if they match the patch or context object, or a variant with swapped language or relation (e.g., if l p (o c ) is predicted in the setups (2)-(3)). 15 14 for simplicity, we may refer to the object as lp(op) or lc(oc) when r and s are from the same input. 15 we only consider valid patch-context pairs where or p,sc and or c ,sp exist, and for predicted token analysis, we enforce distinct spellings, e.g. to claim the predicted token is @xmath9, as languages may share spellings (e.g., "asia" in english and spanish). consequently, the number of examples varies across analyses of output probabilities and token predictions. see in terms of predicted tokens, we find acrossthe-board that l p (o c ) is frequently predicted while l c (o p ) is not ( as a result, we interpret the last token representation as containing a function vector (fv), the relation that needs to be extracted and in which language, which is used in the extraction event. the fv can be transferred to contexts in another language, as the fv is constructed from the patch input and is used in the context subject representation to predict l p (o c ). ## conclusion in this paper, we analyzed factual knowledge recall mechanisms in 10 languages using multilingual transformer-based lms, comparing them to recall in english autoregressive llms. we discovered that some mechanisms, such as the flow of subject representations in the later layers and the extraction phase, are present in multilingual and monolingual models. however, we also identified notable differences, including the join role of late mlps and attention modules during the extraction phase in multilingual models. a key contribution of our work is the first-ever investigation of language encoding during recall, achieved through patching representations. in decoder-only models, the relation flows to the last token first, followed by the language. in contrast, in mt5, both relation and language flow to the last token at similar layers. this suggests that while relation and subject representations are multilingual and enable cross-lingual object extraction, the extraction phase itself is language-specific, as language encoding precedes extraction. these findings provide new evidence to understand the factual knowledge recall in transformer lms, and to how decoder-only lms resolve tasks in stages. contributing with new directions for the study of cross-lingual transfer and knowledge localization.