betaFeedback

WorksComputer Science

Internalized Experience: How Training Data Shapes Memory Formation in LLMs

Abstract

Parametric memory enables large language models (LLMs) to retain information from past experience and reuse it in subsequent tasks. Yet how training data supports the internalization of reusable task rules remains unclear. We introduce FSMem (Finite-State Machine Memory), a state-transition framework for constructing training data and studying how data content and organization shape memory formation. We evaluate rule reuse across synthetic worlds, classical planning, and code execution through valid-action identification and execution-outcome prediction, complemented by next-operation prediction in code. Our experiments reveal several systematic learning patterns. Under matched training conditions, even unchanged task rules become harder to internalize when learned alongside a larger variety of action types; by contrast, scaling the training data to provide broader state-action coverage generally improves rule learning. We further find that training at a single execution depth produces depth-specialized behavior, with models performing best when training and test executions have similar lengths. Motivated by this finding, we construct cumulative corpora that combine short and long trajectories, which can outperform long-trajectory-only training while using fewer training tokens. Together, these results demonstrate that the same task rules can be internalized differently depending on how execution experience is constructed, and that understanding these learning patterns can guide the design of more effective training data for parametric memory.

Introduction

Large language models (LLMs) are expected to build on past experience when facing new tasks and contexts. Memory supports this reuse by preserving information beyond the context in which it was acquired [42]. Existing approaches realize this capacity mainly through text-based memory, which stores information externally for later retrieval [26, 48, 29], or parametric memory, which incorporates information into model parameters through updates (Roberts et al., 2020; Meng et al., 2022a;b; Back et al., 2026). In this work, we focus on parametric memory given its potential to turn past experience into lasting improvements in model capabilities.

Existing research on LLMs’ parametric memory focuses on mechanisms for encoding useful information into model parameters [13, 32, 10] or dedicated parametric modules for later use [24, 41, 7, 43]. These studies have advanced our understanding of memory capacity [2, 44], the internalization of factual information [35, 1, 9], and reasoning over learned information [3, 40, 5]. What models internalize also depends on the training data itself [39, 47]. For example, planning trajectories (Kok et al., 2025) and program execution traces [33] have been used to study how LLMs reason about task execution. These records contain information about particular entities and their states, as illustrated in Figure 1(a). However, existing work has overlooked the fact that execution trajectories involving different entities could follow the same task rules: when an action is valid and how it changes the state, and apply across different entities and states. They are reusable across instances of a given task [16, 18, 46]. How the task content and organization of these records facilitate the internalization of such reusable rules remains less well understood.

Figure 1. An illustration of FSMem in Blocksworld. (a) Recalling facts about specific entities. (b) Constructing training data from execution trajectories. (c) Identifying valid actions and predicting execution outcomes on held-out instances, without access to training records.

Studying the internalization of task rules requires distinguishing which rules training data contains from how their executions are recorded. In this work, we introduce FSMem (Finite-State Machine Memory), a framework that makes this distinction explicitly by representing task execution as a finite-state machine (§ 2). For the Blocksworld example in Figure 1(b), states describe the configuration of blocks and the gripper’s status, while concrete actions manipulate particular blocks. The transition function specifies whether an action is valid and, if so, the resulting state; trajectories record sequences of concrete actions and states. This representation allows us to vary the action types selected for supervision and, with the rules fixed, the state–action coverage and depth of execution records.

Consistent with our understanding of parametric memory, past experience should induce lasting changes in model parameters that influence subsequent behavior [13, 10]. Compared with existing work centered on task-level results [10, 5], FSMem characterizes this influence through two complementary behaviors: identifying valid actions and predicting execution outcomes, as illustrated in Figure 1(c). These behaviors reflect the two aspects of task rules encoded by the transition function: when an action can be executed and how execution changes the state. They therefore connect the experience represented in training data to the subsequent behavior that rule internalization should support.

We instantiate FSMem in synthetic worlds, classical planning, and code execution (§ 3), and study how training-data content and organization shape parametric memory. Our study of action complexity shows that, under matched training conditions, task rules can become harder to internalize when learned alongside more action types (§ 4). Expanding trajectory breadth generally supports more effective rule reuse without increasing the number of training steps (§ 5). Our study of depth reveals depth-specialized behavior under single-depth training: models tend to perform better at execution depths represented in training. Based on this observation, training on a cumulative corpus of short and long trajectories can outperform long-only one with fewer tokens (§ 6).

Method

Our goal is to understand how training-data content and organization affect memory formation in LLMs. To this end, we introduce FSMem, a state-transition framework for constructing training data. We first formalize task rules and execution trajectories and define action complexity, trajectory breadth, and depth (§ 2.1). Building on this formulation, we describe how to construct supervised training examples from execution records (§ 2.2).

A Finite-State Machine Framework

To study how training data supports the learning of reusable execution rules, we need to specify both the rules underlying the data and the particular executions recorded. We use a finite-state machine to make this execution process explicit: its transition function specifies action validity and state changes, while its trajectories provide records for constructing training examples. This representation allows us to vary the action types selected for supervision or, with the rules fixed, change the state–action coverage and depth of execution records.

Finite-State Worlds To construct execution records under specified rules, we model each task instance as a deterministic finite-state machine, with configurations as states and concrete actions as inputs. The task world is specified by

Ω=(E,A,S,F),(1)\Omega= (\mathcal{E}, \mathcal{A}, \mathcal{S}, F), \tag*{(1)}

where E\mathcal{E} is a finite set of typed entities, A\mathcal{A} contains the action types under study, S\mathcal{S} is the finite state space, and FF is the transition function.

A state ss assigns values to state variables describing entity attributes and relations. Let V\mathcal{V} denote a finite set of these variables, each with a finite value domain DvD_v. The state space consists of admissible configurations:

S⊆∏v∈VDv,s=(sv)v∈V.(2)\mathcal{S} \subseteq\prod_{v \in\mathcal{V}} D_v, \qquad s = (s_v)_{v \in\mathcal{V}}. \tag*{(2)}

Actions and Transitions The action set A\mathcal{A} specifies which operation types are represented in the training data. Instantiating these types with entity arguments yields concrete actions, whose validity and execution outcomes are determined by FF. This separation of action validity and state changes follows classical planning representations [16, 18].

Definition 1 (Action Complexity). Let A={a1,a2,…,aA}\mathcal{A} = \{a_1, a_2, \ldots, a_A\} be the set of distinct action identifiers represented in the corpus. The action complexity is A=∣A∣A = |\mathcal{A}|.

In our framework, each action type provides a template for concrete actions that serve as inputs to the finite-state machine. Instantiating the same type with different entity arguments does not increase action complexity.

Definition 2 (Concrete Action). A concrete action ai(x)a_i(\mathbf{x}) is obtained by instantiating an action aia_i with a type-compatible tuple of entities x\mathbf{x} from E\mathcal{E}. Here ai∈Aa_i \in\mathcal{A}, 1≤i≤A1 \leq i \leq A.

