Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified article/main.pdf
Binary file not shown.
19 changes: 8 additions & 11 deletions article/sections/00-abstract.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@
interfaces and coordination structure rather than literal biological mechanism.

We develop a typed interface correspondence, expressed in the language of polynomial functors and
wiring diagrams, between Gene Regulatory Networks (GRNs) and agentic software systems. At the
atomic level, genes and agent capabilities are modeled as polynomial interfaces; at the composite
level, cells and agents are modeled as structured compositions of those interfaces plus shared
organelles; tissues correspond to multi-agent subsystems. On top of this abstraction, we derive a typed
wiring diagrams, between Gene Regulatory Networks (GRNs) and agentic software systems. On top of this abstraction, we derive a typed
syntax for agent composition by mapping biological
mechanisms---including Quorum Sensing for consensus, Chaperone Proteins for structural validation,
Innate and Adaptive Immunity for layered security, Mitochondrial Signaling for bioenergetic resource
governance, and Endosymbiosis for neuro-symbolic integration---to software design patterns. This framework
provides a mathematical basis for ``Epigenetic'' state management (RAG), a \textit{Provenance Functor} for
trust-gated resistance to content-level trust forgery, \textit{Epiplexity} for detecting epistemic stagnation, a \textit{Metabolic
Coalgebra} that provides a qualified termination criterion under explicit resource-monotonicity
assumptions, wire-level \textit{Optics} (Prisms and Traversals) for conditional routing, graph-based
governance, and Endosymbiosis for neuro-symbolic integration---to software design patterns. The framework
provides ``Epigenetic'' state management, a \textit{Provenance Functor} for
trust-gated security, \textit{Epiplexity} for detecting epistemic stagnation, a \textit{Metabolic
Coalgebra} for resource governance, wire-level \textit{Optics} for conditional routing, graph-based
\textit{Morphogen Diffusion} for spatially varying coordination, and composable \textit{Coalgebraic State
Machines} with observational equivalence criteria. A reference implementation, interactive
demonstrations, and a synthetic evaluation harness illustrate the framework's practical feasibility.
Machines} with observational equivalence criteria.

Beyond the structural layer, we introduce a progression from \textit{temporal epistemics} (bi-temporal memory with append-only correction semantics and belief-state reconstruction) through \textit{adaptive structure} (pattern libraries, runtime watchers with three-category signal taxonomy, and experience-driven assembly) to a \textit{cognitive architecture} (dual-process System A/B mode annotations, sleep consolidation with counterfactual replay, social learning with epistemic vigilance, curiosity-driven exploration) and finally \textit{developmental staging} (critical periods, capability gating, teacher-learner scaffolding). This six-layer progression---structure, memory, adaptation, cognition, development, integration---is grounded in Dupoux, LeCun, and Malik's autonomous learning framework and validated by Hao et al.'s empirical finding that intervention count serves as a convergence proxy. A reference implementation with 1,130 tests, 81 examples, interactive demonstrations, and cross-subsystem integration tests illustrates the framework's practical feasibility.
\end{abstract}
37 changes: 20 additions & 17 deletions article/sections/09-conclusion.tex
Original file line number Diff line number Diff line change
Expand Up @@ -111,25 +111,28 @@ \subsection*{Implications}
suggests a path toward more formally analyzed adaptive multi-agent systems, where topological transitions
can be justified under explicit epistemic and resource assumptions.

\subsection*{The Six-Layer Arc}

The v0.19--v0.23 progression demonstrates that the biological analogy extends beyond structural safety into temporal reasoning, adaptive behavior, and cognitive development:

\begin{enumerate}[leftmargin=*]
\item \textbf{Structure} (v0.17--0.18): Typed wiring diagrams, topology advice, pattern-first API.
\item \textbf{Memory} (v0.19--0.20): Bi-temporal facts with dual time axes; auditable substrate integration with three-layer context model.
\item \textbf{Adaptation} (v0.21): Pattern libraries for evolutionary template memory; watcher with three-category signal taxonomy (epistemic/somatic/species); intervention-count convergence signal grounded in Hao et al.~\cite{hao2026bigmas}; experience-driven adaptive assembly.
\item \textbf{Cognition} (v0.22): System A/B cognitive mode annotations per Dupoux et al.~\cite{dupoux2026learning}; sleep consolidation with counterfactual replay; social learning with epistemic vigilance (trust-weighted template exchange); curiosity signals for intrinsic motivation.
\item \textbf{Development} (v0.23): Critical periods that close as organisms mature; capability gating via developmental stage on tool acquisition; teacher-learner scaffolding.
\item \textbf{Integration} (v0.23.x): Cross-subsystem integration tests; memory adapters bridging histone and episodic memory into the bi-temporal store; paper and documentation finalization.
\end{enumerate}

