SandHouse
Pages and contents

TL1 — C Space

Let's say I'm sneezing. This is actively causing negative reward and I expect more negative reward if I don't stop it. This expectation is a persistent thought in C. I have learned that "blowing my nose" helps increase reward, where blowing my nose is also a concept I have stored in Γ. This has some expected return for my present experience Z,C. I should also be thinking about tissues or other methods to blow my nose that have produce positive reward in the past under these circumstances. "Blow my nose" captures a decently broad distribution of past Z sequences and A sequences but the C space understands the continuation of H,A∣Γ.

Essentially C is a reasoning head over current experience and active concepts.

Thought

The C space is where planning occurs and where I attempt to approximate a sequence of internal thoughts. C also acts as working memory because the current thought depends recurrently on previous thought states. The thought system should selectively read information from Zt rather than requiring the entire dense representation to be compressed into a single vector beforehand. The general form is

Ct=Think(Cti<t,Zt,Read(qt,M))

For the first simplified version, explicit memory retrieval will be deferred.

Ct=Think(Cti<t,Zt)

There may eventually be multiple internal thought steps per environment timestep, Ct,1,Ct,2,...,Ct,J, but this will also be deferred initially.

Reading From Z

The current thought should selectively query the dense perceptual representation. Given the previous thought Ct−1 and perceptual features zt,i, we calculate

αt,i=softmaxi(q(Ct−1)⊤k(zt,i)d)

The attended perceptual context is

QtC=∑iαt,iv(zt,i)

Importantly, this attention does not assume that each zt,i corresponds to an object. It allows the thought process to retrieve whichever parts of the learned perceptual representation are useful at a given moment.

Thought Transition

A simple form of the thought transition is

Ct=Ct−+gtC⊙ΔC(Ct−,QtC)

where

Ct−=DC(Ct−1)

Ct− represents the recurrent continuation of the previous thought state while QC introduces information from current perception. The gate gtC controls how strongly the new perceptual information modifies the existing thought state.

Mamba-Like Think Function

Rather than using only a simple gated recurrence, the thought space can eventually use a Mamba-like state space model to maintain information across a sequence of thoughts. First, the current thought queries Zt

QtC=Read(Ct−1,Zt)

We then update a recurrent hidden state HtC

HtC=Mamba(Ht−1C,QtC)

The explicit thought is produced from this hidden state

Ct=fC(HtC,QtC)

Thus HtC acts as the recurrent memory of the thought sequence while Ct represents the current explicit thought exposed to the policy. The overall Think function can therefore be written as

Ct=Think(Ht−1C,Ct−1,Zt)

with the transition

Zt→Read(Ct−1,⋅)QCt→MambaHtC→fCCt

For V1, a simpler gated recurrence may be preferable before introducing the full state-space implementation.