arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.07809cs.LGcs.CL
收藏

pyvene:一个通过干预理解和改进PyTorch模型的库

pyvene: A Library for Understanding and Improving PyTorch Models via Interventions

Stanford University(斯坦福大学);Pr(Ai)R Group(Pr(Ai)R集团)

Zhengxuan Wu, Atticus Geiger, Aryaman Arora, Jing Huang, Zheng Wang, Noah D. Goodman, Christopher D. Manning, Christopher Potts

AI总结:

本研究推出开源Python库pyvene,支持对多种PyTorch模块进行可定制的静态或含可训练参数的干预,提供统一可扩展框架用于神经模型干预与模型共享,可应用于模型编辑、可解释性等AI领域。

摘要:

对模型内部状态的干预是AI诸多领域的基础操作,包括模型编辑、引导、鲁棒性和可解释性研究。为推动此类研究,我们推出开源Python库$\textbf{pyvene}$,它支持对多种PyTorch模块进行可定制的干预。$\textbf{pyvene}$以直观的配置格式支持复杂干预方案,其干预可以是静态的,也可包含可训练参数。我们展示了$\textbf{pyvene}$如何为神经模型干预及共享干预后模型提供统一且可扩展的框架。我们通过因果抽象和知识定位的可解释性分析,例证了该库的强大功能。我们通过Python Package Index(PyPI)发布该库,并在https://github.com/stanfordnlp/pyvene提供代码、文档和教程。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