Each layer assumes the previous one is stable. The progression from structural safety to temporal epistemics to adaptive cognition to developmental staging is not arbitrary---it mirrors the biological sequence from genome (fixed structure) through epigenetics (learned bias) to neural development (plastic then crystallizing).

\subsection*{Future Work}

Several directions remain open:
\begin{itemize}[leftmargin=*]
\item \textbf{Epiplexity Validation:} Empirical calibration of the $\alpha$ mixing parameter and threshold
$\delta$ across diverse task types and LLM families. The current implementation uses a mock embedding
provider; integration with production embedding APIs remains future work.
\item \textbf{Correlation Estimation:} Lightweight methods for estimating $\rho$ between agent error modes
without exhaustive pairwise testing.
\item \textbf{Distributed Diffusion:} The morphogen diffusion field currently operates in a single process.
Extending to distributed multi-process deployments with eventual consistency remains open.
\item \textbf{Adversarial Robustness:} Red-team evaluation of immune evasion vectors, including novel
injection syntax, tool poisoning, and behavioral mimicry attacks. Development of continuous adaptation
mechanisms (signature updates, thymic retraining, threat intelligence sharing).
\item \textbf{Production Benchmarks:} Validation on real LLM outputs at scale, measuring both security
efficacy and performance overhead of the defense layers.
\item \textbf{Finite-Trace Equivalence at Scale:} The current equivalence check operates over finite input sequences.
Extending it to coinductive bisimulation for infinite-trace or continuously interacting agent systems is an open challenge.
\item \textbf{Learned Rewriting Rules:} The current optimization passes are hand-crafted. Learning
rewriting rules from execution traces---identifying recurring subdiagram patterns and their optimized
replacements---would connect diagram optimization to program synthesis and equality saturation techniques.
\item \textbf{Convergence Investigation:} Combining Operon's structural guarantees with operational runtimes (AnimaWorks~\cite{animaworks}, Swarms~\cite{swarms}) to create structurally guaranteed persistent organizations with cognitive capabilities.
\item \textbf{Production Benchmarks:} Validation on real LLM outputs at scale via BFCL and AgentDojo evaluation harnesses, measuring both reliability and the impact of adaptive assembly on task performance.
\item \textbf{Adversarial Robustness:} Red-team evaluation of immune evasion vectors and development of continuous adaptation mechanisms.
\item \textbf{Distributed Diffusion:} Extending morphogen fields to distributed multi-process deployments with eventual consistency.
\item \textbf{Learned Rewriting Rules:} Learning diagram optimization rules from execution traces, connecting to program synthesis and equality saturation.
\end{itemize}
2 changes: 1 addition & 1 deletion docs/site/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ The lower-level layer models modules, ports, wires, and topology explicitly so t
- `v0.20` integrated bi-temporal memory into the SkillOrganism runtime as an auditable substrate, formalizing the three-layer context model (topology, ephemeral, bi-temporal)
- `v0.21` added pattern repository, watcher component, adaptive assembly, and experience pool — the adaptive structure layer
- `v0.22` added cognitive mode annotations (System A/B), sleep consolidation, social learning, and curiosity — the cognitive architecture layer
- `v0.23` added developmental staging with critical periods and capability gating — the developmental layer
- `v0.23` added developmental staging with critical periods and capability gating — the developmental layer; release integration with memory adapters and cross-subsystem tests completed the roadmap

The current center of gravity is pattern-first workflows with auditable state.
16 changes: 16 additions & 0 deletions docs/site/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

This page tracks the recent direction of the project.

## v0.23.1

Focus:

- release integration and publication polish
- bi-temporal memory adapters (HistoneStore → BiTemporal, EpisodicMemory → BiTemporal)
- cross-subsystem integration tests (5 end-to-end tests)
- article rewrite (abstract, conclusion updated for full v0.19–v0.23 scope)

