HippoMemoryCellLayer<T>

Layers · AiDotNet.NeuralNetworks.Layers.SSM

Implements the recurrent memory cell from the original HiPPO paper.

Inheritance: LayerBase<T> → HippoMemoryCellLayer<T>

Implements: IShapeContract

How It Works

The cell maintains a trainable hidden state and a fixed, non-trainable polynomial memory. The memory is updated with the selected HiPPO operator, while learned input-to-memory, memory-to-hidden, and sigmoid-gate projections reproduce the paper’s HiPPO-RNN wiring.

Reference: Gu et al., “HiPPO: Recurrent Memory with Optimal Polynomial Projections” (2020).

Constructors

Constructor Summary
HippoMemoryCellLayer(int hiddenSize, int inputSize, int memoryOrder, int memorySize, string measure, string discretization, int initialTime, double timeStep, double timescaleMin, double timescaleMax, bool useGate, IInitializationStrategy<T> initializationStrategy) Creates an original-paper HiPPO recurrent cell.

Properties

Property Summary
bool SupportsTraining { get; }
int HiddenSize { get; } Gets the hidden-state width.
int MemoryOrder { get; } Gets the polynomial order of each memory.
int MemorySize { get; } Gets the number of independent polynomial memories.
string Discretization { get; } Gets the configured discretization method.
string Measure { get; } Gets the configured HiPPO measure.

Methods

Method Summary
Dictionary<string, string> GetParameterRoles() Returns parameter roles for per-role optimizer configuration (e.g., weight decay exemption for biases).
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank)
IReadOnlyList<Tensor<T>> GetTrainableParameters() Returns all trainable parameter tensors marked with [TrainableParameter].
void ResetState()
void SetTrainableParameters(IReadOnlyList<Tensor<T>> parameters) Replaces trainable parameter tensors (e.g., with ParameterBuffer views).
void UpdateParameters(T learningRate)
void ZeroGrad() Clears all gradient fields discovered by convention ({paramName}Gradient).