Operations
| Operation | Mechanism | API | Cost |
|---|---|---|---|
| Index | There is no separate index. A node’s key is its centre , recomputed from when needed; searching is comparing with the max_nodes centres. |
||
| Assign | Posterior over the nodes and new story (The read). | Memory.step, Memory.read |
|
| Insert | Add to and 1 to of the winning node, or spread it with soft write. | inside step |
|
| Create | Birth: a free row with , , . | inside step; Step.born |
|
| Update | Not a separate operation: every insertion moves the centre and changes the concentration of its node. | ||
| Delete | Gradual forgetting (always), expiry below a mass (expiry), and eviction of the lightest node when the table is full and another is born. |
History.ended records when each node left |
|
| Nearest nodes now | Cosine between a query and the centres of the active nodes. | Memory.nearest |
|
| Retrieve by query at a date | Cosine between a query and the centre of each node’s items in a window around the date. | History.query |
|
| Items of a node | From the record, not from the memory. | History.items, History.exemplars |
|
| Nodes alive at a date | Forgotten mass of each node at that time, from the record. | History.active |
|
| Reconstruct | The statistics are sums, so a node’s mass and centre at any past time are recomputed from the record: exactly with hard write, from each item’s share in its own node with soft write. | History.masses, History.trajectory |
|
| Merge | Possible and exact, by adding , and . Not provided: in the paper’s error analysis, merging nodes with similar centres would merge mostly different stories. |
With max_nodes = 256 and d = 256, a step compares the item with 256 centres of 256 numbers: about 0.4 ms in NumPy on one CPU thread, independent of how many items came before. In practice the sentence encoder costs far more per item.