Assessing Generalization for Subpopulation Representative Modeling via In-Context Learning (2024)

Abstract: This study evaluates the ability of Large Language Model (LLM)-based Subpopulation Representative Models (SRMs) to generalize from empirical data, utilizing in-context learning with data from the 2016 and 2020 American National Election Studies. We explore generalization across response variables and demographic subgroups. While conditioning with empirical data improves performance on the whole, the benefit of in-context learning varies considerably across demographics, sometimes hurting performance for one demographic while helping performance for others. The inequitable benefits of in-context learning for SRM present a challenge for practitioners implementing SRMs, and for decision-makers who might come to rely on them. Our work highlights a need for fine-grained benchmarks captured from diverse subpopulations that test not only fidelity but generalization.

## introduction natural language processing research has plunged headlong into the new alchemical science of prompt engineering @xcite . ask openai's chat-gpt to "think step-by-step" and behold its improved reasoning performance @xcite . tell it to behave as an expert and witness its expertise increasing @xcite . the responsiveness of foundation models to prompt engineering has led researchers from diverse disciplines to explore their applications. this is certainly true in political science, where several recent studies investigate whether the malleability of llms would allow them to simulate the attitudes and behaviors of human subpopulations @xcite @xcite @xcite . polling plays an important role in opinion aggregation, acting as a cornerstone of governance @xcite . the use of llms as subgroup simulators has hypothesized benefits including decreased cost and increased sample sizes @xcite . as response rates to traditional survey methods decline, social scientists are encouraged to explore new methods @xcite . more than a dozen examples of the subpopulation representative modeling approach are found in academic research @xcite , and the approach has already garnered attention at local (tal) and national levels (ion). ## methods this section documents methods shared across both studies. specific methods for each study are documented in section 3 and section 4. ## generalization of in-context learning across response variables this study investigates the generalization of incontext learning across response variables (research question 1). we are interested in finding out to what extent increasing the number of conditioning variables improves fidelity to unobserved response variables. ## discussion: subpopulation representative modeling via in-context learning recent criticisms have argued that large language models do not sufficiently represent the opinions or behaviors of human subpopulations when these subpopulations are specified in the context @xcite . however, extant work neglects the capability for models to learn via incontext learning. our experiments demonstrate that llms can learn the subpopulation representative modeling task in-context. the experiments in section 3 show that providing the model with partial information about subpopulation behavior improves model fidelity on unobserved response variables. section 4 shows that providing the model with information about other subpopulations can improve model fidelity to an unrelated subpopulation of interest. in this experiment, we selected few-shot examples uniformly at random. this is only one of several few-shot example selection strategies available to the practitioner (see section 4, methods). we believe it is likely that the example selection strategy has some influence over the performance disparities between majority and minority groups. appendix figure 13 shows that the anes data is imbalanced with repsect to the demographic variables -for example, approximately three fourths of respondents were non-hispanic white, as opposed to hispanic or non-hispanic black. the minority categories account for approximately 1/8th of the observations each. for a given target example, the likelihood to select a few-shot example with the same race is proportional to the distribution of the data over the race variable. in general, it is more likely that a randomly-selected few-shot example will share demographic values with the target example when the target example belongs to the majority demographic. assuming that the similarity between few-shot examples correlates to their utility for the predictive task, this dataset bias could result in few-shot prompting being more effective for majority groups. this applies both in absolute terms, and in terms of the marginal benefit of additional few-shot examples. we encourage further investigation of the relationship between demographic representation in the few-shot data, performance discrepancies across demographics, and few-shot example selection strategies, and plan to explore this theme in future work. these aggregate results seem promising for the potential of llms to perform the subpopulation modeling task. however, upon closer analysis, we find that the effectiveness of in-context learning is variable across demographics. while additional conditioning data boosts performance for some demographics, it has negligible or even deleterious effects for others. this result extends prior work showing variation across demographics in the exaggeration of stereotypical response patterns @xcite and the fidelity of llms to human responses without conditioning @xcite . the subgroup-specific effectiveness of in-context learning for srm presents challenges for srm practitioners, as well as decision-makers using the results of srms. we suggest three directions for future work. the inequitable performance of llms on subpopulation simulation calls the ethicality of the endeavor into question. in tasks like recidivism prediction, theoretical results indicate mutual unsatisfiability of model bias criteria @xcite . these impossibility results influence why the field views machine learning models as appropriate for certain use cases and possibly unfit for others. we encourage similar investigation into the ethical nature of the subpopulation representative modeling task. this should take into consideration the dual-use nature of subpopulation representative models -that they could be leveraged for positive use cases (improving existing political representation processes) as well as negative (used to steer misinformation campaigns). secondly, our results highlight the need for fine-grained benchmarking for subpopulation representative models, in terms of generalization performance in few-shot settings as studied here, as well as absolute performance in zero-shot settings. finally, we note that several approaches have been proposed to ameliorate issues with existing subpopulation representation techniques @xcite . we see potential for further research in this area of improving subpopulation representative model performance.