Spatial Memory Kit v0.1

A small research kit for testing spatial memory in recurrent world models.

A model can use its observation history without having a representation of place that transfers to another route. This release makes that distinction inspectable with 12 trained models, 12 matched initial models, 24 recorded trajectories, and reproducible memory controls. Each model has 276,501 parameters, stored as 18 FP32 tensors, and a 128-dimensional recurrent state.

The original study found improved sensory prediction and limited memory use. It did not establish stable spatial understanding across changes in route, direction, and distance, or an integrated artificial organism. The negative results and the limits of the evaluation are part of the research kit.

This is exploratory personal research developed with AI agents for implementation, analysis, auditing, and documentation. Agent-assisted checks are not external peer review or independent laboratory replication.

GitHub source and documentation · Version 0.1.0 release · Recorded trace explorer · 日本語の詳しい説明

Download and run the complete kit

Download spatial-memory-kit-v0.1.0.zip and extract it first. The ZIP contains the original package layout, all 24 model checkpoints, all 24 numerical traces, source code, examples, tests, and documentation.

This Hugging Face repository has a deliberately flat distribution layout. The individual .safetensors and .json files at its root are for direct inspection and selective download. The Hugging Face repository root is not pip-installable. Do not run pip install -e . there; run it in the extracted spatial-memory-kit-v0.1.0 directory instead. The original manifests and relative file paths are preserved inside the ZIP.

Use Python 3.12. CPU is sufficient for the commands below. Install the tested dependencies and then the package from the extracted directory:

python -m zipfile -e spatial-memory-kit-v0.1.0.zip .
cd spatial-memory-kit-v0.1.0
python -m pip install -r requirements-tested.txt
python -m pip install --no-deps -e .
python -m spatial_memory_kit verify --root .
python -m spatial_memory_kit replay --root . --model coupled_b7_s33101 --route a_one --state trained
python -m spatial_memory_kit replay --root . --model coupled_b7_s33101 --route a_two --state trained
python -m spatial_memory_kit replay --root . --model coupled_b7_s33101 --route a_two --state initial
python -m spatial_memory_kit replay --root . --model coupled_b7_s33101 --route a_two --state trained --history reset8
python -m spatial_memory_kit replay --root . --model coupled_b7_s33101 --route a_two --state trained --history reset-now
python examples/compare_memory_controls.py --root . --route a_two
python -m spatial_memory_kit smoke-train --root . --output smoke-run

The ZIP SHA-256 is:

d9a9ae9793941f4ef310c933b058c79060cfc2849a2350d72fc481838a9aa5f2

manifest.json records this checksum and the filename, configuration checksum, source-checkpoint checksum, and tensor count for every model. Flat checkpoint names use <condition>_s<seed>.<state>.safetensors, for example coupled_b7_s33101.trained.safetensors; the corresponding architecture file is coupled_b7_s33101.trained.json. These are exact copies of the files in the ZIP, with renamed paths only.

Model family and architecture

Property Release scope
Conditions separate_b2, coupled_b2, separate_b7, coupled_b7
Paired seeds 33101, 33113, 33127
Checkpoints 12 final trained models plus their 12 matched initial states
Size 276,501 parameters / 18 FP32 tensors per model
Visual input 16×16 egocentric grayscale image
Body input Two contact signals, two motion values, one energy value
Action input Four-way previous-action encoding; known future actions for prediction
State and prediction 128-dimensional GRU state, action-only transition, horizons 1 and 5
Original training 1,125 epochs / 18,000 updates per final model

The image encoder produces 64 features. Concatenating these with five body values and four previous-action values gives the observation GRU 73 inputs. The action-only GRUCell advances imagined states, which a width-280 decoder maps to 256 image values, two contact logits, two motion values, and one energy value.

In the coupled condition, the action transition supplies a prior before observation correction. In separate, observation assimilation uses a separate update. b2 and b7 describe action-transition update-gate bias initialization; observation memory bias is fixed at 4. At the true episode start, the all-zero previous-action sentinel discards the computed coupled prior. Reset windows retain their real preceding action.

Coordinates, maps, route IDs, and object identities are excluded from brain inputs and training teachers. This is a custom PyTorch model, not a language model or a Transformers checkpoint. The four conditions share three paired seed groups; they are not twelve independent experimental replicates. Across seed groups, both initialization and sampled training energy differ. Parameter and update counts were matched, but computational cost was not guaranteed identical.

