DocumentationArchitecture

ReadGate

A zoomed-in view of one operation in Piro’s stateful inference loop.

Architecture detail

ReadGate

Deferred CTM architecture: gates retrieved context into a recurrent state update.

← Full model
hₖ,
x,
contextₖ,
weights
):
gateInputₖ = Normalize(Concatenate(hₖ, x, contextₖ))
gateLogitsₖ = gateInputₖ · weights.attention.readGate.W
+ weights.attention.readGate.b
readGateₖ = sigmoid(gateLogitsₖ)
if Shape(readGateₖ) != Shape(contextₖ):
return Error("read gate cannot be applied to context")
return readGateₖ

What it does

Normalizes the current state, input, and retrieved context, projects them into gate logits with the learned read-gate weights, applies sigmoid, and returns one gate value per context feature.

Why it exists

A memory read should help without automatically overwriting the current thought; the gate must have the same shape as contextₖ so the final elementwise multiplication is well-defined.

← Back to architecture