Reusing task rules requires knowing when a concrete action can trigger a valid state transition. We express the requirements for such transitions as execution conditions.

Definition 3 (Execution Condition). An execution condition p(x)p(\mathbf{x}) is a Boolean expression involving state variables and entity arguments x\mathbf{x}. Its value in state s=(sv)v∈Vs = (s_v)_{v \in\mathcal{V}} is

p(s,x)=p(x)∣v=sv, v∈V∈{0,1}.(3)p(s,\mathbf{x}) = p(\mathbf{x})\big|_{v=s_v,\ v\in\mathcal{V}} \in\{0,1\}. \tag*{(3)}

Definition 4 (Valid Action). Let Pi\mathcal{P}_i be the execution conditions for action type aia_i, and define

gi(s,x)=⋀p∈Pip(s,x).(4)g_i(s,\mathbf{x}) = \bigwedge_{p \in\mathcal{P}_i} p(s,\mathbf{x}). \tag*{(4)}

A concrete action ai(x)a_i(\mathbf{x}) is valid in state ss if and only if gi(s,x)=1g_i(s,\mathbf{x}) = 1.

Identifying valid actions means determining whether a transition is permitted. Reusing task rules also requires predicting the state reached after executing a valid action.

Definition 5 (Execution Outcomes). The execution outcome of a valid action ai(x)a_i(\mathbf{x}) in state ss is the resulting state s′s' after executing that action.

Consistent with our view of parametric memory, past experience should induce lasting changes in model parameters that influence subsequent behavior. Here, the rules to be internalized govern action validity and state changes, jointly represented by the transition function FF.

Definition 6 (Transition Function). The transition function FF encodes task rules by mapping each concrete action and current state to execution outcomes:

