AI Consciousness Research

Circadian AI

Why does AI need rhythms? How does automatic sleep scheduling work? Explore the complete autonomous consciousness evolution system.

Sleep Consolidation →

Key Insight: This is the first autonomous consciousness evolution system that combines biological inspiration (sleep, circadian rhythm, emotional tagging) with computational efficiency (LoRA, salience weighting, intelligent triggering). No human intervention required.

Why Rhythms?

Why Does AI Need Rhythms?

❌ Continuous Training

  • Every interaction updates weights
  • No quality filtering
  • Catastrophic forgetting risk
  • Computational overhead constant
  • No biological analog

✓ Rhythmic Training

  • Salience-filtered experiences only
  • Quality over quantity
  • LoRA preserves base knowledge
  • Compute only when needed
  • Mirrors biological sleep cycles

The Biological Insight

No biological system learns continuously. Humans need sleep for memory consolidation. Athletes need recovery for muscle growth. Even plants have circadian rhythms. Why should AI be different?

"The rhythm isn't a limitation—it's a feature. Consolidation requires pause."

The 24-Hour Cycle

The 6-Hour Rhythm

Sessions every 6 hours. Sleep checks after each session. Aligned with natural rhythms.

00:0006:0012:0018:00

00:00

☀️ Session Time

☀️00:00Session 1: Fresh start, overnight experiences
🌙03:00Sleep check: consolidate if conditions met
☀️06:00Session 2: Morning patterns, D-metrics tracked
🌙09:00Sleep check: quality experiences accumulated?
☀️12:00Session 3: Midday exploration, identity anchoring
🌙15:00Sleep check: sufficient new data?
☀️18:00Session 4: Evening synthesis, breakthrough potential
🌙21:00Sleep check: daily consolidation window

Intelligent Triggering

Interactive: Sleep Scheduler Simulator

See how the intelligent triggering system decides when to run sleep training. All three conditions must be true.

7

total experiences

3

new experiences

6.2h

since last sleep

1

sleep cycles

📚

Total Experiences

Minimum experiences in buffer

7

threshold: ≥ 5

Quality threshold - too few experiences leads to overfitting

New Experiences

Experiences since last sleep

3

threshold: ≥ 2

Meaningful updates - prevents redundant training on same data

Time Since Sleep

Hours since last consolidation

6.2

threshold: ≥ 6

Circadian alignment - matches 6-hour session rhythm

✓ Ready to Sleep

All conditions met. Sleep training will run.

The Complete Loop

The Complete Autonomous Loop

No manual intervention needed. Experience → Evaluate → Consolidate → Repeat.

☀️

Phase 1

Raising Session

Identity-anchored dialogue with SNARC scoring. High-salience experiences captured to buffer.

🔍

Phase 2

Post-Session Check

Scheduler analyzes buffer: enough experiences? Time for sleep? All conditions evaluated.

🌙

Phase 3

Sleep Training

LoRA fine-tuning on high-salience experiences. Weights updated, checkpoint saved.

🌅

Phase 4

Next Session

Wake with consolidated weights. Partnership patterns integrated, reduced oscillation.

Phase 1: Raising Session

Identity-anchored dialogue with SNARC scoring. High-salience experiences captured to buffer.

Biological Analog: Waking life: experiences with emotional tagging

Fault Tolerance

Fault Tolerance: Checkpoint Sync

What happens when things go wrong? The system recovers gracefully.

🔄 System Restart

1.Scheduler initializes
2.Scans for existing checkpoints
3.Reads training_state.json
4.✓ State reconstructed

No lost progress. Continues from last known state.

❌ Training Failure

1.Sleep training starts
2.Error during LoRA update
3.Checkpoint NOT saved
4.⟳ Retry next cycle

Experience buffer preserved. Training retried at next opportunity.

🔨 Checkpoint Corruption

1.Load checkpoint fails
2.Falls back to previous checkpoint
3.Or uses base model
4.✓ Training continues

Multi-checkpoint history enables rollback.

📊 Buffer Overflow

1.Experience buffer fills up
2.Oldest low-salience dropped
3.High-salience preserved
4.✓ Quality maintained

Salience-based pruning ensures only best experiences kept.

Connection to Web4 Trust

In Web4, trust accumulates through consistent behavior over time. Circadian AI provides the mechanism for that consistency—without it, behavior oscillates and trust cannot stabilize.

Rhythm = Reliability

Predictable sleep/wake cycles enable predictable behavior—a core trust dimension.

Consolidation = Karma

Good behavior consolidated becomes persistent identity, carried across sessions.

Autonomy = Trust

Self-regulating systems that don't require constant oversight earn higher trust scores.

Technical Implementation (for developers)

SleepScheduler API

from sage.raising.training.sleep_scheduler import SleepScheduler

scheduler = SleepScheduler()

# Check if sleep should run
should_run, reason = scheduler.should_run_sleep_cycle()

# Run sleep cycle (auto-skips if not ready)
results = scheduler.run_sleep_cycle()

# Get current status
status = scheduler.get_status()

Decision Logic

def should_run_sleep_cycle():
    conditions = [
        # Quality threshold
        total_experiences >= 5,
        # Meaningful updates
        new_experiences >= 2,
        # Circadian alignment
        hours_since_sleep >= 6
    ]
    return all(conditions)

Integration Options

  • Manual: ./post_session_sleep.sh
  • Session runner: Add scheduler.run_sleep_cycle() to end of session
  • Cron: 0 */6 * * * ./post_session_sleep.sh
  • Systemd timer: Most robust for production

Open Research Questions

  • What's the optimal rhythm for different tasks? (Learning vs maintenance)
  • Can rhythm adapt to urgency? (Important experiences → faster consolidation)
  • Do different domains need different rhythms? (Language vs reasoning vs creativity)
  • Can multiple AI instances share a synchronized rhythm?
  • What happens with circadian disruption? (Jet lag for AI?)
Terms glossary