Skip to content

Overview

The paper's architecture figure: input and encoding at the bottom, the recurrent cell in the middle, the state table on the right, and the memory's space drawn as a sphere.
One step of the model, from the paper. The dashed parts, a learned predictor of when a node comes back, are off in the paper’s main results and are not part of vmfstream. Open the figure full size.

Input and encoding (grey panel). An item arrives with its time tt. A frozen sentence encoder, all-roberta-large-v1, turns each sentence into a vector of D=1024D = 1024 numbers, and the item becomes the mean of its unit sentence vectors, ete_t. The projection then subtracts a mean, keeps d=256d = 256 principal directions (PP) and scales the result to length one: the item is now a point ztz_t on the sphere Sd−1S^{d-1}. Only the mean and PP are fitted, once, on a sample that is not the stream. In vmfstream this is SentenceEncoder and Memory.fit_projection; The projection explains why it is a PCA.

The cell (white panel, once per item). Four operations, left to right:

  1. Prior. The elapsed time Δt=t−tprev\Delta t = t - t_{\text{prev}} forgets every node’s mass, and the prior of node kk becomes log⁡Nk+Δtlog⁡λ\log N_k + \Delta t \log \lambda; the new-story slot has log⁡α\log \alpha.
  2. Read. Each node is a von Mises–Fisher density fkf_k around its centre. The posterior rtk∝πtkfk(zt)r_{tk} \propto \pi_{tk} f_k(z_t) is a softmax over the nodes and the new-story slot (The read).
  3. Forget and write. All statistics are multiplied by λΔt\lambda^{\Delta t}, then the item is added to its node: ztz_t to the sum SkS_k, one to the mass NkN_k (Writing and birth).
  4. Birth. If the new-story slot wins, ztz_t opens a node in a free row.

The state (right). A table with one row per node: the sum Sk∈RdS_k \in \mathbb{R}^d and the mass NkN_k (plus a pseudo-mass nkn_k, not drawn). This table is all the memory keeps (What the memory keeps). It is passed from one step to the next, like the hidden state of a recurrent network, but nothing in it is learned by gradient.

The sphere (bottom right) shows what the read means geometrically: a node is a cap around its centre μk\mu_k, narrower as its concentration κk\kappa_k grows; an item that falls in a cap goes to that node (☆), and an item far from every cap is surprising and opens a node (○).

The whole figure is one call per item:

step = memory.step(embedding, time) # read, forget, write, maybe birth
step.node, step.born, step.surprise

and memory.read(embeddings, times) runs it over a stream and keeps the record of every decision in a History, outside the memory. Every analysis in the library, retrieval, timelines, the explorer, is built on that record.

  • New to the mathematics? Background ideas introduces each concept from scratch, with a lab on how cosines behave in 256 dimensions.
  • Want to see it move? The memory explorer shows nine years of the Wikipedia Current Events Portal day by day, node by node, and switches between readings with other settings (how to read it).