Cogs/EWC Lifelongv0.7.0ESP32-S3 · CSI

Lifelong learning overview

Elastic Weight Consolidation prevents catastrophic forgetting when the on-device model learns new CSI tasks. The Fisher information matrix protects important weights from past tasks while leaving capacity for the next one.

Tasks learned
consolidated + active
Fisher updates
last: —
Consolidations
weight_consolidated
CSI samples
since boot
Heap free
of 24 KB
Active task
on-device gradient step
Training progress 0%
Loss (CE)
EWC penalty
λ
400
Step
0 / 0
Status
idle
CSI samples / sec
throughput  Hz ·
Loss curve (last 20 steps)
L(θ) ·

Recent events

Tasks

Each task is a distinct CSI classification target the model has learned. Consolidated tasks contribute to the EWC penalty; the active task is currently being trained.

Task ledger
IDNameSamplesAccuracyFisher normStatus

Fisher information matrix

The diagonal Fisher matrix estimates parameter importance for each consolidated task. Larger values pin weights closer to their previous optimum, raising the EWC penalty when they drift.

Diagonal Fisher · summary
computed over 512 samples
Parameters tracked
Mean F̄
Max F
Sparsity (F < 1e-4)
Last update
Per-layer importance
log-scaled diagonal magnitude
Top-k weights by Fisher
LayerIndexWeight θθ*F

Consolidated weights

θ* snapshots are taken at every consolidation event. The EWC penalty Σ Fᵢ (θᵢ − θ*ᵢ)² is computed against these anchors during subsequent training.

Footprinton-device
model
fisher
anchors
budget24 KB
Last consolidation
task
at
Δθ‖₂
Forgetting scorehealthy
avg drop
worst task
stability
Anchor snapshots (θ*)
stored in flash, recomputed when a task graduates
SnapshotTaskStoredBytes‖θ*‖₂

Event stream

All weight_consolidated, task_learned, and fisher_updated events emitted by the on-device runtime.

Filters
Live stream

Settings

Hyperparameters and runtime configuration for the EWC lifelong learning loop.

EWC hyperparameters
Hardware
Target
ESP32-S3
Input
CSI raw (channel state info)
Subcarriers
Sample rate
Hz
Model footprint
24 KB (quantized int8)
PSRAM
enabled
Danger zone
these actions wipe consolidated knowledge

Guide

A short field guide to running Elastic Weight Consolidation on a 24 KB ESP32-S3 model fed by raw WiFi CSI.

Elastic Weight Consolidation

Learn new tasks without forgetting the old ones.

When a small on-device model is fine-tuned on a new task, gradient descent quickly overwrites the weights that mattered for past tasks — a problem known as catastrophic forgetting.

EWC measures, per parameter, how much it mattered for past tasks (the diagonal Fisher information F) and adds a quadratic penalty that pulls important weights back toward their consolidated values θ*. The model keeps spare capacity for the new task while preserving what it has already learned.

θ
current weights being trained on task B
θ*
anchor — weights at consolidation of task A
F
diagonal Fisher — per-weight importance
λ
penalty strength (rigidity vs plasticity)
L(θ)=LB(θ) + λ ⁄ 2 · Σi Fi (θiθ*i
objective minimised on task B
01 ·

Lifecycle

what happens for each new task
1

Train

Fine-tune on the new task until rolling accuracy ≥ threshold (default 92%).

2

Estimate F

Compute diagonal Fisher over a held-out CSI batch (default 512 samples).

3

Snapshot θ*

Persist current weights as a new anchor. Emit weight_consolidated.

4

Begin next

Activate the next task. The EWC penalty kicks in immediately.

5

Recycle

When the 24 KB budget is hit, the oldest anchor is purged and F is merged.

02 ·

Runtime events

published on ewc/+
task_learned
Fired when a task's rolling accuracy crosses the consolidation threshold.
topic: ewc/task_learned
task_id: "T05"
name: "breathing-rate"
accuracy: 0.93
samples: 1893
fisher_updated
Fired after the diagonal Fisher matrix is recomputed over a held-out CSI batch.
topic: ewc/fisher_updated
batch_size: 512
mean_f: 0.0084
max_f: 0.612
duration_ms: 214
weight_consolidated
Fired when θ* is snapshotted to flash and added to the anchor set.
topic: ewc/weight_consolidated
anchor_id: "A05"
task_id: "T05"
bytes: 3712
norm_l2: 12.8
03 ·

Footprint budget

24 KB ceiling on ESP32-S3 internal SRAM
14.6 KB
3.7
3.7
2.0
Model (int8)14.6 KB
Diagonal Fisher3.7 KB
θ* anchor (×1)3.7 KB
Activation buffers2.0 KB
Event ring buffer0.4 KB

Anchor capacity is ⌊(24 − model − fisher − buffers) / 3.7⌋. On this footprint that leaves room for ~1 anchor at a time, so older anchors are recycled (their F is merged into the kept anchor) when a new task consolidates.