A growing number of scholars seek to estimate causal effects of unstructured data such as text, images, and video. However, existing methods typically treat each object as a single, static observation. We develop a statistical framework for dynamic causal inference with unstructured data by leveraging generative artificial intelligence (GenAI) models. Our approach enables researchers to estimate the causal effects of sequences of treatment features, including their positions within text and video. We first extract internal representations of unstructured objects from a GenAI model and then estimate a marginal structural model using a neural network architecture that jointly learns a deconfounder for each treatment feature in the sequence. Our semiparametric inference framework yields valid asymptotic confidence intervals. Simulation studies demonstrate that the proposed estimator recovers the target causal effects and that the confidence intervals achieve nominal coverage in finite samples. We further apply our method to a randomized experiment on the Hong Kong protests, showing that the effect of a treatment feature depends critically on its position within the text.
翻译:越来越多学者试图估计文本、图像和视频等非结构化数据的因果效应,但现有方法通常将每个对象视为单一静态观测。我们通过利用生成式人工智能(GenAI)模型,构建了适用于非结构化数据的动态因果推断统计框架。该方法使研究者能够估计包含治疗特征序列(包括其在文本和视频中的位置)的因果效应。我们首先从GenAI模型中提取非结构化对象的内部表征,继而通过联合学习序列中每个治疗特征的去混杂因子的神经网络架构来估计边际结构模型。该半参数推断框架可生成具有渐近有效性的置信区间。模拟研究表明,所提估计量能准确恢复目标因果效应,置信区间在有限样本中达到名义覆盖率。我们进一步将该方法应用于香港抗议活动的随机实验,结果显示治疗特征的效果关键取决于其在文本中的位置。