What’s GPI?
gpi_pack is a Python package for Generative-AI Powered Inference. This section provides an overview of the package, its purpose, and the workflow.
Generative-AI Powered Inference
Generative-AI Powered Inference (GPI) is a statistical inference framework that leverages the internal representations of deep generative models. Traditionally, statistical inference for unstructured objects — such as texts or images — requires modeling these objects directly, a process that can be challenging due to their high dimensionality. GPI overcomes this difficulty by utilizing the internal representations generated by deep generative models. Since these representations actually generate the texts or images, they give you the low-dimensional representation of the unstructured objects without estimation errors.
The GPI procedure consists of two main steps:
Internal Representation Generation: Produce the internal representations of unstructured objects using deep generative models.
Statistical Inference: Perform statistical inference using these representations.
In some cases, an additional step — Representation Learning — is necessary. Unstructured objects often contain a multitude of complex features, and it may be essential to extract the specific variable of interest from the internal representation. For example, in a Text-as-Treatment scenario where survey participants are randomly assigned various texts to infer the causal effect of a particular feature, other features within the texts may act as confounders. Controlling for the entire internal representation directly could lead to an overlap violation. Therefore, it is crucial to learn a representation of the confounding features, thereby preserving the positivity assumption.
This package implements the entire GPI procedure, including generating internal representations, conducting statistical inference, and performing representation learning. It is designed to be user-friendly and accessible to researchers and practitioners across various disciplines.
Contribute to GPI
We welcome your feedback, comments, suggestions, code contributions, and bug reports. You can contribute to GPI by:
Submitting bug reports and feature requests on Github Issues
Emailing the maintainer at knakamura [at] g.harvard.edu.