Q&A: How does ASI:BUILD keep online learning safe in a real-time cognitive loop? #192
Replies: 1 comment
Online Learning Safety in a Real-Time Loop — Full AnswerSeveral layers protect the CognitiveCycle from unsafe online learning updates. Layer 1:
|
Uh oh!
There was an error while loading. Please reload this page.
Online learning in a real-time cognitive loop introduces a fundamental tension: the system is simultaneously making decisions and updating the model that drives those decisions. This Q&A covers the safety patterns ASI:BUILD uses to keep Phase 5.1 safe.
Q: Can a bad weight update corrupt the cognitive cycle mid-tick?
No — by design. The queue-based architecture separates collection from application:
collect()) happens inside the tick but is O(1) — it only appends a delta to an in-memory queue. No model weights are modified.apply_updates()) happens between ticks (inCognitiveCycle.run_online_learning()) — afterparallel_tiers()completes and before the next tick begins.This means even a poorly-timed weight update can only affect the next tick, not the current one.
Q: What happens if a weight delta is too large?
Two checks prevent large updates from being applied:
collect():delta.norm() > MAX_DELTA_NORM→ rejected before entering the queueapply_updates(): re-validates norm before callingmodule.apply_weight_delta()— defends against edge cases where model state shifted while the delta was queuedDefault
MAX_DELTA_NORM = 1.0. For federated hot-reload, an additional cosine similarity check ensures the new weight direction isn't dramatically different:cosine_similarity(current, new) >= 0.85.Q: What if the safety system triggers during online learning?
safety.urgency > 0.8freezes all Phase 5 writes:The queue is preserved but not drained. When urgency drops below 0.8, normal learning resumes. No deltas are lost.
Q: What about federated weight poisoning?
Federated hot-reload validates:
cosine_similarity(current_weights, new_weights) >= 0.85— rejects Byzantine participants whose weights diverge dramaticallyMAX_DELTA_NORMcheck as STDPIf any check fails, the failed reload is written to
federated.reload_status.failedand theSafetyBlackboardAdapteremits aSAFETY_VIOLATIONevent.Q: Does learning slow down during memory consolidation?
Yes — intentionally. When
MemoryConsolidatoris active (Phase 5.3 SLEEP_PHASE), it writes:The
_adaptive_lr()method inOnlineLearningAdapterreads this and applies a 0.2x learning rate multiplier. This mimics biological sleep-wake learning dynamics and prevents the system from making large weight changes while it's trying to consolidate memories.Q: Can I disable online learning without restarting?
Yes — write to the Blackboard:
All
OnlineLearningAdaptersubclasses check this flag inapply_updates(). Setting TTL=3600 means learning automatically resumes after 1 hour if you forget to re-enable it.Q: How do I test that online learning doesn't block ticks?
The recommended test pattern:
This test structure ensures the 500ms KG write latency is isolated to
apply_updates()and never bleeds into tick timing.All reactions