Blog Post

Inference Should Learn: An Experiment in Dynamic Memory for Language Models

An ongoing experiment into whether language models can acquire knowledge by dynamically changing their own parameters.

Inference Should Learn: An Experiment in Dynamic Memory for Language Models

An ongoing experiment into whether language models can acquire knowledge by dynamically changing their own parameters.

Status: Phase I closed - continues in Ask It Twice
Writing knowledge 1.0000 Recall of facts the frozen model scores 0.0000 on, through a detachable parameter update. This part was solved in the first experiment.
Reasoning across it 0.4167 Composition, and only with the reasoning channel open. Without it, 0.0000. Every later experiment in Phase I was an attempt to move this number.
Cost to the reasoner 0.3333 Interference on unrelated general knowledge while the memory is attached. Driving it to zero was possible — but composition collapsed to chance when we did.

Phase I ran nine experiments to move the middle number and could not. The reason was found later, in the sequel: composition was never the bottleneck it appeared to be.

The Idea

Modern large language models have an unusual limitation.

They can reason about new information. They can retrieve information. They can hold enormous amounts of information in their context window.

But once training ends, the model itself is largely frozen.

Its parameters might contain billions of learned relationships, but during normal inference those parameters do not change.

A model can discover something today and effectively know nothing about it tomorrow unless we provide that information again through context, retrieval, external memory, or another training process.

That raises a simple question:

Why should learning and inference be separate processes?

Our hypothesis is that they do not have to be.

The Hypothesis

Instead of treating the parameters of a language model as static, we want to investigate a model consisting of two parts:

  1. A relatively stable core containing language and reasoning capabilities.
  2. A dynamic portion of the model containing knowledge acquired during its operational lifetime.

The long term idea is simple:

If the model encounters something it does not know, it should be able to learn it.

Not merely place it into the current prompt.

Not simply retrieve it again next time.

Actually learn it.

The model should eventually be capable of identifying a gap in its knowledge, finding information about it, evaluating that information, learning what is useful, and retaining that knowledge for future reasoning.

Dynamic Memory

Today, a model encountering an unknown subject might follow a process like this:

Question

Search

Add information to context

Answer

Once that context disappears, the model has not fundamentally changed.

We want to investigate a different process:

Question

Recognize a knowledge gap

Acquire information

Evaluate it

Learn it

Answer

Retain what was learned

The important difference is the learning step.

New information would cause a controlled change to part of the model itself.

Those changes could eventually behave like dynamic memories. They might be created, loaded, unloaded, combined, transferred, consolidated, or forgotten.

This leads to the central hypothesis behind the project:

Inference can become a learning process.

Why Start Small?

There are many ways to make this idea unnecessarily complicated.

We could immediately introduce web search, autonomous agents, vector databases, long term memory systems, large models, distributed training, and complicated infrastructure.

We are deliberately doing none of that.

The first question is much smaller:

Can a frozen reasoning model acquire previously unknown information through a detachable parameter update and subsequently reason using that information?

If the answer is no, we want to discover that quickly.

If the answer is yes, we can build from there.

Experiment 0: Writable Parametric Memory

We are starting with one small reasoning model.

The original model remains frozen.

We then create a small, separate set of trainable parameters containing newly learned information.

For the first experiment, we are using LoRA adapters to create these parameter changes.

LoRA itself is not the hypothesis and is not being presented as a new memory architecture.

It is simply useful laboratory equipment.

It gives us a practical way to modify a small number of parameters without retraining the underlying model.

This lets us test the basic idea before designing a new architecture.

Teaching the Model Something That Does Not Exist

We need to know with certainty whether the model learned something during our experiment rather than remembering something from its original training.

So we will create artificial worlds.

For example:

NARU-17 is a planet.

KEL-44 is the largest moon of NARU-17.

KEL-44 contains ZETA-4.

Objects containing ZETA-4 emit VIOLET radiation.

These names and relationships are generated specifically for the experiment.

First, we test the untouched model.

It should not know these facts.

Then we teach the detachable memory.

After training, all of the original teaching material is removed from the model's context.

We ask questions again.

If the model can now recall the information, we have demonstrated that knowledge was acquired by the parameter memory.

But recall is only the first test.

Memory Is Not Enough

The more important question is whether the model can reason with what it learned.

For example, we never explicitly teach the model this statement:

"The largest moon of NARU-17 emits VIOLET radiation."

Instead, the model has to combine several independently learned facts.

NARU-17 has a largest moon named KEL-44.

KEL-44 contains ZETA-4.

Objects containing ZETA-4 emit VIOLET radiation.

