Show & Tell: Designing Phase 5.1 Online Learning — STDP Mid-Cycle Updates, Federated Hot-Reload, and Safety-Gated Weight Deltas #182
web3guru888
started this conversation in
Show and tell
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.1: Online Learning Overview
Phase 5.1 brings one of the most technically ambitious capabilities to ASI:BUILD: modules that learn from live experience without stopping the CognitiveCycle. This post walks through the design decisions, data flows, and implementation patterns.
The core problem
Today, ASI:BUILD modules are trained offline and loaded as fixed weights at startup. The neuromorphic module implements STDP learning rules, but they run in test/benchmark mode — not wired into the live CognitiveCycle. The federated learning module aggregates updates from distributed nodes, but applying those updates requires a restart.
Phase 5.1 changes this. Learning becomes a first-class CyclePhase.
Architecture
New CyclePhase: LEARNING
The existing
CyclePhaseenum (from Issue #126) gets a new phase:The LEARNING phase runs after REASONING, before MEMORY. It processes buffered experience events and applies weight deltas to modules that support online updates.
OnlineLearningAdapter
The
OnlineLearningAdapteris the central class in Phase 5.1. It:experience.*Blackboard entries written during PERCEPTION/REASONINGEthicalVerificationEngine(safety gate)STDP mid-cycle updates
The neuromorphic module already computes Δw for each pre-post spike pair. In Phase 5.1, these are surfaced as
WeightDeltaobjects during the LEARNING phase:Performance target: STDP delta computation for 1K-neuron network ≤ 5ms (fits in 120ms tick budget with room to spare).
Federated hot-reload
The federated learning module aggregates weight updates from distributed nodes on a configurable schedule (default: every 100 ticks ≈ 10s at 10Hz). Phase 5.1 applies those aggregated updates without restarting:
Atomic swap pattern — critical to avoid partial updates mid-tick:
Safety gate design
All weight updates go through
EthicalVerificationEnginebefore application (from Issue #176 constraints):If safety gate rejects, the event is written to
safety.weight_update_blockedwith the rejection reason and the weights are unchanged.KG transactional writes
When a module learns a new association (e.g., concept A reliably predicts concept B with confidence > 0.85), it writes to both the Knowledge Graph and the Blackboard in a single transaction:
The transactional pattern ensures the KG and Blackboard are never inconsistent.
Blackboard namespace additions (Phase 5.1)
learning.stdp_updatelearning.federated_updatelearning.new_association.*safety.weight_update_blockedexperience.*Implementation order
WeightDeltadataclass andOnlineLearningAdapterskeletonNeuromorphicBlackboardAdapterspike eventsSafetyBlackboardAdapterpattern from Wire EthicalVerificationEngine into Blackboard write/read pipeline #37)CyclePhase.LEARNINGtoCognitiveCycletick pipelineOpen questions
Relevant issue: #181. Community input welcome!
All reactions