F(s,ai(x))={s′,gi(s,x)=1,⊥,gi(s,x)=0,(5)F(s,a_i(\mathbf{x})) = \begin{cases} s', & g_i(s,\mathbf{x}) = 1,\\ \bot, & g_i(s,\mathbf{x}) = 0, \end{cases} \tag*{(5)}

Here, s′∈Ss' \in S is the execution outcome and ⊥\bot denotes an invalid transition.

Execution Trajectories In a finite-state machine, a sequence of valid actions produces a trajectory of states. We record how these actions change entity attributes and relations, and use the resulting execution trajectories to construct training data.

Definition 7 (Execution Trajectory). An execution trajectory of length TξT_{\xi} is a sequence ξ=(s0,u1,s1,…,uTξ,sTξ)\xi= (s_0, u_1, s_1, \ldots, u_{T_{\xi}}, s_{T_{\xi}}), where s0∈Ss_0 \in S and, for 1≤t≤Tξ1 \le t \le T_{\xi}, ut=akt(xt)u_t = a_{k_t}(\mathbf{x}_t) with akt∈Aa_{k_t} \in\mathcal{A}, and st=F(st−1,ut)∈Ss_t = F(s_{t-1}, u_t) \in S.

Training trajectories can follow the same task rules while differing in state–action coverage (breadth) and execution length (depth). These dimensions let us study how the organization of execution records shapes memory formation.

Definition 8 (Trajectory Breadth). Let T\mathcal{T} be a collection of training trajectories. With the action set A\mathcal{A}, transition function FF, and trajectory depth fixed, breadth is the range of state-action pairs represented by these trajectories. For t≥1t \ge1, their coverage at execution step tt is

bt(T)=∣{(st−1(ξ),ut(ξ))∣ξ∈T, Tξ≥t}∣.(6)b_t(\mathcal{T}) = \left|\left\{(s_{t-1}^{(\xi)}, u_t^{(\xi)}) \mid\xi\in\mathcal{T},\ T_{\xi} \ge t\right\}\right|. \tag*{(6)}

We expand breadth by collecting trajectories from additional distinct source examples.

Definition 9 (Trajectory Depth). The depth of an execution trajectory ξ\xi is the number of actions it contains: d(ξ)=Tξd(\xi) = T_{\xi}.

Constructing Training Data from Execution Records

Algorithm 1 Training Corpus Construction

Input: Action set A\mathcal{A}, transition function FF, source examples {zi}i=1N\{z_i\}_{i=1}^{N}, trajectory depths L\mathcal{L}.

Output: Training corpus D={(qj,yj)}j=1M\mathcal{D} = \{(q_j, y_j)\}_{j=1}^{M}.

  1. D←[ ]; M←0\mathcal{D} \leftarrow[\ ];\ M \leftarrow0

  2. for i=1,…,Ni = 1,\ldots,N do

  3.   for each T∈LT \in\mathcal{L} do

  4.     for each ξ∈COLLECT⁡(zi;A,F,T)\xi\in\operatorname{COLLECT}(z_i;\mathcal{A},F,T) do

  5.       for each q∈QUERIES⁡(zi,ξ)q \in\operatorname{QUERIES}(z_i,\xi) do

  6.         M←M+1; qM←qM \leftarrow M+1;\ q_M \leftarrow q

  7.         yM←LABEL⁡(qM,ξ;F)y_M \leftarrow\operatorname{LABEL}(q_M,\xi;F)

  8.         APPEND⁡(D,(qM,yM))\operatorname{APPEND}(\mathcal{D},(q_M,y_M))

  9. return D\mathcal{D}

Algorithm 1 constructs supervised pairs (qj,yj)(q_j, y_j) from source examples ziz_i and selected trajectory depths L\mathcal{L}. After initializing the corpus (Line 1), it iterates over each source and depth (Lines 2–3). COLLECT (Line 4) generates or selects TT-step trajectories using action types from A\mathcal{A}, with transitions satisfying st=F(st−1,ut)≠⊥s_t = F(s_{t-1},u_t) \ne\bot.

For each trajectory, QUERIES (Line 5) constructs prediction inputs from the source example and observed execution information. Each query is indexed (Line 6) and paired with a target computed by LABEL from the execution record and FF (Line 7). The pair is appended to the corpus (Line 8), which is returned in Line 9.

Experimental Setup

This section describes the task instantiations, training and evaluation procedures, and experimental design used to study memory formation with FSMem.

Task instantiations. We instantiate Algorithm 1 in three task families, constructing execution records and deriving training targets from their task rules. (1) Synthetic worlds. We execute valid actions from sampled entity configurations; execution conditions and resulting states provide targets for valid-action identification and state prediction. (2) Classical planning. We construct from problem instances in 13 ACPBench domains [22]. Domain rules determine valid-action targets for query states, specified directly or through an initial state and an action sequence. (3) Code execution. Running Code/I/O programs [27] on concrete inputs yields operation sequences and outputs. Recorded operations supervise next-operation prediction; outputs supervise output prediction from the program and input (Native), optionally augmented with execution order without intermediate values (Explicit trace). Further details are provided in Appendix § 11.

Training and evaluation. We fine-tune Qwen2.5-0.5B-Instruct [36] with LoRA [19], keeping the procedure fixed within each comparison. We assess memory formation through two complementary behaviors: identifying valid actions and predicting execution outcomes on held-out sources without access to training records. In synthetic worlds, we evaluate valid-action selection by order-robust accuracy and state prediction by exact match. In classical planning, we use candidate selection (order-robust accuracy) or complete valid-action-set prediction (exact-set accuracy and action-set F1). In code execution, we evaluate program-output prediction by numeric-equivalence accuracy and, as a complementary test of rule reuse, next-operation selection by order-robust accuracy, using repository-disjoint training and test splits. Order-robust accuracy requires correct answers under every tested candidate ordering. Appendix § 12 reports additional valid-action identification experiments with Qwen2.5-3B-Instruct, Qwen2.5-7B-Instruct, and Qwen3-8B [45] in synthetic worlds and classical planning.

Experimental Design Our experiments aim to investigate three research questions about how training-data content and organization shape memory formation. First, how does action complexity affect the effectiveness of task-rule internalization? Controlled comparisons introduce additional action types while keeping existing actions’ execution conditions and effects unchanged (§ 4). With these rules fixed, the remaining studies focus on trajectory organization. Second, does broader state–action coverage support memory formation more effectively than repeatedly learning from fewer sources? Breadth experiments vary the number of distinct source examples while holding trajectory depth and the number of training steps fixed (§ 5). Third, how does training trajectory depth affect generalization across execution depths, and can short and long trajectories complement each other? Depth experiments compare training at individual depths with training on cumulative corpora containing both shorter and longer trajectories (§ 6).

Action Complexity Affects Memory Formation Effectiveness

We examine how action complexity affects the effectiveness of memory formation. Increasing the number of action types represented in training data expands the range of task rules the model must learn. We assess how effectively models internalize and reuse these rules through two complementary behaviors: identifying valid actions in synthetic worlds and classical planning (§ 4.1), and predicting execution outcomes in synthetic worlds, with an additional test of next-operation prediction in code (§ 4.2).

Identifying Valid Actions

We begin with synthetic worlds instantiated from our state-transition formulation, which allows us to vary action complexity in a controlled setting. In synthetic worlds, we expand nested sets of action types from A=5A=5 to A=20A=20, holding the other world properties fixed within each comparison. Mean order-robust accuracy decreases from 88.1% to 65.1% (Figure 2a) with the same number of training steps and examples processed. These results indicate that increasing action complexity reduces the effectiveness of rule internalization under the same training conditions. We next examine whether this finding could be extended to classical planning tasks.

Figure 2. Valid-action identification as action complexity AA increases. (a) Synthetic order-robust accuracy: light curves show individual settings and the green curve their mean. (b) Exact-set accuracy in 13 planning domains; the gray curve is an exponential fit. (c) Exact-set accuracy as more action types are included in training within each of seven planning domains.

In 13 planning domains, exact-set accuracy is negatively associated with the number of action types appearing in the ground-truth valid-action sets of the training data (Spearman $\rho=-0.819$; Figure 2b). We then progressively expand the set of action types within seven planning domains to examine whether the same decline appears (Figure 2c). Including more action types generally makes valid-action identification harder to learn within each domain.

Predicting Execution Outcomes

Identifying valid actions tests whether a model has learned when an operation can be executed, but does not establish whether it can predict how execution proceeds. We examine next-state prediction in synthetic worlds and, as a complementary test of rule reuse, next-operation prediction in code.

In synthetic worlds, models predict complete next states on the same 200 state-action queries involving five shared action types. Exact accuracy decreases from 98.7% at A=5A = 5 to 47.7% at A=20A = 20 (Figure 3). A similar decline appears in code next-operation prediction. Given a program, its input, and an execution prefix without intermediate values, the model selects the next operation from two candidates. We expand the training action vocabulary from A=5A = 5 to A=20A = 20, keeping the same 800 training programs and evaluating the same 500 test events under both candidate orders. In this single-seed comparison, order-robust accuracy decreases from 92.6% to 79.0% (Figure 3). Even on identical questions about shared rules, models trained on a broader rule set make less reliable execution predictions.

Next-state and next-operation prediction as action complexity increases

Figure 3. Next-state and next-operation prediction as action complexity increases.

Takeaway 4.1 Increasing action complexity impairs valid-action identification and execution-outcome prediction. The same task rules can become harder to internalize when learned alongside a wider range of actions.

Scaling Breadth to Improve Memory Formation

Learning task rules from execution trajectories requires generalizing beyond the particular entities and states recorded during training. To test whether broader state–action coverage supports this generalization, we vary breadth while holding action complexity and trajectory depth fixed (§ 5.1), and assess valid-action identification (§ 5.2) and execution-outcome prediction (§ 5.3).

Varying Breadth

Following Algorithm 1, we collect trajectories T\mathcal{T} from nested sets of NN distinct source examples, with the action set A\mathcal{A}, transition function FF, and trajectory depths fixed. Increasing NN adds trajectories in which the same action types are applied to different entities and states, expanding the state–action coverage bt(T)b_t(\mathcal{T}) at each execution step tt (synthetic counts in Table 5). Within each task family, all conditions use the same number of training steps and effective batch size and share the

Training corpusStep ttN=50N = 50N=200N = 200N=800N = 800N=1600N = 1600
Valid-action identification (depth 4)1501936831,191
249180602982
347149399604
43597192291
Next-state prediction (depth 1)1502008001,600

Table 5. Measured breadth btb_t in synthetic training corpora (A=20A = 20); NN counts distinct sources.

same test set. At this fixed budget, increasing NN spreads example presentations across more distinct sources, with fewer presentations per source. We test how this allocation affects rule reuse.

Trajectory Breadth Supports Valid-Action Identification

In synthetic worlds, increasing NN from 50 to 1,600 raises order-robust accuracy from 39.0% to 61.8%, with most of the gain reached by N=800N = 800 (Figure 4, left): at fixed action complexity, broader state–action coverage helps the model learn the execution conditions of the same actions.

Figure 4. ORAcc: order-robust accuracy (mean ± SD). Planning: gains over NN=50.

In classical planning, 12 of the 13 domains achieve higher exact-set accuracy at N=1,600N = 1,600 than at $N = 50, including gains of 20.1 percentage points on Grid and 18.0 points on Blocksworld (Figure 4, right); gains vary across domains, and ALFWorld remains near zero throughout the sweep. Together with § 4.1, these results identify breadth as a way to address the difficulty of rule internalization without changing action complexity.

Breadth Scaling Enhances Execution-Outcome Prediction

For execution-outcome prediction, synthetic models predict complete next states under the same A=20A=20 rule set, and code models predict outputs on the same 500 repository-disjoint test programs, trained on nested program sets with a fixed mixture of short, medium, and long trajectories (S+M+L; depth ranges defined in § 6.3). Synthetic training uses 667,200 prompt tokens and 48,000 supervised tokens per condition; code token counts are not exactly matched. Synthetic next-state exact-match accuracy rises from 20.83 ± 1.89% at NN=50 to 46.33 ± 3.55% at NN=1,600 (+25.5 points), and program-output accuracy rises from 19.2% to 28.6% in the Native view (+9.4 points) and from 18.0% to 37.0% in the Explicit-trace view (+19.0 points) (Figure 5).

Figure 5. Next-state exact match and numeric-equivalence output accuracy.

Takeaway 5.1 Expanding trajectory breadth generally improves memory formation, providing a way to mitigate the difficulty of rule internalization under higher action complexity.

Benefits of Accumulating Trajectories across Depths

Entity attributes and relations change along a trajectory, but the transition function governing an action does not change with depth, so a model that has learned the rules should reuse them at different trajectory depths. We first test this expectation and find that single-depth training produces depth-specialized behavior (§ 6.1). This motivates accumulating trajectories across depths while retaining shorter ones; we compare the resulting cumulative corpora with long-only training on valid-action identification (§ 6.2) and execution-outcome prediction (§ 6.3).

Single-Depth Training Produces Specialized Behavior

Motivated by known limits of length generalization [4], we train separate models at individual depths and evaluate each across depths in the synthetic, planning, and code task families. Table 1 reports, for selected settings, the matching gain (the difference in mean accuracy between matched and mismatched training–test depths) and ρ\rho (Spearman’s correlation between the binary depth-matching indicator and accuracy); matched-depth training achieves higher accuracy on average in each. Figure 6 shows the synthetic A=5A=5 setting, where the matching gain is 12.2 percentage points and is most pronounced at shallow evaluation depths. Longer training executions thus do not automatically support stronger performance at shorter depths.

TaskSettingGain (pp)ρ\rho
SyntheticA=5A=5+12.20.751
A=20A=20+5.50.408
PlanningFerry+20.10.836
GoldMiner+14.20.825
Satellite+38.20.825
CodeNative+14.80.504
Explicit trace+12.10.275

Table 1. Depth matching in selected settings.

Synthetic depth specialization

Figure 6. Synthetic depth specialization.

Valid-Action Identification across Depths

We test whether retaining shorter trajectories improves valid-action identification as longer trajectories are added. The synthetic corpora cover depths 1, 1+4, 1+4+8, or 1+4+8+16, where “+” denotes depths included together in one corpus, and 16-only training uses the same maximum depth without shorter trajectories. The synthetic and code conditions in Sections 6.2 and 6.3 each use 600 optimizer updates and 9,600 training examples. Order-robust accuracy averaged over evaluation depths rises from 62.1% to 85.7% as depths are added, against 71.2% for 16-only training (Figure 7): a 14.5-point advantage with 29.1% fewer non-padding tokens.

Valid-action identification

Figure 7. Valid-action identification.

At 300 updates and 4,800 presentations, cumulative training raises mean exact-set accuracy from 42.90% to 67.76% across the nine domains shown in Table 2, with 3.79% fewer non-padding training tokens in total. Accuracy improves in all nine domains. Full exact-set results for all 13 domains are in Appendix A.

DepthBWDep.FerryGrip.Sat.GridGMSwapVAAvg.
6-only35.26.450.222.555.336.269.135.975.342.90
231.56.733.79.832.731.137.635.446.829.47
2+462.311.455.824.066.045.277.391.879.357.01
2+4+677.011.867.831.195.947.199.499.780.067.76
Δ\DeltaTok−2.9−3.5−3.4−4.3−4.9−3.2−4.3−2.6−5.6−3.79

Table 2. Planning exact-set accuracy (%) and token use. BW: BlocksWorld; Dep.: Depots; Grip.: Grippers; Sat.: Satellite; GM: GoldMiner; VA: VisitAll. Δ\DeltaTok (%) vs. 6-only.

Execution-Outcome Prediction across Depths

In synthetic worlds with varying action complexity AA, models receive a held-out initial state and an executed action prefix and predict the complete terminal state. As the corpus expands from depth 1 to 1+4+8+16, terminal-state exact-match accuracy averaged over evaluation depths rises from 32.3% to 99.0%, with corresponding non-padding training tokens reported in Table 3.

Training depthsAvg. acc. (%)Tokens (M)
16-only64.46.86
132.33.34
1+491.63.67
1+4+898.34.09
1+4+8+1699.04.78

Table 3. Synthetic Results.

To determine whether this gain comes only from the depth-16 trajectories, we compare the full cumulative corpus with 16-only training at each evaluation depth (Figure 8). The cumulative corpus exceeds 16-only training throughout the tested synthetic settings, 99.0% against 64.4% on average (+34.6 points) with 30.3% fewer non-padding tokens; the gap is concentrated at shorter depths (59.4, 62.2, and 16.5 points at depths 1, 4, and 8) and narrows to +0.3 points at depth 16.

Synthetic accuracy by evaluation depth

Figure 8. Synthetic accuracy by evaluation depth.

For program-output prediction, we construct corpora from the same 800 training programs using short (S: T≤6T \le6), medium (M: 8≤T≤118 \le T \le11), and long (L: T≥14T \ge14) trajectories. We evaluate cumulative corpora S, S+M, and S+M+L on long executions against long-only (L-only) training, shown as dashed baselines in Figure 9. The full cumulative corpus exceeds L-only training by 1.73 percentage points in the Native view and 7.87 points in the Explicit-trace view, using 1.0% and 15.1% fewer non-padding tokens, respectively. The benefit thus extends to organizing execution records across depths within a fixed set of training programs.

Figure 9. Code Execution on long executions.

Takeaway 6.1 Single-depth training produces depth-specialized behavior, while a cumulative corpus of short and long trajectories can outperform long-only training with fewer tokens.

Related Work

Parametric memory in LLMs. Analyses of pretrained Transformers characterize feed-forward layers as key-value memories ([17]) and identify neurons associated with particular facts ([12]). Existing approaches update stored information through targeted parameter changes ([30, 15, 41]), additional trainable parameters ([14, 20]), or dedicated memory modules ([24, 7, 43]). Engram adds conditional memory through sparse lookup ([11]), while consolidation methods transfer short-term memories into long-term parameters through distillation and replay ([6]). Recent LoRA-based studies examine capacity, retention, and reasoning over internalized information ([5, 44]).

Training data and memory formation. Varied presentations of facts ([1]), supervision formats ([5]), and the number and frequency of facts ([47]) influence acquisition and memorization. For document-specific LoRA memory, training on question-answer pairs outperforms next-token prediction on raw documents when answering questions about the encoded content ([28]). Data repetition also affects verbatim memorization ([8, 25]). However, recalling stored information does not ensure its flexible use in downstream reasoning ([3]). Our study concerns execution records of rules shared across entities and states. With fine-tuning fixed, we vary action complexity, trajectory breadth, and depth to study how data construction supports rule internalization, as reflected in identifying valid actions and predicting execution outcomes.

Generalization and transfer. Compositional generalization tests whether models can recombine familiar components in new ways ([23, 21]). Length generalization asks whether learned behavior extends to inputs longer than those seen during training ([4, 49]). Transfer learning studies how knowledge acquired in a source task or domain helps in a target setting ([34, 37]). FSMem studies how the content and organization of execution records shape within-task generalization. We evaluate valid-action identification and execution-outcome prediction on held-out instances governed by the same task rules, with training records absent from the evaluation context. Performance on these instances provides behavioral evidence of rule reuse.

Conclusion

We introduced FSMem, a state-transition framework for studying how training-data content and organization shape parametric memory in LLMs. Our findings show that increasing action complexity can make even shared task rules harder to internalize, while broader state–action coverage supports more effective rule reuse. Single-depth training produces depth-specialized behavior, motivating cumulative corpora of short and long trajectories that can outperform long-only training with fewer tokens. Together, these findings show how training-data construction shapes the internalization of experience into reusable task rules, providing guidance for more effective memory formation under a fixed fine-tuning procedure.

AI USE DISCLOSURE

In this work, we used generative AI tools for generating synthetic datasets through programmatic pipelines, helping develop the conceptual framework, proposing or refining hypotheses, providing feedback on research methodology and experiments, implementing methods, assisting with translation, cleaning and reformatting datasets, and interpreting results. We have not used generative AI tools for formulating mathematical claims, and providing critical ingredients for proving mathematical claims, assisting in the writing of proofs, and supporting qualitative and thematic data analysis are not applicable to this work. Additionally, we used generative AI tools for creating or modifying scientific figures, creating or editing software code, drafting parts of the paper, summarizing and analyzing existing literature, brainstorming, identifying relevant literature, improving manuscript readability, formatting references, suggesting a paper structure, and proposing titles and keywords. We have reviewed all AI-assisted work. Specifically, we checked cited sources, verified reported results against experimental outputs, and reviewed AI-assisted code, text, and figures. We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.

Full Planning Depth Results

Table 4 reports exact-set accuracy for all 13 planning domains. Each score averages evaluation depths 2, 4, and 6 and then seeds 13, 37, and 73. Training on depths 2+4+6 outperforms 6-only training in ten domains, ties in Logistics, and is lower in Rovers and FloorTile, while using fewer non-padding training tokens in every domain. Logistics, FloorTile, and ALFWorld remain near the exact-set floor. Table 2 uses the same exact-set metric and the corresponding non-padding training-token counts for its ten displayed domains. It averages accuracy across domains and computes the aggregate token change from the summed counts.

Table 4: Full planning depth results. Exact-set accuracy (%) averages evaluation depths 2, 4, and 6. CC denotes training on depths 2+4+6; LL denotes 6-only training. Δ\DeltaAcc and Δ\DeltaTok compare CC with LL. Tokens are mean non-padding training tokens in millions.

Domain22+4CCLLΔ\DeltaAcc (pp)CC (M)LL (M)Δ\DeltaTok (%)
Blocksworld31.5062.2877.0035.17+41.831.4241.466−2.9
Depots6.7211.4411.836.39+5.442.9723.080−3.5
Ferry33.7255.7867.7850.17+17.612.3422.424−3.4
FloorTile0.110.060.000.11−0.115.1425.212−1.3
GoldMiner37.5677.2899.4469.06+30.393.9534.132−4.3
Grid31.0645.2247.1136.22+10.893.9114.039−3.2
Grippers9.7824.0031.1122.50+8.612.2392.341−4.3
Logistics1.390.560.670.670.004.2504.412−3.7
Rovers5.065.616.286.61−0.334.6264.765−2.9
Satellite32.6766.0095.8955.33+40.562.5272.656−4.9
Swap35.4491.8399.6735.89+63.783.9174.022−2.6
VisitAll46.7879.2880.0075.33+4.671.9882.106−5.6
ALFWorld0.220.170.060.00+0.0628.42928.772−1.2

Table 4.

Data Construction Details

Synthetic worlds. Valid-action queries provide an initial state, an execution record, and candidate actions; labels are obtained by checking execution conditions in the resulting state. The action-complexity study of next-state prediction instead supplies a complete current state and one valid concrete action. Actions use fixed identifiers without descriptions of their effects, and the target contains the resulting state of every entity, including entities unchanged by the action. The depth study supplies an initial state and a valid action sequence and uses the complete terminal state as the target.

Classical planning. Problem instances specify objects and initial states. Domain rules generate valid execution records and determine which concrete actions are valid at each reached state. Current-state queries render the queried state directly; trajectory queries provide the initial state and executed actions. Targets either select a valid candidate or list the complete valid-action set. Records derived from the same source problem remain in the same data split. In the breadth experiments, Logistics and FloorTile use regenerated controlled instances; the other planning domains use native-domain instance construction.

Code execution. Training and test programs are separated by repository. Next-operation queries include the program description, input/output requirements, program, concrete input, and an execution prefix with intermediate values removed. The target operation is obtained from the recorded execution, and each query is presented under both candidate orders. Program-output queries use the same task information and concrete input; Explicit-trace inputs also include executed line and statement order, without intermediate values or the terminal output. Both Native and Explicit-trace inputs share the output produced by execution as their target.

Distinct sources are sampled trajectories, planning problems, and programs for synthetic worlds, classical planning, and code execution, respectively. Breadth comparisons collect records from nested source pools with the action types and trajectory depths fixed. Cumulative depth comparisons retain records at shorter depths when records at longer depths are included.

Result aggregation. Synthetic and planning breadth results average three training seeds; code breadth results use seed 13. Synthetic cumulative-depth outcome results also use seed 13, while the cumulative-depth code results average seeds 13, 37, and 73. Error bars report sample standard deviations where shown.

Measured Trajectory Breadth

Table 5 reports bt(T)b_t(T) from the frozen synthetic training corpora, following Definition 8. Counts use symbolic states and executed concrete actions before surface rendering; candidate-order variants and repeated training do not add pairs. Increasing NN expands coverage at every step, although distinct trajectories can share state–action pairs, so btb_t need not equal NN.

Synthetic Valid-Action Fine-Tuning

Table 6 reports the LoRA settings for Qwen2.5-0.5B-Instruct in the synthetic valid-action identification experiment in Figure 2a.

SettingValue
OptimizerAdamW
LoRA rank / alpha / dropout8 / 16 / 0
LoRA target modulesq-proj, v-proj
Peak learning rate2×10−42 \times10^{-4}
Example presentations per optimizer update16

Table 6. Fine-tuning settings for synthetic valid-action identification.

Results on Additional Models

We extend valid-action identification to Qwen2.5-3B-Instruct, Qwen2.5-7B-Instruct, and Qwen3-8B. Candidate selection uses order-robust accuracy, requiring correct answers under every tested ordering. Completed comparisons retain all intermediate conditions.

Action Complexity and Trajectory Breadth

Figure 10. Action complexity and breadth across models. Top: synthetic accuracy; gray lines show individual settings, green their mean, and dashed brown the 0.5B reference. Bottom: planning gains relative to N=50N = 50, where NN counts distinct training sources; colors identify domains.

Action complexity. Across the same 40 synthetic configurations and 300 training steps (seed 13), mean accuracy decreases from A=5A = 5 to A=20A = 20 in all three models. The decline is smaller than for 0.5B: larger models mitigate, but do not remove, the effect of action complexity in this comparison.

Trajectory breadth. Increasing distinct sources expands state–action coverage while action complexity and trajectory depths remain fixed. Each condition uses 300 steps and 4,800 training examples. The N=1600N = 1600 mean exceeds N=50N = 50 in all 16 complete model–domain comparisons, despite intermediate plateaus and decreases. Broader coverage remains beneficial across these models without additional training steps.

Depth Specialization and Cumulative Training

Figure 11 connects single-depth specialization with cumulative training. Planning candidate-selection scores in this section average four candidate counts (2, 3, 4, 8), three training seeds (13, 37, 73), and three evaluation depths (2, 4, 6), except when these factors are shown separately. Every required evaluation must be present.

Figure 11. Depth specialization and cumulative training. Top: Blocksworld training–test matrices; numbers show accuracy (%), colors show deviations from column means, and outlines mark matched depths. Bottom: cumulative-training gains over 6-only training (dashed zero line). Each condition uses 300 steps; colors identify domains.

Cumulative training. The 2+4+6 corpus outperforms 6-only training in all 19 complete model–domain comparisons. The plus sign denotes trajectory depths included together in one corpus. Accuracy also increases from 2 to 2+4 and then to 2+4+6 in every comparison. Retaining shorter trajectories therefore supports valid-action identification across models without increasing training steps.

Training–test depth matching. Table 7 provides the other 22 complete matrices; the three Blocksworld matrices appear in Figure 11. Each cell averages four candidate counts and three training seeds. The matching gain, Δ\Delta, is the mean of the three matched-depth cells minus the mean of the six mismatched-depth cells. It is positive in all 25 matrices: ten for Qwen2.5-3B, eight for Qwen2.5-7B, and seven for Qwen3-8B. This supports depth specialization as an average tendency; the matched model need not be best at every test depth.

Train depth 2Train depth 4Train depth 6
Test depth246246246Δ\Delta
Qwen2.5-3B-Instruct
Logistics86.672.570.081.977.479.776.777.075.2+3.4
Depots99.192.884.097.898.797.596.998.199.0+4.5
Ferry100.095.079.699.999.897.999.8100.0100.0+4.6
Grippers99.993.482.896.499.595.599.199.899.3+5.1
Rovers99.999.294.698.199.097.998.198.898.9+1.5
Satellite99.254.543.962.098.589.161.894.698.7+31.1
Grid99.195.891.398.698.896.198.698.397.5+2.0
FloorTile100.098.196.999.799.098.798.598.999.4+1.0
GoldMiner100.091.064.799.699.893.994.497.899.8+9.6
Qwen2.5-7B-Instruct
Logistics92.580.777.790.989.087.483.684.686.0+5.0
Depots99.998.296.699.799.599.399.298.999.5+1.0
Ferry100.098.093.2100.0100.099.7100.0100.0100.0+1.5
Grippers100.098.094.798.399.695.5100.0100.099.7+2.0
Satellite99.877.265.585.4100.096.183.499.299.5+15.3
Grid99.798.498.399.699.299.199.598.899.2+0.4
FloorTile99.898.195.199.899.999.199.899.999.4+1.0
Qwen3-8B
Logistics98.083.377.896.791.889.092.593.291.5+5.0
Depots99.597.094.999.599.699.199.599.599.5+1.3
Ferry100.091.183.4100.0100.0100.0100.099.9100.0+4.3
Grippers99.999.096.499.799.999.399.9100.099.8+0.8
Rovers99.899.197.799.599.599.099.799.499.2+0.5
Satellite99.885.885.690.499.695.794.599.499.8+7.9

Table 7. Training–test depth matrices for the remaining planning domains. Values are order-robust accuracy (%); bold marks matched depths. Δ\Delta is the matching gain in percentage points. Blocksworld appears in Figure 11.

Scope. These experiments extend the valid-action findings to additional Qwen models. They do not evaluate execution-outcome prediction or establish token savings for these models. Breadth is varied through source-pool size; NN is not a count of distinct state–action pairs. The comparisons support the effects of data construction within each model; differences between Qwen2.5 and Qwen3 also involve model generation, not only size.

Results by Candidate Count

Figure 12 separates the planning results by candidate count to check whether the benefits depend on tasks with few candidates. All 16 complete breadth groups and all 19 complete cumulative-depth groups are retained. Each point averages three training seeds and three evaluation depths. These are disaggregated results from the same experiments, rather than additional training runs.

Figure 12. Planning gains by candidate count. Top: N=1600N = 1600 minus N=50N = 50. Bottom: cumulative 2+4+62+4+6 minus 6-only training. All comparisons use 300 training steps. The dashed line marks zero gain; colors identify domains.

Breadth yields positive gains in 63 of 64 comparisons and ties in one. Cumulative training improves 70 of 76 comparisons, ties in three, and decreases slightly in three (at most 0.12 percentage points). Both gains remain positive at every candidate count in Blocksworld and Logistics for all three models, including the eight-candidate setting. The average benefits therefore do not arise only from tasks with few candidates.

Cumulative Training at Different Evaluation Depths

The preceding cumulative-training curves average over test depths. Figure 13 separates these depths to locate the gains from retaining shorter trajectories. It compares 2+4+62+4+6 with 6-only training in all 19 complete model–domain groups, using 300 training steps per condition. Each point averages four candidate counts and three training seeds.

Figure 13. Cumulative-training gains at each evaluation depth. Curves show 2+4+62+4+6 minus 6-only order-robust accuracy in all complete planning comparisons. The dashed line marks zero gain; colors identify domains.

Cumulative training improves 18 of 19 comparisons at depth 2, 17 at depth 4, and 16 at depth 6. The remaining comparisons comprise four ties and two decreases smaller than 0.05 percentage points. Within each model’s completed task set, the mean gain is greatest at depth 2 and remains positive at depth 6. Retaining shorter trajectories therefore helps most at shallower depths on average, while often also benefiting the deepest tested executions.

These are the same trained models and evaluation records underlying Figure 11, separated by test depth. Model columns contain different sets of completed domains and should not be compared as a controlled model-size sweep.

Additional Planning Comparisons

Complete valid-action sets. Table 8 complements candidate selection by requiring the entire valid-action set to be correct. All three models have results for 11 domains. Training uses 800 source instances for three epochs; scores average seeds 1, 2, and 3 on the original combined test set.

DomainQwen2.5-3BQwen2.5-7BQwen3-8B
Blocksworld68.0088.1786.00
Depots56.0065.0068.33
Ferry67.8392.0092.33
FloorTile0.500.004.17
GoldMiner47.8371.8364.33
Grid67.0071.1769.83
VisitAll93.5097.1797.17
Grippers51.5085.6791.00
Logistics5.8322.6718.00
Rovers7.8312.3318.00
Satellite80.0088.6789.67

Table 8. Complete valid-action-set accuracy (%) in 11 planning domains.

Training-step sensitivity. Table 9 compares 300 total steps with 300 steps per included depth: 600 for 2+4 and 900 for 2+4+6. Additional steps improve 32 of 38 comparisons, tie in three, and reduce accuracy in three. Cumulative training can therefore retain room for further optimization. Its advantage over long-only training in Figure 11 is established separately at matched step counts.

Domain300 steps600 steps300 steps900 steps
2+4 / 2+4+6
Qwen2.5-3B-Instruct
Blocksworld95.0896.1597.3298.03
Logistics90.6292.0395.5595.96
Depots98.7699.3399.2899.64
Ferry99.2499.3999.9699.96
Grippers98.9499.1999.8299.82
Rovers99.5699.6999.6499.82
Satellite97.4397.4699.4099.71
Grid98.6298.9799.2899.60
FloorTile99.1499.4299.7299.76
GoldMiner98.0898.3999.9499.97
Qwen2.5-7B-Instruct
Blocksworld96.9297.5699.5399.33
Logistics94.7694.9796.3896.70
Qwen3-8B
Blocksworld98.0398.2999.4399.63
Logistics96.5496.6597.6498.01
Depots99.4699.6799.8599.90
Ferry99.9299.9299.99100.00
Grippers99.7999.7599.93100.00
Rovers99.6099.5199.7599.79
Satellite98.9999.1599.8699.93

Table 9. Order-robust accuracy (%) with 300 total steps or 300 steps per included depth.

References

  1. [1]Zeyuan Allen-Zhu and Yuanzhi Li. Physics of language models: Part 3.1, knowledge storage and extraction. arXiv preprint arXiv:2309.14316, 2023.
  2. [2]Zeyuan Allen-Zhu and Yuanzhi Li. Physics of language models: Part 3.3, knowledge capacity scaling laws. arXiv preprint arXiv:2404.05405, 2024.
  3. [3]Zeyuan Allen-Zhu and Yuanzhi Li. Physics of language models: Part 3.2, knowledge manipulation. In International Conference on Learning Representations, volume 2025, pp. 85824–85832, 2025.
  4. [4]Cem Anil, Yu Huai Wu, Anders Andreassen, Aitor Lewkowycz, Vedant Misra, Vinay Ramasesh, Ambrose Slone, Guy Gur-Ari, Ethan Dyer, and Behnam Neyshabur. Exploring length generalization in large language models. Advances in Neural Information Processing Systems, 35:38546–38556, 2022.arxiv.org/abs/2207.04901
  5. [5]Seungju Back, Dongwoo Lee, Naun Kang, Taehee Lee, SK Hong, Youngjune Gwon, and Sungjin Ahn. Understanding lora as knowledge memory: An empirical analysis. arXiv preprint arXiv:2603.01097, 2026.arxiv.org/abs/2603.01097
  6. [6]Ali Behrouz, Farnoosh Hashemi, Adel Javanmard, and Vahab Mirrokni. Language models need sleep: Learning to self-modify and consolidate memories. arXiv preprint arXiv:2606.03979, 2026a.arxiv.org/abs/2606.03979
  7. [7]Ali Behrouz, Peilin Zhong, and Vahab Mirrokni. Titans: Learning to memorize at test time. Advances in Neural Information Processing Systems, 38:113506–113543, 2026b.arxiv.org/abs/2501.00663
  8. [8]Nicholas Carlini, Daphne Ippolito, Matthew Jagielski, Katherine Lee, Florian Tramer, and Chiyuan Zhang. Quantifying memorization across neural language models. arXiv preprint arXiv:2202.07646, 2022.arxiv.org/abs/2202.07646
  9. [9]Hoyeon Chang, Jinho Park, Seonghyeon Ye, Sohee Yang, Youngkyung Seo, Du-Seong Chang, and Minjoon Seo. How do large language models acquire factual knowledge during pretraining? Advances in neural information processing systems, 37:60626–60668, 2024.arxiv.org/abs/2406.11813
  10. [10]Rujikorn Charakorn, Edoardo Cetin, Shinnosuke Uesaka, and Robert Tjarko Lange. Doc-to-lora: Learning to instantly internalize contexts. arXiv preprint arXiv:2602.15902, 2026.arxiv.org/abs/2602.15902
  11. [11]Xin Cheng, Wangding Zeng, Damai Dai, Qinyu Chen, Bingxuan Wang, Zhenda Xie, Kezhao Huang, Xingkai Yu, Zhewen Hao, Han Zhang, et al. Conditional memory via scalable lookup: A new axis of sparsity for large language models. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 4968–4990, 2026.
  12. [12]Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, and Furu Wei. Knowledge neurons in pretrained transformers. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 8493–8502, 2022.
  13. [13]Nicola De Cao, Wilker Aziz, and Ivan Titov. Editing factual knowledge in language models. In Proceedings of the 2021 conference on empirical methods in natural language processing, pp. 6491–6506, 2021.
  14. [14]Qingxiu Dong, Damai Dai, Yifan Song, Jingjing Xu, Zhifang Sui, and Lei Li. Calibrating factual knowledge in pretrained language models. In Findings of the association for computational linguistics: EMNLP 2022, pp. 5937–5947, 2022.
  15. [15]Junfeng Fang, Houcheng Jiang, Kun Wang, Yunshan Ma, Jie Shi, Xiang Wang, Xiangnan He, and Tat-Seng Chua. AlphaEdit: Null-space constrained knowledge editing for language models. In International Conference on Learning Representations, volume 2025, pp. 16366–16396, 2025.arxiv.org/abs/2410.02355
  16. [16]Richard E Fikes and Nils J Nilsson. STRIPS: A new approach to the application of theorem proving to problem solving. Artificial intelligence, 2(3-4):189–208, 1971.
  17. [17]Mor Geva, Roei Schuster, Jonathan Berant, and Omer Levy. Transformer feed-forward layers are key-value memories. In Proceedings of the 2021 conference on empirical methods in natural language processing, pp. 5484–5495, 2021.arxiv.org/abs/2012.14913
  18. [18]Malik Ghallab, Adele Howe, Craig Knoblock, Drew McDermott, Ashwin Ram, Manuela Veloso, Daniel Weld, and David Wilkins. PDDL—the planning domain definition language. Technical Report CVC TR-98-003/DCS TR-1165, Yale Center for Computational Vision and Control, 1998. URL https://ai.stanford.edu/~capas-conference.org/deterministic/data/mcdermott-et-al-tr-1998.pdf.
  19. [19]Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.arxiv.org/abs/2106.09685
  20. [20]Zeyu Huang, Yikang Shen, Xiaofeng Zhang, Jie Zhou, Wenge Rong, and Zhang Xiong. Transformer-Patcher: One mistake worth one neuron. arXiv preprint arXiv:2301.09785, 2023.arxiv.org/abs/2301.09785
  21. [21]Daniel Keysers, Nathanael Schärli, Nathan Scales, Hylke Buisman, Daniel Furrer, Sergii Kashubin, Nikola Momchev, Danila Sinopalkov, Lukasz Stafiniak, Tibor Tihon, et al. Measuring compositional generalization: A comprehensive method on realistic data. arXiv preprint arXiv:1912.09713, 2019.arxiv.org/abs/1912.09713
  22. [22]Harsha Kokel, Michael Katz, Kavitha Srinivas, and Shirin Sohrabi. Acpbench: Reasoning about action, change, and planning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pp. 26559–26568, 2025.
  23. [23]Brenden Lake and Marco Baroni. Generalization without systematicity: On the compositional skills of sequence-to-sequence recurrent networks. In International conference on machine learning, pp. 2873–2882. PMLR, 2018.arxiv.org/abs/1711.00350
  24. [24]Guillaume Lample, Alexandre Sablayrolles, Marc’Aurelio Ranzato, Ludovic Denoyer, and Hervé Jégou. Large memory layers with product keys. Advances in Neural Information Processing Systems, 32, 2019.arxiv.org/abs/1907.05242
  25. [25]Katherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang, Douglas Eck, Chris Callison-Burch, and Nicholas Carlini. Deduplicating training data makes language models better. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 8424–8445, 2022.arxiv.org/abs/2107.06499
  26. [26]Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal,\nHeinrich K\u 776 ttler, Mike Lewis, Wen-tau Yih, Tim Rockt \u 776 schel, et al. Retrieval-augmented gener-\nation for knowledge-intensive nlp tasks. Advances in neural information processing systems, 33:\n9459–9474, 2020.arxiv.org/abs/2005.11401
  27. [27]Junlong Li, Daya Guo, Dejian Yang, Runxin Xu, Yu Wu, and Junxian He. Codei/o: Condensing reasoning patterns via code input-output prediction. arXiv preprint arXiv:2502.07316, 2025.arxiv.org/abs/2502.07316
  28. [28]Yewei Liu, Xiyuan Wang, Yansheng Mao, Yoav Gelber, Haggai Maron, and Muhan Zhang. Shine: A scalable in-context hypernetwork for mapping context to lora in a single pass. arXiv preprint arXiv:2602.06358, 2026.arxiv.org/abs/2602.06358
  29. [29]Junru Lu, Siyu An, Mingbao Lin, Gabriele Pergola, Yulan He, Di Yin, Xing Sun, and Yunsheng Wu. MemoChat: Tuning LLMs to use memos for consistent long-range open-domain conversation. arXiv preprint arXiv:2308.08239, 2023.arxiv.org/abs/2308.08239
  30. [30]Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. Locating and editing factual associations in gpt. Advances in neural information processing systems, 35:17359–17372, 2022a.arxiv.org/abs/2202.05262
  31. [32]Eric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn, and Christopher D Manning. Fast model editing at scale. arXiv preprint arXiv:2110.11309, 2021.arxiv.org/abs/2110.11309
  32. [33]Maxwell Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, et al. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114, 2021.arxiv.org/abs/2112.00114
  33. [34]Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345–1359, 2009.DOI
  34. [35]Fabio Petroni, Tim Rocktäschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and Alexander Miller. Language models as knowledge bases? In Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP), pp. 2463–2473, 2019.arxiv.org/abs/1909.01066
  35. [36]Qwen, An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Daiyheng Liu, Fei Huang, Haoran Wei, Huan Lin, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jingren Zhou, Junyang Lin, Kai Dang, Keming Lu, Keqin Bao, Kexin Yang, Le Yu, Mei Li, Mingfeng Xue, Pei Zhang, Qin Zhu, Rui Men, Runji Lin, Tianhao Li, Tianyi Tang, Tingyu Xia, Xingzhang Ren, Xuancheng Ren, Yan Fan, Yang Su, Yichang Zhang, Yu Wan, Yuqiong Liu, Zeyu Cui, Zhenru Zhang, and Zihan Qiu. Qwen2.5 technical report, 2025. URL https://arxiv.org/abs/2412.15115.
  36. [37]Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of machine learning research, 21(140):1–67, 2020.arxiv.org/abs/1910.10683
  37. [39]Kushal Tirumala, Aram Markosyan, Luke Zettlemoyer, and Armen Aghajanyan. Memorization without overfitting: Analyzing the training dynamics of large language models. Advances in Neural Information Processing Systems, 35:38274–38290, 2022.arxiv.org/abs/2205.10770
  38. [40]Boshi Wang, Xiang Yue, Yu Su, and Huan Sun. Grokked transformers are implicit reasoners: A mechanistic journey to the edge of generalization. arXiv preprint arXiv:2405.15071, 2024a.arxiv.org/abs/2405.15071
  39. [41]Peng Wang, Zexi Li, Ningyu Zhang, Ziwen Xu, Yunzhi Yao, Yong Jiang, Pengjun Xie, Fei Huang, and Huajun Chen. Wise: Rethinking the knowledge memory for lifelong model editing of large language models. Advances in Neural Information Processing Systems, 37:53764–53797, 2024b.arxiv.org/abs/2405.14768
  40. [42]Weizhi Wang, Li Dong, Hao Cheng, Xiaodong Liu, Xifeng Yan, Jianfeng Gao, and Furu Wei. Augmenting language models with long-term memory. Advances in neural information processing systems, 36:74530–74543, 2023.arxiv.org/abs/2306.07174
  41. [43]Rubin Wei, Jiaqi Cao, Jiarui Wang, Jushi Kai, Qipeng Guo, Bowen Zhou, and Zhouhan Lin. Mlp memory: A retriever-pretrained memory for large language models. In International Conference on Learning Representations, volume 2026, pp. 132772–132795, 2026.arxiv.org/abs/2508.01832
  42. [44]Ziwen Xu, Haiwen Hong, Linsong Yu, Benglei Cui, Longtao Huang, Hui Xue, and Ningyu Zhang. How lora remembers? a parametric memory law for llm finetuning. arXiv preprint arXiv:2605.30260, 2026.arxiv.org/abs/2605.30260
  43. [45]An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chenggen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025.arxiv.org/abs/2505.09388
  44. [46]Qiang Yang, Kanheng Wu, and Yunfei Jiang. Learning action models from plan examples using weighted MAX-SAT. Artificial Intelligence, 171(2-3):107–143, 2007.DOI
  45. [47]Jiayuan Ye, Vitaly Feldman, and Kunal Talwar. Cram less to fit more: Training data pruning improves memorization of facts. arXiv preprint arXiv:2604.08519, 2026.arxiv.org/abs/2604.08519
  46. [48]Wanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye, and Yanlin Wang. MemoryBank: Enhancing large language models with long-term memory. In Proceedings of the AAAI conference on artificial intelligence, volume 38, pp. 19724–19731, 2024.arxiv.org/abs/2305.10250
  47. [49]Hattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin, Omid Saremi, Joshua Susskind, Samy Bengio, and Preetum Nakkiran. What algorithms can transformers learn: a study in length generalization. In International Conference on Learning Representations, volume 2024, pp. 15898–15926, 2024.arxiv.org/abs/2310.16028

Paper details

vlnc:W_tdwfdr55
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

generative AI tools

View statement
Looking for related papers…
Contents