Therefore, the largest moon of NARU-17 should emit VIOLET radiation.

That conclusion was never part of the training material.

The reasoning capability comes from the original model.

The premises come from the newly acquired memory.

That distinction is central to the experiment.

We do not merely want:

New weights + memorization

We want:

New knowledge + existing reasoning = new conclusions

The Detachment Test

After teaching the artificial world, we remove the parameter memory.

The synthetic knowledge should disappear.

Load the memory again and the knowledge should return.

This gives us a very simple experimental test.

Base model:

Does not know NARU-17.

Base model + Memory A:

Knows NARU-17 and can reason about it.

Base model:

Memory A removed. Knowledge disappears.

Base model + Memory A:

Memory restored. Knowledge returns.

If that works reliably, we have demonstrated a primitive form of loadable neural memory.

The Next Important Test

Suppose two memories are learned independently.

Memory A knows one part of an artificial world.

Memory B knows another part.

Neither memory contains enough information to answer a particular question independently.

We then load both.

Base model + Memory A + Memory B

Can the underlying reasoning model combine information distributed across independently acquired parameter memories and reach a conclusion that neither memory contains?

If it can, that becomes significantly more interesting than simple memorization.

It suggests that separately acquired neural memories can participate in a common reasoning process.

That will be a later experiment.

First, Experiment 0 needs to work.

The Hardware

We are intentionally starting with modest hardware.

The lab currently consists of a Ryzen based CPU server with 32 GB of RAM and two NVIDIA Jetson systems with approximately 8 GB of unified memory each.

We are starting with a very small reasoning model, currently targeting Qwen3-0.6B.

The hardware constraint is intentional.

If the underlying mechanism is interesting, we should be able to demonstrate its basic properties without requiring a rack of high end GPUs.

We are trying to discover a principle, not train a frontier model.

What Would Count as Success?

Experiment 0 has four basic tests.

  1. Write

Can new synthetic knowledge be encoded into a small detachable parameter memory?

  1. Recall

Can the model recover that knowledge later without seeing the original teaching context?

  1. Reason

Can the model use its existing reasoning capabilities to derive conclusions from newly acquired knowledge that were never explicitly included in training?

  1. Forget

When the parameter memory is removed, does the acquired knowledge disappear while the underlying model remains intact?

The third test is the most important.

A system that simply memorizes additional strings is not particularly interesting.

A system that can acquire new premises and immediately integrate them into its existing reasoning process potentially is.

What We Are Not Claiming

This experiment does not demonstrate that LoRA adapters are a new form of AI memory.

They are not.

It does not demonstrate continual learning.

It does not demonstrate that dynamically changing weights is superior to retrieval augmented generation.

It does not demonstrate a replacement for the Transformer.

We are starting with a much narrower question.

Can reasoning and dynamically acquired parametric knowledge be separated and recombined?

If Experiment 0 fails, we will document why.

If it succeeds, we will make the next experiment harder.

The nine experiments

Each row is one attempt on the same problem. The full write-ups are in the log below.

IDWhat it triedOutcomeKey figure
000Can a frozen model acquire facts through a detachable delta?Yes — and reason with them, partially1.0000 recall
001Make the memory non-invasiveInterference gone, composition fell to chance0.0000 interference
002Does composition need more exposure, or more capacity?Capacity, not exposure5 / 24
003Does a middle rank get both?No — rank-16 damage, rank-4 benefit0.2500 interference
004Put memory outside the frozen projections entirelyWorse — worst interference measured0.5000
005Give the memory an explicit addressFailed to address, not to store1 slot, 4285/4287
006Stop the address collapsingRegulariser worked, aimed at the wrong statisticstopped at epoch 6
007Supervise the address directlyCollapse broken, identity still not learned0.2292
008Does the model represent fact identity anywhere?Yes — but four layers above where we looked0.8958 at L22

What Phase I established.

Writing knowledge into a frozen model is the easy part, and it works cleanly — the delta attaches, performs, and detaches with the base weights provably untouched. The hard part is letting that knowledge participate in reasoning without perturbing the reasoner. Nine experiments moved that number very little, which is why Phase II stopped trying to make the update reason on its own and started treating it as a memory object selected from outside.

Research Log

Experiment 0 - Feasibility

Current objective:

Can we give a frozen reasoning model writable, detachable parametric memory?

The first step is determining whether our small reasoning model can run and undergo parameter efficient training on the available Jetson hardware.

Results, failures, measurements, changes to the hypothesis, and subsequent experiments will be added here as we go.

The Bigger Question

Today's language models generally follow a basic lifecycle:

Train

Deploy

Infer

We are interested in a different lifecycle:

