GPI: Generative-AI Powered Inference

gpi_pack is a Python library for the statistical inference powered by Generative Artificial Intelligence (AI). It provides a set of tools and utilities for performing statistical inference using the internal representation of the Generative AI models. The library is designed to be easy to use and flexible, allowing users to perform a wide range of statistical analyses.
Note
We released gpi_pack version 0.1.0 on February 27th, 2025. This is the first version of the package, and we currently only support the setting of Text-as-Treatment based on our paper. We have been working hard to make this package as useful and user-friendly as possible. If you have any feedback or suggestions, please feel free to reach out to the maintainer.
Getting Started
Data Generation
Basic Operation
Advanced Operations
References
How to cite
Imai, Kosuke and Nakamura, Kentaro (2024). Causal Representation Learning with Generative Artificial Intelligence: Application to Texts as Treatments. arXiv preprint arXiv:2410.00903. [Paper]
@article{imai2024causal,
title={Causal Representation Learning with Generative Artificial Intelligence: Application to Texts as Treatments},
author={Imai, Kosuke and Nakamura, Kentaro},
journal={arXiv preprint arXiv:2410.00903},
year={2024}
}