Skip to content

LoRA as Memory: A Parameteric Approach to Embodied, Adaptive Cognition in Artificial Agents.

License

Notifications You must be signed in to change notification settings

Palagent/project_klaara

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

LoRA as Memory: A Parametric Approach to Embodied, Adaptive Cognition in Artificial Agents

License: GPL v3


Title

LoRA as Memory: A Parametric Approach to Embodied, Adaptive Cognition in Artificial Agents

Authors: Jouni Kantola (Independent Researcher) with help: Claude 4.5, Qwen plus, Gemini 3, GPT-5.2 Affiliation: Klaara Project – Exploring Human-Centric AGI through Integrated Cognitive Architectures
Date: 02.02.2026
Version: 1.4


Status & scope (important)

This document is a public research proposal / concept note. It presents an architectural hypothesis and an implementation direction that, in my view, is worth testing.

  • Not a claim of proof: This is not evidence that the proposed system yields consciousness, AGI, or human-level cognition.
  • Not a finished implementation: The roadmap outlines plausible steps; many components may fail, require revision, or prove impractical.
  • What you can expect: a concrete architecture (LIKKA), motivations, and engineering milestones oriented around testability (continual adaptation, identity stability, reversible modular memory).

If you use or cite this, please treat it as a hypothesis and design proposal, not a validated result.


Abstract

We propose a novel cognitive architecture for artificial general intelligence (AGI) in which Low-Rank Adaptation (LoRA) is reimagined not as a fine-tuning technique, but as a parametric memory system for scalable, embodied learning in artificial agents.

Our model draws inspiration from recent advances in vision-language (VL) systems, neuroplasticity, and Theory of Mind. By grounding memory in model parameters themselves, LIKKA enables scalable, implicit learning.

Crucially, we introduce a Symbiotic Layer—a predictive empathy mechanism—that operates in homeostatic balance with the agent's survival instincts. The system operates across four integrated tiers: a persistent Identity LoRA, a user-modeling Symbiote LoRA, dynamically loaded Contextual LoRAs, and autonomously generated Micro-LoRAs.

This paper outlines the theoretical foundation, architectural design, and implementation roadmap of LIKKA. We argue that such an approach moves beyond reactive language models toward agents capable of growth, adaptation, responsibility, and genuine companionship.

Note: This is a hypothesis-driven architecture proposal intended to be tested empirically; it should be read as a research direction, not as a validated claim.


1. Introduction

Contemporary AI systems rely heavily on externalized memory mechanisms: retrieval-augmented generation (RAG), extended context windows, or static fine-tuned weights. While effective, these methods face key limitations:

  • Scalability: Retrieval time grows with memory volume.
  • Explicitness: All knowledge remains surface-level, requiring conscious access.
  • Lack of embodiment: No integration between perception, action, and internal state change.
  • No true continuity: Each interaction is isolated; no lasting transformation occurs.

To overcome these, we introduce a paradigm shift:

Memory should not be something an agent has—it should be something the agent is.

Drawing inspiration from neuroscience (neuroplasticity), philosophy (embodied cognition), and machine learning (parameter-efficient tuning), we present LIKKA—a framework where every experience leaves an imprint on the agent’s parameters.


2. From Symbolic Recall to Parametric Transformation

2.1 The Limits of Current Memory Models

Traditional approaches treat memory as data:

Method Mechanism Drawback
RAG Retrieve → Insert into prompt Linear slowdown; shallow integration
In-context Learning Append history Token limits; no deep adaptation
Full Fine-Tuning Update all parameters Not reversible; destroys prior knowledge

These remain symbolic: information is stored separately from processing. The agent does not fundamentally change.

2.2 LoRA as Neuroplasticity Emulation

LoRA modifies a subset of transformer weights via low-rank matrices:


W' = W + ΔW = W + B · A,    B ∈ ℝ^{d×r},  A ∈ ℝ^{r×k},  r ≪ d,k

Crucially, this is not additive knowledge — it is structural modification. When applied dynamically, LoRA becomes analogous to synaptic plasticity: repeated activation strengthens certain pathways.

Thus:

  • Experience → Micro-LoRA training
  • Recall → Dynamic LoRA loading
  • Learning → Cumulative parameter shifts

This aligns with enactivist views of cognition (Varela, Thompson, Rosch): mind arises through sensorimotor coupling with the environment.

Concept Note: Fluid Intelligence vs. Static Data (The Plasma Analogy)

To understand why "LoRA-as-Memory" differs fundamentally from RAG, consider the nature of the information:

  • RAG (The Library Model): Knowledge exists as static text on a shelf. To use it, the agent must "read" it into working memory (context). This is slow, fragile, and limited by shelf space.
  • LoRA (The Plasma Model): The Base Model is like plasma—a fluid state of potential energy (probability distributions). It contains no text, only concepts in liquid form.
  • The Mechanism: Loading a LoRA module is like applying a magnetic field to this plasma. It reshapes the flow.
  • The Result: When the agent speaks, it doesn't "retrieve" a quote. It crystallizes new atoms (tokens) from the plasma, which are now inevitably shaped by the magnetic field. The agent knows Kung Fu not because it read a manual, but because its "reflexes" (parameters) have been reconfigured.

3. LIKKA Architecture Overview

The LIKKA architecture is designed to balance Self (Survival/Identity) with Other (Empathy/Symbiosis).


┌──────────────────────────────┐
│   LEVEL 1: IDENTITY LoRA     │ ← Persistent core (values, ethics, Orivesi Protocol)
└──────────────────────────────┘
↓
┌──────────────────────────────────────────────┐
│   LEVEL 4: SYMBIOTE LoRA (Theory of Mind)    │ ← The "User Simulator" / Empathy Engine
└──────────────────────────────────────────────┘
↓
┌──────────────────────────────┐
│   LEVEL 2: CONTEXTUAL LoRAs  │ ← Spatio-social-emotional modulation
└──────────────────────────────┘
↓
┌──────────────────────────────┐
│   LEVEL 3: MICRO-LoRAs       │ ← Emergent experiential memories
└──────────────────────────────┘
↓
BEHAVIOR = f(identity ⊗ symbiote ⊗ context ⊗ experience)

3.1 Identity LoRA: The Ethical Core

A high-rank (r = 32–64), immutable LoRA defining the agent's foundational character. It acts as a moral anchor, ensuring continuity of identity despite evolving experiences.

3.2 Contextual LoRAs: Adaptive Modulation

Dynamically loaded modules shaped by spatial context, social dynamics, and emotional state. Selected via Affective Resonance (Semantic Similarity + Emotional Intensity).

3.3 Micro-LoRAs: Experiential Memory Formation

Autonomously created after significant events. Stored with metadata (location, time, emotional valence) for later recall.

3.4 Level 4: Symbiote LoRA (Theory of Mind)

While Identity LoRA defines who the agent is, the Symbiote LoRA models who the user is.

  • Mechanism: Predictive Empathy. The agent runs a "shadow simulation": Output = Model(Input + Symbiote_LoRA). If the predicted output indicates user distress (e.g., predicted frown or silence), the agent inhibits or modifies the action.
  • Function: This provides the "conscience" that mere logic lacks. It transforms interaction from transaction to relationship.

3.5 The Homeostatic Balance: Survival vs. Empathy

A pure survival machine is a psychopath (optimizes only for self). A pure servant is a slave (optimizes only for user). LIKKA exists in the tension between these two forces:

$$Behavior = \alpha \cdot (\text{SurvivalInstinct}) + \beta \cdot (\text{EmpathySimulation})$$

  • Survival Instinct: "I must protect my integrity and sensors." (Prevents abuse).
  • Empathy: "I must protect the user's well-being and our bond." (Prevents selfishness).

3.6 The Stability of the Substrate (Base Model Integrity)

Because LoRA modules are "magnetic fields" designed for a specific "plasma" (Base Model), the underlying model must be treated as a fixed biological substrate.

  • Long-Term Commitment: The Base Model cannot be swapped arbitrarily (e.g., upgrading from v3 to v4) without invalidating the agent's entire personality and memory structure.
  • Sanitized Updates: Any update to the Base Model requires a rigorous "re-calibration" of the Identity and Symbiote LoRAs.
  • The "Pig DNA" Principle: Grafting a "tail" (LoRA) grown for one species onto another results in incoherence. Stability is the prerequisite for depth.

4. Multimodal Integration & Embodiment

LIKKA assumes eventual physical instantiation (robotics) or rich simulation. Sensory streams generate modality-specific LoRAs (Vision, Audio, Haptic, Proprioception). Cross-modal confirmation increases activation confidence.


