Note: The ECE594 project is currently limited in scope to "Aim 1" above.
This project investigates whether state-estimation objectives for articulated bodies induce structured neural representations analogous to grid codes in spatial navigation. We train recurrent networks on path integration for a robotic arm with configuration space Q = SO(3) × SO(3), analyze the learned representations, and evaluate their utility for downstream reinforcement learning.
Project Stages:
- Body-state estimation (Team Estimation): Train RNN to perform path integration on joint angular velocities
- Representation analysis (Team Interpretation): Visualize and analyze latent structure
- RL evaluation (Team RL): Use learned representations as embeddings for Reacher-v5
# Linux/macOS
curl -sSL https://install.python-poetry.org | python3 -
# Verify installation
poetry --versiongit clone <repository-url>
cd articulated
# Install dependencies
poetry install
# Activate the virtual environment
poetry shellpytest
black --check .
ruff check .articulated/
├── articulated/
│ ├── estimation/ # Team Estimation
│ │ ├── datamodule.py # Trajectory data generation
│ │ ├── model.py # RNN architectures
│ │ └── train.py # Training script
│ │
│ ├── analysis/ # Team Interpretation
│ │ ├── dimensionality.py # PCA
│ │ ├── tuning.py # Tuning curve analysis
│ │ └── visualization.py # Plotting utilities
│ │
│ ├── rl/ # Team RL
│ │ ├── environment.py # Reacher-v5 wrappers
│ │ ├── agent.py # RL agents
│ │ └── train.py # Training script
│ │
│ ├── shared/ # Shared utilities
│ │ └── robot_arm.py # Kinematics on SO(3) × SO(3)
│ │
│ ├── configs/ # Configuration files
│ │ ├── estimation/ # Team Estimation configs
│ │ └── rl/ # Team RL configs
│ │
│ └── notebooks/ # Analysis notebooks
│
├── tests/
├── docs/
└── pyproject.toml
Goal: Train RNN to perform path integration on SO(3) × SO(3).
Key files:
articulated/estimation/datamodule.py: Implement trajectory generation (inputs,targets)articulated/estimation/model.py: Define RNN architecturearticulated/estimation/train.py: Training script
Key TODOs:
- Implement proper SO(3) × SO(3) trajectory generation in
_generate_single_trajectory() - Implement proper "place cell" targets on SO(3) × SO(3)
- Experiment with RNN vs LSTM vs GRU architectures
Run training:
python -m articulated.estimation.train --config articulated/configs/estimation/rnn.yamlInterface with other teams:
- The
StateEstimationModel.get_embedding()will be used by Team RL - The
StateEstimationModel.get_hidden_states()will be used by Team Interpretation
Resources:
Goal: Analyze how the RNN encodes joint position using dimensionality reduction and tuning curves.
Key files:
articulated/analysis/dimensionality.py: PCAarticulated/analysis/tuning.py: Tuning curve analysisarticulated/analysis/visualization.py: Plotting
Key TODOs:
- Apply PCA to hidden states from trained models
- Compute tuning curves w.r.t. configuration variables (joint angles)
- Check if representations have structure (e.g. grid-like, etc.).
Getting hidden states:
from articulated.estimation.model import StateEstimationModel
model = StateEstimationModel.load_for_embedding("checkpoints/estimation/best.ckpt")
hidden_states = model.get_hidden_states(velocity_trajectory)Resources:
Goal: Compare RL performance using raw observations vs learned embeddings on Reacher-v5.
Key files:
articulated/rl/environment.py- Reacher wrappersarticulated/rl/agent.py- RL agents (PPO, SAC)articulated/rl/train.py- Training script
Key TODOs:
- Understand Reacher-v5 observation space
- Implement
_extract_angular_velocities()in environment wrapper - Run baseline (raw obs) vs embedded experiments
Run training:
# Baseline (raw observations)
python -m articulated.rl.train --config articulated/configs/rl/baseline.yaml
# With embeddings (requires trained estimation model)
python -m articulated.rl.train --config articulated/configs/rl/embedded.yamlResources:
black . # Format
ruff check . # Lint
ruff check --fix # Auto-fix
mypy articulated/ # Type checkpytest
pytest -v
pytest tests/test_models.pyProject Leads:
- Mathilde Papillon (papillon@ucsb.edu)
- Francisco Acosta (facosta@ucsb.edu) Geometric Intelligence Lab @ UCSB
ECE594 Project Team:
- Team Estimation: Awsaf Rahman (lead), Siheng Wang
- Team Interpretation: Rohan Koshy, Siheng Wang
- Team RL: Pushpita Joardar, Hun Tae Kim
