Replace language with brain activity as the instruction signal for robot manipulation.
Standard VLAs (Vision-Language-Action models) take a text instruction + camera image and output robot actions. We replace the text encoder with TRIBE v2's brain encoding. The robot is conditioned on a spatial brain activity pattern instead of a flat text string.
VLA (existing): text string + camera image → robot action
VBA (this project): brain pattern + camera image → robot action
The brain pattern is richer than text — when TRIBE v2 processes "pick up the red cup," the output encodes motor planning, visual expectations, spatial attention, and semantic understanding simultaneously across 20,484 cortical vertices.
Text is a bottleneck. When you say "pick up the red cup," you compress an enormous amount of information into 5 words. The VLA's text encoder has to reconstruct all the implicit meaning:
A brain pattern from TRIBE v2 encodes ALL of that implicitly. The predicted brain response to "pick up the red cup" includes:
| Brain Region | What it encodes | Why it helps the robot |
|---|---|---|
| Visual cortex (V1-V4) | What a red cup looks like | Object recognition grounding |
| Ventral stream (IT cortex) | Object identity/category | Distinguish cup from bowl |
| Dorsal stream (parietal) | Spatial location, reach planning | Where to move the arm |
| Premotor cortex | Motor planning, grip type | How to grasp |
| Prefrontal cortex | Task goals, sequencing | Multi-step planning |
| Angular gyrus | Semantic meaning | Understanding the instruction |
A single 20k-dimensional brain pattern packages all of these into one conditioning signal.
"pick up the red cup" → text tokenizer → LLM backbone →
} → action tokens → 7-DoF
camera image → ViT encoder →
"pick up the red cup" → TRIBE v2 → brain pattern (20484,) → BrainEncoder →
} → action tokens → 7-DoF
camera image → ViT encoder →
video of human doing task → TRIBE v2 → brain pattern (20484,) → BrainEncoder →
} → action tokens → 7-DoF
camera image → ViT encoder →
See src/vba/model/brain_encoder.py for the full implementation. It:
Output shape: (batch, 32, 4096) — a drop-in replacement for text instruction tokens.
BrainEncoder params: ~45M (trainable). The VLA backbone (OpenVLA 7B) stays frozen.
TRIBE v2 gives you a deterministic mapping from text → brain pattern. So for every (text, image, action) triple in an existing VLA dataset, you can add the brain pattern. See scripts/02_enrich_dataset.py.
Phase 1 — Brain-text alignment pretraining (5 epochs). See scripts/03_train_alignment.py. Align BrainEncoder tokens with the VLA's own text encoder tokens using MSE. After this, brain tokens live in the same space as text tokens.
Phase 2 — End-to-end action fine-tuning (20 epochs). See scripts/04_train_vba.py. Train with action MSE loss. VLA backbone + ViT stay frozen; only BrainEncoder trains.
Phase 3 — Video-conditioned training (10 epochs). See scripts/05_train_video_cond.py. Replace text-derived brain patterns with video-derived brain patterns. The model learns to reproduce actions from watching a human do them, with the brain as the intermediate representation.
| Dataset | Tasks | Size | Source |
|---|---|---|---|
| Open X-Embodiment | Diverse manipulation | 1M+ episodes | Google (open) |
| Bridge V2 | Tabletop manipulation | 60k episodes | Berkeley (open) |
| DROID | Diverse real-world | 76k episodes | Toyota Research (open) |
| RoboSet | Manipulation | 100k episodes | MIT (open) |
For each episode, you already have (instruction_text, camera_images, actions). Run each instruction through TRIBE v2 once to get the brain pattern. Embarrassingly parallel.
See src/vba/data/isaac_collector.py for a skeleton Franka Panda episode collector.
TRIBE v2 forward pass on a short text: ~1–2 seconds on A100. 60k episodes (Bridge V2): ~17–33 GPU-hours. One overnight job.
All four experiments from the paper are run from scripts/06_evaluate.py and scripts/07_ablation.py:
See scripts/08_demo.py for the end-to-end demo (Mode A: text instruction; Mode B: video demonstration, no text).
vba/
├── README.md
├── pyproject.toml
├── configs/
│ ├── brain_encoder.yaml # BrainEncoder architecture
│ ├── training.yaml # training schedule, losses
│ └── eval.yaml # evaluation settings
├── scripts/
│ ├── 01_install_tribev2.sh # setup script
│ ├── 02_enrich_dataset.py # add brain patterns to VLA dataset
│ ├── 03_train_alignment.py # Phase 1: brain-text alignment
│ ├── 04_train_vba.py # Phase 2: end-to-end action training
│ ├── 05_train_video_cond.py # Phase 3: video conditioning
│ ├── 06_evaluate.py # all experiments
│ ├── 07_ablation.py # brain region ablation study
│ └── 08_demo.py # full pipeline demo
├── src/vba/
│ ├── model/
│ │ ├── brain_encoder.py # BrainPatchEmbedding + BrainEncoder
│ │ ├── vba_model.py # BrainEncoder + frozen OpenVLA backbone
│ │ └── losses.py # alignment loss + action loss
│ ├── data/
│ │ ├── enriched_dataset.py # VLA dataset + brain patterns
│ │ ├── brain_cache.py # cache TRIBE v2 outputs to disk
│ │ └── isaac_collector.py # collect episodes in Isaac Sim
│ └── viz/
│ ├── brain_render.py # TRIBE v2 PlotBrain wrapper
│ └── demo_dashboard.py # split-screen brain + robot viz
├── tests/
│ ├── test_brain_encoder.py # shape tests
│ ├── test_enrichment.py # verify brain patterns cached correctly
│ └── test_vba_forward.py # end-to-end forward pass
└── notebooks/
├── 01_explore_brain_patterns.ipynb
├── 02_brain_vs_text_similarity.ipynb
└── 03_ablation_analysis.ipynb
| Phase | GPU | Time | Notes |
|---|---|---|---|
| Dataset enrichment (60k episodes) | 1× A100 | ~20 hrs | TRIBE v2 forward pass per instruction, cache results |
| Phase 1 alignment training | 1× A100 | ~4 hrs | BrainEncoder only, small |
| Phase 2 action training | 1× A100 (80GB) | ~12 hrs | VLA backbone loaded frozen |
| Phase 3 video conditioning | 1× A100 (80GB) | ~8 hrs | Same as Phase 2, different data |
| Evaluation | 1× A100 | ~2 hrs | Isaac Sim + VBA inference |
| Demo | 1× RTX 3090+ | Real-time | TRIBE v2 + VBA + rendering |
Total VRAM at inference: TRIBE v2 (~12–16 GB) + OpenVLA 7B frozen (~14 GB) + BrainEncoder (~0.1 GB) + Isaac Sim (~2–4 GB) → fits on A100 40 GB / GH200.
# 1. Install
pip install -e ".[tribev2,vla,dev]"
# 2. Sanity check the BrainEncoder
python -c "import torch; from vba.model.brain_encoder import BrainEncoder; \
m = BrainEncoder(); print(m(torch.randn(2, 20484)).shape)"
# -> torch.Size([2, 32, 4096])
# 3. Run tests
pytest tests/ -v
# 4. See each training script's CLI
python scripts/03_train_alignment.py --help
python scripts/04_train_vba.py --help
6 commits
Python
95.7%
Jupyter Notebook
3.5%
Replace language with brain activity as the instruction signal for robot manipulation.
Standard VLAs (Vision-Language-Action models) take a text instruction + camera image and output robot actions. We replace the text encoder with TRIBE v2's brain encoding. The robot is conditioned on a spatial brain activity pattern instead of a flat text string.
VLA (existing): text string + camera image → robot action
VBA (this project): brain pattern + camera image → robot action
The brain pattern is richer than text — when TRIBE v2 processes "pick up the red cup," the output encodes motor planning, visual expectations, spatial attention, and semantic understanding simultaneously across 20,484 cortical vertices.
Text is a bottleneck. When you say "pick up the red cup," you compress an enormous amount of information into 5 words. The VLA's text encoder has to reconstruct all the implicit meaning:
A brain pattern from TRIBE v2 encodes ALL of that implicitly. The predicted brain response to "pick up the red cup" includes:
| Brain Region | What it encodes | Why it helps the robot |
|---|---|---|
| Visual cortex (V1-V4) | What a red cup looks like | Object recognition grounding |
| Ventral stream (IT cortex) | Object identity/category | Distinguish cup from bowl |
| Dorsal stream (parietal) | Spatial location, reach planning | Where to move the arm |
| Premotor cortex | Motor planning, grip type | How to grasp |
| Prefrontal cortex | Task goals, sequencing | Multi-step planning |
| Angular gyrus | Semantic meaning | Understanding the instruction |
A single 20k-dimensional brain pattern packages all of these into one conditioning signal.
"pick up the red cup" → text tokenizer → LLM backbone →
} → action tokens → 7-DoF
camera image → ViT encoder →
"pick up the red cup" → TRIBE v2 → brain pattern (20484,) → BrainEncoder →
} → action tokens → 7-DoF
camera image → ViT encoder →
video of human doing task → TRIBE v2 → brain pattern (20484,) → BrainEncoder →
} → action tokens → 7-DoF
camera image → ViT encoder →
See src/vba/model/brain_encoder.py for the full implementation. It:
Output shape: (batch, 32, 4096) — a drop-in replacement for text instruction tokens.
BrainEncoder params: ~45M (trainable). The VLA backbone (OpenVLA 7B) stays frozen.
TRIBE v2 gives you a deterministic mapping from text → brain pattern. So for every (text, image, action) triple in an existing VLA dataset, you can add the brain pattern. See scripts/02_enrich_dataset.py.
Phase 1 — Brain-text alignment pretraining (5 epochs). See scripts/03_train_alignment.py. Align BrainEncoder tokens with the VLA's own text encoder tokens using MSE. After this, brain tokens live in the same space as text tokens.
Phase 2 — End-to-end action fine-tuning (20 epochs). See scripts/04_train_vba.py. Train with action MSE loss. VLA backbone + ViT stay frozen; only BrainEncoder trains.
Phase 3 — Video-conditioned training (10 epochs). See scripts/05_train_video_cond.py. Replace text-derived brain patterns with video-derived brain patterns. The model learns to reproduce actions from watching a human do them, with the brain as the intermediate representation.
| Dataset | Tasks | Size | Source |
|---|---|---|---|
| Open X-Embodiment | Diverse manipulation | 1M+ episodes | Google (open) |
| Bridge V2 | Tabletop manipulation | 60k episodes | Berkeley (open) |
| DROID | Diverse real-world | 76k episodes | Toyota Research (open) |
| RoboSet | Manipulation | 100k episodes | MIT (open) |
For each episode, you already have (instruction_text, camera_images, actions). Run each instruction through TRIBE v2 once to get the brain pattern. Embarrassingly parallel.
See src/vba/data/isaac_collector.py for a skeleton Franka Panda episode collector.
TRIBE v2 forward pass on a short text: ~1–2 seconds on A100. 60k episodes (Bridge V2): ~17–33 GPU-hours. One overnight job.
All four experiments from the paper are run from scripts/06_evaluate.py and scripts/07_ablation.py:
See scripts/08_demo.py for the end-to-end demo (Mode A: text instruction; Mode B: video demonstration, no text).
vba/
├── README.md
├── pyproject.toml
├── configs/
│ ├── brain_encoder.yaml # BrainEncoder architecture
│ ├── training.yaml # training schedule, losses
│ └── eval.yaml # evaluation settings
├── scripts/
│ ├── 01_install_tribev2.sh # setup script
│ ├── 02_enrich_dataset.py # add brain patterns to VLA dataset
│ ├── 03_train_alignment.py # Phase 1: brain-text alignment
│ ├── 04_train_vba.py # Phase 2: end-to-end action training
│ ├── 05_train_video_cond.py # Phase 3: video conditioning
│ ├── 06_evaluate.py # all experiments
│ ├── 07_ablation.py # brain region ablation study
│ └── 08_demo.py # full pipeline demo
├── src/vba/
│ ├── model/
│ │ ├── brain_encoder.py # BrainPatchEmbedding + BrainEncoder
│ │ ├── vba_model.py # BrainEncoder + frozen OpenVLA backbone
│ │ └── losses.py # alignment loss + action loss
│ ├── data/
│ │ ├── enriched_dataset.py # VLA dataset + brain patterns
│ │ ├── brain_cache.py # cache TRIBE v2 outputs to disk
│ │ └── isaac_collector.py # collect episodes in Isaac Sim
│ └── viz/
│ ├── brain_render.py # TRIBE v2 PlotBrain wrapper
│ └── demo_dashboard.py # split-screen brain + robot viz
├── tests/
│ ├── test_brain_encoder.py # shape tests
│ ├── test_enrichment.py # verify brain patterns cached correctly
│ └── test_vba_forward.py # end-to-end forward pass
└── notebooks/
├── 01_explore_brain_patterns.ipynb
├── 02_brain_vs_text_similarity.ipynb
└── 03_ablation_analysis.ipynb
| Phase | GPU | Time | Notes |
|---|---|---|---|
| Dataset enrichment (60k episodes) | 1× A100 | ~20 hrs | TRIBE v2 forward pass per instruction, cache results |
| Phase 1 alignment training | 1× A100 | ~4 hrs | BrainEncoder only, small |
| Phase 2 action training | 1× A100 (80GB) | ~12 hrs | VLA backbone loaded frozen |
| Phase 3 video conditioning | 1× A100 (80GB) | ~8 hrs | Same as Phase 2, different data |
| Evaluation | 1× A100 | ~2 hrs | Isaac Sim + VBA inference |
| Demo | 1× RTX 3090+ | Real-time | TRIBE v2 + VBA + rendering |
Total VRAM at inference: TRIBE v2 (~12–16 GB) + OpenVLA 7B frozen (~14 GB) + BrainEncoder (~0.1 GB) + Isaac Sim (~2–4 GB) → fits on A100 40 GB / GH200.
# 1. Install
pip install -e ".[tribev2,vla,dev]"
# 2. Sanity check the BrainEncoder
python -c "import torch; from vba.model.brain_encoder import BrainEncoder; \
m = BrainEncoder(); print(m(torch.randn(2, 20484)).shape)"
# -> torch.Size([2, 32, 4096])
# 3. Run tests
pytest tests/ -v
# 4. See each training script's CLI
python scripts/03_train_alignment.py --help
python scripts/04_train_vba.py --help
6 commits
Python
95.7%
Jupyter Notebook
3.5%