Search and Filter

Conditional Hypothesis Generation for LLM-Based Text Analysis with Researcher-Specified Covariates

 

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 — identified through researchers' domain knowledge — that shape the data. 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.

Education level
Topics
Document Object Identifier (DOI)
10.26300/knbg-hb51
EdWorkingPaper suggested citation:
Xu, Paiheng, Jing Liu, and Wei Ai. (). Conditional Hypothesis Generation for LLM-Based Text Analysis with Researcher-Specified Covariates. (EdWorkingPaper: -1521). Retrieved from Annenberg Institute at Brown University: https://doi.org/10.26300/knbg-hb51

Machine-readable bibliographic record: RIS, BibTeX