pyvene: A Library for Understanding and Improving PyTorch Models via Interventions
Fuente:
arXiv
Enregistré dans:
| Auteurs principaux: | , , , , , , , |
|---|---|
| Format: | Preprint |
| Publié: |
2024
|
| Sujets: | |
| Accès en ligne: | |
| Tags: |
Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
|
| _version_ | 1866929273653166080 |
|---|---|
| author | Wu, Zhengxuan Geiger, Atticus Arora, Aryaman Huang, Jing Wang, Zheng Goodman, Noah D. Manning, Christopher D. Potts, Christopher |
| author_facet | Wu, Zhengxuan Geiger, Atticus Arora, Aryaman Huang, Jing Wang, Zheng Goodman, Noah D. Manning, Christopher D. Potts, Christopher |
| contents | 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 $\textbf{pyvene}$, an open-source Python library that supports customizable interventions on a range of different PyTorch modules. $\textbf{pyvene}$ supports complex intervention schemes with an intuitive configuration format, and its interventions can be static or include trainable parameters. We show how $\textbf{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. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2403_07809 |
| institution | arXiv |
| publishDate | 2024 |
| record_format | arxiv |
| spellingShingle | pyvene: A Library for Understanding and Improving PyTorch Models via Interventions Wu, Zhengxuan Geiger, Atticus Arora, Aryaman Huang, Jing Wang, Zheng Goodman, Noah D. Manning, Christopher D. Potts, Christopher Machine Learning Computation and Language 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 $\textbf{pyvene}$, an open-source Python library that supports customizable interventions on a range of different PyTorch modules. $\textbf{pyvene}$ supports complex intervention schemes with an intuitive configuration format, and its interventions can be static or include trainable parameters. We show how $\textbf{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. |
| title | pyvene: A Library for Understanding and Improving PyTorch Models via Interventions |
| topic | Machine Learning Computation and Language |
| url | https://arxiv.org/abs/2403.07809 |