Do LLM Coding Pipelines Erase Rare Themes? A Prevalence-Controlled Audit and a Merge Check

Researchers increasingly hand qualitative analysis to large language models. In this kind of analysis, a person reads interviews or posts, labels short passages with "codes," and groups those codes into themes. Pipelines that do this at scale report agreement with human coders that approaches human-to-human agreement. A separate literature shows that instruction-tuned models pull open-ended output toward a bland, high-probability default and drop rare perspectives. Put those two findings together and a worry follows: when an LLM merges thousands of fine-grained codes into a handful of themes, it may fold the uncommon, culturally specific, or non-normative ones into generic categories. Overall agreement scores would barely register the loss, because rare themes contribute little to aggregate precision and recall. Yet in qualitative research the rare voice is often the finding.

This note proposes two things. The first is an audit that measures theme survival as a function of how often the theme occurs. We do this by thinning real, human-coded themes in existing benchmark corpora down to controlled prevalences of 0.5% to 10% and asking which pipelines still find them. The second is a targeted fix. We hypothesize that most erasure happens at the step where the model merges codes into broader themes. The fix is a merge check: before any child code is absorbed into a parent theme, it must be shown that the child's supporting verbatim passages are actually entailed by the parent theme's description. Children that fail are kept as residual themes instead of being dissolved. The core claim is testable. Current inductive pipelines lose rare themes much faster than common ones as prevalence drops, the loss is concentrated at the merge step, and a cheap entailment check at that step recovers rare-theme recall without inflating the number of themes or hurting precision.

Where this sits

The homogenization evidence motivates the question. Does Writing with Language Models Reduce Content Diversity? found that InstructGPT suggestions, but not base GPT-3, collapsed the set of unique arguments in essays. Notably, that study used an LLM key-point extractor and clustering as its unvalidated measuring instrument, which is exactly the kind of tool we propose to audit. Epistemic Diversity and Knowledge Collapse in Large Language Models showed that larger models produce fewer distinct claims and that grounding in external sources raises diversity sharply. We borrow its claim decomposition and its Hill-Shannon diversity measure, an ecological index of how many distinct, evenly represented types are present. The Homogenization Problem in LLMs documented a "normative pull" in which even explicitly marked non-default content gets bent back toward a default archetype. If that pull operates during theme naming and merging, it predicts exactly the erasure we want to measure. The Price of Format showed that structured chat templates cut decoding diversity and blunt the effect of temperature. That finding constrains the design: raising temperature is unlikely to be the remedy in pipelines built on rigid JSON prompts.

The qualitative-scaling work supplies both the systems under audit and the benchmarks. HICode generates grounded labels for text spans and then has an LLM iteratively cluster them into a hierarchy. It reports theme-level precision 0.72 and recall 0.74 on Astro Queries, but it does not break recall down by theme frequency. RACER extracts verbatim evidence and re-clusters five times with majority voting. It reaches 72% concordance against 77% human agreement, and its evaluators noted shared failures on ambivalent statements. Majority voting is itself a mechanism that could suppress minority clusters, and nobody has tested whether it does. Qualitative Code Suggestion found that neural models could not significantly beat BM25 at detecting genuinely new codes. We read that as a warning that "rare" and "new" are the hard regime for current models.

The seed papers frame why this matters beyond static corpora. SAGE gathers simulated perspectives from a reference population and then synthesizes them for a user. SparkMe collects richer emergent themes through adaptive interviews. Both ultimately feed a many-perspectives-to-few-themes summarization step, and neither measures whether that step re-homogenizes what was collected. Our audit and merge check address that shared step directly. We apply them to analysis of real human text rather than to simulated respondents, which keeps us clear of the separate question of whether simulations are faithful.

Core claim

Theme erasure in LLM inductive coding depends on prevalence and is localized. At low prevalence, recall for a fixed theme falls well below the pipeline's average recall. Most of the drop occurs at the merge stage rather than at span labeling. An entailment-gated merge restores much of the lost recall at matched theme count and matched precision. If the audit instead shows flat recall across prevalence, that is itself a useful result: it would mean the homogenization literature does not transfer to grounded coding pipelines.

Research program

Prevalence-controlled corpora. We avoid synthetic or simulated "rare voices," which would carry their own homogenization. Instead we use themes that human coders already annotated in the HICode benchmark suite (Media Frames, Astro Queries, ML Values) and in CVDQuoding. For each target theme we subsample its gold-labeled segments so that the theme makes up a prevalence $p \in \{0.5, 1, 2, 5, 10\}\%$ of the corpus, holding everything else fixed. We repeat this across many target themes and random seeds. The result is a recall-versus-prevalence curve per pipeline and a summary statistic, $p_{50}$, defined as the prevalence at which recall of the target theme reaches 50%. CVDQuoding's two coders, one granular and one abstract, let us check whether erasure depends on the granularity of the gold codebook.

Stage attribution. Every pipeline we test has a span-labeling stage and an aggregation stage. We score target-theme recall after each stage separately: whether any first-stage label matches the theme, and whether any final theme matches it. Matching uses an LLM judge validated against expert spot checks. The ratio of these two scores tells us where the theme was lost.

The merge check. Whenever the clustering model proposes absorbing child code $c$ into parent theme $T$, we take the verbatim passages supporting $c$ and test whether an entailment model judges them to be entailed by $T$'s written definition. If fewer than a threshold fraction pass, the merge is refused and $c$ is either kept as a residual theme or offered to the next-best parent. The check needs only one entailment call per passage per proposed merge, so its cost grows with the number of codes, not with the corpus. To keep the comparison honest, the final number of themes is fixed to match the unchecked pipeline. Residual themes must therefore displace something, which prevents the method from buying recall by simply producing more themes.

Extension to perspective synthesis. As a secondary test, we apply the same check to the synthesis step that SAGE- and SparkMe-style systems use. We feed it real transcripts (the RACER healthcare-worker interviews) and measure whether minority responses to each question survive into the summary.

Baselines

The naive reference point is classical topic modeling (LDA) run on the same subsampled corpora. It has no instruction-tuned prior to pull it toward defaults, so it tests whether LLM pipelines erase rare themes more than a purely statistical method does. We also use the gold codebook itself as the ceiling: recall 1 at every prevalence by construction. Human-to-human agreement figures from RACER (77%) and LLM-in-the-loop give the realistic upper band.

The strongest existing method is HICode, which reports theme-level precision 0.72 and recall 0.74 on Astro Queries in expert evaluation HICode. We run it with its released prompts, the same base LLM as our method, the same token budget, and the same final theme count. Beating it means a higher rare-theme recall curve, operationalized as a lower $p_{50}$ by a margin outside seed-to-seed variance, with theme precision within two points of HICode's on the unthinned corpora. We also run RACER's five-pass majority-vote re-clustering because it directly tests whether voting suppresses minorities. On its own corpus RACER reports 72% concordance and 88.2% run-to-run stability RACER.

A non-generative clustering baseline embeds first-stage labels and clusters them with a density method that allows small clusters, matched to the same theme count. For flagging rare content specifically, we also run BM25 novelty scoring, following its competitiveness in Qualitative Code Suggestion. That paper gives no numeric value for novelty detection, and no reported result was found on Lacuna for BM25 on our prevalence-controlled task.

Three ablations isolate the key ingredient. The first removes the merge check while keeping everything else, so its effect can be measured directly. The second swaps the instruction-tuned clustering model for a base model where feasible, testing the alignment-tax explanation. The third replaces the structured chat-template merge prompt with a bare instruction, testing the format explanation.

Why not just…?

Why not just raise the temperature? The Price of Format reports that temperature's effect is significantly muted under structured templates, and coding pipelines run on such templates. Higher temperature also randomizes which rare themes appear, so they are not reliably recovered. We include temperature sweeps of HICode as a baseline. If they match the merge check's recall curve at equal precision and stability, the check is unnecessary and we will say so.

Why not just prompt the model to preserve rare themes? This is a real threat, because it is free. However, the normative-pull evidence in The Homogenization Problem in LLMs, where explicit markers were overridden, suggests instructions alone may not hold. Our design also caps theme count, so "preserve rare themes" must trade against common ones. We run a prompt-only variant as a baseline. The merge check earns its place only if it beats this variant at matched theme count.

Why not just use embedding clustering or topic models and skip the LLM in aggregation? These avoid the instruction-tuned prior but lose the abstraction that made HICode outperform topic-modeling baselines. They may preserve rare clusters while producing incoherent themes. Both are baselines here, scored on rare-theme recall and on expert-rated theme coherence. If embedding clustering matches the merge check on both, the right conclusion is that LLMs should label spans but not merge them, and we would report that outcome.

Why not just produce more themes? Recall rises trivially as the number of themes grows. This is why every comparison fixes final theme count. We also report full recall-versus-theme-count curves so that any gain cannot be an artifact of granularity.

Decisive checks

Three results would settle the proposal. First, if HICode's target-theme recall at 1% prevalence is not meaningfully below its recall at 10% prevalence across themes and seeds, the erasure hypothesis fails for grounded pipelines. Second, if stage attribution shows that rare themes are lost mostly at span labeling rather than merging, the merge check is the wrong intervention, and the proposal pivots toward labeling-stage remedies such as the base-model or bare-prompt ablations. Third, if the merge check lowers $p_{50}$ at fixed theme count, keeps precision within two points, and beats both the prompt-only and embedding-clustering baselines, then rare-theme erasure is real, localized, and cheaply fixable. In that case, frequency-stratified recall should be reported alongside headline agreement for any LLM qualitative pipeline, including the synthesis steps in SAGE- and SparkMe-style systems.

Workshop authors to connect with