Recombination-Aware Haplotype Topics for Locus-Level Association

Genetic association studies usually test one DNA letter at a time. Biology is inherited in chunks: stretches of chromosome called haplotypes, passed down intact until recombination cuts them. Some disease signals only appear when you look at the whole chunk. Examples include a rare three-variant combination in a cataract gene and variants in a cancer-gene promoter that matter only when they sit together on the same strand. The standard fix is to treat every distinct haplotype in a window as its own category. That fails in two ways. The number of categories explodes (up to $2^M$ for $M$ markers), and someone has to choose the window size in advance.

We propose to borrow the central move of topic modeling, describing each document as a mixture of a few shared themes, and adapt it to chromosomes. Each phased haplotype becomes a "document" whose "words" are ordered alleles. A small set of latent haplotype topics, which are recurring ancestral segment types, generates them. Unlike text topics, the topic in force can switch only at plausible recombination points along the chromosome. The association test then regresses the trait on a person's local topic dosages, which costs $K-1$ degrees of freedom for $K$ topics (for example 8 to 16) instead of one per haplotype. No window is chosen and no rare haplotype is thrown away. Each person's dosage at a position is the expected number of their two chromosome copies carrying that topic there.

Core Claim

A topic model over phased haplotypes, where each haplotype has its own mixture over shared topics and topic switches happen with probability set by genetic map distance, gives a locus-level association test with three properties. It has more power than sliding-window and hard-clustering haplotype tests when causal signal sits on rare or multi-variant backgrounds. It is calibrated under the null. It scales to biobanks through an amortized encoder. We do not claim it beats single-marker testing in general; we expect gains specifically in the multi-variant and rare-haplotype architectures, and the experiments are designed to show where the gains stop.

Concretely, for haplotype $h$ at ordered marker $m$, let $z_{hm}\in\{1,\dots,K\}$ be the latent topic and $x_{hm}\in\{0,1\}$ the observed allele. Let $\theta_h$ be the haplotype's topic proportions, $F_{km}$ the frequency of allele 1 under topic $k$ at marker $m$, $d_m$ the genetic distance in centimorgans between markers $m-1$ and $m$, and $\rho$ a learned scaling. The generative model is

$$ z_{hm} = \begin{cases} z_{h,m-1} & \text{with prob. } e^{-\rho d_m} \\ \sim \mathrm{Cat}(\theta_h) & \text{otherwise}\end{cases}, \qquad x_{hm}\sim \mathrm{Bernoulli}(F_{z_{hm} m}). $$

Setting $\rho\to\infty$ recovers an exchangeable, LDA-style allele model like the one underlying ADMIXTURE. Setting $\theta_h$ to be shared across all haplotypes recovers a plain haplotype-cluster hidden Markov model. For individual $i$ with haplotypes $h_1,h_2$, the dosage of topic $k$ at marker $m$ is $D_{ikm}=\sum_{j=1,2}P(z_{h_j m}=k\mid x)$. We test association with

$$ y_i = \sum_{k=1}^{K-1}\beta_{km} D_{ikm} + \gamma^\top c_i + \varepsilon_i, $$

where $c_i$ are covariates (global ancestry, age, sex) and $H_0:\beta_{\cdot m}=0$ is a $(K-1)$-degree-of-freedom test. Topics are learned without access to the phenotype, so fitting and testing do not double-dip.

Relation to Prior Work

Three lines of prior work motivate this design.

The first is the clustering approach to haplotype association. HapMiner clusters haplotype segments with DBSCAN, using a Hamming plus longest-common-substring distance, and scores each cluster with a t-statistic. F_HapMiner does the same for founder haplotypes in pedigrees and reports 9% to 130% power gains over single-locus transmission tests in a rare-haplotype model. Both show that pooling similar haplotypes beats testing them one by one. Both also make hard assignments, use fixed windows, and (in HapMiner) label low-density haplotypes as noise. That last choice is dangerous when, as in the rare-haplotype model, the rare haplotypes carry the effect. We keep the pooling idea, but replace hard clusters with soft local membership and replace windows with recombination-driven switching.

The second line is ancestry models. STRUCTURE and ADMIXTURE are the same model as Latent Dirichlet Allocation, with genomes as documents and ancestries as topics, but they assume markers are independent. Neural ADMIXTURE makes that model fast through amortized inference. Amortized inference means training an encoder network to output the latent proportions directly instead of optimizing them separately per person. Neural ADMIXTURE keeps interpretability through a linear decoder bounded in $[0,1]$. Its inputs, however, are unphased SNPs and it never touches phenotypes. We reuse its encoder-plus-interpretable-decoder recipe, but on phased, ordered input, and we output local rather than global proportions.

The third line is haplotype-aware structure. ChromoPainter/fineSTRUCTURE paints each chromosome as copied chunks from all other individuals, which costs on the order of $N^2$. Its authors note that fineSTRUCTURE clusters people discretely rather than as mixtures, and the method is not built for trait association. Haplotype Components use PBWT haplotype matching and reference-panel local ancestry to build better global stratification covariates. PBWT is the positional Burrows–Wheeler transform, a fast index for finding shared haplotype segments. The covariates beat principal components on birthplace recall and uncover six new educational-attainment SNPs. Both works show that haplotype sharing carries information SNP-level summaries miss. Neither learns a small reference-free set of local topics and tests them directly against a trait.

Two further works use topic models on the phenotype side. PheCode-guided topic modeling and the sub-phenotyping mixture model decompose health records into topics, but leave the genotype side as single-SNP regression. Our proposal is the mirror image, and the two could later be combined.

An honest caveat about novelty: cluster-based haplotype hidden Markov models are used for phasing and imputation in literature outside the material reviewed here. The per-haplotype mixture $\theta_h$, the amortized biobank encoder, and the calibrated association use of local topic dosages are what we claim as new. The novelty check must include that phasing and imputation literature.

Research Program

We will build the model in two inference forms. The first is an exact forward-backward variational EM for regional studies of up to about $10^4$ haplotypes and a few hundred markers; forward-backward is the standard dynamic-programming pass for hidden Markov models. The second is an amortized form for biobanks. In it, a bidirectional sequence encoder reads a phased haplotype together with its genetic-map distances and outputs $\theta_h$ plus per-position switch evidence. The decoder stays the interpretable $F$ matrix with the Markov switching prior, so the learned topics remain readable as allele-frequency profiles.

Model selection over $K$ uses held-out haplotype likelihood, following the Neural ADMIXTURE practice of fitting several values of $K$ at once with multiple output heads. The association test uses analytic $(K-1)$-df F/Wald statistics. We will check calibration with permuted and simulated-null phenotypes, and region-level significance uses permutation over phenotypes with topics held fixed.

Two analyses accompany the method. The first concerns phasing errors. A switch error that swaps maternal and paternal phase changes each haplotype's topic path, but the diploid dosage $D_{ikm}$ can stay nearly unchanged if the model places a topic switch at the error. Additive topic tests should therefore be partly robust to switch errors. Tests of effects that depend on two variants being on the same strand cannot be robust in this way. We will add an interaction variant that tests topic effects on single haplotypes and measure both behaviors. The second analysis is interpretation. For any significant topic we report its allele-frequency profile, the haplotypes that load on it most heavily, and where its boundaries fall relative to the recombination map.

Baselines

The naive reference point is single-marker regression at every SNP in the region with the same covariates and a region-wide multiple-testing correction. This is what most GWAS would do. It sets the floor and shows whether haplotype modeling helps at all for a given architecture.

The standard haplotype baseline is sliding-window haplotype regression. Every haplotype above a frequency threshold in windows of 3, 5 and 7 markers becomes a category, and rare haplotypes are pooled. All window sizes are reported and corrected for jointly, so the baseline is not denied its best window after the fact.

The strongest existing method for this question is HapMiner, with F_HapMiner for family data. These methods are the direct prior art on reducing haplotype degrees of freedom by grouping similar haplotypes, and they report the relevant numbers. On the Crohn's 5q31 two-stage tag-SNP design, HapMiner kept 87% power versus 84% for single-marker analysis (HapMiner). On GAW15 and rare-haplotype simulations, F_HapMiner beat single-locus TDT by 9% to 130% (F_HapMiner). We will reimplement both from their published descriptions, since no code release is listed in the file. We give them the same phased data, the same covariate adjustment, and a tuning grid over the DBSCAN radius and window that matches our grid over $K$ in number of settings. Significance for both uses permutation. Beating HapMiner means higher power at the same empirical region-wise type I error of 0.05, replicated across the simulation architectures, with no loss on the single-causal-common-variant architecture where HapMiner and single-marker tests are already strong.

A reference-panel competitor tests local ancestry dosages computed as in the Haplotype Components pipeline at each position. This checks whether learned topics add anything beyond continental ancestry.

Two ablations isolate the key ingredients and use the same $K$ and the same data. The exchangeable ablation fixes $\rho\to\infty$, giving LDA over alleles within windows; it tests whether recombination-aware switching matters. The hard ablation replaces posterior dosages with argmax topic counts; it tests whether soft mixed membership matters, as opposed to merely having a better clustering.

Why not just…?

Why not just use single-marker GWAS with good stratification control? For most loci this will be enough, and we expect to tie there. The evidence that it is not always enough comes from loci where no single SNP is significant but a multi-variant haplotype is, as in the KLC1 and PIN1 examples summarized in the file. The rare-haplotype simulation results of F_HapMiner point the same way. Our simulations include one architecture with a single common causal variant precisely so that single-marker testing can win where it should. If it also wins on the rare-haplotype and same-strand architectures, the proposal fails.

Why not just run HapMiner-style hard clustering with a better distance? This is the most serious threat. If the gain comes from pooling similar haplotypes rather than from soft membership or switching, a tuned hard clusterer will match us at lower cost. The hard ablation and the exchangeable ablation decide this directly. If hard assignment matches soft dosages across architectures, we will report that soft membership is unnecessary and shift the contribution to removing the window through switching. If both ablations match the full model, the contribution reduces to scalability alone.

Why not just use local ancestry calls or Haplotype Components? These capture which continental population a segment came from, which is coarse relative to the within-population haplotype variation that drives cis-acting effects. The file's HC results (80.19% vs 62.68% birthplace recall against PCs) show their value as covariates, not as locus-level test variables. We include local ancestry dosages as a baseline. In a largely homogeneous cohort we expect them to carry little signal at the simulated loci. If they match our model, the learned topics are just ancestry in disguise.

Why not just run BERTopic or LDA on haplotype strings? Language-model embeddings have no notion of recombination distance. Density clustering discards low-density points, which is exactly where rare risk haplotypes live, as both HapMiner's noise label and the rare-haplotype findings show. The exchangeable ablation is the principled version of this alternative and is tested directly.

Proposed Experiments

The first set of experiments are power simulations on real haplotype backgrounds. Effects are planted on haplotypes from the Crohn's 5q31 region, the cystic fibrosis 1.8 Mb 19-locus region, and the GAW15 chromosome-6 20-SNP segment with CEPH pedigrees. We will use four architectures. The first has a single common causal SNP. The second has a causal variant untyped but tagged by a haplotype. The third has a rare haplotype carrying a large effect, at frequencies from 0.5% to 3%. The fourth has a same-strand two-variant interaction. Effect sizes span 1% to 10% of variance, and sample sizes run from 500 upward, matching the regime HapMiner targeted. Metrics are power at empirical region-wise α = 0.05, null calibration (QQ plots, inflation factor) on 1,000 null phenotypes, and accuracy in localizing the causal position. The decisive check is the rare-haplotype architecture. We must beat F_HapMiner's reported gains under the same design, and the soft and switching ablations must both lose ground there.

The second set tests robustness to phasing errors. We inject switch errors at controlled rates into true phases and track power for additive dosage tests versus single-haplotype interaction tests. The prediction is that the additive test degrades slowly and the interaction test degrades fast. If the additive test degrades as fast as sliding-window testing, the robustness argument is wrong.

The third set covers scale and real data. On UK Biobank we fit the amortized model region by region across the genome and report wall-clock time. As a reference point, Neural ADMIXTURE reports 11 hours for K = 2 to 6 on about 500k individuals, against an estimated month per K for classical ADMIXTURE. We then run topic-dosage association for educational attainment and standing height, and compare loci found against single-marker testing under identical covariates. As a sanity check that the topics carry structure, we aggregate global topic dosages and test birthplace recall against the HC figure of 80.19%. On HGDP (938 individuals, 53 populations) we check whether the topics separate groups that fineSTRUCTURE resolves, such as Italians versus Tuscans. Real-data hits are treated as hypotheses, not validation. We require that a new locus replicate in a held-out half of the cohort. We also require that it show a topic profile spanning several markers that no single tag SNP reproduces.