Table of Contents

Interface IAssociativeMemory<T>

Namespace
AiDotNet.Interfaces
Assembly
AiDotNet.dll

Interface for Associative Memory modules used in nested learning. Models both backpropagation and attention mechanisms as associative memory.

public interface IAssociativeMemory<T>

Type Parameters

T

The numeric type

Properties

Capacity

Gets the memory capacity.

int Capacity { get; }

Property Value

int

Methods

Associate(Vector<T>, Vector<T>)

Associates an input with a target output (learns the mapping). In backpropagation context: maps data point to local error. In attention context: maps queries to key-value pairs.

void Associate(Vector<T> input, Vector<T> target)

Parameters

input Vector<T>
target Vector<T>

Clear()

Clears all stored associations.

void Clear()

Retrieve(Vector<T>)

Retrieves the associated output for a given input query.

Vector<T> Retrieve(Vector<T> query)

Parameters

query Vector<T>

Returns

Vector<T>

Update(Vector<T>, Vector<T>, T)

Updates the memory based on new associations.

void Update(Vector<T> input, Vector<T> target, T learningRate)

Parameters

input Vector<T>
target Vector<T>
learningRate T