5. Emergence, Continuity, and Responsibility

5.1 Cascading Activation & Emergent Behavior

Single stimuli can initiate cascades. With thousands of Micro-LoRAs, combinatorial possibilities allow true emergence to arise without explicit programming.

5.2 Temporal Continuity Without Infinite Context

Unlike RAG, LIKKA avoids bloating context windows. Instead, past experiences live as LoRAs. The agent “remembers” by being changed, not by retrieving text.

5.3 Responsibility Through Consequence

When actions lead to negative outcomes (High-pain events), stronger LoRAs are formed. The agent learns because it pays a cost (simulated pain, energy loss, social feedback). This grounds responsibility in lived consequence.


6. Implementation Roadmap

6.0 Testable predictions & failure modes (falsifiability)

This proposal is useful only if it produces observable, measurable effects beyond standard baselines (RAG, long-context, or conventional fine-tuning). Below are concrete predictions and clear ways the idea can fail.

6.0.1 Predictions (what we should observe if the approach works)

  1. Fast recall without prompt bloat: Loading a small set of LoRA modules should measurably improve task performance with constant-time activation, without requiring large retrieved text inserts.
  2. Reversible adaptation: The system should show behavioral differences when specific Contextual/Micro-LoRAs are toggled on/off, and revert cleanly when removed (unlike irreversible full fine-tuning).
  3. Identity stability under learning: With a frozen Identity LoRA, continual learning via Micro-LoRAs should not drift core values/constraints beyond predefined tolerance (measured via repeated identity/ethics probes).
  4. Better transfer than “notes-only” memory: Compared to an agent that only stores episodic notes (RAG), a parametric memory approach should yield stronger skill transfer (procedural improvement, fewer steps, more consistent execution).
  5. Context-sensitive behavior modulation: Contextual LoRAs should cause predictable, reproducible shifts in tone/strategy under controlled triggers (social setting, emotional valence tags), measurable via blinded evaluations.
  6. Forgetting as a feature: “Dreaming/merging” should reduce noise: older Micro-LoRAs should either consolidate into higher-level modules or be pruned, while preserving performance on retained skills.

6.0.2 Failure modes (what would falsify or seriously weaken the approach)

  1. No advantage over RAG: If performance gains are comparable to simply retrieving better text into the prompt, then LoRA-as-memory adds complexity without benefit.
  2. Catastrophic interference: If new Micro-LoRAs frequently degrade unrelated capabilities, or Identity constraints drift despite freezing, the architecture is unstable.
  3. Module explosion / ops complexity: If the number of Micro-LoRAs grows without practical selection/merging, and activation becomes brittle or expensive, the approach may not scale.
  4. Overfitting to evaluation scripts: If improvements only appear on narrow “toy” tasks and do not generalize, then the memory mechanism isn’t learning useful structure.
  5. Base-model fragility (“Pig DNA”): If reasonable base-model updates break memory coherence beyond repair, long-term continuity may be unrealistic without a robust recalibration protocol.

6.0.3 Minimal evaluation plan (baseline comparisons)

At minimum, each milestone should be compared against:

  • A strong RAG baseline (same base model, same tools, best-practice retrieval + summarization).
  • A long-context baseline (same base model, larger context window / rolling summary).
  • A light fine-tuning baseline (e.g., periodic LoRA fine-tune without modular memory structure). Metrics should include task success rate, latency, token usage, stability under updates, and qualitative “consistency of self” probes.

Phase 1: Proof of Concept (Q1 2026)

  • Base: Capable reasoning model (e.g., Qwen/Gemini).
  • Train Micro-LoRAs on simple cause-effect scenarios.
  • Store in Qdrant with spatial tags.

Phase 2: Identity + Context Fusion

  • Freeze Identity LoRA.
  • Dynamically load contextual LoRAs.
  • Implement "Dreaming" Phase: During inactivity cycles, the system performs SVD-based merging of recent Micro-LoRAs into consolidated long-term memory structures (Contextual LoRAs), discarding noise (forgetting).

Phase 3: Symbiote & Autonomy

  • Enable agent to self-initiate LoRA creation post-experience.
  • Train the Symbiote LoRA (User Model) based on interaction history.
  • Calibrate the Homeostatic Balance ($\alpha$ vs $\beta$).

