Skip to content

feat(ocl): add Learning Without Forgetting (LWF) strategy - #404

Open
tachyonicClock wants to merge 1 commit into
feat/ocl-sifrom
feat/ocl-lwf
Open

feat(ocl): add Learning Without Forgetting (LWF) strategy#404
tachyonicClock wants to merge 1 commit into
feat/ocl-sifrom
feat/ocl-lwf

Conversation

@tachyonicClock

@tachyonicClock tachyonicClock commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator
  • Stacked on feat(ocl): add Synaptic Intelligence (SI) strategy #403 (feat/ocl-si) — this PR only diffs the LWF-specific changes and depends on capymoa.ocl.util._optim.reset_optimizer_state, added there.
  • Cherry-picks the Learning Without Forgetting (LWF) continual learning strategy from the blurry-ocl draft branch, adapting it to the current capymoa.ocl module layout (capymoa.ocl.events, capymoa.ocl.evaluation.events).
  • Adds hinton_distillation_loss to a new capymoa.ocl.util.functional module, LWF's only dependency for computing the distillation loss.
  • Registers LWF in capymoa.ocl.strategy.__init__.
  • Adds an LWF case to tests/ocl/test_strategy.py.

Closes: LwF

Assisted-by: claude-code:claude-sonnet-5

@tachyonicClock tachyonicClock changed the title feat/ocl lwf feat(ocl): add Learning Without Forgetting (LWF) strategy Aug 24, 2026
Learning Without Forgetting (LwF) is a regularisation-based continual
learning strategy that distils predictions from a frozen teacher
snapshot of the previous task while learning the current task (Li &
Hoiem, 2016).

Ported from the `blurry-ocl` draft branch and adapted to the current
`capymoa.ocl` module layout. Also moves the model to `device` at
construction (matching EWC and SI), since the draft version never did
so and would otherwise error if `device` wasn't left as its `"cpu"`
default, and renames `on_train_task` to `_on_train_task_begin` for
naming consistency with the other event-handling strategies.

Stacked on `feat/ocl-si` (#401), which this depends on for
`capymoa.ocl.util._optim.reset_optimizer_state`.

Assisted-by: claude-code:claude-sonnet-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant