Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install .[docs]
pip install jupyter-book sphinxcontrib-mermaid
pip install jupyter-book sphinxcontrib-mermaid numpydoc

- name: Build the book
run: |
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# CEBRA-Lens

## A python library for mechanistic interpretability of CEBRA models
<img src="https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/c443da50-49cd-4fcb-a2f3-a5cae2915f51/zebra.png?format=1500w" title="cebra-lens" alt="cebra-lens" width="150" align="right" style="margin-top:80px;" />

<img src="_static/zebra.png" title="cebra-lens" alt="cebra-lens" width="150" align="right" vspace = "80"/>
A python library for mechanistic interpretability of CEBRA models

**CEBRA-Lens** is a Python library for analyzing and interpreting neural representations learned by models trained with [CEBRA](https://github.com/AdaptiveMotorControlLab/cebra). It provides tools for mechanistic interpretability, allowing users to probe, visualize, and understand the structure of learned embeddings. The library is designed to support in-depth analysis of representational geometry, feature selectivity, and latent space dynamics in neuroscience and beyond. 👋 We welcome contributions and will continue to expand the library in the coming years.

Expand All @@ -18,13 +18,13 @@ conda create -n CEBRAlens python=3.12
conda activate CEBRAlens
conda install -c conda-forge pytables==3.8.0

# install PyTorch with your desired CUDA version (or for CPU only)- check their website: https://pytorch.org/get-started/locally/
# install PyTorch with your desired CUDA version - check their website: https://pytorch.org/get-started/locally/
# example: GPU version of pytorch for CUDA 11.3
conda install pytorch cudatoolkit=11.3 -c pytorch

# install CEBRA and CEBRA-lens
pip install --pre 'cebra[datasets,demos]'
pip install -- cebra_lens
pip install --pre cebra_lens
```

## 🦓🔍 Analysis Methods
Expand Down Expand Up @@ -65,7 +65,9 @@ These analyses quantify the change in the distance calculated per layer in a mod
- inter-class distance
- inter-repetition distance (only relevant if the model was trained on a dataset where there is repeating stimuli)

<img src="_static/abstractfig.png" alt="analysis">
<img src="https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/4e8eaca2-e14a-4a46-aba5-702775ad2797/abstractfig.png?format=1500w" alt="analysis">



# Demo

Expand Down
Binary file removed docs/docs/images/abstractfig.png
Binary file not shown.
Binary file removed docs/docs/images/zebra.png
Binary file not shown.
Loading