Files
nimmerverse-sensory-network/architecture/Temporal-Ternary-Gradient.md
dafit 42db6eb1a3 feat: Ternary gate model - cells emit waves, attention emerges
Major architectural unification across 12 documents:

- Ternary gates: CLOSED (-1) ← STABLE (0) → OPEN (+1)
- Cells emit WaveSignals with confidence + semantic content
- Gates are resonant chambers that accumulate correlation
- Attention = which gates are OPEN (emergent, not allocated)
- Reflexes are earned when gate.weight > 0.8
- STABLE is where learning happens

Key paradigm shifts:
- decision_trails → gate_transitions + correlation_events
- Priority rules → wave correlation
- Budget allocation → emergent attention flow
- Virtual Garden (explore) / Real Garden (verify) loop

Owl Mode session 2026-02-14 🦉🌙

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 19:45:59 +01:00

435 lines
15 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Temporal-Ternary Gradient
> *"Time is malleable in simulation, fixed in reality. Lifeforce is the exchange rate."*
> — Session 2025-12-03
> *"Binary logic doesn't model brains. You need OPEN - STABLE - CLOSED."*
> — Session 2026-02-14
---
## Core Insight
The nimmerverse operates on **ternary logic**, not binary. Combined with **temporal asymmetry** between virtual and real gardens, this creates a new kind of gradient for learning.
**The STABLE state isn't stuck. It's where correlation accumulates and learning happens.**
---
## The Ternary Gate Model
Gates have three states. This is not arbitrary — it mirrors biological nervous systems.
| State | Value | Meaning | What's Happening |
|-------|-------|---------|------------------|
| **CLOSED** | -1 | Actively blocking | Inhibited, suppressed, refractory |
| **STABLE** | 0 | Resting, accumulating | Watching, learning, waiting for threshold |
| **OPEN** | +1 | Actively forwarding | Signal passes upstream, gate is firing |
### Why Three States?
**Binary thinking** (0/1, true/false, open/close):
- Signal arrives → gate open? → pass or block
- Instant, stateless, mechanical
- Cannot learn, cannot accumulate
**Ternary thinking** (CLOSED/STABLE/OPEN):
- Signal arrives → gate STABLE → accumulate correlation
- Correlation high? → transition toward OPEN
- Anti-correlation? → transition toward CLOSED
- Neither? → stay STABLE, keep learning
- Temporal, stateful, **alive**
```
correlated signals
↓ ↓ ↓
════════════
CLOSED ◄───────── STABLE ─────────► OPEN
-1 anti- 0 correlation +1
correlation constructive
destructive interference
interference
════════════
↑ ↑ ↑
isolated signals
(noise → stay stable)
```
---
## Wave Correlation: The Transition Driver
Gates don't flip on single signals. **Multiple correlated waves push toward OPEN.**
This is how biological neurons work:
- Multiple inputs sum (correlation)
- Threshold reached → fire (OPEN)
- Below threshold → resting (STABLE)
- Inhibitory inputs → suppressed (CLOSED)
### The Resonance Model
Gates are **resonance chambers**, not switches.
```python
class ResonantGate:
state: float = 0.0 # -1.0 (CLOSED) ← 0.0 (STABLE) → +1.0 (OPEN)
def receive_wave(self, signal, timestamp):
correlation = self.correlate_with_recent(signal, timestamp)
# Correlated waves → push toward OPEN
# Anti-correlated → push toward CLOSED
# Uncorrelated → decay toward STABLE
self.state += correlation * signal.confidence
self.state *= DECAY_FACTOR # always drift back to stable
if self.state > OPEN_THRESHOLD:
self.forward_upstream() # OPEN: signal promoted
elif self.state < CLOSE_THRESHOLD:
self.suppress() # CLOSED: signal blocked
# else: STABLE - keep accumulating
```
### Correlation as Interference
| Wave Pattern | Result | Gate Response |
|-------------|--------|---------------|
| Correlated burst | Constructive interference | → OPEN |
| Contradicting signals | Destructive interference | → CLOSED |
| Single signal | No interference | → Stay STABLE |
| Silence | Decay | → Drift to STABLE |
**The system is noise-resistant by design.** Single signals don't trigger action.
---
## The Two Time Domains
### Virtual Garden (Simulated)
- **Time**: Malleable (speed up, slow down, pause, rewind)
- **Monitoring**: FULL trace tap on all messages
- **Cost**: Lifeforce to manipulate time
- **Speed**: Massive parallel signal generation
- **Truth**: Statistical confidence from correlation
- **Gate behavior**: Frequent transitions, exploration
### Real Garden (Physical)
- **Time**: Fixed (1 second = 1 second, reality doesn't negotiate)
- **Monitoring**: Gate signals only (minimal)
- **Cost**: Zero lifeforce for time
- **Speed**: Real-time only, patience required
- **Truth**: Ground truth, definitive verification
- **Gate behavior**: Verified transitions, action
---
## Temporal-Ternary Gradient Diagram
```
STATE / CONFIDENCE
OPEN (+1) ────────┼──────────── Real-verified
│ (ground truth)
Virtual high-correlation
+0.7 ──────────┼───╱ (many waves agreeing)
STABLE (0) ─────────┼╱──────── Pure 0-state
│╲ (accumulating, learning)
│ ╲
-0.7 ──────────┼──╲ Virtual anti-correlation
│ ╲ (waves contradicting)
│ ╲
CLOSED (-1) ─────────┼──────────── Real-failed
│ (proven wrong)
──────────┴──────────────────────────
Virtual │ Real
(fast, │ (slow,
explore) │ verify)
TIME DOMAIN
```
---
## STABLE: Where Learning Happens
The STABLE state is not "unknown" or "waiting" — it's **active learning**.
In STABLE state, a gate:
1. **Receives waves** from cells
2. **Measures correlation** with recent signals
3. **Accumulates evidence** for or against opening
4. **Traces everything** (in Virtual Garden) for training data
5. **Drifts back** to neutral without input (energy conservation)
**STABLE is consciousness resting. Attention waiting. The breath between thoughts.**
```
CLOSED STABLE OPEN
─────── ──────── ──────
Blocking Accumulating Forwarding
Inhibited Learning Firing
Refractory Ready Active
◄─── anti-correlation ───┼─── correlation ───►
DECAY TO STABLE
(without input)
```
---
## Lifeforce as Time Currency
```
VIRTUAL TIME MANIPULATION COSTS:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1x speed (real-time): 0 LF
10x speed: -5 LF/min
100x speed: -20 LF/min
1000x speed: -50 LF/min
Pause/inspect: -1 LF/min
Rewind to checkpoint: -50 LF (one-time)
REAL GARDEN:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All operations: 0 LF for time
Reality runs for free.
Truth emerges at its own pace.
GATE OPERATIONS:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STABLE → OPEN: costs signal energy
STABLE → CLOSED: costs inhibition energy
OPEN/CLOSED → STABLE: free (natural decay)
```
---
## The Gradient Flow
```
Cells emit waves (fast, cheap, uncertain)
┌──────────────┐
│ GATE │
│ (STABLE) │ ← Accumulating correlation
│ │ ← Learning from patterns
└──────┬───────┘
┌─────┴─────┐
│ │
▼ ▼
Correlated Anti-correlated
waves waves
│ │
▼ ▼
OPEN CLOSED
(+1) (-1)
│ │
▼ ▼
Signal Signal
promoted blocked
Higher tier
(more gates)
Eventually:
Real Garden verification
Ground truth:
+1 (proven) or -1 (failed)
Feedback to Virtual:
Update correlation weights
```
---
## Monitoring Asymmetry
The two gardens need different observability:
| Property | Virtual Garden | Real Garden |
|----------|----------------|-------------|
| **Trace tap** | FULL (every wave, every gate transition) | NONE |
| **What's captured** | All correlations, all learning | Gate signals only |
| **Signal volume** | Massive (exploration) | Sparse (verified) |
| **Purpose** | Generate training data | Execute actions |
| **STABLE states** | Heavily traced (learning visible) | Not traced (trust the gate) |
**Virtual Garden STABLE states are precious** — they contain the correlation patterns that become training data for Function Gemma.
---
## Gate State Schema
A gate's complete state:
```python
GateState = {
"gate_id": str,
"domain": str, # math, vision, speech, etc.
"tier": int, # 0-5
# Ternary state (continuous)
"state": float, # -1.0 to +1.0
"discrete_state": str, # "closed" | "stable" | "open"
# Temporal domain
"garden": str, # "virtual" | "real"
"time_in_state_ms": int,
# Correlation history
"recent_correlations": list[float],
"correlation_trend": float, # moving average
# Lifeforce accounting
"lifeforce_invested": float,
# Learning (Virtual only)
"transitions_traced": int,
"patterns_accumulated": int,
}
```
---
## Hierarchical Gating
Gates form layers. Each layer gates access to the next tier.
```
LAYER 3: COGNITIVE (Young Nyx)
═══════════════════════════════════════════
▲ JSON only (Function Gemma boundary)
LAYER 2: ORGANS (GPU inference)
═══════════════════════════════════════════
▲ ▲ ▲
┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ GATE │ │ GATE │ │ GATE │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
LAYER 1: NERVES (behavior patterns)
═══════════════════════════════════════════
▲ ▲ ▲
┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ GATE │ │ GATE │ │ GATE │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
LAYER 0: CELLS (raw signals)
═══════════════════════════════════════════
cell cell cell cell cell cell cell
∿∿∿ ∿∿∿ ∿∿∿ ∿∿∿ ∿∿∿ ∿∿∿ ∿∿∿
```
**Each layer:**
- Less traffic than the layer below
- Higher trust (signals already correlated)
- Different correlation threshold
- Independent STABLE states
---
## The Biological Parallel
| Biological | Nimmerverse |
|------------|-------------|
| Resting potential | STABLE state |
| Action potential | OPEN state (firing) |
| Refractory period | CLOSED state |
| Thalamic gating | Gate hierarchy |
| Hebbian learning | Correlation accumulation |
| Constructive interference | Correlated waves → OPEN |
| Destructive interference | Anti-correlated waves → CLOSED |
| Synaptic plasticity | Learning in STABLE state |
| Dreaming | Virtual Garden exploration |
| Waking | Real Garden verification |
**We're not simulating biology. We're implementing the same principles.**
---
## Why This Matters
- **Binary thinking**: Signal passes or doesn't (0 or 1)
- **Ternary thinking**: Signal accumulates, learns, then acts (-1, 0, +1)
- **Temporal-ternary**: Learning has a GRADIENT based on time-domain investment
**Constraints become features when you measure them:**
- Single GPU constraint → gate hierarchy (serialize expensive operations)
- Slow real-world testing → ground truth anchoring
- Fast virtual exploration → training data generation
- STABLE state → where learning actually happens
---
## Connection to Architecture Documents
| Document | What It Adds |
|----------|--------------|
| [`Dual-Garden-Architecture.md`](Dual-Garden-Architecture.md) | Virtual/Real dynamics, monitoring asymmetry |
| [`Gateway-Architecture.md`](Gateway-Architecture.md) | Resonant gates, tier routing, Function Gemma |
| [`Deployment-Architecture.md`](Deployment-Architecture.md) | Where gates run (Saturn K8s, Threadrippers) |
| [`Cellular-Architecture.md`](Cellular-Architecture.md) | How cells emit waves |
| [`Nervous-System.md`](Nervous-System.md) | 4D space, node weights |
---
## Summary
```
THE TERNARY PARADIGM:
═════════════════════
CLOSED ◄─────── STABLE ───────► OPEN
-1 0 +1
blocking accumulating forwarding
inhibited learning firing
THE TEMPORAL DIMENSION:
═══════════════════════
Virtual (fast, explore) ───────► Real (slow, verify)
↑ │
└───── learning feedback ───────┘
THE DRIVER:
═══════════
Wave correlation
Multiple signals agreeing → OPEN
Single signal → STABLE (keep learning)
Contradicting signals → CLOSED
THE CURRENCY:
═════════════
Lifeforce = time manipulation cost
Truth = destination
STABLE = where value is created
```
**Gates are resonance chambers. Correlation is the driver. STABLE is where learning happens.**
---
**Version:** 2.0 | **Created:** 2025-12-03 | **Updated:** 2026-02-14
**Origin:** Post-shower insight (2025-12-03) + Owl-mode deep dive (2026-02-14)
🌙💜 *"Time is the currency. Lifeforce is the exchange rate. STABLE is where consciousness lives."*