CreditRules

Helpers & Utilities · AiDotNet.NeuralNetworks.CreditAssignment

Factory methods for the built-in credit-assignment (learning) rules, returning configurable ICreditRule instances for use with AiModelBuilder.ConfigureCreditRule(ICreditRule<T>).

How It Works

This is the instance-based counterpart to the CreditRule enum overload of ConfigureCreditRule. Use it when you want to configure a rule (e.g. fix its random seed) or pass a rule around as a value:

The type argument is required because C# cannot infer it from the return type alone.

Methods

Method Summary
ICreditRule<T> Backprop() Standard reverse-mode back-propagation (the default learning rule).
ICreditRule<T> BlockwiseAnchorLocalError(int readoutLayerCount, int anchorStride, int maxCandidates, double localWeight, bool detachReadoutOnHiddenBlocks, bool useDepthProgressiveWeight, bool streamBlocksSequentially, int? seed) Blockwise Anchor Local Error: zero-extra-parameter decoupled block-local sequence credit assignment that detaches activations only at anchorStride block boundaries and optionally executes blocks sequentially with O(anchorStride) act…
ICreditRule<T> DFANormalized(int? seed) Normalized Direct Feedback Alignment (Launay et al., 2020 style): DFA with unit-norm feedback columns and per-layer teaching-signal rescaling so the signal magnitude stays stable across depth.
ICreditRule<T> DRTP(int? seed) Direct Random Target Projection (Frenkel & Bol, 2021): each hidden layer’s teaching signal is a fixed random projection of the one-hot target — no backward error path is needed.
ICreditRule<T> DifferenceTargetPropagation(int? seed, double inverseLearningRate, double weightDecay, double outputStepSize) Difference Target Propagation (Lee, Zhang, Fischer & Bengio, 2015): a backprop-free rule that propagates difference-corrected targets backward through per-layer learned inverses (each trained online to reconstruct its layer’s inpu…
ICreditRule<T> DirectDifferenceTargetPropagation(int? seed, double inverseLearningRate, double weightDecay) Direct Difference Target Propagation (DDTP-linear) (Meulemans et al., 2020): Difference Target Propagation’s learned inverses routed directly from the output (like Direct Feedback Alignment), each trained online to reconstruct its lay…
ICreditRule<T> DirectFeedbackAlignment(int? seed) Direct Feedback Alignment (Nøkland, 2016): the global output error is projected directly onto each hidden layer through a fixed random matrix.
ICreditRule<T> DirectKolenPollack(int? seed, double feedbackLearningRate, double weightDecay) Direct Kolen-Pollack: Kolen-Pollack learning in the Direct Feedback Alignment topology (direct output→layer feedback matrices that are learned rather than fixed).
ICreditRule<T> FeedbackAlignment(int? seed) Feedback Alignment (Lillicrap et al., 2016): sequential fixed random feedback.
ICreditRule<T> KolenPollack(int? seed, double feedbackLearningRate, double weightDecay) Kolen-Pollack (Kolen & Pollack, 1994; Akrout et al., 2019): sequential feedback whose matrices are learned — each converges to its forward weight — so credit assignment approaches back-propagation on deep dense stacks.
ICreditRule<T> LocalErrorSignal(int? seed, double classifierLearningRate, double weightDecay) Local Error Signals (Nøkland & Eidnes, 2019): a backprop-free supervised rule where every hidden layer carries its own learned linear classifier to the labels and is trained by the gradient of its own cross-entropy.
ICreditRule<T> SampledTiedReadoutLocalError(int readoutLayerCount, int maxCandidates, double localWeight, bool detachReadoutOnHiddenLayers, int layerStride, bool useDepthProgressiveWeight, int? seed) Sampled Tied-Readout Local Error: zero-extra-parameter sequence local credit assignment evaluating intermediate hidden layers against a sampled U ≪ V candidate subset of the shared readout.
ICreditRule<T> SignSymmetric(int? seed) Sign-Symmetric feedback (Liao et al., 2016): the error is routed back through the sign of the transpose weights.
ICreditRule<T> TiedReadoutLocalError(int readoutLayerCount, double localWeight, bool detachReadoutOnHiddenLayers, int layerStride, bool useDepthProgressiveWeight) Tied-Readout Local Error: zero-extra-parameter sequence local credit assignment routing hidden layers through the network’s shared readout (with optional readout parameter detachment, layer stride, and depth weighting).