How mirros-lab/s-space works
S-Space is a research toolkit for constructing and evaluating a spatial representation in multimodal models. Its main workflow prepares benchmark data, extracts model activations to learn spatial axes, validates and publishes those axes, then uses them in readout and intervention experiments. The README also documents distinct prompt-generalization, multi-view, action-supervision, perspective-taking, and reasoning-context studies. The source excerpts show parts of the extraction and model layers; links for unsampled experiment subsystems rely on the README’s documented capabilities.
Main entry points: workflows.py Experiment workflows · core/pipeline.py Training pipeline · assets.py Pinned assets · coco/pipeline.py COCO preparation
Components 28
Workflow entry
- Experiment workflows
sspace/experiments/workflows.py - Experiment registry
sspace/registry.py
Data preparation
- Pinned assets
sspace/data/assets.py - Dataset hub
sspace/data/hub.py - COCO preparation
sspace/data/coco/pipeline.py - Dataset access
sspace/core/data.py
S-Space construction
- Training configuration
sspace/core/config.py - Frozen prompts
sspace/core/prompts/templates.py - Prompt rendering
sspace/core/prompts/rendering.py - Model runtime
sspace/core/models/runtime.py - Model adapters
sspace/core/models/molmo.py - Activation extraction
sspace/core/extraction/execution.py - Shard storage
sspace/core/extraction/storage.py - Shard merging
sspace/core/extraction/merge.py - Training pipeline
sspace/core/pipeline.py - Spatial artifacts
sspace/core/artifacts/artifacts.py - Layer selection
sspace/experiments/validation/coco1800/selection/layers.py
Readout studies
- Pairwise evaluation
sspace/experiments/common/pairwise/runner.py - Prompt generalization
sspace/experiments/prompt/where/run_sweep.py - Object coordinates
sspace/experiments/analysis/object_coordinates/plot.py - Coordinate lens
sspace/experiments/analysis/object_coordinate_lens/inference.py
Specialized studies
- Multi-view reasoning
sspace/experiments/multi_view/hstar/hstar_multiview.py - Spatial interventions
sspace/experiments/intervention/spatial_causality/spatial_jacobian/spatial_causality.py - Action supervision
sspace/experiments/action_supervision/instructpart/scoring.py - Perspective taking
sspace/experiments/spinbench/perspective_taking/direct.py - CoT evolution
sspace/experiments/spinbench/evolving_cot/runtime.py - Context scaling
sspace/experiments/analysis/contextual_cases/runner.py
Other components
- Researcher
Connections 29
- Researcher → Experiment workflows: selects study
- Experiment workflows → Experiment registry: resolves workflow
sspace/registry.py - Researcher → Pinned assets: prepares datasets
- Pinned assets → Dataset hub: downloads assets
sspace/data/assets.py - Pinned assets → COCO preparation: supports COCO prep
- COCO preparation → Dataset access: produces training data
- Experiment workflows → Training pipeline: runs construction
- Training pipeline → Training configuration: uses settings
sspace/core/pipeline.py - Training pipeline → Dataset access: uses samples
sspace/core/pipeline.py - Training pipeline → Model runtime: uses runtime
sspace/core/pipeline.py - Model runtime → Model adapters: selects adapter
sspace/core/models/runtime.py - Model adapters → Prompt rendering: prepares prompts
sspace/core/models/molmo.py - Prompt rendering → Frozen prompts: renders templates
sspace/core/prompts/rendering.py - Training pipeline → Activation extraction: extracts activations
sspace/core/pipeline.py - Activation extraction → Shard storage: stores shards
- Training pipeline → Shard merging: merges shards
sspace/core/pipeline.py - Training pipeline → Layer selection: selects readout layers
sspace/core/pipeline.py - Training pipeline → Spatial artifacts: publishes axes
sspace/core/pipeline.py - Experiment workflows → Pairwise evaluation: runs benchmark studies
- Pairwise evaluation → Spatial artifacts: reads released axes
- Experiment workflows → Prompt generalization: runs prompt studies
- Experiment workflows → Object coordinates: plots coordinates
- Experiment workflows → Coordinate lens: runs coordinate lens
- Experiment workflows → Multi-view reasoning: runs HStar study
- Experiment workflows → Spatial interventions: runs causal study
- Experiment workflows → Action supervision: runs action study
- Experiment workflows → Perspective taking: runs perspective study
- Experiment workflows → CoT evolution: runs CoT study
- Experiment workflows → Context scaling: runs context study