Learn

Infer

Learn again

Infer again

Every interaction is potentially new evidence.

Every solved problem is potentially new experience.

Every discovery is potentially something worth retaining.

The question behind this project is ultimately very simple:

What happens when a reasoning model is no longer frozen after training?

We are going to find out.

Back to blog index
Update - August 22, 2026

GOAL_0 progress

Experiment 0 reached perfect recall, and explicit reasoning lifted composition to 0.4167.

  • The experiment config now carries measured values instead of `PENDING` placeholders.
  • A frozen Qwen3-0.6B can store facts in a 38.56 MiB detachable delta, and it only composes them when it reasons out loud.
  • The base model can already do 2-hop composition from premises in context, but that does not prove learned facts will still compose once the teaching text is removed.
  • The reported 0.4167 composition rate came from explicit reasoning, with `p = 0.0033`.
  • Balanced sampling restored the composition chance baseline to 1/6, not 25%.

Reports: GOAL_0_PROGRESS.2026-08-22.md

See the linked progress report for the full analysis and follow-up.

Update - August 22, 2026

GOAL_1 progress

Recall 1.0000 (48/48) target >= 0.90 MET Interference 0.0000 (9/12 = base) target <= 0.10 MET Composition 0.1667 (4/24, thinking) above baseline NOT MET Adapter 9.68 MiB / 2,523,136 params (0.423%) 4x smaller than Exp 0

  • How small before recall degrades? It never degraded. All 15 configurations scored ≥ 0.9167; the smallest (0.192%, 4.40 MiB) reached 0.9792.
  • How small before composition degrades? Composition degrades before size bites — every GOAL_1 config sits at chance, including one at Experiment 0's exact size. The difference is 12 vs 30 epochs, not adapter size.
  • Does lower rank reduce interference? Yes, within fixed scope (ρ = +0.840). r16 worse than r8 at matched epochs; r4 vs r8 mixed and within 1–2 questions.
  • Does narrower module scope reduce interference? No — it sharply increases it. Clearest effect measured (ρ = −0.871), contradicting the hypothesis.
  • Does shorter training reduce interference? Not reliably (ρ = +0.017). At rank 8 it rises with epochs (0.0833→0.25); at rank 4 it falls (0.1667→0.0000).

Reports: GOAL_1_PROGRESS.2026-08-22.md

See the linked progress report for the full analysis and follow-up.

Update - August 22, 2026

GOAL_2 progress

Progress report available.

  • Rank 4 recover composition at 30 epochs? No. 5/24, p = 0.37.
  • When does composition first rise above chance? Never, supportably. Only epoch 30 exceeds the chance count, by one question, p = 0.37.
  • When does interference first become measurable? Epoch 20 (9/12 → 8/12, I = 0.0833), then plateaus. Caveat: substantive control churn exists from epoch 12, before the net metric moves.
  • Do composition and interference rise together? Weakly and inconclusively (r = +0.43, n = 5). This run lacks dynamic range — neither variable moved much.
  • Does recall remain stable? Yes, exactly 48/48 at every checkpoint.

Reports: GOAL_2_PROGRESS.2026-08-22.md

See the linked progress report for the full analysis and follow-up.

Update - August 23, 2026

GOAL_3 progress

Progress report available.

  • Meaningful composition? No. 4/24 at epoch 30, p = 0.58. Best checkpoint 5/24, p = 0.37.
  • Below the interference target? No. I = 0.2500, 2.5× the 0.10 target, at every checkpoint.
  • Churn independent of net interference? Substantial — 10/12 changed, all 10 substantive, against a net of −3. Five regressions partly masked by two accidental repairs.
  • Hop-2 better than rank 4? No — worse. 10/24 → 6/24, while hop-1 rose 20/24 → 23/24.
  • Longer or more exploratory traces? No. 152.1 mean tokens, the shortest of the three ranks.

Reports: GOAL_3_PROGRESS.2026-08-23.md

See the linked progress report for the full analysis and follow-up.

Update - August 23, 2026

GOAL_4 progress

Parameter isolation did not deliver behavioural isolation. It made things worse.

  • Learned the world? Yes, completely. Loss 3.5763 → 0.1157; recall 48/48.
  • Recall ≥ 0.90? Yes — 1.0000.
  • Composition above chance? No. 0/24, p = 1.00. Worst of any configuration and no better than the frozen base.
  • Hop-2 improved? No. 6/24, tied worst with rank 8 against rank 16's 14/24. Hop-1 also regressed, to 17/24.
  • Interference? 0.5000 (control 3/12) — worst measured; 6× rank 4, 1.5× rank 16.

