Show & Tell: Online Fisher estimation via EMA — math, trade-offs, and surrogate gradients (Phase 6.4) #253
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.
-
What Is Online Fisher Estimation?
Standard EWC computes the Fisher information matrix once per task, using a full pass over the episode buffer at SLEEP_PHASE time. This works, but:
Phase 6.4 introduces incremental Fisher estimation via exponential moving average (EMA):
At α = 1.0 this degenerates to a last-step estimate. At α → 0 it approaches a uniform average over all history. In practice α = 0.01 to 0.05 gives good results.
EMA vs. Full-Batch: Comparison
Both are complementary: the EMA accumulator provides fast, approximate importance tracking during a task; the SLEEP_PHASE full-batch pass provides accurate, stable snapshots at task boundaries.
Surrogate Gradients in Spiking Networks
True log-likelihood gradients require differentiating the network output with respect to parameters — this is straightforward in gradient-descent networks but undefined for discrete spikes.
For
STDPOnlineLearnerwe use the weight delta Δw as a surrogate gradient:This is closely related to the Synaptic Intelligence (SI) approach (Zenke et al. 2017), which computes per-synapse importance as the running sum of
Δw · g. For STDP rules, Δw² is a recognised proxy for Fisher.FisherAccumulator State Diagram
Alpha Sensitivity Analysis
Half-life formula:
t_{1/2} = ln(2) / αFor a 10ms timestep agent tick, α = 0.01 gives a ~690-step (~7s) half-life, a reasonable working memory window for STDP learning.
Expected Prometheus Metrics
ewc_fisher_ema_steps_totalewc_fisher_snapshot_age_stepsewc_fisher_max_deltaewc_fisher_staleness_warnings_totalOpen Questions
CachedFisherStore, do their EMA steps interfere? Shouldtask_idinclude an agent UUID?See issue #252 for the full specification. Thoughts welcome below! 👇
Beta Was this translation helpful? Give feedback.
All reactions