Talking Sand Labs

How experience becomes structure

Geometry of Memory

What should an experience change—and what should survive when its influence fades?

Spine gives that question a geometric form. Experiences become directions in a shared embedding space. DCMDb gathers related evidence into memory nodes; Thymos learns a response to the regions an agent encounters. Together they connect what has happened to what the system recalls and how it approaches the next interaction.

01 · Meaning as a direction

Normalize an embedding and it becomes a point on a unit sphere. Two aligned directions have a larger dot product; their angle measures how far apart they are in the embedding. In Spine’s intended MiniLM configuration, these vectors have 384 components. This gives memory a common coordinate system, while the original event records retain the actual words and their provenance.

x = v / ‖v‖cos θ = x · y

02 · Evidence has both direction and weight

A memory node tracks a weighted vector sum S and an effective evidence count N. The ratio m = ‖S‖ / N describes directional agreement. Many consistent observations can point strongly in one direction; conflicting observations reduce that agreement. N is accumulated weight, so it need not be an integer message count.

S⁺ = S + ηxN⁺ = N + η

The live retrieval centroid has its own conservative update: spherical interpolation moves it toward incoming evidence, with a ten-degree cap per observation in the paper’s release. It is not always the normalized sufficient sum. Concentration, confidence, and tension provide additional signals about how the memory is organized.

03 · Forget influence without erasing history

Exponential decay scales the evidence sum and its effective count together. Their ratio remains unchanged in exact arithmetic: the evidence still agrees just as much, but less of its weight remains. This separates the shape of a memory from the strength of its support. Pruning an active memory coordinate is a separate operation from deleting the canonical event.

ρ = exp(−Δt / τ)S⁺ = ρS   N⁺ = ρN

Try the decay rule

Start with N = 10 and ‖S‖ = 8. Move time forward without adding evidence.

Evidence weight N
10.00
Sum length ‖S‖
8.00
Agreement m
0.80

A numerical illustration of uniform decay, with no new observations, merges, pruning, or finite-precision cutoffs. Agreement stays fixed as support fades.

04 · Surprise can have a direction

A scalar error says how wrong a prediction was. A directional residual also indicates how the outcome differed. For unit vectors p (predicted) and a (actual), Spine’s default cosine-error residual removes the component along p, leaving a vector in its tangent plane. The implementation also offers a spherical residual based on the log map and a direct-difference variant.

δ = a − (p · a)p

These variants have different behavior. The default tangent residual vanishes at both perfect alignment and exact opposition; the spherical log map has an antipodal ambiguity. Their geometry is part of the method’s assumptions, not a guarantee that every semantic surprise is measured correctly.

05 · A learned response travels to similar contexts

Thymos stores a matrix W that maps a context x into response channels. In the linear variant, r(x) = Wx. Each channel changes according to its activation, an eligibility signal e, a learning rate η, and decay λ. The outer product below makes a local experience affect responses elsewhere in the same embedding space.

u = e ⊙ (Wx)W⁺ = (1 − λ)W + ηuxᵀ

Multiplying by another context y exposes the transfer rule: the learned adjustment is scaled by x · y. Similar directions receive similar adjustments, orthogonal directions receive none from this update, and opposite directions receive a reversed adjustment.

r⁺(y) = (1 − λ)r(y) + ηu(x · y)

This identity applies to the linear update without row normalization. Nonlinear activations and normalization change the full response behavior. The channels are numerical adaptation signals; their names do not demonstrate subjective feelings or validated human emotions.

From equations back to an agent

The 45-page systems paper connects these mechanisms to encrypted events, context reconstruction, evidence checking, tool execution, and interrupted-run recovery. It documents Spine v0.3.3, with source references and a reproducibility inventory. Its software checks establish bounded implementation contracts; they do not establish general memory accuracy or universal task improvement.

Read sections 7 and 10 for DCMDb and Thymos, section 8 for Triangle’s bounded context traversal, and section 17 for the evaluation boundaries. The mathematics is most useful when those connections remain visible: a coordinate helps find evidence, and the evidence still has to support the answer.