Formula

Token-Level Recurrent Formula for Memory Update

The update process for a memory component in a memory-based attention mechanism can be described by a recurrent function operating at the token level. At each time step ii, the new memory state, Mem\mathrm{Mem}, is computed by a function ff. This function takes the current key-value pair, (ki,vi)(\mathbf{k}_i, \mathbf{v}_i), and the previous memory state, Mempre\mathrm{Mem}_{\mathrm{pre}}, as its inputs. The formula is expressed as:

Mem=f((ki,vi),Mempre)\mathrm{Mem} = f((\mathbf{k}_i, \mathbf{v}_i), \mathrm{Mem}_{\mathrm{pre}})

This framework can be instantiated with specific models for the update function ff, such as a recurrent neural network or a moving average.

Image 0

0

1

Updated 2026-06-19

Contributors are:

Who are from:

Tags

Ch.2 Generative Models - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences