pyvene-interventions

Design causal intervention experiments for PyTorch models using pyvene.

Updated May 4, 2026
One-click install
npx skills add https://github.com/Supporter09/Face_Anti_Spoofing_Biometric --skill pyvene-interventions-supporter09
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pyvene-interventions
Source: https://github.com/Supporter09/Face_Anti_Spoofing_Biometric/tree/main/.claude/skills/pyvene
Command: npx skills add https://github.com/Supporter09/Face_Anti_Spoofing_Biometric --skill pyvene-interventions-supporter09

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you test causal hypotheses in PyTorch models by swapping, modifying, collecting, or zeroing internal activations in a reproducible way.

Core Features & Use Cases

  • Causal tracing and activation patching: localize where behavior is represented by restoring selected activations across layers and positions.
  • Trainable interventions: learn low-rank or rotated subspaces for interchange intervention training, distributed alignment search, and steering.
  • Broad model support: apply the same declarative workflow to transformers and other PyTorch architectures for research, debugging, and interpretability experiments.

Quick Start

Use the pyvene-interventions skill to design a causal intervention experiment for your PyTorch model and explain how to configure the target layer, component, and intervention type.

Frequently Asked Questions about pyvene-interventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform activation patching on a PyTorch transformer model?

Activation patching in a PyTorch transformer is performed by swapping or restoring selected activations across specific layers and positions to localize where behavior is represented. This Skill configures the target layer, component, and intervention type using pyvene's declarative framework.

What is causal tracing and how does it work for model interpretability?

Causal tracing is a model interpretability technique that localizes where specific behavior is represented inside a PyTorch model by restoring selected activations across layers and positions. It uses pyvene's declarative framework to swap, modify, collect, or zero internal activations reproducibly.

Can I train low-rank interventions for interchange intervention training on PyTorch models?

Yes, you can train low-rank or rotated subspaces for interchange intervention training, distributed alignment search, and model steering. This Skill supports optional trainable intervention parameters to learn these subspaces within PyTorch architectures.

Does pyvene-interventions support causal interventions on non-transformer PyTorch architectures?

Yes, this Skill applies the same declarative causal intervention workflow to transformers and other PyTorch neural architectures. You can configure intervention types, source-base activation mapping, and target components across diverse model structures for interpretability research.

How do I configure source-base activation mapping for causal intervention experiments?

Source-base activation mapping requires precise layer and component configuration to define where interventions occur in your PyTorch model. This Skill uses pyvene's declarative framework to map source activations to base activations for reproducible causal analysis.

What's the best way to run model steering experiments on PyTorch transformers?

Model steering on PyTorch transformers is executed by applying trainable interventions that learn low-rank or rotated subspaces to modify model behavior. This Skill provides the declarative configuration needed to define intervention parameters and target layers for steering.