Prisma-Multimodal/ViT-Prisma

ViT Prisma is a mechanistic interpretability library for Vision and Video Transformers (ViTs).

What it solves

Prisma is an open-source toolkit designed for mechanistic interpretability in vision and video models. It provides the necessary infrastructure to understand the internal causal links and activations of vision transformers (ViTs), helping researchers move beyond treating these models as "black boxes."

How it works

The toolkit focuses on two primary methodologies for model analysis:

  • Circuit Analysis: Uses activation caching to identify causal links between the internal components of a model.
  • Sparse Autoencoders (SAEs): Provides tools to train, load, and evaluate SAEs, which act as fine-grained primitives to examine intermediate activations.

Prisma supports a wide range of models from Huggingface and OpenCLIP, including ViTs, CLIP, DINO, and JEPA. It includes a suite of pretrained SAE weights for CLIP and DINO across all layers.

Who it’s for

It is intended for AI researchers and developers interested in the internal workings of vision and video models, specifically those practicing mechanistic interpretability.

Highlights

  • Broad Model Support: Compatible with most vision/video transformers from OpenCLIP and Huggingface.
  • Pretrained SAEs: Includes a comprehensive library of open-source SAEs and transcoders for all layers of CLIP and DINO.
  • Integrated Tooling: Provides activation caching, SAE training, and evaluation metrics (such as L0, cosine similarity, and reconstruction loss).
  • Educational Resources: Includes demo notebooks for loading, training, and evaluating SAEs, as well as tutorials on logit lens and attention head visualization.

Related

  • Project
  • Project
  • Project
  • Project