User Guide

Welcome to the pyc_logo PyC User Guide! This guide walks you through building interpretable and causally transparent deep learning models with PyTorch Concepts.

Three Levels of Control and Abstraction

pyc_logo PyC exposes three API levels. They share the same primitives but offer increasing amounts of abstraction, and they build on top of one another.

Semantic primitives and Interventions

(Low-level)

Extend pytorch_logo PyTorch tensors with concept annotations and build semantics-aware layers. Use Interventions to steer concepts and mechanisms.

Best for: pure PyTorch users, research in interpretable modules.

Semantic primitives and Interventions
Interpretable Probabilistic Models

(Mid-level)

Build interpretable probabilistic graphical models from concept variables and neural factors. Run probabilistic inferences over it.

Best for: users who think in probabilistic terms, research in interpretable architectures.

Interpretable Probabilistic Graphical Models
Out-of-the-box Models

(High-level)

Use state-of-the-art concept-based models with one line of code. These models can be trained with pytorch_logo PyTorch loops or automatically with pl_logo Lightning.

Best for: users who just want a model that works out of the box.

Out-of-the-box Models
conceptarium_logo Benchmarking at scale

Use conceptarium_logo Conceptarium, a configuration-based framework built on top of pyc_logo PyC and hydra_logo Hydra for running large-scale experiments.

Best for: no experience with programming, benchmarking with just configurations.

Conceptarium