What can be reproduced here

The complete kit includes 24 recorded trajectories: 12 trained models × two routes, with 49 observed timesteps per trajectory. These contain model inputs, future prediction targets, hidden states, imagined states, and masks distinguishing a prior that was computed from one that was actually adopted.

The Python CLI recomputes forward passes. --state initial selects the paired starting checkpoint. --history full, reset8, and reset-now compare full observation history, at most the latest eight observations from a reset state, and the current observation only. The original saved recurrent state is not injected into these inference runs.

examples/memory_control_results.json in the ZIP records 144 conditions: 12 models × two recorded routes × two checkpoint states × three history settings. Each condition uses one selected episode; its 49 timepoints are not 49 independent samples. These results are illustrative image-prediction and hidden-state comparisons, not a reproduction of the original aggregate spatial-memory evaluation.

Every exported tensor matched its original checkpoint exactly. Release CPU checks replayed all 24 trained traces with maximum absolute error 5.692243576049805e-6, below tolerance 1e-5. The reference traces and a new replay can use different batch sizes, so numerical agreement is tested with the stated tolerance, not claimed to be bit-identical at every output.

The included independent 40-update smoke run reduced validation loss from approximately 0.157437 to 0.076054, but did not beat the current-image-copy baseline at either prediction horizon. It verifies a small fresh-model training execution; it is not full v33 retraining or new evidence of spatial-memory achievement.

Original findings and their limits

For the featured checkpoint coupled_b7_s33101, the original multi-case evaluation reported native future-image candidate accuracy of 100% / 100% at horizons 1 / 5 on route A1, falling to 42.1875% / 37.5% on rearranged route A2. The A2 reset-eight scores were 25% / 25%. History contributed, but robust transfer between routes was not established. The featured checkpoint was selected for explanation, not declared the best model.

The original combined criterion was unmet for all 12 final v33 candidates. The featured model had not met the earlier acquisition precondition, so this is not evidence that it learned and later forgot that ability. Failure of a source-trained position readout under a changed distribution is also not proof that the state contains no position information. Initial random recurrence can already retain useful history; trained-versus-initial controls are necessary when attributing an effect to learning.

The percentages above are saved results from the original full evaluation. The 24 single-case trajectories in this release cannot reproduce those aggregate percentages by themselves. The ZIP includes exported source values and provenance, along with results and limitations and methods.

Intended use and reproduction boundary

Use this kit to inspect small recurrent representations, compare matched trained and initial models, test history resets on supplied observations, and distinguish sensory prediction from transferable spatial representation.

This v0.1 release focuses on the final v33 family and trace replay. It does not contain all 39 historical candidates, the complete original training datasets, every task variant, or the full original evaluation pipeline. It does not establish general navigation, biological realism, consciousness, autonomous foraging, long-term survival, or causal circuit identification.

The companion Space is a recorded replay, not a live inference service or a freely navigating agent. A 128-cell activation grid arranges feature indices for display; it is not a physical neural circuit or a decoded map. The same component index need not have the same meaning in different models.

日本語での要点

小型の世界モデルが「過去の情報を利用できること」と「別の経路でも場所を理解できること」を分けて検証する研究キットです。学習済み12個と対応する未学習12個の重み、24本の記録、記憶をリセットする比較を含みます。汎用的な空間理解や人工生物の完成を主張するものではありません。

実行するときは、このページのZIPをダウンロードして展開し、spatial-memory-kit-v0.1.0 フォルダ内でインストールしてください。このHFリポジトリの直下には検査用の重み・設定を平坦に配置してあり、直下での pip install -e . はできません。詳しい使い方・結果・限界はZIP内とGitHubにあります。

License, provenance, and citation

Original code, model weights, generated numerical traces, and documentation are available under the MIT License. Dependencies retain their own licenses; see THIRD_PARTY_NOTICES.md. The long narrated project video and third-party speech-model weights are not part of this release.

The flat files retain the same tensor/configuration bytes as the frozen v0.1.0 package. A source .pt checkpoint and its Safetensors export have different file hashes despite identical tensor values. The complete kit includes serialization checks and source-code provenance.

Please cite CITATION.cff, the GitHub repository, and the exact release or commit used. The project identity is qwel64; its Hugging Face publishing identity is nao1357.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using nao1357/spatial-memory-kit-v0.1 1