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)
- LLM Query Stream: A dense embedding vector from the LLM (dimension matching the LLM's output), blended with text input embeddings at 50% strength.
- Neuron Stream: A flattened vector representation of up to 8 active neurons, capturing state, output, connections, and topology.
- Memory Stream: Up to 300 episodic entries, each containing:
- A 22-dimensional vector (prior neuron states + external features).
- Importance weight (alpha value).
- Timestamp (tau value).
Projection Mechanism
- Deterministic Random Projections: Maps arbitrary-dimensional inputs to 64 dimensions using a hash-style algorithm, ensuring:
- Dense mixing (all input dimensions influence output).
- No information loss (no blocking or striding).
- Reproducibility (fixed seeds across runs).
- Full Projection: Scales input by the inverse square root of the input dimension (Johnson-Lindenstrauss lemma).
- Banded Projection: Projects streams into separate 16-dimension bands within the 64-dimensional output (seeds: 1009, 2003, 3001).
Processing Pipeline
- LLM Query Processing: Project and normalize; blend with text input.
- Neuron Feature Extraction: Project and normalize the flattened neuron vector.
- Top-K Memory Attention: Select the top 8 most relevant memory entries by similarity; apply softmax normalization to scores.
- Banded Assembly: Re-project each stream into separate 64-dimensional bands:
- LLM: Dimensions 0-22
- Neurons: Dimensions 22-43
- Memory: Dimensions 43-64
- Cross-Band Mixing: Introduce interactions between bands using sigmoid-modulated mixing.
- Output Normalization: Layer-normalize the final vector.
Design Rationale
- Deterministic Projection: The fusion mechanism is a feature extractor (not a learner); gradients are blocked at the fusion boundary.
- Banded Architecture: Prevents stream dominance (e.g., neurons or memory overwhelming LLM queries).
- Top-K Memory Attention: Ensures focused, informative attention (avoids averaging noise uniformly).
- Orthogonal Subspaces: Separate seeds for each band guarantee stream independence.
Key Results
| Test | Status | Key Metric |
| Learning Efficiency | PASS | Total Improvement: 47.70% |
| Domain Transfer | PASS | Transfer Efficiency: 63.88% |
| Continual Learning | PASS | Forgetting Index: 24.77% |
| Discovery | FAIL | Variance Ratio: 16.34% |
| Model Stability | PASS | Loss Late Std: 1.94% |
| Internal World Model | PASS | Fused Dimensionality: Full |
| Adaptation Speed | PASS | Recovery Epochs: 5 |
| Meta-Learning | PASS | Slope Trend: +0.45% |
| Affective Representations | PASS | Affective Complexity: +119.16% |
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 (24.77%) and fast recovery (Test 3).
- Stability: Low loss variance (1.94%) and full dimensionality utilization (Test 5).
- Meta-Learning: Improving slope trend shows consistent "learning to learn" capability (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.