Hostname: page-component-74656f9884-8rzl6 Total loading time: 0 Render date: 2026-11-05T20:34:56.479Z Has data issue: false hasContentIssue false

The Synthetic Imputation Approach: Using LLMs to Generate Synthetic Texts for Underrepresented Categories in Supervised Classification Tasks

Published online by Cambridge University Press:  14 October 2026

Joan C. Timoneda*
Affiliation:
Political Science, Purdue University, USA
Rights & Permissions [Opens in a new window]

Abstract

Annotated text data are central to many empirical applications in political science, yet many annotation tasks involve categories that are sparsely populated. These low-N categories pose problems for both encoder-only and decoder-only (generative) Transformer large language models (LLMs), leading to low performance, biased evaluation and measurement error in downstream analyses. This article introduces the synthetic imputation approach, a targeted method for expanding sparse categories while remaining consistent with the category-defining content of the human-coded examples. The approach uses a generative LLM to produce additional texts for underrepresented categories by conditioning on small, rotating subsets of human-coded examples. Rather than paraphrasing or replacing the original data, synthetic imputation adds informative variation only where data are thin. I evaluate the approach using both encoder-only and decoder-only LLM classifiers across multiple political science applications. The results show that synthetic imputation substantially improves performance and evaluation stability in sparse settings, recovering full-sample performance once a modest number of true observations is available, with limited and predictable overfitting at very low levels of N.

Information

Type
Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press on behalf of The Society for Political Methodology
Figure 0

Figure 1 Flowchart for an example of synthetic text generation using the synthetic imputation approach (notes: each example is included in the prompt in place of the “{ex_}”; mean_length represents the average length of the five examples, which helps guide the LLM to produce synthetic texts of appropriate length).Figure 1 Long description.

Figure 1

Table 1 Dataset characteristics across the two applicationsTable 1 Long description.

Figure 2

Figure 2 Pipeline for the synthetic imputation approach (top track) and the class-weighted baseline (bottom track). Both pipelines share an identical starting point (a labeled dataset and a sampled subset of N real positives) and identical evaluation methods (RoBERTa-large fine-tuning and GPT-4o few-shot annotation). They differ only in the construction of the training/evaluation sample: synthetic imputation augments the N real positives with 151−N$151 - N$ LLM-generated synthetic positives, while the baseline uses only the N real positives. Numbers shown reflect the nostalgia application; the same procedure applies to the international-speeches application with corresponding sample sizes.Figure 2 Long description.

Figure 3

Figure 3 Model performance across sparse subsets with synthetic imputation, baseline and SSMBA augmentations. Shaded bands show 95% confidence intervals. F1$F1$-score averages based on 10×$\times $10 CV runs.Figure 3 Long description.

Figure 4

Figure 4 Model performance across sparse subsets with synthetic imputation and baseline results. Shaded bands show 95% confidence intervals from nonparametric bootstrap resampling of GPT-4o predictions against the full set of annotated labels.Figure 4 Long description.

Supplementary material: File

Timoneda supplementary material

Timoneda supplementary material
Download Timoneda supplementary material(File)
File 324.6 KB
Supplementary material: Link

Timoneda Dataset

Link