Introducing Cognitive Fusion in Larkos: A Unified Architecture for LLM, Neuron, Memory, and Module Integration
Author: Witold Warchoł
Date: 2.06.2026
See this paper for a more comprehensive version of this post.
Abstract
The Cognitive Fusion Mechanism (CFM) in Larkos integrates LLM embeddings, neuron states, and episodic memory into a shared 64-dimensional space. It ensures information preservation, stream balance, and deterministic reproducibility, enabling dynamic, context-aware reasoning. Empirical results demonstrate strong performance in learning efficiency, domain transfer, continual learning, and meta-learning, while maintaining stability and affective coherence.
Introduction
Current AI systems struggle with catastrophic forgetting, poor generalization, and inefficient adaptation. CFM addresses these by unifying heterogeneous information streams into a cohesive cognitive architecture, validated through a 9-test framework.
Core Architecture: Cognitive Fusion Mechanism (CFM)
Input Streams
-
LLM Query Stream: Dense embedding vector (
q_raw ∈ ℝ^d_llm) from the LLM, blended with text input embeddings at 50% strength. -
Neuron Stream: Flattened vector (
n_flat ∈ ℝ^16N) for up to 8 active neurons, capturing state, output, connections, and topology. -
Memory Stream: Up to 300 episodic entries, each with:
- A 22D vector (prior neuron states + external features).
-
Importance weight (
α_i). -
Timestamp (
τ_i).
Projection Mechanism
-
Deterministic Random Projections: Maps arbitrary-dimensional inputs to 64D using a
splitmix64-style hash, ensuring:- Dense mixing (all input dimensions influence output).
- No information loss (no blocking/striding).
- Reproducibility (fixed seeds across runs).
-
Full Projection: Scales input by
1/√n(Johnson-Lindenstrauss lemma). - Banded Projection: Projects into disjoint bands of the 64D output (seeds: 1009, 2003, 3001).
Processing Pipeline
- LLM Query Processing: Project + layer-normalize; blend with text input.
- Neuron Feature Extraction: Project + normalize flattened neuron vector.
- Top-K Memory Attention: Select top 8 memory entries via dot-product similarity; softmax-normalize scores.
-
Banded Assembly: Re-project each stream into disjoint 64D bands:
- LLM:
[0:22] - Neurons:
[22:43] - Memory:
[43:64]
- LLM:
- Cross-Band Mixing: Introduce interactions between bands via sigmoid-modulated mixing.
- Output Normalization: Layer-normalize the final vector.
Design Rationale
- Deterministic Projection: C-side fusion is a feature extractor (not a learner); gradients are killed at the C boundary.
- Banded Architecture: Prevents stream dominance (e.g., neurons/memory burying LLM queries).
- Top-K Memory Attention: Ensures peaked, informative attention (avoids uniform noise averaging).
- Orthogonal Subspaces: Separate seeds for each band guarantee stream independence.
Key Results
| Test | Status | Key Metric |
|---|---|---|
| Learning Efficiency | PASS | Total Improvement: +0.4770 |
| Domain Transfer | PASS | Transfer Efficiency: +0.6388 |
| Continual Learning | PASS | Forgetting Index: +0.2477 |
| Discovery | FAIL | Variance Ratio: +0.1634 |
| Model Stability | PASS | Loss Late Std: +0.0194 |
| Internal World Model | PASS | Fused Dimensionality: 1.0 |
| Adaptation Speed | PASS | Recovery Epochs: 5 |
| Meta-Learning | PASS | Slope Trend: +0.0045 |
| Affective Representations | PASS | Affective Complexity: +1.1916 |
Analysis Highlights
- Rapid Convergence: 77% loss reduction in early epochs (Test 1).
- Robust Transfer: 63.88% efficiency in domain adaptation (Test 2).
- Continual Learning: Low forgetting index (0.2477) and fast recovery (Test 3).
- Stability: Low loss variance (0.0194) and full dimensionality (Test 5).
- Meta-Learning: Improving slope trend (+0.0045) shows "learning to learn" (Test 8).
- Affective Coherence: High arousal correlates with high loss (Test 9).
Conclusion
CFM enables robust, interpretable, and adaptive cognitive modeling by unifying LLM embeddings, neuron states, and memory. It addresses catastrophic forgetting, poor generalization, and inefficient adaptation, paving the way for human-like AI systems. Future work will focus on scaling and refining exploration-exploitation balance.
Top comments (0)