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.1 on July 11th. We currently support (1) Text/Image-as-Confounder and (2) Text/Image-as-Treatment. Please read our recent paper for the application examples. 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}
}
Imai, Kosuke and Nakamura, Kentaro (2025). GenAI-Powered Inference. arXiv preprint arXiv:2507.03897. [Paper]
@article{imai2025genai,
title={GenAI-Powered Inference},
author={Imai, Kosuke and Nakamura, Kentaro},
journal={arXiv preprint arXiv:2507.03897},
year={2025}
}