AISME — Persona and Affect Layer (Experimental)¶
Note: Internal names include Insula, interoception, cortical hierarchy, and soul-drift.
The Active Inference Self-Model Engine (AISME) provides Spector with autobiographical narrative identity, homeostatic affective tracking, and predictive coding capabilities across recall and consolidation pathways.
Experimental
This pathway is not part of the default memory contract. Enable only with the documented flag (enableAisme). The persona and affect layer modulates recall ranking but is not required for standard Remember / Recall / Reflect / Forget operations.
1. Core Architecture¶
AISME operates across 12 synchronized processing phases:
flowchart TD
SC["SoulContext (Agent / User / Tenant)"] --> GSM["GenerativeSelfModel & MentalStateTracker"]
GSM --> HC["HomeostaticCore (Affective VAD SDE)"]
GSM --> PCMN["PredictiveCodingNetwork (4-Tier Cortical Hierarchy)"]
HC --> FERS["Free-Energy Guided Relay (FERS)"]
PCMN --> CSR["ConstructiveSimulationRelay"]
FERS --> LIR["LateralInhibitionRelay"] 1.1 SoulContext Polymorphism & Identity Plane Storage¶
SoulContext provides polymorphic, versioned persona definitions persisted within dedicated Identity Bundles (identity.bundle) under the sharded Identity Plane (identity/accounts/ and identity/tenants/):
- Agent Soul (
AgentSoul): Personality traits, core values, system prompt baseline, ethical guardrails, and registered tools. - User Soul (
UserSoul): Human interaction preferences, personalized memory salience, and custom ICNU parameters. - Tenant Soul (
TenantSoul): Enterprise organizational isolation, RBAC governance flags, and compliance retention windows. - Org Unit Soul (
OrgUnitSoul): Departmental or divisional sub-souls stored within the tenant bundle'sORG_DIRregion.
At runtime, the applicable soul hierarchy (TenantSoul \(\to\) OrgUnitSoul \(\to\) AgentSoul / UserSoul) is assembled into the Hierarchical Soul Stack and mounted into the kernel's InsulaMemory (RegionId.INSULA in runtime.bundle), powering dynamic interoceptive self-tracking during reasoning.
1.2 GenerativeSelfModel & MentalStateTracker¶
Tracks active beliefs, priors, and goals in embedding space. As new experiences are consolidated during sleep reflection, the autobiographical centroid adapts the generative prior mean with learning rate \(\eta = 0.005\).
1.3 HomeostaticCore¶
Governs Valence-Arousal-Dominance (VAD) emotional dynamics via a continuous stochastic differential equation (SDE):
Where mean-reverting drift ensures the persona returns to emotional baseline after intense events, while stochastic diffusion reflects spontaneous internal variance.
2. Relay Integration & Gating¶
AISME relays are registered in RecallPathway and ReflectPathway:
| Relay | Subsystem | Default Gated Condition |
|---|---|---|
FreeEnergyGuidedRelay | Dynamic FERS scoring | enableAisme && soulContext != null |
ConstructiveSimulationRelay | Recombination | enableAisme && enableConstructiveSimulation |
LateralInhibitionRelay | Contradiction arbitration | enableLateralInhibition (default true) |
SoulDriftRefusionRelay | Sleep restamping | soulDriftRefusionEnabled (default true) |
LifespanAdaptivePruningRelay | Synaptic maintenance | enableAisme |
3. Engine Selection¶
Engine routing is governed by spector.memory.recall.engine:
auto: UsesPathwayEnginewhen AISME, lateral inhibition, or dynamic regimes are active; falls back to legacy direct scan for zero-configuration throughput.pathway: Enforces full pipeline execution throughRecallPathway.direct: Forces minimal direct scanner for microsecond benchmarks.