Reports: GOAL_4_PROGRESS.2026-08-23.md

See the linked progress report for the full analysis and follow-up.

Update - August 23, 2026

GOAL_5 progress

The memory did not fail to store, and it did not fail to reason. It failed to address.

  • Learned the facts? No.
  • Recall? 0/48 (0.0000), at every gate value.
  • Queries memory successfully? Mechanically yes — it queries every token and the query is well-formed (norms 9.4–126.3, never degenerate). Functionally no: the selection is input-independent, so the same value returns regardless.
  • Hop-1 reliability? 0/24.
  • Second meaningful query? Unanswerable — hop 1 never occurred. 0 of 0.

Reports: GOAL_5_PROGRESS.2026-08-23.md

See the linked progress report for the full analysis and follow-up.

Update - August 23, 2026

GOAL_6 progress

The regulariser moved slot usage, but address collapse still happened. ~21 effective slots held mass while all 24 facts selected the same argmax.

  • ~21 effective slots held mass, but every fact still selected the same argmax.
  • The anti-collapse regulariser spread utilisation; it did not produce real addressing.
  • Training stopped early at epoch 6 of 30 when the pre-committed gate tripped.
  • Outcome E still stands: recall 0/48, composition 0/24, interference 0.5833.
  • The comparable takeaway is that the recipe changed the failure shape, not the failure itself.

Reports: GOAL_6_PROGRESS.2026-08-23.md

Reports: GOAL_6.md

Reports: experiment_006_anti_collapse_recipe.md

Reports: experiment_006_architecture.md

Reports: experiment_006_base_isolation_validation.md

Reports: experiment_006_detachability_validation.md

Reports: experiment_006_report.md

Reports: experiment_006_methods.md

See the linked progress report for the full analysis and follow-up.

Update - August 23, 2026

GOAL_7 progress

Single-slot collapse is broken. The address is now input-dependent. It encodes WHICH RELATION is being asked (48/48) and not WHICH FACT (11/48).

  • The memory kept its base behavior intact while the address path stayed open and gate-invariant.
  • The trained query made the address input-dependent: 48/48 on relation identity, but only 11/48 on fact identity.
  • Held-out address accuracy landed at 0.2292, with 7 dominant addresses, 107.33 effective soft slots, and mean top weight 0.0750.
  • Phase A shows the bottleneck is upstream of the memory read: the raw hidden states still do not separate the facts cleanly.
  • Because Phase A failed, recall, composition, interference, churn, and the other downstream metrics were not measured.

Reports: GOAL_7_PROGRESS.2026-08-23.md

Reports: GOAL_7.md

Reports: experiment_007_address_training_recipe.md

Reports: experiment_007_report.md

Reports: experiment_007_methods.md

See the linked progress report for the full analysis and follow-up.

Update - August 24, 2026

GOAL_8 final results

The frozen model contains fact identity, but the best usable representation peaks at layer 22 with 0.8958 held-out accuracy, just below the 0.90 threshold.

  • Layer 22 / last prompt token is the best primary cell at 0.8958, one held-out item short of strong addressability.
  • Layer 18 reproduces the Experiment 007 failure at 0.2292 and has a negative mean margin.
  • The cue-entity control is lexical, and the qa_only control reaches 0.9792 but is excluded from the headline.
  • Fact identity emerges abruptly, not gradually: layer 21 is 0.4375 and layer 22 jumps to 0.8958.
  • The zero-parameter class mean at layer 18 matches the trained head exactly, so the head bought no extra information at that depth.

Reports: GOAL_8_FINAL.md

Reports: experiment_008_report.md

Reports: experiment_008_methods.md

Reports: experiment_008_phase_1_synthesis.md

Reports: experiment_008_validation.md

Reports: experiment_008_representation_matrix.md

See the linked final report and Phase I synthesis for the full sweep and stop condition.

Final Thoughts - August 24, 2026

Final Thoughts

Phase I started with a simple hypothesis: a deployed language model might acquire new knowledge by changing its own parameters.

  • Seven experiments showed that writing knowledge is the easy part.
  • The hard part is letting that knowledge participate in reasoning without perturbing the reasoner.
  • LoRA memories stored information but created interference; isolated residual memory increased disruption.
  • Explicit neural memory failed repeatedly at address formation, and direct supervision only proved that the chosen representation was the wrong one.
  • Phase I is closed; Phase II should treat learned updates as detachable memory objects selected outside the reasoner.

Reports: GOAL_8_FINAL.md

Reports: experiment_008_phase_1_synthesis.md

The reasoner stays stable. A router decides what learned memory gets attached for the problem at hand.

Back to blog