SITrainer<T, TInput, TOutput>

Models & Types · AiDotNet.ContinualLearning.Trainers

Continual learning trainer using Synaptic Intelligence (SI).

Inheritance: ContinualLearnerBase<T, TInput, TOutput> → SITrainer<T, TInput, TOutput>

For Beginners

This trainer implements continual learning using SI, which prevents catastrophic forgetting by tracking how much each parameter contributes to reducing the loss during training.

How It Works

How SI Works:

Path Integral Formula:

Where g_k is the gradient, Δθ_k is parameter change, and ξ is damping.

Key Advantage: SI computes importance online during training, making it more computationally efficient than EWC which requires a separate pass.

Usage Example:

Reference: Zenke et al. “Continual Learning Through Synaptic Intelligence” (ICML 2017)

Constructors

Constructor Summary
SITrainer(IFullModel<T, TInput, TOutput> model, ILossFunction<T> lossFunction, IContinualLearnerConfig<T> config, IContinualLearningStrategy<T, TInput, TOutput> strategy) Initializes a new SI trainer with default options.
SITrainer(IFullModel<T, TInput, TOutput> model, ILossFunction<T> lossFunction, IContinualLearnerConfig<T> config, IContinualLearningStrategy<T, TInput, TOutput> strategy, SITrainerOptions<T> options) Initializes a new SI trainer with custom options.

Properties

Property Summary
SynapticIntelligence<T, TInput, TOutput> SIStrategy { get; } Gets the SI-specific strategy if available.