条件假设生成:基于大语言模型的文本分析中研究者指定协变量
阅读原文· arxiv.org计算社会科学的核心目标是发现语言在不同结果中的可解释差异。现有基于LLM的假设生成方法仅选取全局判别模式,忽略研究者领域知识中的协变量,导致所选模式可能反映混淆而非实质差异。本文提出条件假设生成框架,通过纳入研究者指定的协变量,引导假设发现聚焦于相关子群内成立的差异。针对子群代表性不足(层不平衡)和差异方向可能逆转(符号反转)两个挑战,提出两种方法:引入特征-协变量交互检测符号反转,以及应用层内去均值和逆频率重加权平衡欠代表层。实验表明,协变量感知的生成方法能在相关子群内产出更有用的假设。
A core goal of computational social science is to discover interpretable differences in how language varies across outcomes of interest, such as political affiliation or instructional quality. Recent LLM-based hypothesis generation methods describe such differences in natural language, but select for globally discriminative patterns without accounting for covariates that shape the data based on researchers' domain knowledge. When covariates are ignored, selected patterns can reflect confounds rather than differences of substantive interest. We introduce conditional hypothesis generation, a framework that incorporates researcher-specified covariates to steer hypothesis discovery toward differences that hold within relevant subgroups. Two challenges arise: the target subgroup may be underrepresented (stratum imbalance), and the direction of a difference may reverse across subgroups (sign reversal). We propose two econometrics-inspired methods: one introduces feature--covariate interactions to detect sign reversals, and the other applies within-stratum demeaning and inverse-frequency reweighting to equalize underrepresented strata. Synthetic experiments show each method outperforms global baselines in its targeted setting, and expert evaluation on two real-world datasets confirms that covariate-aware generation surfaces more useful hypotheses within relevant subgroups.