UEMA research program · specification

UEMA Specification v3.5

UEMA (Unified Embodied Mind Architecture) is the design of a learning program that controls a body. At every update it reads the body's senses, compresses each sense into a fixed-length list of numbers called a token, predicts the next tokens, scores the state of the body with a wellness evaluator, and produces the next motor command. The design's central claim is that perceiving, predicting, evaluating one's own state, intending and acting must stay separate computed stages, not one learned mapping from observation to action, because a single mapping has no internal state that represents why an action works. This page is the specification, version 3.5, rewritten so that a reader new to the project can follow it in one pass. It keeps every requirement, number, formula and design decision of the source; section 21 lists what was reordered, merged, removed and added.

0Source and reading guide

TitleUnified Embodied Mind Architecture (UEMA): A Complete Specification for Differentiable Embodied Intelligence
Version3.5
Date and authorFebruary 2026, Mind Machine Learning, Inc. (MML)
StatusWorking Specification. Supersedes UEMA v3.3, v3.0, v2.0 and v1.0.
Source filesdocs/UEMA_Specs/UEMA_Spec_v3_5.docx (the Word original) and docs/UEMA_Specs/UEMA_Spec_v3_5.txt (the author's own text export), in the UEMA_Research release.
Difference between the two filesThe two files have the same text, except that the text export adds two sections marked "added 2026-09-08". Its section 10.6 is given in full as page section 9.6. The requirements of its section 20.6 that apply to any body are page section 13.4.
Companion documentsperceptionSpace-4.docx ("Perception Space: Definition and Framework") and fastGainOfFunction-4.docx ("Fast Gain-of-Function Plan: Execution roadmap for embodied perception"), in the same folder, as is ManyMinds_Spec_v2.md, the "Many Minds Spec v2" the source cites. Where they extend or revise a section, a box marked "Companion note" quotes or summarises them at that section.

Four kinds of boxes

The specification mixes design text with notes about the code that existed when it was written. This page keeps the two apart so a reader can tell a requirement from a record:

Implementation status in the source. A note the source wrote about the code of its time, as of the date it carries. Several of these notes disagree with each other because they were written at different times; section 18 sets them side by side. They describe the code of early to mid 2026, not the released code; section 19 covers the released code.
Companion note. Text from perceptionSpace-4.docx or fastGainOfFunction-4.docx that extends or revises the section where it appears.
Future work in the source. A design the source marks [FUTURE], TODO or "evaluate later": stated, not yet required.
Text-export addition. A section that is only in the author's text export, marked "added 2026-09-08".

Reading guide

ReaderRead firstThen
A student new to the field1 The setting, 2 Core thesis, 4 Two registers, 7 Wellness, 10 Self and body, 15 The path to self-awareness13 Bootstrap, 14 Curiosity and emergence, 12 Many Minds
A machine-learning researcher1, then 4 to 9 (registers, encoders, forward model, wellness, motor controller, intention)16 (losses and differentiability), 17 Open questions, 19 Released code
An engineer1, 3 The body, 5 Encoders, 6 Forward model, 16 Implementation specifications18 Deviations and priorities, 19 Released code

1The setting and the parts

The specification describes one system in a loop. A simulated body sits in a simulated world. Its sensors produce readings; encoders compress the readings into tokens; a forward model predicts the next tokens; a wellness evaluator scores the body's state from the raw readings; the gradient of that score with respect to the motor command drives a motor controller, which sends the next command to the body. A planner can also search for a command by running the forward model on commands that are not executed. A body schema tracks which sensor readings follow the commands, and so marks the boundary of the self.

The specification was written for a full-body human avatar simulated in a game engine. That avatar is not part of the public release. The body released with the code is MIMo, a simulated infant body moved by the MuJoCo physics program; section 19 states where MIMo's senses and commands differ from the numbers below.

Units of time

Frame. One update of the specified system. The forward model and every encoder except vision run at 60 frames per second (one frame = 1/60 s, 16.7 ms); the vision encoder runs at 24 per second. The source plans one training update of the network weights per frame (section 16.5), so its counts of training steps are counts of frames. The released MIMo trainer uses a different unit, the model step of 50 ms (section 19).

The six senses carry the names of the project's sense registry: vision (camera images), tactile (pressure, shear, slip and vibration on the skin), audio (sound at the two ears), proprioception (where each body part is, how fast it moves and how hard it pushes), motor (the command itself, read back as an input) and intermind (the internal state other minds make readable, section 12).

Network terms used from here on. Linear a → b: a learned matrix that maps a list of a numbers to b numbers (plus a learned offset). MLP (multi-layer perceptron): linear layers with a nonlinearity between them. ReLU and GELU: nonlinearities that pass positive values and suppress negative ones (GELU smoothly). Sigmoid: maps any number into (0, 1). Attention: each output is a weighted average of value vectors, with weights computed from the similarity of a query vector to key vectors; multi-head attention runs several such averages in parallel. Attention pooling or a learned query: one learned query vector attends over a set of vectors, reducing the set to one vector. LayerNorm: rescales each vector to mean 0 and variance 1, then applies a learned scale and offset. Residual connection: a layer's input is added to its output.

The parts, each defined once

Handle and command. The body is moved through handles: named body parts (wrist, each finger, head, upper arms, lower arms, thighs, calves, feet), 23 in this specification. A command sets, for every handle, a target position (3 numbers), a target rotation (a quaternion, 4 numbers), a radius from 0 to 1 that the source calls "motor synergy" (in its pain example a larger radius gives a whole-arm retraction), and a strength from 0 to 1. The source also calls a command an action; on this page the two words name the same numbers.
Grounded register, Pt. The complete, uncompressed state of every sensor at time t. Every number in it is a measurable physical quantity (section 4.1).
Encoder and token, the predictive register, zt. One encoder per sense turns that sense's readings into one token of 768 numbers (d_model = 768). The six tokens of one frame together are zt, the predictive register (section 4.2).
Forward model and prediction error (PE). A transformer (a network built from attention layers) that takes the tokens of the last k frames and outputs predicted tokens for the next frame. Prediction error is the mean squared difference between the predicted tokens and the tokens the encoders produce when the next frame arrives (section 6).
Grounded wellness evaluator. Small networks that read the raw readings Pt and the prediction error and output a vector of wellness components, each from 0 to 1 (prediction, tactile, capacity, coherence). All learning signals are derived from it, so the source calls it authoritative (section 7.2).
Approximate wellness evaluator. A network that reads tokens, including predicted tokens, and is trained to output what the grounded wellness evaluator would output. It scores imagined states. An imagined state is a set of predicted tokens that the forward model computes from earlier predicted tokens, with the body not moving, so it has no raw readings. Repeating that computation for several frames is an imagined rollout (section 7.3).
Wellness gradient. The derivative of the summed grounded wellness with respect to the numbers of the motor command: for each command number, the change in wellness per unit change of that number. It is an input of the motor controller (section 7.4).
Adaptive motor controller. A network that reads the six tokens and the wellness gradient and outputs a command. When its own confidence estimate is low it scores further candidate commands by imagined rollouts before choosing (section 8).
Planner search. Model inversion: starting from a command, it runs gradient descent on the command's numbers to lower the mean squared difference between the forward model's predicted tokens and a desired set of tokens (section 9). The source's code name is IntentionGenerator; this page uses "planner search", the released project's name for it.
Body schema. Running averages of the correlation between changes in the command and changes in each sensor reading. A reading whose running correlation is above 0.5 is scored "self" (section 10).
Mind and Many Minds. One set of the parts above (its own forward model, motor controller and wellness evaluator) is one mind. When a mind's prediction error on a group of handles passes a mastery test (mean below 0.05 over 50,000 steps, section 12.3), the specification splits off a subordinate mind for those handles (section 12).
Body in its world(simulated) Sensor readings P_tgrounded register Six encodersone 768-number token each Forward modelpredicts next tokens Approximate wellnessevaluator, reads tokens Planner searchinverts the forward model Grounded wellnessevaluator, reads P_t Body schemaboundary of the self Adaptive motorcontroller readings P_t z_t predicted tokens z_t P_t PE wellness gradient command: 23 handles commands in,tokens out planned commands imagined wellness Δ command,Δ sensor coherence
Figure 1. The parts of one mind and how numbers flow between them. Solid arrows carry the numbers of the executed frame. Dashed arrows carry imagined numbers: the forward model run on commands that the planner search does not execute. Figure 5 draws the motor controller's own imagined rollouts. The six dots are the six tokens: vision, audio, tactile, proprioception, motor, intermind. Drawn for this edition from sections 4 to 11 of the source.

2Core thesis and dual objective source §1–2

2.1 Why a policy network is not enough

A policy network learns one mapping, observation → action. The source states that this collapses five distinct cognitive stages into one mapping:

"I perceive → I predict → I feel myself → I intend → I act"

Requirement: each of the five stages must be a meaningful internal process with its own computational substrate. A policy network computes f(observation) = action and has no internal state representing why an action works; the source calls this "the Zombie Problem" ("There is nothing it is LIKE to be this system").

No permanent policy exceptions. The thesis applies to the entire system. There is no permanent reflex network trained by reinforcement learning (RL), and no bootstrap scaffold: a temporary RL policy whose commands are blended in with a weight that decays over training. Every motor command flows through the prediction-wellness architecture from the start; section 8.5 gives the source's account of how learning starts without a scaffold.

2.2 The dual objective

Prediction error
Trains the forward model (the source also calls it the world model), which minimises prediction error on sensorimotor experience. The source's reason: "Prediction is compression; to predict well you must understand the underlying process."
Wellness gradient
Drives action selection. The wellness evaluator maps the current sensory state to a multi-dimensional wellness vector; its gradient with respect to the command's numbers is the motor controller's input (7.4).
Objective usedWhat the source says follows
Prediction error aloneThe system could minimise prediction error by sitting still: nothing motivates action.
Wellness aloneThe system might learn shortcuts without a deep world model.
BothPrediction error builds an accurate world model; wellness drives self-preserving action on that model.

The source holds that every other behaviour follows from this dual objective, with no external curriculum, no task-specific objective and no permanent reinforcement-learning objective anywhere (the field's term for that externally defined score is reward):

PhenomenonMechanism the source givesWhere on this page
CuriositySeek states where prediction error is moderate: high learning potential14.1
BoredomPrediction error → 0 in the current domain: seek novelty14.1
Self-coherenceMaintain predictive accuracy about the self, the most complex prediction set10
Self-preservationProtect the body model, the most valuable predictive asset10.5
IntentionInvert the forward model: desired consequence → action9
ImaginationChain the forward model without executing: simulate before spending energy6.3, 9.3
StressSustained prediction error across several senses without resolution14.2
GriefA deeply reinforced prediction becomes permanently false14.2
Companion note (fastGainOfFunction-4.docx, §10). Model-based RL adds a learned prediction to a policy but keeps the externally defined objective and has no self-model. The plan calls UEMA "a different type of system", and its demonstrations (sections 7.5 and 10.5) are meant to test that claim.
Companion note (perceptionSpace-4.docx, §6 "Manifold constraints"). Not every representable sensory state is physically realisable: physics, body shape, continuity in time and agreement between senses restrict the valid trajectories. A forward model trained to minimise prediction error on real data therefore learns that restricted set (manifold learning; Bengio, Courville and Vincent 2013). Stated hypothesis: prediction-error-driven learning is more sample-efficient than RL driven by an external objective signal for embodied systems, because it learns the manifold and not only which states score well; "wellness tells it where to go within that understood world". To be validated by the modality-ablation and scaling experiments of the Fast Gain-of-Function Plan.

3The body: senses and handles source §3

The source requires that every concept maps to measurable quantities. This section lists the sensors and the motor interface of the specified avatar. The engine-specific implementation passages of the source are not reproduced (section 21); the measured quantities, units and rates are.

3.1 Tactile sensing

QuantityUnitsRateDescription
Normal pressurePa500–1000 HzNormal force per unit area
Shear magnitudePa500–1000 HzTangential force magnitude
Slip ratemm/s500–1000 HzRelative surface velocity
Contact areamm²500–1000 HzContact patch size
Vibration power (4 bands)W500–1000 HzFourier-transform power bins at 50, 100, 200, 400 Hz

Biological mapping: slowly adapting type I receptors (SA-I) → normal pressure; rapidly adapting type I (RA-I) → shear magnitude and slip rate; rapidly adapting type II (RA-II) → vibration power at 200 Hz and 400 Hz. The vibration channels are frequency-domain features computed by a Fourier transform over a rolling window of the contact-force history, not over the simulation timestep.

3.2 Vision (foveated)

ComponentResolutionField of viewImage patches
Panorama2520 × 1560210° × 130°15,229
Fovea (the sharp centre of view)512 × 5125°1,024
Total——16,253

Each patch carries its angular position (azimuth, elevation), not its pixel position (x, y). The encoder is a Swin Transformer, a transformer that computes attention within local windows of patches that shift from layer to layer (section 5.1). One frame of vision is 48 MB.

3.3 Audio

Binaural stereo sound (PCM) recorded at the two ear locations, with the interaural time difference (ITD, in μs) and interaural level difference (ILD, in dB). Voice is synthesised with the Pink Trombone vocal synthesiser. A self-voice coherence value lies in [0, 1]; the source does not define how it is computed. Loudness: 30–60 dB is comfortable; 75–90 dB gives negative wellness.

3.4 Motor control through handles

The body is a three-layer physics stack:

  1. A rigid-body skeleton: mass, inertia, joint limits.
  2. A postural tone layer: baseline stiffness that holds posture against gravity.
  3. Handles: the motor commands the learning program sets.

Final motion (per frame) = gravity + postural tone + handle forces + tactile contact forces

HandlesCountStiffness scaling
Per hand: wrist, thumb, index, middle, ring, pinky12 (6 per hand)—
Head11.5×
Upper arm, left and right22.5×
Lower arm, left and right22.0×
Thigh, left and right23.0×
Calf, left and right22.5×
Foot, left and right21.5×
Total23

Why the scaling: per-region stiffness gives the same apparent compliance across body segments of different mass.

Effort. The resistance of the postural tone layer is the proprioceptive effort signal. Handles overcome postural tone, gravity and contact forces; that total resistance is "effort".

E_total = Σ |F · v| · dt + λ · Σ PosturalToneStrength · dt

E_total is the energy the body spends (the source's label is "Energy"). F is a handle force, v the velocity of the body part it moves, dt one frame, and λ a weight the source does not give a value for. Fatigue: capacity depletes under load, recovers at rest, and limits the effective strength of the postural tone.

Implementation status in the source. 23-handle full-body motor control implemented, with data-driven handle definitions and per-region stiffness.

The released MIMo body has different sensors and 24 or 26 handles, depending on its body layout; section 19 lists the differences that are visible in the released code.

4Two registers of experience source §4

4.1 The grounded register

Perception is sensor data. The grounded perception state Pt is the complete, uncompressed state of all sensors at time t; every dimension corresponds to a measurable physical quantity.

SenseContents of Pt (shapes as the source gives them)
visionfovea_tokens[1024, 768], pano_tokens[15229, 768], angular_pos[16253, 2], gaze_target
tactilea list of patches, each with normal pressure, shear magnitude, slip rate, contact area and vibration power in 4 bands
audioleft_spectrum[256], right_spectrum[256], itd, ild, self_voice_coherence
proprioceptionjoint_pos[n_joints, 3], joint_vel[n_joints, 3], ph_forces[n_handles, 3] (handle forces), ph_targets[n_handles, 7] (handle targets), pcc_strengths[n_bodysets] (postural tone per body set: a body region with its own postural-tone strength; 10 regions for the 23 handles, section 7.2), muscle_cap[n_bodysets] (muscle capacity per body set), energy
motor commandsph_commands[n_handles, 9]

4.2 The predictive register

Encoding compresses Pt into tokens of d_model = 768 numbers, for imagination rollouts. There are six modality tokens (modality is the field's word for a sense):

z_t = { z_vision, z_audio, z_tactile, z_proprio, z_motor, z_intermind }, each a tensor of 768 numbers

Three properties are required. The encoding is lossy (Pt cannot be reconstructed from zt), learned (jointly with the forward model), and runs only on real data (imagination chains z without re-encoding).

The source's explanation, with its numbers:

  • The problem. Raw sensor data is large: vision alone is 16,253 patches of 768 numbers; tactile is 200 patches of 8 numbers. With audio, proprioception and the motor command, millions of numbers arrive every frame, and no network can efficiently predict the next frame from millions of raw numbers.
  • The solution. Each sense is compressed to one token of 768 numbers. Six senses give six tokens, 6 × 768 = 4,608 numbers for the entire state.
  • What is lost. Detail: the 16,253 vision patches cannot be reconstructed from 768 numbers. The encoder learns which information to keep: the information most useful for predicting what happens next.
  • Why "learned jointly". If an encoder discards information the forward model needs, prediction error rises, gradients flow back into the encoder, and the encoder is trained to keep that information.
  • Why "only on real data". During imagination (chained prediction) no sensor fires, so there is nothing to encode; the system works with tokens it already has.
Future work in the source (TODO): a density-matrix latent. Investigate density-matrix latent geometry (UWM-JEPA, AgentField.ai, arXiv 2605.25313, 2026). Today zt is a point vector, a single commitment to one future state. Under partial observability the same sensory history is consistent with several futures, and a point vector can represent only one. A density-matrix latent (a positive-semidefinite matrix evolving by unitary conjugation, ρ → UρU†) holds a probability distribution over hidden states and keeps information about all futures until an action or a new observation collapses it. Hypothesis: this would reduce information loss in multi-step imagination rollouts, especially in ambiguous motor situations. It changes only the forward model's internals; encoders, wellness evaluators, motor controller and everything above the forward model are unaffected. Key question: does the six-sense grounded stream already resolve enough ambiguity that the gain is small? To be validated against the loss of retained information in rollouts longer than k = 10 frames.

4.3 Reconciliation of the two registers

SituationRegisterWellness evaluatorSource of the motor command
ExecutionGrounded (Pt)Grounded (authoritative)Adaptive motor controller
ImaginationPredictive (zt)Approximate (trained to match the grounded one)Planner search
RetrospectionBoth (compared)Both (the difference is a training signal)None (learning only)

"Imagining pain does not hurt": the grounded register is authoritative, and all evaluation happens there; the predictive register is approximate, and all prediction and planning happen there. The system learns to model the gap between the two. The source calls that gap self-knowledge: the system learns that its imagined pain differs from actual pain by a measurable amount, and this difference is the computational basis for distinguishing reality from thought.

Companion note (perceptionSpace-4.docx, §1, §4, §5). A perception space is the set of every observation a sensor arrangement and its encoding could produce. Each actual observation is one point in it, and behaviour sets which region is visited. The document stacks four layers (Figure 2): the raw sensor space (the grounded register); the modulated sensor space, in which pain and pleasure change how many levels each dimension can distinguish; the encoded space (zt, 6 × 768 = 4,608 numbers per frame; the predictive register); and the functional space, which is what the trained model can tell apart. It defines gain of function in these terms: the prediction loss pulls together the encodings of situations that have similar outcomes; each such cluster is a category learned without a label, and it becomes an input to later blocks of the forward model.
Layer 1: raw sensor spaceevery reading the sensors can produce (grounded register) Layer 2: modulated sensor spacelevels each dimension can distinguish, set by pain and pleasure Layer 3: encoded perception spacez_t: 6 × 768 = 4,608 numbers per frame (predictive register) Layer 4: functional perception spacewhat the trained model can tell apart modulation by pain and pleasure encoding (learned, lossy) training Space and visited region The space: set by the sensorsand by modulation.The visited region: set bybehaviour (flat or on tiptoe).
Figure 2. The four layers of perception space in perceptionSpace-4.docx, redrawn from its Figure 1 (original figure). Layers 1 and 3 are this section's grounded and predictive registers.
Text embedding768 numbers Image latent4 × 64 × 64 = 16,384 numbers Joint space of a diffusion model768 + 16,384 = 17,152 dimensions UEMAsix senses, in time contrast
Figure 3. The diffusion-model example of perceptionSpace-4.docx, redrawn from its Figure 2 (original figure). A text-to-image diffusion model joins a text embedding to a compressed image (a latent); the text narrows which images are explored. The document contrasts this with UEMA's six senses in continuous time, each modulated by wellness.

5Encoders source §5

Each sense has its own encoder, which compresses its raw data into a token of d_model = 768 numbers. Requirements: every encoder computes at d_model width internally (768-dimension attention, 768-dimension MLPs) and is trained jointly with the forward model. There is no intermediate bottleneck dimension; an encoder discards information only at its final pooling step.

EncoderArchitectureInputOutput
Vision (5.1)Patch embedding (Linear 768 → 768) + angular position encoding + Swin Transformer (4 layers) + attention pooling16,253 raw patchesPooled vision token [768], plus the full patch sequence for attention further on
Tactile (5.2)Per-patch MLP (Linear 8 → 64 → 768) + cross-patch attention (8 heads) + attention poolingAbout 200 patches × 8 fieldsTactile token [768]
Audio (5.3)1-D convolution stack (2 → 64 → 128 → 768) + adaptive average pooling + ITD/ILD embedding + linear combinationStereo spectrum + spatial cuesAudio token [768]
Proprioception (5.4)MLP (input_dim → 256 → 768)Flattened joint_pos, joint_vel, handle forces, handle targets, postural tone strengths, muscle capacities, energyProprioception token [768]
Motor command (5.5)Per-handle MLP (8 → 64 → 768) + cross-handle attention (8 heads) + attention poolingn_handles × 8 (position + rotation + radius + strength)Motor token [768]
Intermind (5.6)Target: PerMindIntermindEncoder, cross-attention with learned identity embeddings per mindReadable internal state: each mind projects its forward model's last hidden layer through a learned linear map to [768]. In single-mind training the mind reads its own projected state ("self-reading").Intermind token [768]

Why cross-patch attention: in the tactile encoder it captures spatial relationships between patches ("4 fingers gripping, 1 slipping").

Implementation status in the source, per encoder.
  • Vision: implemented as SwinPatchEncoder with angular position encoding. Split rate implemented at about 30 Hz (vision_every_n_frames = 2 at 60 FPS); to be adjusted to 24 Hz. The code ran every encoder at an internal width d_internal = 128, which the source marks CRITICAL and says must be removed (section 18 gives the full deviation).
  • Tactile: implemented as CrossPatchAttention with learned-query pooling; also used d_internal = 128.
  • Audio: implemented as Conv1DStack with two branches (spectral, and spatial ILD/ITD) and a gated combination; the explicit spatial branch for binaural cues goes beyond the specification.
  • Proprioception: implemented as MLPProject with input_dim = 276 (23 handles × 12 features: quaternion 4 + position 3 + velocity 3 + fatigue 1 + index 1).
  • Motor: implemented as CrossPatchAttention (alias cross_handle_attention), 23 handles × 10 features.
  • Intermind: implemented as SelfAttentionPoolEncoder (intermind.py); the stub returns zeros with loss weight 0.0. Required change: loss weight 0.1 and self-reading from step 0, then replacement by PerMindIntermindEncoder (Many Minds Spec v2 §2.4).

5.7 Preventing encoder collapse

An encoder collapses when it outputs nearly the same token for different inputs, which makes prediction trivially easy and useless. The source names two signals against it: (1) prediction utility, because the forward model needs distinguishable representations; (2) an InfoNCE contrastive loss, which requires different inputs to produce different embeddings, temperature 0.07.

Implementation status in the source (UPDATED 2026-06). The code implements VICReg (variance-invariance-covariance regularisation; here, a loss that keeps the spread of each token number across a batch at or above a target and pushes the correlations between token numbers toward 0) instead of InfoNCE. VICReg addresses the same failure and suits online learning better because it needs no negative pairs. VICReg is enabled by default (vicreg.enabled: true in master_config.yaml; variance weight 1.0, covariance weight 0.04, variance target 1.0), so collapse prevention runs (loss_manager.py compute_vicreg, verified by tests/test_vicreg.py). defaults.py still carries the old disabled value; master_config.yaml is the configuration in effect.

6Forward model source §6

The forward model predicts the next encoded state from a window of past encoded states. It operates entirely in the predictive register.

Input
The six modality tokens of each of the past k frames: a tensor [batch, time, 6, 768]. A learned modality embedding (one vector per sense, in the sense sequence vision, audio, tactile, proprioception, motor, intermind) and a learned temporal embedding (one vector per position in the context window) are added to every token.
Computation
The tokens are laid out as one sequence of time × 6 tokens and passed through n_layers = 8 three-stage attention blocks (6.1), each with n_heads = 12 attention heads. The six tokens of the newest frame are read out.
Output
Five prediction heads (6.2), one each for vision, audio, tactile, proprioception and intermind, output the predicted token of frame t+1 for that sense. The motor token is not predicted: it is the action.

Specified sizes: d_model = 768, n_layers = 8, n_heads = 12, context length ctx_len = 32 frames.

The source's code listing for the forward model
class ForwardModel(nn.Module):
    def __init__(self, d_model=768, n_layers=8, n_heads=12, ctx_len=32):
        self.modality_embed = nn.Embedding(6, d_model)  # V,A,T,P,M,I
        self.temporal_embed = nn.Embedding(ctx_len, d_model)
        self.blocks = nn.ModuleList([
            ForwardModelBlock(d_model, n_heads) for _ in range(n_layers)])
        self.heads = nn.ModuleDict({
            'vision': PredictionHead(d_model),
            'audio': PredictionHead(d_model),
            'tactile': PredictionHead(d_model),
            'proprio': PredictionHead(d_model),
            'intermind': PredictionHead(d_model),  # predicts communication patterns
        })
    def forward(self, modality_tokens, timesteps):
        # modality_tokens: [batch, time, 6, d_model]
        batch, time, n_mod, d = modality_tokens.shape
        modality_tokens += self.modality_embed(torch.arange(n_mod))
        modality_tokens += self.temporal_embed(timesteps).unsqueeze(-2)
        x = modality_tokens.reshape(batch, time * n_mod, d)
        for block in self.blocks:
            x = block(x, time, n_mod)
        latest = x[:, -n_mod:, :]
        return {k: head(latest) for k, head in self.heads.items()}

6.1 The three-stage attention block

Each block runs three attention stages, then a feed-forward network (FFN). Each stage has a LayerNorm and a residual connection (its input is added to its output).

  1. Cross-modal attention within each time step. The six tokens of one frame attend to each other. Purpose: find co-occurrences ("vision and touch fired together").
  2. Causal temporal attention within each sense. One sense's tokens across the window attend to each other, with a causal mask so a token reads only earlier and current frames. Purpose: temporal patterns ("touch increasing for 5 frames").
  3. Cross-modal temporal bridge. Tokens attend across senses and across the frames of the window; the source does not state whether this stage is masked. Purpose: causal chains across senses and time ("vision changed at t−3 caused touch to change at t−1").
  4. FFN: 768 → 4 × 768 = 3,072 → 768, GELU activation.
Stage 1: across senses Stage 2: across time (causal) Stage 3: across senses and time t−3t−2t−1t t−3t−2t−1t t−3t−2t−1t Each stage: LayerNorm, attention, add the input back. Then FFN 768 → 3,072 → 768 (GELU). 8 such blocks.
Figure 4. The three stages of one block on a window of four frames (the specification's window is 32). Rows are the six senses (vision, audio, tactile, proprioception, motor, intermind); the shaded region is the set of tokens that attend to each other in that stage. Stage 2 is drawn for vision; it runs for every sense, and a token reads only its own and earlier frames. The source does not state whether stage 3 is masked.

6.2 Prediction head

Input
The six tokens of the newest frame from the last block, [batch, 6, 768].
Computation
A learned query vector attends over the six tokens (multi-head attention, 4 heads), giving one pooled vector; an MLP 768 → 1,536 → 768 with GELU transforms it.
Output
The predicted token [768] of one sense for the next frame. One head per predicted sense.
The source's code listing for the prediction head
class PredictionHead(nn.Module):
    def __init__(self, d_model):
        self.attn_pool = nn.MultiheadAttention(d_model, num_heads=4)
        self.query = nn.Parameter(torch.randn(1, 1, d_model))
        self.mlp = nn.Sequential(
            nn.Linear(d_model, d_model*2), nn.GELU(),
            nn.Linear(d_model*2, d_model))
    def forward(self, context):  # [batch, 6, d_model]
        query = self.query.expand(context.shape[0], 1, -1)
        pooled = self.attn_pool(query, context, context)[0].squeeze(1)
        return self.mlp(pooled)

6.3 Distribution shift in imagination

During an imagination rollout the forward model's outputs are fed back as its inputs. Each prediction carries some error, and the errors compound over steps (the source calls this "the telephone game effect"). Two countermeasures are required:

Latent regulariser
Input: predicted tokens, and running means and variances of real encoder outputs. Computation: for each number, z = (prediction − running mean) / running standard deviation; penalty = max(0, |z| − 2)², so predictions within 2 standard deviations cost nothing. Output: a differentiable penalty added to the loss.
Imagination-aware training
Input: a real trajectory. Computation: chain the forward model through its own predictions for 3 steps and compare each step with the real trajectory. Output: a multi-step loss, weight 0.5.
Implementation status in the source (UPDATED 2026-06). Implemented and enabled. context_length is 8 in master_config.yaml. Latent regulariser active (latent_reg.enabled: true, loss weight 0.01, ±2σ envelope over running statistics; training/latent_regularizer.py, tests/test_latent_regularizer.py). Imagination-aware training active (imagination.enabled: true, 3 steps, loss weight 0.5, every step): run_batched_imagination chains the forward model through its own predictions with gradient through every step (training_step.py; tests/test_imagination.py).
Future work in the source: dual-timescale latent channels. Add a slow latent channel updated every T = 30 steps (about 0.5 s) beside the fast 60 Hz channel. The split-rate vision design (section 16.4) already introduces signals at more than one rate and is the natural test bed. To be evaluated only after the recursive motor controller (8.3) and deep supervision of imagination rollouts (9.3).

6.4 Gaze head

Input
The forward model's latent tokens.
Computation
A learned query vector with multi-head attention over the latents, then an MLP, then a tanh scaled and clamped to configurable ranges.
Output
Gaze direction: azimuth in [−π, π] and elevation in [−π/2, π/2]. Loss weight 0.1.

Why: gaze becomes a motor decision instead of a fixed property of the vision system. It is needed to aim the 5° fovea, for the gaze-dwell measure of anticipation (section 11), and for social gaze communication.

Implementation status in the source. Implemented as GazeHead in prediction_heads.py: learned query, multi-head attention, MLP, tanh scaling. Section 29.4 of the source adopts it as canonical.

7Wellness source §7–8

7.1 What wellness is

Wellness is a region of the possible grounded-register states Pt where four things hold: predictions succeed (low prediction error); sensors function (tactile sensing active, fovea tracking, audio in range); the body has capacity (muscle not depleted); and the self-model is coherent (high coherence, section 10.1). The source states that wellness is a multi-dimensional state, not one number judged against a line such as 0.7; two evaluators compute it, one for each register.

7.2 Grounded wellness evaluator (execution)

It reads the raw sensor data Pt. It is the authoritative wellness signal: all learning signals are ultimately derived from it.

ComponentInputNetworkOutput
predictionThe prediction error, 1 numberLinear 1 → 32, ReLU, Linear 32 → 1, sigmoid0 to 1
tactileA summary of the tactile patches, 8 numbersLinear 8 → 32, ReLU, Linear 32 → 1, sigmoid0 to 1
capacityMuscle capacities, 21 numbersLinear 21 → 32, ReLU, Linear 32 → 1, sigmoid0 to 1
coherenceThe body schema's coherence score, 1 number (section 10.1)Linear 1 → 32, ReLU, Linear 32 → 1, sigmoid0 to 1

The evaluator returns the four components stacked into one wellness vector, and the components by name.

Implementation status in the source. Partially implemented. The grounded wellness evaluator's networks use simplified inputs: prediction 1, tactile 8, capacity 21 (for 10 body sets: postural tone strengths 10 + capacity 10 + energy 1), coherence 1. The capacity network returns zeros (a stub); the source's code calls it capability_wellness. With 23 handles there are 10 body sets (Leg_L, Leg_R, Foot_L, Foot_R and Head were added).

7.3 Approximate wellness evaluator (imagination)

Input
The five tokens other than the motor token, from the encoders or predicted by the forward model, flattened to 5 × 768 = 3,840 numbers.
Computation
Linear 3,840 → 256, ReLU, Linear 256 → 128, ReLU, Linear 128 → 4, sigmoid.
Output
Four wellness components, each 0 to 1. Trained during execution to match the grounded wellness evaluator: loss = ‖Wapprox(zt) − Wgrounded(Pt)‖².

7.4 From wellness gradient to motor command

The source calls the wellness gradient "the core motor drive signal". During execution:

Input
Pt with its motor-command numbers marked for differentiation; the prediction error.
Computation
Run the grounded wellness evaluator; sum the wellness vector; take the gradient of the sum with respect to the motor-command numbers (with the graph kept, so that training can differentiate through it again). The result says, for each command number, which direction raises wellness.
Output
The gradient, passed to the motor controller, which turns it into structured handle commands.

With Many Minds active, each mind calls this computation independently with the system's wellness sum.

Implementation status in the source (UPDATED 2026-06). Implemented and wired: torch.autograd.grad(total_wellness, motor_commands) is computed in training_step.py and passed to the motor controller as an extra input (motor_controller.py concatenates the flattened gradient into the motor input). Gradient flow from the wellness evaluators through the motor controller is verified by tests/test_wellness_gradient.py. The source concludes that the five-stage pipeline is closed. Remaining dependency: the quality of the signal scales with the forward model's accuracy, the same reason the planner search (section 9) stays off by default.

7.5 Pain and pleasure as trajectories source §8

StagePain: hand contacts a hot surfacePleasure: hand contacts a pleasant texture
Tactile detectionNormal pressure spikes (contact); a thermal reading exceeds its thresholdLight normal pressure (500 Pa); vibration power shows a texture signature
Grounded wellnessTactile wellness drops (high pressure and heat)Tactile wellness rises (the pattern matches a learned pleasant association)
Wellness gradientPoints away from the contact: withdrawalPoints toward continued contact
Motor effectHandle strength increases for withdrawal; radius expands (whole-arm retraction)Strength decreases (lighter touch); the texture surface is explored
Forward model learns"This visual + tactile pattern leads to a wellness drop"This visual + tactile pattern leads to a wellness increase
LaterAnticipatory withdrawal when the visual pattern alone is detectedApproach when the visual pattern is detected
Companion note (perceptionSpace-4.docx, §2–3). In the project's patent, pain and pleasure also change how the senses are encoded: sensor resolution and range, learning rate and computation budget. Hypothesis: with touch, a painful contact gives an immediate tactile signal that cross-modal attention can link to the visual pattern in one trial, while a vision-only model must learn from pixels that something predicts a sensation with no visual form. To be tested by removing senses one at a time.
Companion note (fastGainOfFunction-4.docx, Demo 2: one-trial hot-object avoidance). The pain walkthrough is one of the plan's three headline demonstrations: the avatar contacts a hot surface, tactile pain fires, withdrawal occurs; at the next encounter with the same or a similar visual pattern, avoidance fires before contact. It needs an environment with a thermal surface. Its control: the same scenario with modulation switched off.

8Motor controller source §9

This design replaces version 2.0's three fixed motor modes (reflex, habitual, intentional, chosen by prediction-error thresholds) with one controller of adaptive computation depth plus developmental constraints.

8.1 Why adaptive depth

Biology has fast reflexive responses and slow deliberate actions, but the source holds that these emerge from one mechanism and are not three pre-wired modes. Its reasons against fixed tiers: a system with hard-coded tiers cannot find a fourth strategy, cannot introspect on why it processes differently, and needs arbitrary gating thresholds. The adaptive controller gives fast processing in familiar situations and deep processing in novel ones through a learned confidence estimate, and the depth it used is a readable record ("I am thinking more carefully because my predictions are uncertain").

8.2 Core architecture

Input
The six tokens of the encoded state, concatenated (6 × 768 numbers); the wellness gradient; the forward model; the approximate wellness evaluator; the available energy.
Computation
  1. Fast response, always computed: the motor network (8.3) at depth 1 outputs a command. A confidence estimator (Linear 6 × 768 → 128, ReLU, Linear 128 → 1, sigmoid) outputs a confidence.
  2. If confidence > the depth threshold (a learned parameter, initial value 0.7), emit the fast command.
  3. Otherwise deepen: score the fast command by the approximate wellness of the forward model's prediction for it. For depth = 2 … max_depth (10): the motor network at that depth outputs a candidate; the forward model rolls the candidate out for depth steps; the approximate wellness evaluator scores the rollout; a candidate whose summed wellness is higher replaces the best. Stop early when depth × 0.001 (the thinking energy rate per imagination step) > 0.1 × available energy.
Output
A command [n_handles, per-handle numbers] and metadata: the depth used and the confidence.
Encoded state+ wellness gradient Fast commandmotor network, depth 1 Confidence abovethe learned threshold? Emit fast commanddepth = 1 Deep path, for depth = 2 … 10:new candidate command, imagined rollout of that depth,approximate-wellness score; keep the best Emit best commandand the depth used yes no Stops early when depth × 0.001 > 0.1 × available energy.
Figure 5. The adaptive computation depth of section 8.2, drawn from the source's listing. The threshold starts at 0.7 and is learned.
Implementation status in the source: SIGNIFICANT DEVIATION. The code implements a fixed 6-layer MLP that runs every layer every frame regardless of confidence. The confidence head exists but does not gate computation; there are no imagination rollouts and no energy budget. Adaptive depth requires context_length > 1 for meaningful rollouts. The configuration option recursive: false anticipates the future recursive controller (2 layers recursed 1–6 times, about 14M parameters instead of 42.6M). Depth-gated layer count is to be implemented after the context length is increased.

8.3 The adaptive motor network and structured output head

Input
The state (6 × 768 numbers) concatenated with the flattened wellness gradient (n_handles × 8 numbers); a depth.
Computation
Six layers, each Linear(6 × 768 + 23 × 8 → 512), ReLU, Linear(512 → 512), applied with a residual connection; only the first min(depth, 6) layers run. The structured motor head then computes, from the 512-number result: positions (Linear → n_handles × 3), rotations (Linear → n_handles × 4, normalised to unit quaternions), radius (Linear → n_handles, sigmoid) and strength (Linear → n_handles, sigmoid).
Output
Per handle: position, rotation, radius, strength, concatenated. The source labels the result [n_handles, 8]; the fields listed add up to 9 numbers (3 + 4 + 1 + 1), the count used in ph_commands[n_handles, 9] of section 4.1 and in section 9.2. Section 21 lists this as a question for the author.
The source's code listing for sections 8.2 and 8.3
class AdaptiveMotorController(nn.Module):
    '''Generates motor commands with variable computation depth.
       Fast path: single forward pass when prediction confidence is high.
       Deep path: imagination rollouts when confidence is low.'''
    def __init__(self, d_model=768, n_handles=23, max_depth=10):
        self.motor_net = AdaptiveMotorNet(d_model, n_handles)
        self.confidence_estimator = nn.Sequential(
            nn.Linear(d_model * 6, 128), nn.ReLU(),
            nn.Linear(128, 1), nn.Sigmoid())
        self.depth_threshold = nn.Parameter(torch.tensor(0.7))  # learned
        self.thinking_energy_rate = 0.001  # energy cost per imagination step
        self.max_depth = max_depth
    def forward(self, encoded_state, wellness_gradient, forward_model,
                approx_wellness, available_energy):
        '''encoded_state: {z_vision, z_audio, z_tactile, z_proprio, z_motor, z_intermind}
           wellness_gradient: gradient of wellness w.r.t. motor params
           Returns: motor_commands [n_handles, 8], metadata'''
        state_flat = torch.cat([encoded_state[k] for k in encoded_state])
        # Step 1: Fast response (always computed)
        fast_cmd = self.motor_net(state_flat, wellness_gradient, depth=1)
        confidence = self.confidence_estimator(state_flat)
        # Step 2: If confident enough, emit fast response
        if confidence > self.depth_threshold:
            return fast_cmd, {'depth': 1, 'confidence': confidence}
        # Step 3: Iterative deepening via imagination
        best_cmd = fast_cmd
        best_wellness = approx_wellness(
            forward_model.predict_from_action(state_flat, fast_cmd))
        actual_depth = 1
        for depth in range(2, self.max_depth + 1):
            candidate = self.motor_net(state_flat, wellness_gradient, depth=depth)
            imagined = forward_model.rollout(state_flat, candidate, steps=depth)
            candidate_w = approx_wellness(imagined)
            if candidate_w.sum() > best_wellness.sum():
                best_cmd, best_wellness = candidate, candidate_w
                actual_depth = depth
            # Energy budget: stop if thinking costs too much
            if depth * self.thinking_energy_rate > available_energy * 0.1:
                break
        return best_cmd, {'depth': actual_depth, 'confidence': confidence}

class AdaptiveMotorNet(nn.Module):
    '''At depth=1: single forward pass (fast, habitual-like).
       At depth>1: processes wellness gradient + state through more layers.'''
    def __init__(self, d_model=768, n_handles=23, n_layers=6):
        self.layers = nn.ModuleList([
            nn.Sequential(nn.Linear(d_model*6 + n_handles*8, 512),
                          nn.ReLU(), nn.Linear(512, 512))
            for _ in range(n_layers)])
        self.output_head = StructuredMotorHead(512, n_handles)
    def forward(self, state, wellness_grad, depth=1):
        x = torch.cat([state, wellness_grad.flatten()])
        for i in range(min(depth, len(self.layers))):
            x = self.layers[i](x) + x  # residual
        return self.output_head(x)

class StructuredMotorHead(nn.Module):
    '''Outputs structured handle commands respecting action space constraints.'''
    def __init__(self, input_dim, n_handles=23):
        self.pos_head = nn.Linear(input_dim, n_handles * 3)
        self.rot_head = nn.Linear(input_dim, n_handles * 4)
        self.radius_head = nn.Linear(input_dim, n_handles)
        self.strength_head = nn.Linear(input_dim, n_handles)
    def forward(self, x):
        pos = self.pos_head(x).reshape(-1, 3)
        rot = F.normalize(self.rot_head(x).reshape(-1, 4), dim=-1)
        radius = torch.sigmoid(self.radius_head(x))
        strength = torch.sigmoid(self.strength_head(x))
        return torch.cat([pos, rot, radius.unsqueeze(-1),
                          strength.unsqueeze(-1)], dim=-1)  # [n_handles, 8]
Future work in the source: recursive motor controller. Replace the 6 sequential layers (42.6M parameters at d_model = 768) with 2 layers recursed 1–6 times (about 14M parameters), with a learned halt head. The motor controller is part of the 0.3% of each frame's computation that falls outside the vision encoder and the forward model (16.3); the change saves parameters and the source expects better generalisation. Reference: HRM (Wang et al., June 2025, arXiv:2506.21734).

8.4 Developmental motor constraints

Instead of training a permanent RL reflex policy, the system develops through constrained degrees of freedom. A phase sets which handles are active, a range-of-motion factor (ROM) and a strength factor.

Input
The raw command per handle; the current phase.
Computation
For a handle not active in the phase, every number is multiplied by 0. For an active handle, the three position numbers are multiplied by the phase's ROM factor and the strength by the phase's strength factor.
Output
The constrained command.
PhaseActive handlesROM factorStrength factorAdvances to the next phase when
neonateall0.050.02head_control > 0.8
early_infantHead, Wrist_L, Wrist_R0.30.15reaching > 0.7
late_infantHead, Wrist_L, Wrist_R, Thumb_L, Thumb_R, Index_L, Index_R0.50.3basic_grasp > 0.7
toddlerall0.70.6locomotion > 0.6
childall1.00.9fine_motor > 0.6
matureall1.01.0(final)

Advancement rule as the source's comment states it: "Advance when current active handles show PE < threshold"; the listing compares a named mastery metric with the threshold in the last column. The source does not define how each mastery metric is computed.

Implementation status in the source. The code implements 4 phases with explicit numbers: neonate (steps 0–10K, ROM 0.05, strength 0.02, exploration noise 0.01), infant (10K–50K, ROM 0.20, strength 0.10), toddler (50K–200K, ROM 0.50, strength 0.30), child (200K and later, ROM 1.0, strength 1.0). All 23 handles are active in all phases. The specification's six phases are merged: early_infant + late_infant = infant; mature is omitted.

8.5 Bootstrap without a scaffold

The concern: how does the system learn anything from random motor commands? The source answers without any scaffold network (a temporary RL policy blended into the commands, 2.1), because the wellness gradient carries a learning signal from frame zero for three reasons:

  1. Postural tone baseline. The postural tone layer holds the body against gravity from the first frame. Random handle commands perturb a stable baseline posture, not a body floating in free space.
  2. Grounded wellness signal. From frame one the grounded wellness evaluator assesses joint limits, posture quality, sensor function and energy. In the source's words, "Wellness has STRONG gradients near boundaries: approaching a joint limit sharply drops wellness"; the source gives no number for the size. The source: "A random motor command that pushes toward a joint limit produces a clear negative gradient. This asymmetry IS the bootstrap signal."
  3. Developmental constraints. In the neonate phase all handles fire at 2% strength and 5% ROM (8.4). Weak limb movements brushing surfaces produce correlated proprioception, tactile and vision readings for body-schema discovery across the whole body from step zero.

Requirements that follow: no scaffold network and no "Phase 0" training. The prediction-wellness architecture is the mechanism from step zero; the source accepts that early training may be slower than with a scaffold ("that IS the developmental process"). There is no temporary RL policy, no blend weight and no decay schedule, so the core thesis has zero architectural exceptions. The source: "The system earns every capability through the same mechanism it will use forever."

9Intention as differentiable model inversion source §10

9.1 From forward model to intention

During exploration the forward model learns action → consequence. Intention inverts it: desired consequence → action.

Implementation status in the source. Exists and works (intention_generator.py lines 78–189, 11 tests). Off by default (enabled: false), which the source calls correct because it needs an accurate forward model. Includes plan_multistep (line 196) and CrossSimulationAttention (line 283) with trainable parameters. Command-line flag --intention. Called on the inference path (live_test.py lines 1417–1433), not in the training loop. Activation is deferred until forward-model accuracy is established and imagination-aware training works.

9.2 The planner search on the structured action space

Input
The current encoded state; a desired encoded state; the current command [n_handles, 9], used as the starting point.
Computation
Copy the command's position (3), rotation (4), radius (1) and strength (1) as free variables. Run n_steps = 50 steps of the Adam optimiser (gradient descent with a step size adapted per number from running averages of its gradients), learning rate 0.1. At each step: normalise the rotation to a unit quaternion; bound radius and strength with a sigmoid; encode the action with the motor encoder; let the forward model predict the next state from the current state and the encoded action (predict_from_action); loss = mean squared error(predicted, desired) + 0.01 × Σ strength²; take a gradient step on the free variables. The forward model's own weights are not changed.
Output
The optimised command: position, unit rotation, sigmoid(radius), sigmoid(strength).

The strength term makes weaker commands cheaper, so among commands whose predicted tokens match the desired tokens equally well, the one with less strength has the lower loss.

9.3 Multi-step intention by imagination rollout

Input
Current state, goal state, max_steps = 5.
Computation
Repeat up to 5 times: stop if the mean squared error between the imagined state and the goal is below 0.01; otherwise run the planner search from the imagined state toward the goal, append the action to the plan, and replace the imagined state by the forward model's prediction for that action; stop if the approximate wellness evaluator's lowest component for the imagined state is below 0.2 (the imagined trajectory leads to unwellness).
Output
A plan: a list of up to 5 commands.

Why plans stay short: imagination drifts (section 6.3). The source draws the consequence: plan a few steps, execute, re-observe in the grounded register, plan again.

Future work in the source: deep supervision for imagination rollouts. At each imagination step, supervise the prediction against ground truth, detach its gradient, and feed the detached prediction forward. A change of training strategy, not of architecture. Reference: TRM (Jolicoeur-Martineau, October 2025, arXiv:2510.04871).

9.4 Cross-simulation attention

Input
Current state; goal; noise 0.1.
Computation
Make n_rollouts = 5 multi-step plans for the same goal; rollouts 2 to 5 use the goal plus Gaussian noise of scale 0.1, rollout 1 the exact goal. Encode each plan's actions and stack them. Use the mean over rollouts as the query of a multi-head attention (4 heads) over all rollouts' actions.
Output
A consensus action sequence and the attention weights.

Why: what all rollouts agree on is kept and divergent details average out; in the source's words, "intention crystallizes as the common element".

9.5 Visual imagination module (future)

Future work in the source: visual imagination module. DreamZero (NVIDIA GEAR, February 2026) shows that chunked video-diffusion prediction gives more coherent multi-frame trajectories than chaining one-step predictions. An optional chunked visual prediction module for cross-simulation attention during deep motor computation, to be evaluated during Stream 4, the goal-directed training stream (section 13).
9.6 From predictions to reusable skill (in the author's text export only, "added 2026-09-08").

UEMA has a foundation for learning action consequences: the action-conditioned forward model learns what an action does, and sections 9.1 to 9.3 invert it to choose actions. The central gap, named in the author's assessment of 2026-09-08, is turning those predictions into reusable skill; nothing in sections 9.1 to 9.5 does that, and it does not follow automatically.

Two failures define the gap. The detour problem: the planner search optimises each action against its own next predicted state and executes only the first action. Moving a hand around a barrier first takes it farther from the object, so a per-step optimiser has no objective term that prefers the detour; it can still reach one by chance, but nothing scores the first action by the end of the sequence. Executing and re-observing corrects errors but supplies no reason to take the first detour step. Extending the imagined chain does not fix this: a longer greedy chain still never scores the first action by the sequence's end. The skill problem: remembering a recent high-wellness state (the goal ring of the released code, section 19) is a goal, not a skill. A reusable skill needs four functions the architecture does not yet learn: when it can start (initiation conditions), how to continue under disturbance, when it has succeeded (termination), and how to recover when an intermediate step is disturbed. These must be learned, never written by hand per behaviour, because hand-writing would break the core thesis (section 2).

Three candidate mechanisms, to be tested one at a time against the same acceptance test: (a) a learned subgoal mechanism, in which the endpoints of learned consequences become selectable intermediate goals; (b) a short joint action-sequence objective, optimising two to three actions against the imagined sequence outcome instead of the greedy per-step objective, at matched compute; (c) a temporally extended controller, a learned policy over initiation, continuation and termination, trained from the forward model's own rollouts.

Acceptance test (it governs any claim that this gap is closed): a composition such as reaching around a barrier before contact. The final goal must change the first action appropriately; held-out trials must succeed; the simple component ability must remain after the composition is learned. Upstream gate: first-action benefit must be measurable at all: chosen actions must improve actual outcomes over matched alternative actions from restored identical states, after replays of identical actions establish the noise floor.

Implementation status (2026-09-08): not implemented. On the MIMo test bed, a probe that compared approach to chosen goals with matched random controls found the two statistically indistinguishable. The same review found that the planner search's strength penalty sums over the batch while the sensory error averages, so the effective effort penalty grows with the number of simulated bodies trained side by side in one batch; this biases the multi-body planner toward weak actions and must be repaired before first-action rankings are compared across body counts (single-body probes are unaffected).

10Self and body source §11

10.1 The self as the motor-correlation boundary

The self is not defined by skeleton or sensor layout. It is defined by what correlates with the motor commands. The boundary is dynamic and its membership values are differentiable.

Input
Each frame: the change of the motor command and the change of every sensor dimension.
Computation
Correlation score per sensor dimension, a running average outside the gradient path: score ← 0.99 × score + 0.01 × (instantaneous correlation of motor change and sensor change; the source does not define how this one-frame correlation is computed).
Membership = sigmoid(5.0 × (score − 0.5)): above 0.5 for a dimension whose score is above 0.5 (self), below for one whose score is below (world). The temperature 5.0 sets how sharp the boundary is.
Coherence = mean over dimensions of |membership − 0.5| × 2: 1 when every dimension is clearly self or clearly world, 0 when every membership is 0.5.
Incorporation strength of a set of dimensions = mean membership over that set.
Output
Per-dimension membership in [0, 1]; the coherence score in [0, 1], an input of the grounded wellness evaluator (7.2); incorporation strengths.
Implementation status in the source. Exists and works (body_schema.py lines 22–175, 17 or more tests). A running-average correlation matrix [n_handles, n_handles × n_proprio] updated every frame on the inference loop (replay_train.py line 1807, live_test.py line 1342). Produces coherence_score() (a number in [0, 1]), self_membership() (per handle, sigmoid(temperature × (mean correlation − 0.5))) and incorporation_strength(indices). About 6.6K numbers (about 26 KB), no trainable weights. Its correlation buffers are a prerequisite for correlation-based domain discovery (section 12.3).

10.2 Object incorporation

Grasping expands the self. Before a grasp a cup is world: its visual position is independent of the commands, correlation ≈ 0. During the grasp the cup follows the commands: correlation rises and so does its membership. On release the correlation drops and the self contracts. On a slip the contraction is partial, and the wellness gradient drives grip correction.

10.3 Slip detection as self-contraction

Mechanism: a slip lowers the incorporation strength of the cup's tactile contact dimensions; lower incorporation lowers coherence; lower coherence lowers grounded wellness; the gradient of grounded wellness with respect to the motor command therefore points toward restoring coherence, which means restoring grip and incorporation. The source's function slip_driven_correction (in the listing below) returns that gradient. The source states that this needs no grip-force controller and no external objective signal.

10.4 The hierarchical self-model

The boundary of 10.1 is the Level 1 self: what responds directly to motor commands. The source extends the self to slower timescales: a grasped tool is Level 1 self, but losing a house also shrinks the set of wellness states the system can reach, so the house is self in a meaningful sense. A hierarchical self-model tracks three levels with the same correlation machinery:

LevelCorrelatesExampleRunning-average momentumTimescalePrediction-error pattern when this level's self is lost
1 MotorMotor command change with sensor change, every frameBody, grasped objects0.99~100 framesHand injury: immediate, sharp
2 ControlChange of an entity's presence with the change of wellness over the window (minutes)A tool, a house, familiar terrain0.9999~10K framesTool taken: delayed, moderate
3 AbstractChange of an entity's presence with long-run wellness change (hours)Money → resource access → wellness0.99999~100K framesHouse burns: slow, deep, long resolution
Input
Level 1: motor and sensor changes. Levels 2 and 3: for each of n_entity_slots = 64 entity slots, the change of the entity's presence (current − previous; the source does not define how entities are found or how presence is measured); the wellness change over the level's window (last − first value of the wellness trajectory).
Computation
Each level is a body schema of 10.1 with its own momentum. Full membership of a sensor or entity = the maximum of its membership over the three levels. Loss-of-self signal at a level (the source's loss_at_level; not a training loss) = 1 − that level's coherence.
Output
Memberships per level and overall; a loss signal per level.

Level 2 includes entities whose presence correlates with the ability to bring about wellness through action sequences: a house does not move with the hand, but having it correlates with reachable wellness states (shelter, storage, a base of operations). Level 3 extends to multi-step causal chains (money → resource access → wellness maintenance); correlation strength is proportional to the reliability of the chain.

The source states that this produces the right behaviour without programming it: the system is not instructed to protect a house or to be possessive; certain states correlate with sustained wellness and the gradient maintains them. Weak or unreliable chains give weak incorporation: ten houses when one is needed give diminishing correlation.

Connection to Many Minds (section 12). When a mind splits, the subordinate inherits the domain-specific self at Levels 1 and 2 (the walking subordinate's Level 2 includes familiar terrain; the grasping subordinate's includes known tools). The higher mind keeps the full hierarchy including Level 3, so the self-model is distributed across minds.

The source's code listings for sections 10.1, 10.3 and 10.4
class DifferentiableBodySchema(nn.Module):
    def __init__(self, n_sensor_dims, temperature=5.0, ema_momentum=0.99):
        self.correlation_scores = nn.Parameter(
            torch.zeros(n_sensor_dims), requires_grad=False)
        self.temperature = temperature
        self.momentum = ema_momentum
    def update(self, motor_delta, sensor_delta):
        with torch.no_grad():
            instant_corr = self._compute_correlation(motor_delta, sensor_delta)
            self.correlation_scores.data = (
                self.momentum * self.correlation_scores.data +
                (1 - self.momentum) * instant_corr)
    def self_membership(self, sensor_dims=None):
        scores = self.correlation_scores[sensor_dims] if sensor_dims else self.correlation_scores
        return torch.sigmoid(self.temperature * (scores - 0.5))
    def coherence_score(self):
        membership = self.self_membership()
        certainty = (membership - 0.5).abs() * 2
        return certainty.mean()  # differentiable
    def incorporation_strength(self, sensor_dims):
        return self.self_membership(sensor_dims).mean()

def slip_driven_correction(body_schema, grounded_eval, P_t, pe):
    cup_dims = P_t.tactile.cup_contact_patch_indices
    incorporation = body_schema.incorporation_strength(cup_dims)
    # Incorporation drop = self-contraction = prediction error about self
    coherence = body_schema.coherence_score()
    wellness_grad = torch.autograd.grad(
        grounded_eval(P_t, pe)[0].sum(), P_t.motor_commands, create_graph=True)[0]
    # Gradient naturally drives grip tightening because:
    # lower coherence -> lower wellness -> gradient toward restoring coherence
    # -> restoring grip -> restoring incorporation
    return wellness_grad

class HierarchicalSelfModel(nn.Module):
    '''Multi-timescale self-model. Each level tracks correlation between entities
    and wellness maintenance at different time horizons.
    Level 1: Motor-correlation (body, grasped objects). ~100 frames.
    Level 2: Control-correlation (sustained wellness maintenance). ~10K frames.
    Level 3: Abstract-correlation (long-term wellness trajectory). ~100K frames.'''
    def __init__(self, n_sensor_dims, n_entity_slots=64):
        self.levels = nn.ModuleDict({
            'motor': DifferentiableBodySchema(n_sensor_dims, ema_momentum=0.99),
            'control': DifferentiableBodySchema(n_entity_slots, ema_momentum=0.9999),
            'abstract': DifferentiableBodySchema(n_entity_slots, ema_momentum=0.99999),
        })
    def update_level1(self, motor_delta, sensor_delta):
        '''Standard motor-correlation update (every frame).'''
        self.levels['motor'].update(motor_delta, sensor_delta)
    def update_level2(self, entity_states, wellness_trajectory):
        '''Control-correlation: does entity presence correlate with
        ability to maintain wellness over minutes?'''
        wellness_delta = wellness_trajectory[-1] - wellness_trajectory[0]
        for entity_id, state in entity_states.items():
            presence_delta = state.current - state.previous
            self.levels['control'].update(presence_delta, wellness_delta)
    def update_level3(self, entity_states, long_wellness):
        '''Abstract-correlation: does entity correlate with wellness over hours?'''
        wellness_delta = long_wellness[-1] - long_wellness[0]
        for entity_id, state in entity_states.items():
            presence_delta = state.current - state.previous
            self.levels['abstract'].update(presence_delta, wellness_delta)
    def full_self_membership(self, sensor_or_entity_dims):
        '''Returns max membership across all levels.'''
        return torch.stack([
            level.self_membership(sensor_or_entity_dims)
            for level in self.levels.values()
        ]).max(dim=0).values
    def loss_at_level(self, level_name):
        '''PE pattern differs by level:
        Level 1 loss (hand injury): immediate, sharp PE
        Level 2 loss (tool taken): delayed, moderate PE
        Level 3 loss (house burns): slow, deep PE, long resolution time'''
        return 1.0 - self.levels[level_name].coherence_score()

10.5 Self-preservation

The body model is the most complex and most refined prediction set. Damage (a limb stops responding, sensors go dark) produces the largest possible prediction error. The source derives self-preservation from this: the system acts to prevent body-model degradation because that is the most costly prediction-error event.

Companion note (perceptionSpace-4.docx, §5 and §8). "Self lives in this layer": the functional perception space, what the model has learned to distinguish. "Self is bounded by what the model has learned to perceive." The document records Level 1 (motor-sensory correlation through DifferentiableBodySchema) as implemented and testable, and Levels 2 and 3 as specified but not implemented; "Self expands as function grows."
Companion note (fastGainOfFunction-4.docx, Demo 1, Demo 3 and Metric 6). Demo 1, self-touch discovery (neonate): the avatar moves a limb, contacts its own body, and predicts the resulting tactile sensation better on later trials; the prediction error of self-contact events drops and the body schema's coherence score rises; it needs no environment beyond the avatar and gravity; its control is self-generated motion only. Demo 3, tool and body-schema extension (toddler): grasping an object raises the self-membership of the object's tactile dimensions; external removal lowers it; grasping a new object raises it again; it needs graspable objects and a scripted removal; its control is the same scenario with the body schema disabled. Metric 6, self-model coherence: the coherence trajectory and an ownership-transfer test in which an object alternates between grasped, externally moved and stationary, and self-membership must follow the grasped state.

11Grounded anticipation source §12

Anticipation is not a label or an abstract pattern. It is the actual state of the motor and sensor systems when features predict an upcoming interaction, and it is measurable:

MeasureSenseWhat is measuredThreshold
Gaze dwellvisionTime the fovea is held on a target> 200 ms on an approaching object
Centre-of-mass shiftproprioceptionCentre-of-mass displacement> 2 mm before the expected contact
Tactile computation boosttactileThe tactile sensing's adaptive computation per frame (its iteration count)Above its baseline before contact
Handle preloadmotorStrength > 0 with velocity = 0Any handle preloading

These measures become the supervision of a learned anticipation network: the system learns to anticipate, and the measures check that anticipation shows up as observable motor preparation.

Input
The six current tokens, concatenated (6 × 768).
Computation
Anticipation network: Linear 6 × 768 → 256, ReLU, Linear 256 → 128, ReLU, Linear 128 → 4 + n_handles × 8. Confidence gate: Linear 6 × 768 → 64, ReLU, Linear 64 → 1, sigmoid. The first 4 outputs are the predicted measures; the remaining outputs, reshaped per handle and multiplied by the confidence, are the motor preparation.
Output
Motor preparation per handle, the confidence, and the 4 predicted measures.
Training
Over a trajectory, with lookahead 30: for each frame t up to the trajectory length − 30, mean squared error between the 4 predicted measures at t and the measures computed at frame t+1; summed. The measure functions: gaze dwell time; the norm of the centre-of-mass change; 1 if the tactile sensing's iteration count exceeds its baseline; 1 if any handle has strength > 0 and velocity < 0.01.

The source states the purpose: the learned network generalises to novel situations, while the fixed measures verify that anticipation appears as real motor preparation.

Implementation status in the source. Not implemented. It needs context_length > 1 for temporal prediction and a reasonably accurate forward model; the source calls the deferral justified until then.

12Many Minds source §13–18

When a mind passes the mastery test of 12.3 on a domain (a group of handles and the sensors that follow them), it splits into a subordinate mind that handles that domain and a higher mind freed for broader learning. A mastered subordinate is not frozen: it keeps running inference, predicting, generating motor commands and monitoring its domain every frame, while its gradients approach zero under stable low prediction error. Its optimiser state may be evicted to save memory and restored when gradients return.

The specification names two roles in the grown hierarchy (12.6): the top mind, which controls no handles, and the attending mind, which coordinates present-world behaviour, gaze and navigation.

12.1 Data structures

Field of a mindMeaning
mind_id, parent_id (none for the top mind), children, depth (0 = top)Position in the hierarchy
motor_channelsThe handles this mind controls; may be empty (the top mind has none)
sensor_domainsThe sensor subsets monitored for prediction error
forward_model, motor_controller, wellness_evaluatorEach mind has its own computational substrate
Training stateOrdinary gradient dynamics, no freeze flag; optimiser state evicted when the gradient norm is below a threshold
pe_history (ring buffer), pe_variance, mastery_score (0.0 to 1.0)Monitoring of prediction error in the domain
intermind_stateThe last hidden layer projected to [768]; read continuously by other minds through zintermind

The hierarchy holds the minds, the top mind's id and a shared sensory bus. Motor output is a confidence-weighted softmax blend per handle; there is no binary arbitrator.

12.2 Sensory sharing

Requirement ("non-negotiable"): every mind receives the identical tokenised sensory stream every frame, read-only. A subordinate that controls walking receives the same tokens as the top and attending minds. Why: a shared grounded stream lets all minds observe the same physical reality and measure the consequences of each other's actions. When terrain changes from flat ground to stairs, the walking mind's prediction error rises in the same frame in which the higher minds observe the changed world; the walking mind's changed internal state is readable through zintermind, so no alert protocol is required. Implementation: the shared encoders run once and produce the tokens; each mind runs its own forward model, possibly smaller, over the shared tokens for its domain. Subordinates may attend mainly to tokens relevant to their domain, but all tokens are available.

12.3 Mind splitting

Mastery test
Over a window of 50,000 steps of the domain's prediction error: mean < 0.05, variance < 0.01, and more than 95% of the steps below 0.05.
Domain discovery
Correlation-based, with no predefined domain groups: (1) find handles whose prediction error is below threshold; (2) cluster them by motor-to-proprioception correlation from the body schema's running-average buffers; (3) return each correlated cluster as a candidate domain.
Split
(1) Create the subordinate: a full deep copy of the parent's forward model, the parent's motor controller cloned for the domain's handles, sensor scope from the handle set (Many Minds Spec v2 §2.13), no freeze; the child reads the parent's state through zintermind. (2) Remove the domain's handles from the parent and list the child. (3) Register the child. No motor arbitrator: commands are blended by confidence (12.5).

After a split, the subordinate produces the motor commands of the mastered domain. The higher mind still runs its forward model over that domain (it predicts the subordinate's domain) but no longer commands it, and its attention and learning shift to new problems. The subordinate inherits Levels 1 and 2 of the self for its domain; the higher mind keeps all levels.

Implementation status in the source. The core tracking logic exists as MasteryTracker (curriculum.py lines 111–178) with matching thresholds (rolling 50K-step window, prediction error < 0.05, variance < 0.01, 95% consistency), used for curriculum phase advancement. The gap: it receives a single mean prediction error, not the per-handle breakdown needed for domain-specific mastery.
Companion note (fastGainOfFunction-4.docx, Metric 5: adaptive mastery detection; revises the flat window). Mastery = the conjunction of low prediction error, low prediction-error slope, probe accuracy above the domain's threshold, and perturbation recovery (alter the environment for a bounded interval, confirm that prediction error spikes and then recovers). The plan states that this "Replaces flat 50K window".

12.4 Inter-mind communication

Readable state replaces the alert protocol (v3.5). The AlertSignal and its fields (source_mind_id, domain, current_pe, pe_delta, anomaly_context, urgency) are removed, as are alert_threshold and send_alert_to_parent. Every frame each mind predicts, computes its domain prediction error, and sets its intermind state to a learned projection of its forward model's last hidden layer, its domain prediction error, its motor intent (last motor output) and its motor confidence. All minds always generate motor output (override_active is removed); control goes through the confidence-weighted blend. Each mind's projected state is available to all others through the per-mind intermind encoder (Many Minds Spec v2 §2.4). A subordinate that meets trouble shows it only through its readable state (higher prediction error, lower confidence) and that state's effect on other minds' computation, mainly the attending mind's engagement gengage (defined in the next paragraph).

Attending-mind engagement replaces the override protocol (v3.5). override_subordinate(), release_override() and process_alerts() are removed.

g_engage = sigmoid( MLP( [ latents_attend, z_inter_from_top, pe_attend, approx_wellness_attend ] ) )

Inputs: the attending mind's forward-model latents, the intermind token from the top mind, the attending mind's prediction error and its approximate wellness. Output: one number from 0 to 1.

Example from the source: a walking subordinate meets stairs where its model predicted flat ground. Its prediction error rises, its confidence falls and its motor intent changes; the attending mind reads this through zintermind, its gengage rises, and its coordination depth increases for the current frame. No alert, no override command.

High gengage: the attending mind is in executive coordination mode, with more computation depth and a larger coordination gain (the source does not define coordination gain). Low: routine control, the specialist child minds dominate. The top mind does not take part in per-handle arbitration and emits no handle commands; it changes present-world behaviour only by shifting the attending mind's computation through zintermind (engagement, confidence, depth, coordination strength). Release needs no command: when the higher mind's outputs fade, the lower minds' steady outputs dominate again. Reference: Many Minds Spec v2 §§2.3–2.5.1.

Intermind tokens. Communication is a sixth modality on the shared sensory bus. A token carries its source mind and a content vector [768]; target_mind is removed (state is broadcast and each mind's attention filters it) and token_type is removed (no prescribed message types). Token sequence per frame in this part of the source: [zvision, ztactile, zaudio, zproprio, zmotor, zintermind]. The forward model can learn to predict when another mind's prediction error, confidence, motor intent or engagement will shift and how that affects coordination; the source calls this the Many Minds contribution to self-awareness about distributed processing.

12.5 Motor arbitration

Per handle, the commands of every mind that controls that handle are blended with softmax weights computed from their confidences; the temperature is learned per handle. No ownership flags, no binary choice. The source states, with no formula, that the mind with the broader scope gets the larger weight when more wellness components are active. The top mind has no handles and acts only through intermind state and gengage. The source defers the full mechanism to a separate document, the Many Minds gap analysis.

12.6 Growth trajectory

The sequence of splits is not prescribed: the topology follows from correlation-based mastery detection. The source's illustration: first, one attending mind controls all 23 handles; then motor splits appear as correlated handle groups reach mastery. Late: a two-level apex. The top mind splits off when all of the attending mind's handles show sustained mastery; it has no handles (the motor controller needs zero-handle support) and specialises through deeper imagination (16 or more steps instead of 3 to 5). Each split frees capacity in the attending mind; the system scales through hierarchy depth, not model size; the top mind is freed for abstract thought only when the attending mind's motor hierarchy is mastered.

Top mindno handles; self levels 1, 2, 3imagination 16+ steps Attending mindpresent-world coordinator,gaze, navigation Motor child mindits own handle domain Motor child mindits own handle domain Motor child mindits own handle domain Shared sensorybus, read-only z_intermind, g_engage split off from it same tokens every frame
Figure 6. The late two-level apex of section 12.6, drawn from the source's illustration. The number of motor child minds and their domains are not fixed by the specification; three are drawn. The bus delivers the same tokens to every mind (one dashed arrow drawn per level). The source's tree lists the attending mind and the motor child minds side by side under the top mind; they are drawn under the attending mind because the motor splits come from it. When several minds command one handle, their commands are blended by confidence (12.5).
Implementation status in the source. Not implemented. Infrastructure ready: the intermind sense exists as a stub (loss weight 0.0, zero vectors); the self-attention pool encoder processes n_agents = 5. No mind hierarchy, sensory bus, motor arbitrator, mastery detection per domain or mind splitting exists. The deferral is justified because single-mind training must first show mastery (about 100K steps).
Companion note (perceptionSpace-4.docx, §8). Mind splitting divides the perception space: the child gets the dimensions of its domain sensors, the parent keeps the full space, and "hierarchical authority emerges from scope". The top mind has the broadest functional perception space because it has trained longest across all senses.

13Bootstrap and training streams source §19–20

13.1 From nothing to body knowledge

  1. The null prediction. At time zero the simplest prediction is "nothing will change", so everything interesting is a surprise. The source calls this the universal starting point.
  2. Motor babbling and cross-modal correlation. Constrained random commands fire across all handles at the neonate limits (2% strength, 5% ROM); all senses are live from step zero. The null prediction breaks unevenly: an arm moving through air changes vision and proprioception while audio and tactile stay silent (no contact): one command, 2 correlated sensor changes, 3 uncorrelated.
  3. Discovery of self and world. Over thousands of movements the correlation statistics partition the sensors: self always correlates with the commands (proprioception, the body seen in vision, self-voice); world sometimes correlates (objects when grasped) or never (background). This is the body schema emerging.
  4. Progressive refinement. Accuracy improves monotonically for self-sensors (reliable motor-sensor coupling); for world-sensors it improves on physics-governed patterns (objects fall when released); stochastic world events stay hard (another agent acts). The source holds that this hierarchy of predictability guides learning.

13.2 Training streams, overlapping and not sequential

Training is organised as overlapping streams with different onsets. Motor babbling begins first. Stream 3 can overlap from step zero if the pipeline that extracts handle commands from motion capture is available. All other streams can run in parallel or join when their data becomes available.

StreamOnsetDurationWhat it isPrerequisites
1 Motor babblingStep 0~10M stepsDevelopmental constraints active (neonate: all handles at 2% strength, 5% ROM). No scaffold: postural tone baseline + wellness gradient + constraints give the learning signal from frame zero. The forward model trains by prediction-error minimisation + contrastive loss; the body schema emerges. By the end: head control mastered, advancing to early_infant.None
2 Observation pre-trainingStep 0, in parallel~5M video framesVisual prediction only; other senses masked with learned "unknown" tokens. Learns salience (what moves matters), physics priors (objects fall, collide) and temporal structure (actions have durations). Does not need motor competence.None
3 Imitation groundingStep 0, once the extraction pipeline is validated~20M stepsJoins whenever motion capture and eye-gaze tracking data become available, at whatever stage the system has reached. Kinematic animations are played on the body; the forward model predicts the expected sensation and compares it with the actual one, learning "what coordinated movement FEELS like". Gaze data is critical: gaze-leads-hand timing teaches the anticipation system where to attend. Provides acceleration, not a prerequisite.Hard: the handle-command extraction pipeline works. Soft: none; no prior body schema needed. Can overlap Stream 1 from step zero.
4 Goal-directed behaviour + Many Minds splitting~1M stepsOngoingSelf-generated through imagination and execution. Curiosity drives exploration. When mastery is detected, a mind splits (12.3) and the hierarchy grows.Planner search (9)
1 Motor babbling~10M steps 2 Observation~5M video frames 3 Imitation~20M 4 Goal-directedonset ~1M steps, ongoing 05M10M15M20M training steps (Stream 2 is counted in video frames)
Figure 7. The four streams of section 13.2 on one axis, from the source's onsets and durations. The compute budget of section 16.7 gives wider step ranges for the same streams (Stream 1: 5M–15M; Stream 3: 10M–30M; Stream 4: 20M–100M).
Future work in the source, Stream 2. When Stream 2 is implemented, state that masking senses is a fact of the data (external video has no tactile or proprioceptive channels), not a design choice; in the embodied streams (1, 3, 4) all six channels are always live. Two DreamZero transfer pathways: (1) knowledge distillation, training a smaller model of matching d_model to reproduce DreamZero's visual predictions; (2) data generation, using DreamZero to generate manipulation videos as Stream 2 data. Both need DreamZero API access; neither changes the architecture.
Implementation status in the source. The code has one unified training loop that runs motor babbling (neonate phase) and prediction (all senses) at once. Stream 3 integration should be prioritised given its step-zero onset. Streams 3 and 4 need the extraction pipeline and the planner search respectively; the single loop handles what is implemented, and support for four streams will be needed as components arrive.

13.3 One step of Stream 4

  1. Observe the grounded state Pt; encode it to zt.
  2. Select a goal with the curiosity system from the forward model and zt (the source names select_goal but does not specify it; 14.1).
  3. Make a multi-step plan toward the goal (9.3).
  4. For each action of the plan: the motor arbitrator resolves the per-handle command (present-world output coordinated by the attending mind; the top mind acts only through zintermind and gengage); the environment steps; observe and encode the next state; prediction error = mean squared error between the forward model's prediction from zt and the next tokens; train the forward model on it; compute the grounded wellness of the next state and train the approximate wellness evaluator on the mean squared error between its output on the five sensory tokens and the detached grounded output; check mastery and split; advance zt.
13.4 Sensor and action contracts (body-independent requirements from section 20.6 of the author's text export, "added 2026-09-08").

Section 20.6 of the text export concerns the engine-simulated avatar and is not reproduced. The requirements it states that apply to any body:

  • No training run on a body earns credit until the contracts below are verified with a recorded sensor and action trace from the matching build of that body. The precedent the source gives: on the MIMo test bed, one field copied across a unit boundary (normalised achieved positions written into a centimetre command interface) trained for a day before an independent isolated replay caught it. Field names and filled bits are never evidence of meaning. That recorded trace is produced before any long training run.
  • Touch into the model. Trace one actual contact from the simulator, through every program that passes it on, into the model's input numbers. Pressure patches and collision events carry separate validity and freshness masks; collision-only data must never mark the tactile slice valid while pressure patches are absent. A contact that looks right, a physically valid force and slip estimate, and that estimate reaching the model are three separate achievements. Each field's physical meaning and timing (for example, whether "slip" is sliding against the contacted surface or only point speed) must be verified, never assumed from its name.
  • Action into the body's senses. Requested, accepted (the source does not define this one) and achieved action are three distinct quantities and travel as three distinct fields. Acceptance test: physically block a limb; the command fields must change while the achieved fields do not. Until this passes, every model quantity built on achieved state (body speed, the motor-correlation self boundary of section 10) is unmeasured on that body.
  • Vision into the model. Before training on a capture path, prove fresh camera data and eye-position feedback for the same physical interval in training mode, with any demonstration or display path provably out of the loop.
  • Grasp aids (shape substitutions, welds, release helpers) change the environment and must be recorded in any claim about learned grasping.

The checking program for MIMo is mimo_bridge/tools/sensor_action_contract_check.py in the release. It includes negative controls (--self-test): a defective sensor or command path must fail them.

14Curiosity and emergence source §21–22

14.1 Curiosity as moderate prediction error

Curiosity seeks states where prediction error is moderate: high enough to learn from, low enough to make progress. It is not "seek maximum prediction error" (chaos-seeking).

Input
One prediction-error value pe; the range (pemin, pemax) = (0.1, 0.4).
Computation
If pe < 0.1 (too easy, bored): drive = pe / 0.1 − 1, a negative number.
If pe > 0.4 (too hard, overwhelmed): drive = 1 − pe / 0.4, negative.
Otherwise (the "goldilocks zone"): drive = 1 − |pe − 0.25| / (0.4 − 0.1).
Output
The drive. The source states that the drive changes the direction of the wellness gradient (positive drive toward states of new prediction error, negative toward familiar or simpler states) and is not an external objective signal. It gives no formula for that change. In the code of its time the drive scaled the wellness loss (status below).
Implementation status in the source. compute_drive() exists and works (curiosity.py lines 12–48); the zone (0.1, 0.4) is implemented and called in the training step (training_step.py lines 889–890), scaling the wellness loss. select_goal() does not exist; it is a Stream 4 feature (after 1M steps), not needed in the neonate and infant phases. Motor babbling (exploration noise 0.01) gives undirected exploration in the neonate phase.

14.2 Emergent phenomena

Stress as sustained prediction error. Prediction error stays high across several senses without resolution: the forward model keeps failing, the exploration drive stays high (spending energy), and the motor controller finds no command that improves wellness. The distinction from curiosity: stress is elevated prediction error that resists reduction despite effort; curiosity is elevated prediction error that is being reduced, where each action reveals learnable structure.

Grief as unresolvable prediction error. A deeply reinforced prediction (an object on a shelf for thousands of timesteps) becomes permanently false (the object is removed). Sequence: (1) prediction error spikes; (2) exploration burst; (3) repeated failure to resolve; (4) energy depletion; (5) structural model update: objects can cease to exist; (6) gradual overwriting. Validation milestone: grief about abstract losses (capabilities, resources, relationships in the hierarchical self-model of section 10.4), not only object disappearance. Grief about a Level 3 entity would indicate that perception spaces of a higher level have formed.

Conditions for emergence. The architecture must preserve them: prediction error is allowed to persist (no clamping); the coupling of energy and exploration is kept; the forward model supports structural updates, not only parameter updates.

15The path to self-awareness source §23 and Summary

15.1 What self-awareness requires

The source holds that self-awareness is not binary and arises from: (1) a model of the world (the forward model); (2) a model of oneself as part of that world (the body schema as a subset); (3) the ability to predict one's own future states (the forward model includes the self); (4) the ability to distinguish self from other (the motor-correlation boundary); (5) the ability to model one's own prediction process (meta-cognition, emergent).

15.2 Four levels of meta-prediction

LevelWhat is predictedComes from
1The next tokens, zt+1The forward model, in the predictive register
2One's own prediction error, εThe forward model learns to estimate its own prediction error
3The gap δ between approximate and grounded wellness: how far imagination differs from experienceThe two registers (section 4)
4How the other minds will shift state in this situation: which become uncertain, which stay stable, when engagement rises, how coordination reconfiguresThe Many Minds hierarchy (section 12)

The source's statement about Level 4: "The hierarchy IS the self." Identity is the whole graph of minds, their relationships and their communication; asked what it is doing, the system's answer is distributed (posture mind keeps the body balanced, grasp mind holds the object, top mind plans the next action), as a person does not consciously control breathing or posture yet identifies both as "me".

15.3 The critical test

Input
A state; the forward model with three extra outputs (own prediction error, wellness gap, intermind state shifts); both evaluators; the hierarchy.
Computation
Predict z, the own prediction error, the wellness gap and the intermind states. Execute and observe. Actual prediction error = MSE(predicted z, actual z); actual gap = MSE(grounded wellness of the actual state, approximate wellness of the predicted z); read the actual intermind states.
PE accuracy = 1 − |predicted PE − actual PE| / (actual PE + 10−6).
Gap accuracy = 1 − |predicted gap − actual gap| / (actual gap + 10−6).
Intermind accuracy = a comparison of predicted and actual intermind states (the source does not define it further).
Output
The three accuracies. 1 means exact; 0 means an error as large as the actual value.

15.4 Emergence through architecture

Per the source, self-awareness is not programmed; it emerges when (1) the forward model predicts its own failures, (2) the body schema models the prediction process, (3) the hierarchy provides distributed self-knowledge, (4) enough experience teaches the limits of reliability.

15.5 Summary: from policy network to mind

StageWhat is presentWhat is missing
Policy network ("zombie")Input → output mappingEverything else
+ PredictionWorld modelSelf-model
+ Motor correlationSelf/world boundaryStakes
+ Body schemaSelf-modelTemporal continuity
+ Fatigue/energyStakes (things to lose)Motivation
+ Dual objective (prediction error + wellness)Understanding + motivationFlexible computation
+ Adaptive computation depthVariable processing (emergent modes)Scalability
+ Model inversionIntention (goal → action)Distributed processing
+ Many MindsHierarchical skill masterySelf-knowledge
+ Meta-predictionModel of own predictions???
+ Hierarchy self-modelSelf-awareness of distributed processing—

At each stage something missing becomes present; the source calls the last two stages "the closest we can get to defining self-awareness computationally". Its closing statements, quoted:

"The system is not told it has a self. It discovers that some predictions correlate with its commands. The system is not told to have intentions. It discovers that inverting its forward model achieves desired consequences. The system is not told to be curious. It discovers that moderate PE is where learning happens. The system is not told to value resources. It discovers that certain entities correlate with sustained wellness across timescales, and acts to maintain them. The system is not told to fear death. It discovers its body model is its most valuable asset. The system is not told its imagination differs from experience. It discovers its approximate wellness evaluator is less reliable than its grounded [wellness] evaluator. The system is not told it has subordinate minds. It discovers it can predict its own inter-mind communication patterns. These are not metaphors. They are the computational facts of what this architecture does."

16Implementation specifications source §24–27

This section is the source's sizing and compute plan for the full-size model. The numbers are the source's projections of early 2026; section 19 gives the sizes the released MIMo trainer uses.

16.1 Hardware: Google Cloud G4 instances

MML uses Google Cloud G4 instances with NVIDIA RTX PRO 6000 Blackwell Server Edition GPUs (generally available October 2025), replacing the RTX 4090 the specification was originally designed around.

SpecificationRTX PRO 6000 Blackwell (Server)RTX 4090 (old target)
CUDA cores24,06416,384
Tensor cores752 (5th gen)512 (4th gen)
VRAM96 GB GDDR7 ECC24 GB GDDR6X
Memory bandwidth1,586 GB/s1,008 GB/s
FP16 TFLOPS (tensor)~220~165
FP4 AI TOPS (sparse)3,753N/A
PCIeGen 5Gen 4
Machine typeGPUsvCPUsRAM~Monthly
g4-standard-48148180 GB~$3,300
g4-standard-96296360 GB~$6,500
g4-standard-1924192720 GB$13,141
g4-standard-38483841,440 GB~$26,000

CPU: AMD Turin (EPYC 9005). Interconnect: Google custom peer-to-peer over PCIe Gen 5; NVLink is not available. 48 vCPUs per GPU. Development target: g4-standard-96 (2 GPUs, 96 vCPUs, 360 GB RAM), GPU 0 for rendering and the tokenizer (the program that converts the simulator's raw sensor output into the fixed-shape number arrays of the grounded register Pt), GPU 1 for model training. Upgrade to g4-standard-192 only if d_model must grow beyond 768.

16.2 Corrected parameter counts

Erratum in the source: version 3.2 stated "total_forward_model_params ~27M". That estimate assumed standard single-attention transformer blocks; the three-stage blocks of section 6.1 give 173M forward-model parameters at d_model = 768.

Component (d_model = 768, 8 layers)Millions of parameters
Vision encoder (Swin, 4 layers, 16K patches)28.9
Tactile encoder (cross-patch attention, 200 patches)7.1
Audio encoder (1-D convolution stack)4.1
Proprioception encoder (MLP)0.9
Motor command encoder (cross-handle attention)7.1
Intermind encoder (self-attention)7.1
Forward model (8 three-stage blocks + 5 heads)173.1
Adaptive motor controller (6 layers)42.6
Wellness evaluators (grounded + approximate)0.6
All encoders55.3
Total trainable~271

Memory: mixed-precision Adam with gradient checkpointing needs 4.3 GB; one 96 GB GPU holds the model with 95% of its memory unused. More GPUs are needed for computation, not memory.

16.3 The vision encoder is 96% of the computation

Component (d_model = 768, 8 layers)GFLOPs per callShare
Vision encoder (Swin, 16K patches)94596.3%
Forward model (8 blocks, 192 tokens)343.5%
All other encoders + motor + wellness2.50.3%
Total per frame (everything at 60 Hz)982100%

16.4 Split-rate senses

Decision: the vision encoder runs at 24 Hz; all other encoders and the forward model run at 60 Hz. Reasons given: human visual cortex object recognition (V4/IT) runs at 20–30 Hz; film looks smooth at 24 FPS; the Swin scene understanding corresponds to V4/IT processing, and running it at 60 Hz "was never biologically motivated" and is 96% of the cost. Proprioception, tactile and motor benefit from 60 Hz: muscle spindle afferents fire at ~100 Hz, mechanoreceptors up to 300 Hz, and the motor control loop runs at 50–100 Hz.

Frame12345678910
VisionV1V1V1V2V2V3V3V3V4V4
TactileT1T2T3T4T5T6T7T8T9T10
ProprioceptionP1P2P3P4P5P6P7P8P9P10
MotorM1M2M3M4M5M6M7M8M9M10

The forward model reuses the latest vision token between vision updates. The source expects its temporal attention to learn that vision updates are slower, and its cross-modal bridge to weight tactile and proprioception more during fast-changing situations, which it calls more biologically faithful than one rate for all senses.

16.5 GPU allocation and real-time feasibility (g4-standard-96)

GPURoleTiming
GPU 0Rendering + tactile physics + tokenizer6.65 ms tokenizer + ~10 ms render = ~16.7 ms
GPU 1Model training (forward + backward + Adam at the frame rate)14.1 ms per frame = 71 FPS (18% headroom above 60 FPS)

The two GPUs work in parallel: GPU 0 tokenizes frame N while GPU 1 trains on frame N−1. The transfer between them is 13 KB through pinned memory (< 0.1 ms).

Sustained compute (d_model = 768, vision at 24 Hz, 1 training GPU)Value
Vision encoder calls24/s × 945 GFLOPs = 22,680 GFLOP/s
Everything else (forward model + encoders + motor)60/s × 36.5 GFLOPs = 2,190 GFLOP/s
Total forward pass24,870 GFLOP/s
Training (forward + 2 × backward + optimiser)74,610 GFLOP/s (74.6 TFLOP/s)
Available (1 GPU, 40% utilisation, FP16)88,000 GFLOP/s (88 TFLOP/s)
Utilisation85%
Effective FPS71

16.6 Model dimensions

SettingValueReason given
d_model768Fits one training GPU at 24 Hz vision (71 FPS)
n_layers (forward model)8Three-stage blocks; 173M forward-model parameters
n_heads12Standard for 768 (64 numbers per head)
n_modalities6Vision, audio, tactile, proprioception, motor, intermind
context_length32~0.5 s at the forward model's 60 FPS
adaptive_motor_layers6Variable depth 1–6 by confidence; 42.6M parameters
vision_encoder_rate24 HzV4/IT rate; 58% less computation than 60 Hz
other_encoder_rate60 HzTactile, proprioception, motor, audio, intermind
forward_model_rate60 HzReuses the latest vision token between vision updates
total_forward_model_params~173MCorrected from ~27M (16.2)
total_system_params~271MAll encoders + forward model + motor + wellness
Implementation status in the source, on these dimensions. (a) The code used d_model = 512 and n_heads = 8 (built against the original specification before the hardware upgrade); the system at 512 is about 104.5M parameters, 38% of the ~271M target, and the GPU ran at about 40% utilisation instead of 85%. Fix: d_model 768 and n_heads 12 in master_config.yaml; the configuration's progressive_resize: true allows Net2Net-style growth from existing checkpoints; no code change needed. Benchmark result recorded by the source: 512, 768 and 1024 give identical FPS under CUDA graphs, because kernel dispatch overhead, not GPU computation, sets the wall-clock time. (b) CRITICAL DEVIATION: the code set context_length = 1, which disables temporal learning: stage 2 of every block does nothing at a context of 1, and split-rate learning, imagination rollouts, anticipation and the body schema's temporal correlation all need more than 1. Recommendation: 8 at once (more than 3 vision cycles at 24 Hz), scaling toward 32; memory at 32 and 768 is ~590 KB. Section 18 sets these notes beside the later "UPDATED 2026-06" notes.

16.7 Training compute budget

At d_model = 768, vision at 24 Hz, one training GPU on g4-standard-96 (~$9/hour): 71 FPS sustained.

StreamStepsWall time (projected)Cost (projected)Milestone
1 Babbling5M–15M1–3 days$216–$648Forward-model loss plateaus; body schema > 80%
3 Imitation10M–30M2–5 days$432–$1,080Predicts the sensory consequences of handle-driven actions
4 Goal-directed20M–100M3–17 days$648–$3,672Intentional reaching through imagination rollouts

Stream 3 overlaps Stream 1 from step zero. The source's projection to first goal-directed behaviour: 5–20 days, $1,000–$4,000.

Near-term plan in the source (a $1,200 cloud credit expiring mid-February 2026): day 1, code the model from the specification (encoders, forward model, motor controller, wellness, training loop) and wire it to the tokenizer outputs; deliverable: the loop runs, the loss computes, gradients flow. Days 2–7: train at d_model = 768 on g4-standard-96 with vision at 24 Hz, Streams 1 and 3 together; deliverable: ~30M training steps, body-schema validation, prediction-loss curves. $1,200 at ~$9/hour is ~133 hours, ~5.5 days continuous. Scaling path after the credit: (1) stay on g4-standard-96 (768, 24 Hz vision, 71 FPS), ~$6,500/month; (2) if prediction quality needs more capacity, g4-standard-192 with 3 training GPUs, d_model = 1024 (~480M parameters) at 30 Hz vision; (3) for parallel experiments, two g4-standard-96 instances with FedAvg, the cost of one g4-standard-192, with cleaner isolation for A/B comparison.

Companion note (fastGainOfFunction-4.docx, §8.3 "Scaling"). The same environment at 3 model sizes (~34M, ~271M, ~500M), compared at equal compute budget on prediction-error convergence and probe accuracy; then the 271M model with and without mind splitting, compared on cost per milestone and speed of transfer to a new environment.

16.8 Loss functions

TermWhat it measuresWeight
predictionForward-model prediction error (the prediction side of the dual objective)1.0
contrastiveEncoder contrastive loss (5.7)0.1
imaginationImagination-aware loss for distribution shift (6.3)0.5
latent_regLatent regulariser penalty on the last predictions (6.3)0.01
approx_wellnessAlignment of the approximate wellness evaluator with the grounded one on the last frame (7.3)0.3
anticipationAnticipation grounding on the measurable signs (11)0.2

total = 1.0·prediction + 0.1·contrastive + 0.5·imagination + 0.01·latent_reg + 0.3·approx_wellness + 0.2·anticipation

No habitual distillation loss: skill consolidation is done by Many Minds splitting, a structural operation (the source writes "cloning + freezing weights"), not a loss term.

Implementation status in the source. The code uses a different loss structure: prediction loss per sense (weighted by each sense's loss weight and by data origin (real sensor data 1.0, synthetic placeholder data 0.0, stale data 0.3)), motor loss (with a developmental scale), wellness loss (0.1), gaze loss (0.1). VICReg available but disabled. The curiosity and anticipation losses are not implemented (those systems do not exist); the imagination loss is not implemented (it needs context_length > 1). One AdamW optimiser, learning rate 3 × 10−4, weight decay 0.01, gradient clip 1.0, warm-up 1,000 steps, bf16 precision. (Several of these points are superseded by the "UPDATED 2026-06" notes; section 18.)

16.9 Differentiability

ComponentOn the gradient path?How
EncodersYesStandard neural networks
Forward modelYesTransformer
Prediction errorYesMSE loss
Grounded wellness evaluatorYesNeural network on raw sensors
Approximate wellness evaluatorYesNeural network on encoded tokens
Wellness gradientYestorch.autograd.grad through the evaluator
Adaptive motor controllerYesVariable-depth neural network
Confidence estimatorYesSigmoid output, learned threshold
Developmental constraintsNoDiscrete phase transitions
Bootstrap mechanismYesPostural tone baseline + wellness gradient (no scaffold)
Planner searchYesGradient descent through the forward model
Body schema updateNoRunning-average tracking
Body schema membershipYesSigmoid on correlation scores
AnticipationYesNeural network with measurable supervision
Curiosity driveYesThe source: "Smooth function of PE"
Mind splittingNoStructural operation (clone + freeze)
Intermind tokensYesEncoded by the intermind encoder
Motor arbitrationNoHierarchy walk

The four components off the gradient path (developmental constraints, body schema update, mind splitting, motor arbitration) are outside it by design: they are structural or scheduling operations, not learned transforms.

17Open questions and research program source §28

The source lists these as open:

QuestionValue the source uses now
Vision encoder depth: a single pooled token may be too aggressive; spatial patch tokens may need to be keptOne pooled token
Optimal curiosity range0.1–0.4, estimated; needs empirical tuning
Imagination step count: should it adapt to confidence?Fixed at 3 in training
Adaptive motor depth threshold: how does the learned value converge?Initial 0.7
Body schema temperature (sigmoid sharpness)5.0
Approximate wellness evaluator capacity: may need more layers3,840 → 256 → 128 → 4
Mastery thresholds: per-domain calibration?Prediction error < 0.05, variance < 0.01
Mind-splitting granularity: when should a domain split further versus stay consolidated?—
Subordinate model size: a full forward-model clone or a domain-specific subset?Full deep copy
Intermind token bandwidth: how many concurrent signals before prediction degrades?—
Hierarchical self timescales: optimal momentum per level?0.99 / 0.9999 / 0.99999
Entity slot count for Levels 2 and 3: scaling with environment complexity?64 proposed
Levels 2 and 3 and Many Minds: best inheritance strategy at a split?Subordinate inherits Levels 1–2 of its domain
Companion note (fastGainOfFunction-4.docx). The companion plan states how this program will be tested: three demonstrations (sections 7.5 and 10.5) and six automated metrics (two are given in 10.5 and 12.3).

18Deviations and priorities source §29

The source's last section reconciles the specification with the codebase of its time (branch UEMA-feature, configuration version 2.1); its stated rule is that the code is the source of truth and this section names where it departs from the specification's intent. The codebase calls the system LEM (Learning Embodiment Model) in configuration comments and log prefixes; the specification calls it UEMA; they are the same system.

The notes disagree by date. Source §29 and several in-section notes predate the notes marked "UPDATED 2026-06". The later notes record context length 8 (against CF-1's 1), VICReg enabled (against CF-4), the wellness gradient wired (against CF-3), and imagination training and the latent regulariser enabled (against CF-8 and CF-11). The configuration file in the release, lem/master_config.yaml, reads d_model: 768, context_length: 8, vicreg: enabled: true, d_internal: null (meaning "d_model"), imagination: enabled: true and latent_reg: enabled: true, which agrees with the later notes.

ItemDeviation as source §29 states itFix the source statesLater status
Critical deviations (must fix)
CF-1context_length = 1 (specification: 32). "The single most impactful deviation": stage 2 temporal attention is dead weight; split-rate learning, imagination rollouts, anticipation, intention and the body schema's temporal correlation are blocked.8 at minimum in master_config.yaml, scaling toward 32; the architecture supports it; ~590 KB at 32 and 768.8 (UPDATED 2026-06)
CF-2d_model = 512, n_heads = 8 (specification: 768, 12): the forward model has ~50M parameters instead of 173M (71% less); GPU at ~40% utilisation.Configuration only: 768 and 12; Net2Net progressive resize for existing checkpoints; 512/768/1024 give identical FPS under CUDA graphs.768 in the released configuration
CF-3The wellness gradient motor drive (7.4) is missing; the five-stage pipeline collapses to perceive-predict-act. "Core thesis violation."Add torch.autograd.grad(total_wellness, motor_commands) to the training loop and pass the result to the motor controller.Implemented (UPDATED 2026-06)
CF-4No active collapse prevention: VICReg implemented but disabled; no InfoNCE either; encoders can collapse without any signal.vicreg.enabled = true.Enabled (UPDATED 2026-06)
CF-5d_internal = 128 must be removed. Every encoder computes at 128 internally and projects to 768 only at its last layer: at 768 that is a 6× bottleneck that compresses all sensory information to 128 numbers before the network has learned what matters. A development convenience for local GPUs, unjustified on the target card (4.3 GB of 96 GB used). The forward model (173M parameters, 768 wide) receives representations of 128-number quality.Remove d_internal from encoder_defaults; all encoders at 768. A configuration deletion; encoder parameters rise from ~15M to ~55M, within the memory budget.d_internal: null (= d_model) in the released configuration
CF-6Body schema: RESOLVED in the source (10.1).——
Justified deferrals (implement in this sequence as dependencies resolve)
CF-7Adaptive computation depth (8.2–8.3): needs context_length > 1; confidence head built.Implement when the context length rises; the future recursive controller is the target.Off in the released configuration (adaptive: false)
CF-8Imagination-aware training (6.3): needs multi-step trajectories.After CF-1.Enabled (UPDATED 2026-06)
CF-9Planner search (9): exists (11 tests), off by default.Enable after CF-7 and CF-8; needs an accurate forward model and imagination.Off in the released configuration
CF-10Curiosity (14.1): compute_drive() works and is called; select_goal() missing (Stream 4). No selective effect in early training while prediction error is uniformly high.Before ~50K steps (priority P3).select_goal still absent; the released trainer picks goals from a goal ring (19)
CF-11Latent regulariser (6.3).With imagination-aware training.Enabled (UPDATED 2026-06)
CF-12Anticipation (11): needs context > 1 and forward-model accuracy.—No class of that name in the released code (19)
CF-13Many Minds (12; amended by Many Minds Spec v2 and the gap analysis): needs single-mind mastery. The version 3.5 changes: override_active removed; the arbitrator replaced by a confidence-weighted blend; predefined groups replaced by correlation discovery; two-level apex added; ordinary gradient dynamics instead of explicit freezing. The intermind stub needs self-reading (loss weight 0.0 → 0.1) and the per-mind encoder.—No class of that name in the released code (19)

18.1 Code improvements the source adopts as canonical

  • 23-handle full-body motor control: extends the earlier 12 hand-only handles to head, arms, legs and feet, with per-region stiffness and data-driven handle definitions, so the embodied-cognition thesis covers the whole body (3.4).
  • Gaze head (6.4): active gaze output, loss weight 0.1.
  • Loss weights by data origin (code: source_scales): real sensor data 1.0, synthetic placeholder data 0.0, stale data (older than 50 ms) 0.3, per-sense loss weights and ramps; prevents learning from placeholder noise; needed for synthetic-to-real transitions.
  • VICReg as the collapse-prevention method (5.7).
  • Real-time infrastructure: an asynchronous ring-buffer reader (ring size 3, frames older than 50 ms marked stale), torch.compile with CUDA graphs (reduce-overhead mode), a configurable skip of backward passes (backward_every_n_frames), a voice input stub (56 numbers, disabled; not one of the six senses).

18.2 Priorities and frame-rate impact

The source: four configuration changes (CF-1, CF-2, CF-4, CF-5) unlock most of the model's capability with zero code changes and should be applied before any further training run.

PriorityItems
P0 (configuration only, now)CF-1 context 1 → 8+; CF-2 768 and 12 heads; CF-4 enable VICReg; CF-5 remove d_internal
P1 (small code changes)CF-3 wellness gradient motor drive; CF-6 body schema (~6.6K numbers, running-average buffer)
P2 (moderate code, after P0 and P1)CF-7 adaptive depth; CF-8 imagination-aware training
P3 (significant code)CF-9 planner search; CF-10 curiosity (before ~50K steps)
P4 (later-stage features)CF-11 latent regulariser; CF-12 anticipation; CF-13 Many Minds

Frame rate: the kernel-dispatch bottleneck makes most P0 changes safe under CUDA graphs. 768 is benchmarked free (512/768/1024 identical FPS); the source calls the cost of enabling VICReg negligible and gives no number; a context of 8–16 is likely safe (to be benchmarked at 32). Removing d_internal raises encoder parameters from ~15M to ~55M, which the source expects the idle capacity of the target GPU to absorb (4.3 GB of 96 GB in use). The vision encoder at 768 and 24 Hz fits the budget: 945 GFLOPs × 24 calls/s = 22.7 TFLOP/s of the 88 TFLOP/s available. All P0 changes together fit on one training GPU.

19Where the released code implements the specification

The public release is UEMA_Research; its Python code is in Source/Python, in three packages: lem (the model), mimo_bridge (the connection to the MIMo body and the trainer for it) and tokenizer. Each row below names a module only where it was opened for this edition (October 25, 2026) and states only differences visible in the file named. Facts about training runs are not on this page.

Specification partReleased module (opened)Difference visible in the code
The body: MIMo (3)mimo_bridge/env.py, touch_adapter.py, vision_adapter.py, audio_adapter.py, proprio_adapter.py, vestibular_sense.py, body_layout.pyTactile: up to 256 patches × 10 numbers from MIMo's skin points (53 skin bodies); vibration bands at 5, 10, 15, 20 Hz (specification 50, 100, 200, 400 Hz); stretch fixed at 1.0 because MIMo has no soft skin. Vision: two eye cameras (60° field of view) cut into 16 × 16 patches, each with its viewing angle (specification: 210° × 130° panorama + 5° fovea). Audio: MuJoCo makes no sound; the bridge synthesises a 256-bin stereo spectrum with level and time differences between ears from contact and object events. Proprioception: 23 tracked bones. Vestibular input can occupy the sixth (intermind) slot (--vestibular-sense on). It is 29 numbers: which way gravity pulls in the head, how fast the head turns, the neck's angles, speeds and efforts, and related body-state numbers. Handles: 24 in the legacy layout, 26 in trunk_v1 (adds lower trunk and chest).
From command to motors (3.4)mimo_bridge/action_decoder.pyMIMo has torque motors, not handles. The bridge solves damped least squares per joint chain and sets motor control = clip(strength × (kp × joint change − kd × joint speed)); radius is ignored. In train_mimo.py a command is held for --motor-hold 5 model steps by default. The model step of MIMo runs is 50 ms, not the specification's 60 Hz frame.
Configuration (16.6)lem/master_config.yaml (version 2.1)d_model 768, context_length 8 (specification 32), forward model 8 blocks × 12 heads, all three stages on. body.n_handles 24 (the 23 of section 3.4 plus a gaze handle for the eyes). Four developmental phases in this file (neonate, infant, toddler, child; infant ROM 0.20, strength 0.10; toddler 0.50, 0.30; child 1.0, 1.0), used when the curriculum below is off.
Encoders (5)lem/model/encoders/swin_patch.py (vision), cross_patch.py (tactile and motor), conv1d_stack.py (audio), mlp_project.py (proprioception, voice), self_attention.py (intermind)Tactile patches carry 10 fields (the 8 of section 3.1 plus 2 principal stretches); the tactile encoder uses 2 cross-attention layers with 4 heads (specification 8 heads). The motor encoder reads 19 numbers per handle: the achieved handle state (10) and the executed command (9), plus a learned per-handle identity vector; the specification has 8. Intermind: SelfAttentionPoolEncoder, data_source: synthetic, loss weight 0.0, "Stub until Many Minds is implemented".
Forward model (6, 6.1)lem/model/forward_model.py (ThreeStageBlock, ForwardModel)Same three stages and FFN; each stage can be switched off for ablation; a final LayerNorm after the blocks. On MIMo the trainer's size flags default to a smaller "lite" model (mimo_bridge/train_mimo.py: --core-blocks 0 = 2 blocks, --d-model 0 = 128, --context-length 0 = 4); each run's own settings are in its records.
Prediction and gaze heads (6.2, 6.4)lem/model/prediction_heads.pyPredictionHead as specified (learned query, attention, MLP), with a LayerNorm on the query; also GazeHead and a VoiceHead (loss weight 0.0 in the configuration).
Not in the specification: the body head (code: efference heads)lem/model/efference.py, lem/model/physical_goal.pyA body head, a small network, receives the executed command directly beside the output of the forward model's blocks and predicts each handle's movement in cm and turn in degrees over 50 ms and over the command's hold. pose_error_per_body scores a predicted pose against a goal pose with those units.
Wellness (7)lem/model/wellness.pyFive grounded terms (prediction_error, tactile_comfort, capability, coherence, motor_state) against the specification's four; in "baseline" mode they are small networks, in "direct" and "forward" modes fixed formulas with no learned weights. The approximate wellness evaluator has 5 outputs and never reads intermind or vestibular. The coherence term is documented to carry the body schema's "extent" (the share of watched things counted as self), not the certainty reading of section 10.1.
Motor controller (8)lem/model/motor_controller.py9 numbers per handle (its docstring calls the specification's 8 "a spec typo"); adaptive depth exists behind adaptive, off in the configuration; max_depth 6 (specification 10); confidence threshold 0.8.
Planner search (9)lem/model/intention_generator.py (IntentionGenerator, plan_multistep, CrossSimulationAttention)50 Adam steps, learning rate 0.1, strength penalty 0.01, as specified. Adds a per-body effort penalty option (the repair named in 9.6) and a "prospective wellness" term scoring imagined states with the approximate wellness evaluator (default off). Off in the configuration; on MIMo --intention defaults to off.
Goal selection (13.3 select_goal)mimo_bridge/lem_model.pyNo select_goal exists. Goals come from a goal ring: the last 200 model steps, each stored with its wellness. The goal is the entry with the highest stored value (after optional re-valuing or normalised ranking).
Body schema (10.1–10.2)lem/model/body_schema.pyCorrelation matrix [handles, handles × 11 proprioception numbers], momentum 0.99, temperature 5.0, as specified; optional outside objects scored like handles (object incorporation, 10.2).
Hierarchical self, Levels 2–3 (10.4)mimo_bridge/hierarchical_self.pyEntities are slots (64 by default) formed by online clustering of the model's own concatenated sense tokens. The specification's endpoint difference over a window is replaced by a band-pass (a fast running average minus a slow one, the fast window 10× shorter). "DARK": it only observes and feeds no loss, goal or wellness term. Trainer flag --hierarchical-self, default off.
Curiosity (14.1)lem/model/curiosity.pyDrive clamped to [0, 1] (specification: negative outside the band) and the middle branch divided by half the band width, so the drive is 0 at both edges; the docstring states that the specification's divisor leaves a 0.5 step at each edge. On MIMo, under --curiosity-goal, the drive multiplies the wellness stored with a goal-ring entry.
Developmental constraints, mastery (8.4, 12.3)lem/training/curriculum.pyAll six phases with the specification's ROM and strength values, plus exploration noise and a context length per phase; every handle active in every phase (the specification limits early_infant and late_infant to listed handles); the file gives anatomy as the reason. MasteryTracker: mean < 0.05, variance < 0.01, 95% consistency.
Latent regulariser (6.3)lem/training/latent_regularizer.pySame formula: mean of max(0, |z| − 2)² over running statistics.
Many Minds (12), anticipation (11)Searched all of Source/PythonNo class named MindHierarchy, SensoryBus, MotorArbitrator, MasteryDetector, PerMindIntermindEncoder or GroundedAnticipation was found.
Sensor and action contracts (13.4)mimo_bridge/tools/sensor_action_contract_check.pyPresent in the release.

20Glossary

Name on this pageCode or source nameDefinition
adaptive motor controllerAdaptiveMotorControllerNetwork that turns the six tokens and the wellness gradient into a command, deepening by imagined rollouts when its confidence is below a learned threshold (8.2).
approximate wellness evaluatorApproximateWellnessEvaluatorNetwork from five sensory tokens to four wellness components, trained to match the grounded wellness evaluator; scores imagined states (7.3).
attending mind—The mind that coordinates present-world behaviour, gaze and navigation below the top mind (12.6).
body schemaDifferentiableBodySchemaRunning-average correlations of command changes with sensor changes; gives membership, coherence and incorporation (10.1).
coherencecoherence_score()Mean of |membership − 0.5| × 2 over sensor dimensions; one input of the grounded wellness evaluator (10.1).
collapse (of an encoder)—An encoder producing nearly the same token for different inputs (5.7).
commandmotor_commandsPer handle: target position (3), rotation quaternion (4), radius, strength (1, 3.4).
cross-simulation attentionCrossSimulationAttentionAttention over 5 noisy plans for one goal, giving a consensus plan (9.4).
developmental phaseDevelopmentalConstraints.PHASESOne of six settings of active handles, ROM factor and strength factor (8.4).
frame—One update of the specified system, 1/60 s (1).
forward modelForwardModelEight three-stage attention blocks plus five prediction heads; predicts next tokens (6).
gengageg_engageThe attending mind's engagement, a sigmoid of an MLP over its latents, the top mind's intermind token, its prediction error and its approximate wellness (12.4).
gaze headGazeHeadOutput head for gaze azimuth and elevation (6.4).
goal ringgoal_ring (released code)The memory of the last 200 model steps from which the released planner picks its goal (19).
grounded register, PtP_tComplete uncompressed sensor state at time t (4.1).
grounded wellness evaluatorGroundedWellnessEvaluatorFour small networks on raw readings giving the authoritative wellness vector (7.2).
handle—A named body part that receives a target from the command (1, 3.4).
hierarchical self-modelHierarchicalSelfModelThree body schemas at momentum 0.99, 0.9999, 0.99999: motor, control, abstract (10.4).
imagination-aware trainingimaginationChaining the forward model through its own predictions for 3 steps and grading each against the real trajectory, weight 0.5 (6.3).
incorporation strengthincorporation_strength()Mean membership over a chosen set of sensor dimensions (10.1).
intermindz_intermindThe sixth sense: other minds' projected internal state (5, 12.4).
latent regulariserLatentRegularizerPenalty max(0, |z| − 2)² on predictions outside 2 standard deviations of real encoder outputs (6.3).
masteryMasteryDetector, MasteryTrackerDomain prediction error mean < 0.05, variance < 0.01, > 95% of 50,000 steps below 0.05 (12.3).
membershipself_membership()sigmoid(5 × (correlation score − 0.5)) per sensor dimension (10.1).
mindMindOne forward model, motor controller and wellness evaluator with a domain of handles and sensors (12.1).
model step—The released MIMo trainer's update, 50 ms (19). Not the same as a frame.
motor babblingexploration noiseConstrained random commands across all handles (13.1).
perception space—Companion term: the set of all observations a sensor arrangement and its encoding can produce (4.3 companion note).
planner searchIntentionGeneratorGradient descent on a command's numbers so the forward model's prediction matches a desired state (9.2).
postural tone layerpcc_strengthsBaseline stiffness holding posture against gravity; its resistance is the effort signal (3.4).
prediction error (PE)peMean squared difference between predicted and actual next tokens (1, 6).
prediction headPredictionHeadLearned-query attention plus MLP that outputs one sense's next token (6.2).
predictive register, ztz_tThe six tokens of a frame (4.2).
radiusradiusCommand number in [0, 1] for motor synergy (3.4).
ROMromRange-of-motion factor applied to command positions in a phase (8.4).
sensesvision, tactile, audio, proprioception, motor, intermind (and vestibular in the released code)The inputs, each with its own encoder and token (1).
splitMindHierarchy.splitCreating a subordinate mind for a mastered handle domain (12.3).
strengthstrengthCommand number in [0, 1] setting how hard a handle pushes (3.4).
three-stage blockForwardModelBlock, ThreeStageBlockCross-modal, causal temporal and bridge attention, then FFN (6.1).
token—Fixed-length list of numbers (768 here) an encoder outputs for one sense (1).
top mind—The apex mind with no handles; acts through intermind state and gengage (12.6).
VICRegvicregVariance-invariance-covariance regularisation: a loss that keeps the spread of each token number across a batch at or above a target and pushes correlations between token numbers toward 0 (5.7).
wellness—A region of the possible grounded-register states; computed as a vector of components (7.1).
wellness gradientwellness_gradDerivative of summed grounded wellness with respect to the command numbers (7.4).

21About this edition

What this edition changed relative to the source

  • Added: the setting and part definitions (section 1); the reading guide; Figures 1 and 4 to 7, drawn for this edition; Figures 2 and 3, redrawn from perceptionSpace-4.docx with the originals linked; input/computation/output blocks for every component; companion notes; section 19 (released code); this glossary.
  • Reordered: the source's sections keep their sequence, except that the Summary, which follows source §28, is page 15.5. Section numbers on this page differ (each heading gives the source's number). The pain and pleasure walkthroughs (source §8) are one table in 7.5.
  • Merged repeated passages: the neonate limits (2% strength, 5% ROM), stated in source §1, §9.4, §9.5, §19.2 and §20.2, are given in full in 8.4 and referred to elsewhere; the d_internal paragraph of source §5.1 and §5.2 and its repetition as CF-5 and in §29.6 are given in full once, in section 18; the gaze head (§6.4 and §29.4) and the 23 handles (§3.4 and §29.4) are described once, with the adoption noted; the in-section status notes and the CF items they repeat are set side by side in section 18; the second paragraph of source §23.5 repeats the Summary's closing statements and is carried by the quotation in 15.5; the source's book-summary analogy in §4.2 is cut because the bullets of 4.2 carry each of its facts.
  • Code listings: kept in collapsible blocks for sections 6, 8, 10. Short listings (sections 7, 9, 11, 12, 13, 14, 15) are given as input/computation/output text with every number.
  • Removed (engine-specific): passages describing the game-engine avatar's own implementation: implementation document names, the soft-body tactile simulation's mesh and solver settings, engine C++ structures and shared-memory buffers, the engine rendering and capture lines of the GPU plan, an editor widget, and section 20.6 of the text export. Body-independent requirements those passages served are kept (sections 3, 13.4, 16.5, 18.1).
  • Renamed for one name per thing: the source's IntentionGenerator is called planner search; the source's abbreviations for the postural tone layer and the handle are written out.

Points in the source a reader may stumble on

  • Numbers per handle in a command: 9 in source §4.1 and §10.2; 8 in §5.5, §9.2–9.3 and §12.2.
  • The sense sequence differs: "V,A,T,P,M,I" in source §4.2 and §6, vision-tactile-audio in §16.3.
  • Source §5 requires no encoder bottleneck, while its tactile, audio and motor encoders list 64- and 128-wide hidden layers.
  • In the adaptive motor network (source §9.3) the residual sum adds a 512-number layer output to a wider input.
  • The approximate wellness evaluator reads "5 sensory modality tokens" with "no motor token" (source §7.3), while the Stream 4 listing (§20.5) passes it the first five tokens, which in the sequence of §4.2 include the motor token and exclude intermind.
  • The pain walkthrough uses a thermal reading that the tactile field list of source §3.1 does not include.
  • The anticipation training loss is declared with lookahead 30 but compares with frame t+1.
  • Implementation-status notes of different dates disagree (section 18).
  • The grounded wellness evaluator's four inputs (source §7.2) include no command number, yet §7.4 takes its gradient with respect to the command numbers. §9.5 says it assesses joint limits and posture quality, which none of the four inputs carries.
  • Level 3 of the hierarchical self is described as hours, but its running-average momentum of 0.99999 spans about 100,000 frames, 28 minutes at 60 frames per second.

References in the source

  • DreamZero: NVIDIA GEAR Lab, February 2026. https://dreamzero0.github.io/DreamZero.pdf
  • HRM: Wang et al., June 2025. arXiv:2506.21734
  • TRM: Jolicoeur-Martineau, October 2025. arXiv:2510.04871
  • Compute analysis scripts named by the source and not in the release: uema_compute_analysis.py, split_rate_analysis.py, training_timeline.py
  • Companion references: patent US 11,537,850 B2; Bengio, Courville and Vincent 2013.

Edition prepared October 25, 2026 from UEMA_Spec_v3_5.docx, UEMA_Spec_v3_5.txt, perceptionSpace-4.docx and fastGainOfFunction-4.docx.