In-Context Learning as Working Memory, Fine-Tuning as Long-Term Memory: A Substrate-Mechanistic Account of LLM Practice
Why do fine-tuned language models hallucinate more confidently than their in-context-learning counterparts on the same knowledge? Two well-established techniques add new knowledge to a language model: keeping it in the prompt — in-context learning (ICL; Brown et al. 2020) — or training it into the weights, here via low-rank adapters (LoRA; Hu et al. 2021). These are usually framed as alternatives along a deployment-cost axis. We show they are not interchangeable. Mechanism. We trace the difference to a substrate-mechanism: each backward pass under cross-entropy loss amplifies the winning route asymmetrically and presses alternatives below the noise floor; the depth of this compression scales with how many gradient passes the substrate has absorbed. ICL preserves the model's calibrated distribution over candidate answers because no weight update has compressed it. FT compresses it as a structural consequence of cumulative gradient pressure, regardless of training-data content. The architecture-level distinction this produces between ICL and FT maps onto the working-memory / long-term-memory distinction familiar from cognitive science: ICL operates in working-memory mode (forward-only computation, full distribution recomputed per turn, alternatives accessible); FT in long-term-memory mode (consolidated trace, alternatives compressed). The mechanism generalises a previously RLHF-specific finding (Pødenphant Lund 2026b §3) to all weight-update training — including plain LoRA fine-tuning on innocuous factual data. Empirical findings. Across three experiments on a 47-fact invented knowledge domain (Zorbetik), Qwen2.5 base models at 3B and 7B scales, and LoRA fine-tuning budgets from 5 to 100 epochs plus a paraphrase-augmented variant: ICL outperforms LoRA-FT on cloze retrieval by 16–28 percentage points across capacity scales; FT-trained models actively degrade application accuracy below the no-context baseline; the per-token competing-routes signal collapses monotonically with cumulative gradient passes — log(CR_pos0) climbs from 5.46 (ICL) to 17.85 (raw FT, 30 epochs) to 21.12 (paraphrase-augmented FT, 30 epochs); entropy at position 0 collapses from 0.32 (ICL) to ≈0.00 (any FT regime), independent of training-data variation. Applied consequences. Why FT-trained models hallucinate more confidently: alternative routes have been compressed beyond reach. Why agentic systems can't reliably represent uncertainty when built on FT: the substrate-level signal that would carry uncertainty is gone. What the RAG-vs-FT debate looks like at the substrate level: RAG operates in ICL-mode and preserves calibration; FT compresses it as a structural consequence. How long-context agentic conversations (Claude Code, Cursor, multi-turn agents) inherit ICL's calibration properties for free: each turn re-evaluates the full context with no weight update. And how concrete hybrid ICL+FT memory architectures can approximate biological memory's two-system structure with bounded context-window cost. Caveats. FT is tested as LoRA only (full-parameter FT untested); single random seed; two model sizes (3B, 7B); one invented domain. Paraphrase-augmentation in Experiment 3 confounds data-variation with cumulative gradient-pressure (≈10× more gradient steps); a clean compute-matched comparison is left to follow-up. The qualitative ICL-vs-FT direction is robust within these scope conditions. Companion papers in the Friction Theory series: Paper 0 (BFT master): 10.5281/zenodo.19462500 Paper 1 (Friction Theory substrate): 10.5281/zenodo.20012655 Paper 2 (Capacity Scaling, the empirical companion): 10.5281/zenodo.20013491 Paper 3 (Friction-Guided Inference): 10.5281/zenodo.20014122 Paper 10 (Race-Architecture Physics): 10.5281/zenodo.20014568 Paper 13 (Operational Friction Theory): 10.5281/zenodo.20059877 Paper 4, Paper 4B, Paper 6 — in preparation Data and code. Per-token logprob datasets, fine-tuning notebooks, and analysis scripts share Paper 2's companion repository: https://github.com/tplund/friction-theory-p2-capacity-scaling (CC BY 4.0).
Authors
- Tomas Pødenphant Lund (ORCID: https://orcid.org/0009-0000-4724-2427)
Institutions
- Aarhus University (DK)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-05-12
- DOI
- https://doi.org/10.5281/zenodo.20145219
- Primary Topic
- Topic Modeling
- Type
- preprint