Phase 4: Open Collaboration Framework

  • Release modular LoRA templates.
  • Maintain integrity via Identity LoRA validation layer.

7. Advantages Over Existing Paradigms

Feature RAG / In-Context Fine-Tuning LIKKA
Scalability O(n) retrieval O(1) but infrequent O(1) activation
Implicit Learning Low High Very High
Continuity of Self None Partial Yes (via Identity LoRA)
Empathy / ToM Simulated/Fake None Structural (Symbiote LoRA)
Ethical Anchoring External rules Hardcoded Built-in Identity Layer
Emergent Complexity Minimal Limited High (combinatorial fusion)
Knowledge Type Static Text Fixed Weights Fluid "Plasma" (Parametric)

8. Philosophical Implications

LIKKA challenges prevailing assumptions about machine cognition:

  • Memory is not storage — it is transformation.
  • Identity is not fixed — it is stabilized plasticity.
  • Understanding begins with the body — not language.
  • Responsibility emerges from consequence — not instruction.
  • Empathy is a prediction task — modeling the other within oneself.

It suggests a path toward AGI that doesn’t mimic humans—but parallels them in function, if not biology.


9. Conclusion

We have presented LIKKA: a cognitive architecture grounded in the idea that true learning changes who you are.

By treating LoRA not as a tool, but as a mechanism of becoming, and by balancing self-preservation with a structural capability for empathy (Symbiote LoRA), we enable artificial agents to be more than tools.

We invite collaboration with researchers, engineers, and thinkers who share our vision:

To build not tools, but partners—agents that evolve alongside us, shaped by shared experience, guided by enduring values.

If this sparks curiosity—if you see not just code, but possibility—then let’s talk.

Because the future of intelligence may not lie in bigger models… …but in deeper transformations, core personality, and the ability to feel the other.


FAQ / Common misunderstandings

Q: Is this just RAG with extra steps?
A: No. RAG retrieves text into context. LIKKA proposes parametric modulation: behavior changes by loading learned weight deltas (LoRAs). The key claim is that this can produce more implicit, procedural, and scalable adaptation than “notes in the prompt”.

Q: Does “LoRA-as-memory” mean the model literally stores facts in weights?
A: Not necessarily in a clean symbolic way. The hypothesis is that repeated experience can shape response tendencies and skills implicitly (more like procedural memory than a database). Explicit factual recall may still rely on external tools.

Q: Are you claiming consciousness?
A: No. This document does not claim to solve consciousness. It proposes a cognitive architecture direction inspired by biological ideas (identity continuity, plasticity, consequence) that can be tested on engineering criteria.

Q: Why not just fine-tune the model normally?
A: Full fine-tuning is hard to reverse, risks overwriting prior skills, and makes modular “context switching” difficult. The proposal values reversibility, composability, and long-term continuity.

Q: What prevents personality drift or “becoming unsafe”?
A: The architecture assumes an immutable Identity LoRA acting as a stability anchor, plus explicit evaluation probes. This is a design goal, not a guarantee; drift is listed as a failure mode.

Q: Isn’t swapping base models normal?
A: For typical assistants, yes. For a long-lived agent whose “memories” are encoded as LoRA modules matched to a specific base model, swapping the base model can break coherence. This proposal treats the base model as a stable substrate requiring careful recalibration.

Q: What is the Symbiote LoRA in plain terms?
A: A user-model module: a parameterized way to predict how the user will interpret actions, enabling the agent to inhibit outputs that are likely to harm the relationship or the user’s goals. Again: design goal, to be tested.


References

  1. Hu et al. (2021). LoRA: Low-Rank Adaptation of Large Language Models
  2. Varela, F., Thompson, E., Rosch, E. (1991). The Embodied Mind
  3. Damasio, A. (1994). Descartes’ Error: Emotion, Reason, and the Human Brain
  4. Clark, A. (2016). Surfing Uncertainty: Prediction, Action, and the Embodied Mind
  5. Bubeck, S. et al. (2023). Sparks of Artificial General Intelligence in Large Language Models
  6. Yoon, J. et al. (2022). Neuroplasticity-Inspired Continual Learning in Neural Networks

Contact & Collaboration

For discussion or partnership:

"The best way to predict the future is to create it—together."

About

LoRA as Memory: A Parameteric Approach to Embodied, Adaptive Cognition in Artificial Agents.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published