Logo

Getting started

  • Installation
    • From a clone (recommended for now)
    • With conda
    • Optional extras
    • Check the install
  • Quickstart
    • 1. Data and a causal graph
    • 2. The model to explain
    • 3. Train a surrogate on the graph
    • 4. Attribute with CIG
    • 5. Attribute with CEG
    • Next steps

User guide

  • How CIG and CEG work
    • The problem with independent-feature attribution
    • Ingredients and notation
    • Direct and indirect effects
    • Second-order indirect effects
      • Worked example: a three-node chain
    • From CIG to CEG
    • How the surrogate is queried
    • Discretization and the completeness delta
    • Assumptions and caveats
  • Attribution methods
    • Causal Integrated Gradients
    • Causal Expected Gradients (multi-step)
    • Causal Expected Gradients (single step)
    • Shapley-value baselines
      • CausalSHAP
      • ConditionalSHAP
  • Arguments reference
    • At a glance
    • Inputs
      • input
      • surrogate
      • ordering
      • baseline / baselines
      • adjacency_matrix
      • target
    • Behavior switches
      • n_steps
      • separate_effects
      • has_closed_form_jacobian
      • include_second_order_indirect
      • return_convergence_delta
      • seed
    • Chunking arguments
      • Rules of thumb for large d
    • Return values
  • Surrogate models
    • MaskedGlobalLinear
    • Training
      • train_surrogate_model
    • Checking surrogate quality
    • Using a known SCM as the surrogate
  • Adding a new surrogate
    • The contract
    • Example: a linear SEM with a closed-form Jacobian
    • Validating a new surrogate
    • Contributing a surrogate to causalig
  • Reproducing the paper
    • Setup
    • Running an experiment from Python
      • Main configuration fields
    • Scripts

Reference

  • API reference
    • causalig.attr
      • Causal gradient methods
      • Shapley-value baselines
    • causalig.models
      • Surrogates
      • Training
      • Structural causal models
    • causalig.utils
      • Graph utilities
      • Logging
    • Internals
      • Attribution base class
      • Surrogate contract and Jacobians
      • Path sampling
  • Development
    • Repository layout
    • Tests and linting
    • Building the documentation
    • Deploying to Read the Docs
CausalIG
  • Search


© Copyright 2026, Joran Michiels, Anis Ismail.

Built with Sphinx using a theme provided by Read the Docs.