How mustafa-elsherif/volition works
Volition turns IBL neural recordings into processed sessions, trains and evaluates a shared region-tagged neuron-set decoder, then serves predictions with neuron and region attention through either a FastAPI service or an in-browser dashboard. The README documents the broader experimental outputs and deployment capabilities; sampled code supports the main training, inference, and UI links. Some data-building and experiment details are unsampled, so those links rely on SOURCE INDEX references or README statements.
Main entry points: run_experiments.py Experiment runner · build_dataset.py Dataset builder · settings.py Settings and storage · main.py FastAPI routes
Components 24
Data preparation
- Dataset builder
src/data/build_dataset.py - Trial cleaning
src/data/clean_trials.py - Neuron features
src/data/features.py - Session processing
src/data/sessions.py - Settings and storage
src/common/settings.py - Data checks
src/common/checks.py
Model and evaluation
- Model data views
src/models/data.py - Trial splits
src/models/splits.py - Neuron set transformer
src/models/set_transformer.py - Pretraining and training
src/models/train.py - Baseline models
src/models/baselines.py - Experiment runner
src/models/run_experiments.py - Decoding metrics
src/evaluation/metrics.py - Evaluation statistics
src/evaluation/statistics.py - Model serialization
src/models/serialize.py - Model artifacts
artifacts/decoder.onnx
Inference services
- FastAPI routes
api/app/main.py - ONNX decoder
api/app/inference.py - Grounded assistant
api/app/assistant.py
User experience
- Web dashboard
web/app.js - Browser inference
web/inference.js - Browser assistant
web/assistant.js
Other components
- IBL recordings
- Demo visitor
Connections 26
- IBL recordings → Dataset builder: provides recordings
README.md - Dataset builder → Trial cleaning: uses cleaning
src/data/build_dataset.py - Dataset builder → Neuron features: uses features
src/data/build_dataset.py - Dataset builder → Session processing: uses session data
src/data/build_dataset.py - Dataset builder → Settings and storage: loads settings
src/data/build_dataset.py - Session processing → Settings and storage: loads sessions
src/data/sessions.py - Settings and storage → Data checks: validates sessions
src/common/settings.py - Experiment runner → Settings and storage: loads configuration
src/models/run_experiments.py - Experiment runner → Model data views: loads model data
src/models/run_experiments.py - Experiment runner → Trial splits: creates splits
src/models/run_experiments.py - Experiment runner → Pretraining and training: trains models
src/models/run_experiments.py - Experiment runner → Baseline models: runs baselines
src/models/run_experiments.py - Pretraining and training → Model data views: packs trials
src/models/train.py - Pretraining and training → Neuron set transformer: trains network
src/models/train.py - Experiment runner → Decoding metrics: scores predictions
src/models/run_experiments.py - Experiment runner → Evaluation statistics: summarizes results
src/models/run_experiments.py - Experiment runner → Model serialization: exports model
README.md - Model serialization → Model artifacts: writes artifacts
README.md - FastAPI routes → ONNX decoder: initializes decoder
api/app/main.py - FastAPI routes → Grounded assistant: initializes assistant
api/app/main.py - FastAPI routes → ONNX decoder: routes decode
api/app/main.py - ONNX decoder → Model artifacts: loads ONNX model
api/app/inference.py - Web dashboard → Browser inference: requests decoding
web/app.js - Web dashboard → Browser assistant: sends questions
web/app.js - Browser inference → Model artifacts: loads browser model
README.md - Demo visitor → Web dashboard: uses demo
README.md