New:

- `histone_to_bitemporal()`, `episodic_to_bitemporal()` — memory bridge adapters
- Integration tests covering substrate+watcher, adaptive+consolidation, social+development, full lifecycle
- Article abstract covering six-layer progression
- Article conclusion with roadmap arc and updated future work

## v0.23.0

Focus:
Expand Down
2 changes: 1 addition & 1 deletion operon_ai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,4 +710,4 @@
"MetabolicAccessPolicy",
]

__version__ = "0.23.0"
__version__ = "0.23.1"
6 changes: 6 additions & 0 deletions operon_ai/memory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
FactSnapshot,
CorrectionResult,
)
from .adapters import (
histone_to_bitemporal,
episodic_to_bitemporal,
)

__all__ = [
"MemoryTier",
Expand All @@ -33,4 +37,6 @@
"BiTemporalMemory",
"FactSnapshot",
"CorrectionResult",
"histone_to_bitemporal",
"episodic_to_bitemporal",
]
96 changes: 96 additions & 0 deletions operon_ai/memory/adapters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
"""Memory adapters — one-way bridges from existing memory systems to BiTemporalMemory.

These adapters create new bi-temporal facts from existing memory entries
without modifying the source. They are the integration layer between
Operon's epigenetic/episodic memory and the append-only auditable fact store.
"""

from __future__ import annotations

from typing import TYPE_CHECKING, Any

from .bitemporal import BiTemporalFact, BiTemporalMemory

if TYPE_CHECKING:
from ..memory.episodic import EpisodicMemory, MemoryTier
from ..state.histone import HistoneStore


def histone_to_bitemporal(
histone_store: HistoneStore,
bitemporal: BiTemporalMemory,
*,
subject_prefix: str = "histone",
) -> list[BiTemporalFact]:
"""Bridge HistoneStore markers into bi-temporal facts.

Each marker becomes a fact with:
- subject: "{prefix}:{marker_hash}"
- predicate: marker_type value (e.g., "methylation")
- value: marker content string
- valid_from/recorded_from: marker created_at
- source: "histone_adapter"
- tags: ("histone", marker_type)

Returns list of created facts.
"""
created: list[BiTemporalFact] = []
for marker_hash, marker in histone_store._markers.items():
if marker.is_expired():
continue
fact = bitemporal.record_fact(
subject=f"{subject_prefix}:{marker_hash[:8]}",
predicate=marker.marker_type.value,
value=marker.content,
valid_from=marker.created_at,
recorded_from=marker.created_at,
source="histone_adapter",
confidence=marker.confidence,
tags=(subject_prefix, marker.marker_type.value),
)
created.append(fact)
return created


def episodic_to_bitemporal(
episodic_memory: EpisodicMemory,
bitemporal: BiTemporalMemory,
*,
subject_prefix: str = "episodic",
min_tier: str = "episodic",
) -> list[BiTemporalFact]:
"""Bridge EpisodicMemory entries into bi-temporal facts.

Filters entries by minimum tier (default: EPISODIC, skipping WORKING).
Each entry becomes a fact with:
- subject: "{prefix}:{entry.id}"
- predicate: tier value (e.g., "episodic", "longterm")
- value: entry content string
- valid_from/recorded_from: entry created_at
- source: "episodic_adapter"
- tags: ("episodic", tier)

Returns list of created facts.
"""
from ..memory.episodic import MemoryTier

tier_order = {"working": 0, "episodic": 1, "longterm": 2}
min_order = tier_order.get(min_tier, 1)

created: list[BiTemporalFact] = []
for entry in episodic_memory.memories.values():
if tier_order.get(entry.tier.value, 0) < min_order:
continue
if entry.strength <= 0:
continue
fact = bitemporal.record_fact(
subject=f"{subject_prefix}:{entry.id}",
predicate=entry.tier.value,
value=entry.content,
valid_from=entry.created_at,
recorded_from=entry.created_at,
source="episodic_adapter",
tags=(subject_prefix, entry.tier.value),
)
created.append(fact)
return created
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "operon-ai"
version = "0.23.0"
version = "0.23.1"
description = "Biomimetic wiring diagrams for robust agentic systems."
readme = "README.md"
requires-python = ">=3.11"
Expand Down
Loading
Loading