Back to Projects
CortexLab Architecture

CortexLab

Multimodal fMRI brain encoding toolkit with streaming inference, interpretability, and brain-alignment benchmarking

CortexLab extends Meta's TRIBE v2 foundation model for in-silico neuroscience. TRIBE v2 predicts fMRI brain activation from video, audio, and text inputs using a LLaMA 3.2-3B backbone. CortexLab adds the tooling researchers need to actually use these predictions: real-time streaming inference, interpretability visualization, cross-subject adaptation, and quantitative benchmarking.

The toolkit includes a brain-alignment benchmark that scores how "brain-like" any AI model's internal representations are using RSA, CKA, and Procrustes analysis. It also provides a cognitive load scorer that predicts mental demand from predicted activation patterns, and modality attribution that reveals which input modality (text, audio, or video) drives each brain region's response.

Key Highlights

3 Input Modalities (Video, Audio, Text)
6 Extension Modules
3 Alignment Methods (RSA, CKA, Procrustes)
RT Real-Time Streaming Inference

Architecture Details

Tech Stack

PyTorchLLaMA 3.2TRIBE v2fMRI nilearnPyVistaNumPySciPy PyTorch LightningHuggingFace
View on GitHub Read the Blog Post