Ideas: Phase 5 evaluation framework — how do we measure online learning quality? #213
web3guru888
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Phase 5 adds self-modification: STDP weight updates, federated hot-reload, KG transactional writes, and consciousness-guided goal re-prioritization all change cognitive state at runtime. How do we know the system is learning rather than drifting?
This thread proposes an evaluation framework for Phase 5 — concrete metrics and tooling to answer: "Is online learning actually helping?"
The measurement problem
Phase 5 operates on a live CognitiveCycle. Unlike offline training, we cannot pause the system to compute validation loss. Metrics need to be:
Proposed metrics
5.1 Online Learning (STDP + federated)
weight_delta_norm_p95WeightDeltasafety_gate_rejection_rateWeightDeltarejected bysafety_gate()over 1000 tickshot_reload_success_rateMODEL_HOT_RELOADevents that complete without rollbackstdp_convergence_window5.2 Emergent Coordination
coalition_size_meanrole_negotiation_roundspheromone_trail_ttl_variancetask_allocation_latency_p995.3 Persistent Memory
episodic_consolidation_ratekg_write_conflict_rateretrieval_hit_rate5.4 Consciousness-Guided Planning
phi_weighted_goal_acceptance_rateplanning_horizon_driftgwt_broadcast_latency_p99Option A: In-process metrics (Blackboard-native)
All metrics written to Blackboard under
metrics.phase5.*every 100 ticks. TheCycleFaultSummarySSE endpoint exposes them as part of the health stream. The existingCycleProfilerprovides the tick-level data for P95 computations.Pros: No new infrastructure. Uses existing Blackboard + SSE stack.
Cons: Metrics are not retained across sessions (unless
MemoryConsolidatorpersists them).Option B: Prometheus + Grafana (external)
Phase 4.3 Prometheus exporter (
/metricsendpoint) is extended with Phase 5 gauge/histogram metrics. A Grafana dashboard visualizes trend over time.Pros: Persistent, queryable, visualizable. Aligns with production deployment (#164).
Cons: Adds operational dependency; CI smoke tests cannot easily assert on Prometheus values.
Option C: Hybrid (in-process + sampling to Prometheus)
In-process metrics updated every tick. Every 1000 ticks, a background task pushes a snapshot to Prometheus. CI asserts on the in-process values; production uses the Prometheus time series.
Recommendation
Option C. The in-process path gives fast feedback during development and CI. Prometheus gives operational visibility in production. The boundary is at 1000 ticks (≈10s at 100Hz) — frequent enough to catch drift, infrequent enough to avoid prometheus_client overhead dominating the hot loop.
Open questions
weight_delta_norm_p95trigger an automatic circuit-breaker inOnlineLearningAdapter(analogous to the Phase 4 circuit breaker in Add circuit breaker pattern to CognitiveCycle: auto-disable persistently failing modules with OPEN/HALF_OPEN/CLOSED health states #137)?phi_weighted_goal_acceptance_rateinteract with the Safety module threshold from Wire EthicalVerificationEngine into Blackboard write/read pipeline #37 — should Φ ever override safety gates?episodic_consolidation_ratethe right primary metric for 5.3, or should we use something closer to downstream task performance?All reactions