pyvene: A Library for Understanding and Improving PyTorch Models via Interventions
Not on the map. Why?
Abstract (arXiv)
Interventions on model-internal states are fundamental operations in many areas of AI, including model editing, steering, robustness, and interpretability. To facilitate such research, we introduce pyvene, an open-source Python library that supports customizable interventions on a range of different PyTorch modules. pyvene supports complex intervention schemes with an intuitive configuration format, and its interventions can be static or include trainable parameters. We show how pyvene provides a unified and extensible framework for performing interventions on neural models and sharing the intervened upon models with others. We illustrate the power of the library via interpretability analyses using causal abstraction and knowledge localization. We publish our library through Python Package Index (PyPI) and provide code, documentation, and tutorials at https://github.com/stanfordnlp/pyvene.
Key facts. Cited by 53 papers in the map (data through 7 Oct 2026). Builds on 14 of its 23 references that are in the map. First posted on arXiv 12 Mar 2024.
Builds on
14 of 23 references.
References · 14
- 2017Attention Is All You Needcited by 59,932
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,259
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 700
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 512
- 2021Causal Abstractions of Neural Networkscited by 401
- 2023Finding Alignments Between Interpretable Causal Variables and Distributed Neural Representationscited by 197
- 2023Localizing Model Behavior with Path Patchingcited by 182
- 2018Parametric Noise Injection: Trainable Randomness to Improve Deep Neural Network Robustness against Adversarial Attackcited by 123
- 2021Inducing Causal Structure for Interpretable Neural Networkscited by 107
2 more
Built on by
Citing papers per year: 2024: 14; 2025: 22; 2026: 17.
53 papers.
Sort:
By area:
- 2025AxBench: Steering LLMs? Even Simple Baselines Outperform Sparse Autoencoderscited by 199
- 2024ReFT: Representation Finetuning for Language Modelscited by 186
- 2024What is Your Data Worth to GPT? LLM-Scale Data Valuation with Influence Functionscited by 88
- 2025MIB: A Mechanistic Interpretability Benchmarkcited by 49
- 2024NNsight and NDIF: Democratizing Access to Open-Weight Foundation Model Internalscited by 43
- 2024Monitoring Latent World States in Language Models with Propositional Probescited by 39
- 2024Personality Alignment of Large Language Modelscited by 36
- 2025A Survey on Mechanistic Interpretability for Multi-Modal Foundation Modelscited by 34
- 2025The Non-Linear Representation Dilemma: Is Causal Abstraction Enough for Mechanistic Interpretability?cited by 34
- 2024The Quest for the Right Mediator: Surveying Mechanistic Interpretability Through the Lens of Causal Mediation Analysiscited by 24
- 2025Back Attention: Understanding and Enhancing Multi-Hop Reasoning in Large Language Modelscited by 23
- 2024Locking Down the Finetuned LLMs Safetycited by 22
38 more
- 2024Controllable Context Sensitivity and the Knob Behind Itcited by 22
- 2024Unlocking the Future: Exploring Look-Ahead Planning Mechanistic Interpretability in Large Language Modelscited by 21
- 2025Causal Interventions Reveal Shared Structure Across English Filler-Gap Constructionscited by 21
- 2025HyperSteer: Activation Steering at Scale with Hypernetworkscited by 20
- 2024Is Factuality Enhancement a Free Lunch For LLMs? Better Factuality Can Lead to Worse Context-Faithfulnesscited by 17
- 2025Enhancing Hallucination Detection through Noise Injectioncited by 13
- 2024Beyond the Doors of Perception: Vision Transformers Represent Relations Between Objectscited by 12
- 2024Characterizing the Role of Similarity in the Property Inferences of Language Modelscited by 9
- 2025Mechanistic evaluation of Transformers and state space modelscited by 8
- 2026Why Larger Models Learn More: Effects of Capacity, Interference, and Rare-Task Retentioncited by 8
- 2025The Geometry of Harmfulness in LLMs through Subconcept Probingcited by 7
- 2025Sparse Feature Coactivation Reveals Causal Semantic Modules in Large Language Modelscited by 6
- 2025Modular Arithmetic: Language Models Solve Math Digit by Digitcited by 6
- 2025Addressing divergent representations from causal interventions on neural networkscited by 6
- 2024Penzai + Treescope: A Toolkit for Interpreting, Visualizing, and Editing Models As Datacited by 5
- 2025On the Effectiveness and Generalization of Race Representations for Debiasing High-Stakes Decisionscited by 5
- 2025Combining Causal Models for More Accurate Abstractions of Neural Networkscited by 4
- 2025Structured Pruning for Diverse Best-of-N Reasoning Optimizationcited by 4
- 2025Learning Distribution-Wise Control in Representation Space for Language Modelscited by 4
- 2025nnterp: A Standardized Interface for Mechanistic Interpretability of Transformerscited by 2
- 2026Correctness-Optimized Residual Activation Lens (CORAL): Transferrable and Calibration-Aware Inference-Time Steeringcited by 2
- 2025eDIF: A European Deep Inference Fabric for Remote Interpretability of LLMcited by 1
- 2025Interpreto: An Explainability Library for Transformerscited by 1
- 2026AI Steerability 360: A Toolkit for Steering Large Language Modelscited by 1
- 2026Are Arithmetic Heuristic Neurons Form-Invariant? A Mechanistic Analysis of Symbols, Text, and Code in LLMscited by 1
- 2026ObserverBench: Testing Mechanistic Estimates for Intervention and Controlcited by 1
- 2024Comgra: A Tool for Analyzing and Debugging Neural Networkscited by 0
- 2025Fine-Grained Interpretation of Political Opinions in Large Language Modelscited by 0
- 2025TDHook: A Lightweight Framework for Interpretabilitycited by 0
- 2026The GRADIEND Python Package: An End-to-End System for Gradient-Based Feature Learningcited by 0
- 2026Causal Drawbridges: Characterizing Gradient Blocking of Syntactic Islands in Transformer LMscited by 0
- 2026Filling in the Mechanisms: How do LMs Learn Filler-Gap Dependencies under Developmental Constraints?cited by 0
- 2026Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanismscited by 0
- 2026Fine-Grained Analysis of Shared Syntactic Mechanisms in Language Modelscited by 0
- 2026Bucketing the Good Apples: A Method for Diagnosing and Improving Causal Abstractioncited by 0
- 2026Riemannian-Manifold Steering: Geometry-Aware Generative Autoencoders for Label-Free Steeringcited by 0
- 2026A Mechanistic Understanding of Pronoun Fidelity in LLMscited by 0
- 2026Unboxing Diffusion Models for the Arts: Interactive Model Bending and Practice-Based Explainabilitycited by 0
50 most cited of 53 All 53 (JSON)
- 2026ObserverBench: Testing Mechanistic Estimates for Intervention and Control2 Sep 2026
- 2026Separating Syntax from Language: A Mechanistic Account of Translation in Multilingual LLMs1 Sep 2026
- 2026(V)LMs generalize beyond surface co-occurrence: Evidence from cross-modal number agreement31 Aug 2026
- 2026MURANO: Design, Run, and Reproduce Mechanistic Interpretability Experiments as Composable Pipelines31 Aug 2026
- 2026Unboxing Diffusion Models for the Arts: Interactive Model Bending and Practice-Based Explainability24 Jul 2026
- 2026Are Arithmetic Heuristic Neurons Form-Invariant? A Mechanistic Analysis of Symbols, Text, and Code in LLMs18 Jul 2026
- 2026A Mechanistic Understanding of Pronoun Fidelity in LLMs15 Jun 2026
- 2026Why Larger Models Learn More: Effects of Capacity, Interference, and Rare-Task Retention28 May 2026
- 2026Riemannian-Manifold Steering: Geometry-Aware Generative Autoencoders for Label-Free Steering24 May 2026
- 2026Bucketing the Good Apples: A Method for Diagnosing and Improving Causal Abstraction4 May 2026
- 2026Fine-Grained Analysis of Shared Syntactic Mechanisms in Language Models24 Apr 2026
- 2026Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanisms17 Apr 2026
38 more
- 2026Filling in the Mechanisms: How do LMs Learn Filler-Gap Dependencies under Developmental Constraints?15 Apr 2026
- 2026Causal Drawbridges: Characterizing Gradient Blocking of Syntactic Islands in Transformer LMs15 Apr 2026
- 2026AI Steerability 360: A Toolkit for Steering Large Language Models8 Mar 2026
- 2026The GRADIEND Python Package: An End-to-End System for Gradient-Based Feature Learning27 Feb 2026
- 2026Correctness-Optimized Residual Activation Lens (CORAL): Transferrable and Calibration-Aware Inference-Time Steering5 Feb 2026
- 2025Interpreto: An Explainability Library for Transformers10 Dec 2025
- 2025nnterp: A Standardized Interface for Mechanistic Interpretability of Transformers18 Nov 2025
- 2025Addressing divergent representations from causal interventions on neural networks6 Nov 2025
- 2025TDHook: A Lightweight Framework for Interpretability29 Sep 2025
- 2025eDIF: A European Deep Inference Fabric for Remote Interpretability of LLM14 Aug 2025
- 2025Modular Arithmetic: Language Models Solve Math Digit by Digit4 Aug 2025
- 2025The Geometry of Harmfulness in LLMs through Subconcept Probing23 Jul 2025
- 2025The Non-Linear Representation Dilemma: Is Causal Abstraction Enough for Mechanistic Interpretability?11 Jul 2025
- 2025Sparse Feature Coactivation Reveals Causal Semantic Modules in Large Language Models22 Jun 2025
- 2025Learning Distribution-Wise Control in Representation Space for Language Models7 Jun 2025
- 2025Fine-Grained Interpretation of Political Opinions in Large Language Models5 Jun 2025
- 2025Structured Pruning for Diverse Best-of-N Reasoning Optimization4 Jun 2025
- 2025HyperSteer: Activation Steering at Scale with Hypernetworks3 Jun 2025
- 2025Causal Interventions Reveal Shared Structure Across English Filler-Gap Constructions21 May 2025
- 2025Mechanistic evaluation of Transformers and state space models21 May 2025
- 2025MIB: A Mechanistic Interpretability Benchmark17 Apr 2025
- 2025On the Effectiveness and Generalization of Race Representations for Debiasing High-Stakes Decisions7 Apr 2025
- 2025Combining Causal Models for More Accurate Abstractions of Neural Networks14 Mar 2025
- 2025A Survey on Mechanistic Interpretability for Multi-Modal Foundation Models22 Feb 2025
- 2025Back Attention: Understanding and Enhancing Multi-Hop Reasoning in Large Language Models15 Feb 2025
- 2025Enhancing Hallucination Detection through Noise Injection6 Feb 2025
- 2025AxBench: Steering LLMs? Even Simple Baselines Outperform Sparse Autoencoders28 Jan 2025
- 2024Controllable Context Sensitivity and the Knob Behind It11 Nov 2024
- 2024Characterizing the Role of Similarity in the Property Inferences of Language Models29 Oct 2024
- 2024Locking Down the Finetuned LLMs Safety14 Oct 2024
- 2024Personality Alignment of Large Language Models21 Aug 2024
- 2024The Quest for the Right Mediator: Surveying Mechanistic Interpretability Through the Lens of Causal Mediation Analysis2 Aug 2024
- 2024Penzai + Treescope: A Toolkit for Interpreting, Visualizing, and Editing Models As Data1 Aug 2024
- 2024Comgra: A Tool for Analyzing and Debugging Neural Networks31 Jul 2024
- 2024NNsight and NDIF: Democratizing Access to Open-Weight Foundation Model Internals18 Jul 2024
- 2024Monitoring Latent World States in Language Models with Propositional Probes27 Jun 2024
- 2024Unlocking the Future: Exploring Look-Ahead Planning Mechanistic Interpretability in Large Language Models23 Jun 2024
- 2024Beyond the Doors of Perception: Vision Transformers Represent Relations Between Objects22 Jun 2024
50 newest of 53 All 53 (JSON)
- 2024Personality Alignment of Large Language Modelscited by 36
- 2024Personality Alignment of Large Language Models21 Aug 2024
- 2025AxBench: Steering LLMs? Even Simple Baselines Outperform Sparse Autoencoderscited by 199
- 2024ReFT: Representation Finetuning for Language Modelscited by 186
- 2024What is Your Data Worth to GPT? LLM-Scale Data Valuation with Influence Functionscited by 88
- 2025MIB: A Mechanistic Interpretability Benchmarkcited by 49
- 2024NNsight and NDIF: Democratizing Access to Open-Weight Foundation Model Internalscited by 43
- 2025The Non-Linear Representation Dilemma: Is Causal Abstraction Enough for Mechanistic Interpretability?cited by 34
- 2024The Quest for the Right Mediator: Surveying Mechanistic Interpretability Through the Lens of Causal Mediation Analysiscited by 24
- 2024Locking Down the Finetuned LLMs Safetycited by 22
- 2024Controllable Context Sensitivity and the Knob Behind Itcited by 22
- 2024Unlocking the Future: Exploring Look-Ahead Planning Mechanistic Interpretability in Large Language Modelscited by 21
- 2025Causal Interventions Reveal Shared Structure Across English Filler-Gap Constructionscited by 21
- 2025HyperSteer: Activation Steering at Scale with Hypernetworkscited by 20
12 most cited of 45 All 45 (JSON)
- 2026ObserverBench: Testing Mechanistic Estimates for Intervention and Control2 Sep 2026
- 2026Separating Syntax from Language: A Mechanistic Account of Translation in Multilingual LLMs1 Sep 2026
- 2026(V)LMs generalize beyond surface co-occurrence: Evidence from cross-modal number agreement31 Aug 2026
- 2026MURANO: Design, Run, and Reproduce Mechanistic Interpretability Experiments as Composable Pipelines31 Aug 2026
- 2026Are Arithmetic Heuristic Neurons Form-Invariant? A Mechanistic Analysis of Symbols, Text, and Code in LLMs18 Jul 2026
- 2026A Mechanistic Understanding of Pronoun Fidelity in LLMs15 Jun 2026
- 2026Why Larger Models Learn More: Effects of Capacity, Interference, and Rare-Task Retention28 May 2026
- 2026Riemannian-Manifold Steering: Geometry-Aware Generative Autoencoders for Label-Free Steering24 May 2026
- 2026Bucketing the Good Apples: A Method for Diagnosing and Improving Causal Abstraction4 May 2026
- 2026Fine-Grained Analysis of Shared Syntactic Mechanisms in Language Models24 Apr 2026
- 2026Filling in the Mechanisms: How do LMs Learn Filler-Gap Dependencies under Developmental Constraints?15 Apr 2026
- 2026Causal Drawbridges: Characterizing Gradient Blocking of Syntactic Islands in Transformer LMs15 Apr 2026
12 newest of 45 All 45 (JSON)