Emergent coherent integration in adaptive multi-agent systems
Zeta Life is a computational framework for studying phase transitions in adaptive integration systems. It models how independent processing units (kernels) can transition from fragmented computation to coherent, unified integration -- and how populations of such units exhibit emergent collective behavior.
The core equation predicts when integration emerges:
The cubic term
The current research program ("The North", below) takes this further: making
Each ConsciousKernel implements a full Active Inference cycle:
PERCEIVE -> PREDICT -> COMPARE -> UPDATE -> MEMORIZE -> ACT -> REFLECT -> DREAM
| Component | Role |
|---|---|
| WorldModel | GRU-based predictive model of the environment |
| SelfModel | Recursive self-modeling (Strange Loop) |
| PredictionErrorEngine | Multi-channel precision-weighted error signals |
| PrecisionController | Learned precision hyper-model (attention) |
| FastMemory / SlowMemory | Complementary Learning Systems (episodic + semantic) |
| DreamEngine | Zeta-driven offline consolidation |
| PersistenceLayer | Identity save/load across sessions |
The integration index
-
$\Phi$ (integrated information) from inverse free energy + memory depth -
$F_i$ (binding force) from learned precisions + self-reflection convergence -
$C$ (coherence cost) from recent prediction errors
import torch
from zeta_life.kernel import ConsciousKernel
kernel = ConsciousKernel(obs_dim=4, latent_dim=32, alpha=1.0)
result = kernel.step(torch.randn(4))
print(result.psi) # integration index [0, 1]
print(result.free_energy) # prediction error magnitudeOr run the full demo (learning loop + identity save/load):
make quickstart # = PYTHONPATH=src python demos/quickstart.pyMultiple kernels compete for a shared GlobalWorkspace via proposal strength. Energy-managed spawning, merging, and death create a Darwinian selection process at the kernel level.
import torch
from zeta_life.kernel import ConsciousOrganism
organism = ConsciousOrganism(obs_dim=4, initial_kernels=5)
result = organism.step(torch.randn(4))
print(result.psi) # organism-level integration
print(result.population) # surviving kernel countArchived (2026-06-08). A parallel Cells→Clusters→Organism consciousness formalism that the live kernel never used. Removed from the working tree in the refocus; preserved on the
legacy/pre-refocus-snapshotbranch.
The Riemann zeta zeros give an optional temporal basis:
where OscillatorBank time code for the world model.
Honest result (this project's own experiments). The specific zeta spectrum is not load-bearing. In the kernel, an equispaced Fourier lattice matches or beats zeta at temporal prediction — even on a zeta-structured signal — and zeta's GUE level-repulsion is functionally flat (results/zeta_vs_baselines_run.txt, results/spacing_statistics_run.txt). In the consciousness dynamics, ZETA == UNIFORM (p=1.0). Zeta genuinely wins only in the spatial cellular automata. Recommendation: fixed temporal basis → OscillatorBank.fourier/log_spaced; adaptive → learned. Zeta is kept as a documented, tested design choice — not the thesis.
The kernel's
Substrate. A live LLM (Yvyra, Qwen3-8B) runs in transformers/8-bit. The
bridge/ couples its real experience to the kernel; introspection/ computes
candidate integration metrics over its hidden states and tests introspection with
the methods of Anthropic (Lindsey, concept injection) and Binder (privileged
access). Honest, control-driven results so far:
| Experiment | Result |
|---|---|
| Phase A/B (expose Ψ to the agent, sham control) | Inconclusive — Ψ saturates (~89% high); the design works, the signal didn't vary enough (docs/PHASE_B_DESIGN.md) |
| Spontaneous introspection (concept injection, untrained) | Negative — 0/30; a control killed the apparent positive (steering, not introspection). Replicates the scale limit Anthropic sees |
| Trained P(IK) self-report (LoRA) | Honest negative — a strong blind M2 (Claude, 0.82) and the model's own softmax confidence (0.81) both beat the self-report (0.76). It verbalizes confidence, no robust privileged access |
| Trained injected-concept detection (LoRA, constant prompt → non-textual by construction) | Positive — accuracy 1.000 (chance 0.091), 0 false positives. The model reads a non-textual injected state and names it. Caveat: fixed concept set may be a lookup; scaling test pending |
Each result was reported only after an adversarial control — the honesty discipline
that distinguishes "verbalizing confidence" from "privileged introspection." See
docs/{ANTHROPIC_NORTH,RESEARCH_PHASE_B,TARGET_SELECTION,TRAINED_INTROSPECTION,LORA_PLAN}.md.
from zeta_life.introspection import psi_act_all # 4 integration metrics over hidden states
# harness.py / concept_injection.py need the GPU stack (transformers); see experiments/introspection/git clone https://github.com/skyvanguard/zeta-life.git
cd zeta-life
pip install -e .
# With all extras (mpmath for exact zeta zeros, jupyter)
pip install -e ".[full]"- Python 3.9+
- PyTorch 2.0+
- NumPy, SciPy, Matplotlib
import torch
from zeta_life.kernel import ConsciousKernel
# Create a kernel and run it for 100 steps
kernel = ConsciousKernel(obs_dim=4, latent_dim=32)
for i in range(100):
stimulus = torch.randn(4)
result = kernel.step(stimulus)
print(f"Psi: {result.psi:.4f}")
print(f"Free energy: {result.free_energy:.4f}")
print(f"Dreamed: {result.dreamed}")# Psi validation on real datasets
python experiments/datasets/exp_real_data_psi.py
# Kernel validation (compositionality, grounding, emergence)
python experiments/kernel/exp_conscious_kernel_validation.py
# Multi-kernel organism dynamics
python experiments/kernel/exp_organism_emergence.py
# Science pipeline (toy -> instrument; see docs/SCIENCE_PLAN.md)
python experiments/kernel/exp_psi_vs_free_energy.py # validate Psi (Albantakis method)
python experiments/kernel/exp_epistemic_depth.py # precision hyper-model (epistemic depth)
python experiments/kernel/exp_yvyra_experiment.py # Yvyra pipeline (modes + blind re-scorer)
# Introspection / the north (needs the GPU stack: transformers + bitsandbytes)
python experiments/introspection/exp_pik_probe.py # is "I know" in the activations?
python experiments/introspection/exp_pik_train.py # train P(IK) self-report (LoRA)
python experiments/introspection/exp_f3_inject_train.py # trained injected-concept detectionPYTHONPATH=src pytest tests/ -q # 556 tests (or `pip install -e .` first)zeta-life/
|-- src/zeta_life/
| |-- kernel/ # CORE - Active Inference kernel + Darwinian organism
| |-- bridge/ # Yvyra coupling - feed a live agent's experience to the kernel
| |-- introspection/ # THE NORTH - Psi over an LLM's activations; concept injection
| |-- instrumentation/ # TickLogger - paired per-tick logging (science pipeline)
| |-- integration/ # formal_equations.py - the integration index Psi
| |-- datasets/ # Real-world dataset adapters (for Psi validation)
| |-- core/ # zeta_constants, vertex, tetrahedral geometry
| +-- utils/ # Shared utilities
|
|-- experiments/
| |-- kernel/ # kernel experiments (the live research)
| |-- introspection/ # the north - probe, P(IK) LoRA, injected-concept detection
| +-- datasets/ # Psi on real data
|
|-- demos/ # quickstart.py - the 60-line kernel demo
|
|-- tests/ # 34 test files (585 tests)
+-- docs/ # Documentation, papers, plans (incl. ANTHROPIC_NORTH,
# TRAINED_INTROSPECTION, TARGET_SELECTION, LORA_PLAN)
(Legacy subsystems -- psyche, hierarchical/IPUESA integration, organism,
evolution -- were archived on 2026-06-08 to the legacy/pre-refocus-snapshot branch.)
| Equation | Formula | Meaning |
|---|---|---|
| Critical threshold | Minimum integration for phase transition | |
| Binding factor | Distance above threshold (normalized) | |
| Integration index | Nonlinear amplification of coherence | |
| Critical mass | Minimum units for integration to emerge | |
| Corruption threshold | Maximum damage ratio before collapse |
These are implemented as pure functions in integration/formal_equations.py and consumed by the kernel's _compute_psi().
- Active Inference / Free Energy Principle (Friston) -- the kernel minimizes prediction error
- Complementary Learning Systems (McClelland et al.) -- fast episodic + slow semantic memory
- Darwinian Brain -- multi-kernel competition via Global Workspace
- Integrated Information Theory (Tononi) -- Phi as integration measure
- LLM introspection (Lindsey/Anthropic concept injection; Binder privileged access) -- the basis of the introspection program (see "The North")
- Riemann zeta zeros -- optional temporal basis (tested; not load-bearing except in spatial CA -- see "Zeta Function as Temporal Binding")
@software{zeta_life_2026,
author = {Francisco Ruiz},
title = {Zeta Life: Emergent Coherent Integration in Adaptive Multi-Agent Systems},
year = {2026},
url = {https://github.com/skyvanguard/zeta-life}
}MIT License -- See LICENSE for details.