Re-identifying Variants Across Pipelines

When the same DNA is processed by different bioinformatics pipelines (chains of software that align raw sequencer reads to a reference genome and then "call" where the sample differs from it), the resulting variant lists disagree far more than most users assume. Software choice explains over 60% of the variance in variant detection, more than sequencing platform or lab (Pan et al.). For small insertions and deletions (indels), five pipelines run on the same exomes agreed on only 26.8% of calls, and on only 4.7% of novel indels (O'Rawe et al.). The usual fix is to keep only the calls that several pipelines share. That intersection discards many real variants and still keeps artifacts: calls unique to the GATK caller validated at 97.1%, while indels shared by all pipelines validated at only 78.1%.

We propose treating each variant call the way computer vision treats a photo of a specific person or animal in re-identification. One physical variant in one genome is a single "individual." Each pipeline or sequencing replicate is a different "camera" that renders it differently: shifted left in a repeat, split into two events, or off by one base in a homopolymer. We learn an embedding in which renderings of the same variant from independent views land close together, while look-alike candidates at the same locus land apart. A call's trustworthiness then becomes how reliably it can be retrieved from other views. The embedding takes sequence context from a frozen DNA foundation model, read from an intermediate layer rather than the last one. Read-level evidence, which that model never saw during pretraining, enters through a small side network trained without gradients flowing into the backbone.

Core Claim

Cross-pipeline agreement is the right signal applied with the wrong matching rule. Exact or normalized allele matching undercounts agreement for indels in repeats, because the "same" variant is rendered inconsistently. Raw vote counting then rewards artifacts that pipelines share. A learned instance-level embedding fixes the first problem. Positives come from independent sequencing replicates and negatives from competing alleles at the same locus, which addresses the second. Together they should let us rescue true pipeline-private indels that intersection throws away, at a precision no lower than the best existing call filter.

The specific, falsifiable prediction concerns pipeline-private indels longer than 5 bp in tandem repeats and homopolymers, where reproducibility collapses (Pan et al.). There, retrieval-based scoring should beat both vote counting and a gradient-boosted filter on hand-built context features, even when those baselines are given the same replicate information.

Position Relative to Prior Work

The closest work is Pipeline-Invariant Representation Learning for Neuroimaging. It treats differently preprocessed MRI scans of one subject as augmentations, or pulls them together with a contrastive loss, so a classifier stops exploiting pipeline shortcuts. We differ in three ways. Our unit is a single localized event among near-identical distractors, not a whole subject. The invariance is used at test time as evidence for whether a call is real, not just to stabilize a downstream classifier. Positives are drawn across independent wet-lab replicates precisely because cross-pipeline agreement on the same reads can be shared error.

Two papers constrain our design. Representative vs. Load-bearing Layers shows that in the masked model NT-v2 the last layer rotates away from mutation signal: an L15 scalar reaches 0.930 AUROC on ClinVar variants versus 0.881 for last-layer mean pooling. Taking the last layer by default is therefore a known mistake for this model family. Benchmarking DNA foundation models finds that frozen embeddings hit ceilings on context-dependent tasks and that mean pooling beats summary tokens. We test whether that pooling result reverses for single-event discrimination, where averaging over a long window dilutes a one-base change.

Two vision papers supply methods. Regional max pooling from R-MAC motivates pooling over multiple sub-windows around the event so the descriptor stays localized. Background suppression in AdaFreq is the analogue of discounting the repeat context that dominates the window. The gradient-detached side branch comes from Res-Tuning, which showed parallel bypass tuners cut training memory by up to 70% without coupling to the backbone. Here that branch is where read evidence enters a model pretrained only on reference sequence.

Research Program

Representing a call. Each candidate call $c$ is represented by two inputs. The first is the reference window with the alternative allele applied, so that equivalent renderings of the same haplotype yield the same input string. The second is a compact summary of supporting and opposing reads: per-position allele counts, base qualities, mapping qualities, and strand.

Building the embedding. The haplotype window passes through frozen NT-v2. We take hidden states at a layer chosen on held-out chromosomes, with L9 and L15 as priors from the layer-dissociation paper, and pool them by max over several nested sub-windows centered on the event. The read summary passes through a small convolutional side network whose output is added to the pooled sequence features. No gradient reaches the backbone. The combined embedding $f(c)$ is trained with the triplet ranking loss of Deep Ranking.

Choosing training pairs. Anchors and positives are calls corresponding to the same truth-set variant but produced by different pipelines on different sequencing replicates. Hard negatives are competing candidates at the same locus, such as a different repeat length or a nearby artifact, plus calls at the same repeat in an unrelated sample that lacks the variant.

Scoring a call at test time. For a call $c$ from view $v(c)$, let $G_u$ be the calls from another view $u$ within a fixed window of the locus. The score is

$$s(c) = \frac{1}{|U|}\sum_{u \in U,\, u \neq v(c)} \max_{g \in G_u} \cos\big(f(c), f(g)\big),$$

where $U$ is the set of available views. It is a soft count of independent views that "re-identify" the same variant.

Two deployment regimes. The cheap regime uses only multiple pipelines on a single sequencing run, which any lab can afford computationally. The benchmark regime adds cross-lab and cross-platform replicates. We report the regimes separately, because only the first is realistic clinically.

Baselines

Do nothing: intersection and majority vote. The reference point is the field's default. Calls are normalized and matched by position and allele, then kept if supported by at least $k$ of the pipelines, with $k$ swept. It sees exactly the same pipeline and replicate call sets as our method, and we report its full precision–recall curve rather than one operating point. The anchoring numbers come from O'Rawe et al.: 26.8% indel concordance and 78.1% validation of shared indels. Beating it means recovering substantially more truth-set indels at equal or higher precision, especially among calls made by only one or two pipelines.

Exact haplotype matching. This is a stronger, non-learned version of voting. It applies each call to the reference window and counts views producing an identical local haplotype string. It isolates whether the learned embedding adds anything beyond resolving representation differences.

SICaRiO, the strongest existing method. SICaRiO is an XGBoost filter over 219 genomic context features. It reports AUC 0.965 on Complete Genomics data, a 30% margin of improvement on an Illumina long-read GATK pipeline, precision up to 93% in tandem repeats, and 86–89% in homopolymers. Because those figures come from a different pipeline mix and split, we retrain it on our exact training chromosomes and GIAB samples. We also give it an augmented feature set that includes our per-view support counts and haplotype-match counts, so any gain is not just access to replicates. Both models get the same hyperparameter search budget. Beating it means higher precision at matched recall on held-out chromosomes, within the long-indel-in-repeat stratum, without losing on the easy SNV stratum.

Ablations of the key ingredient. These show where any gain comes from. The first replaces the frozen-backbone branch with read features alone. The second uses last-layer mean pooling instead of intermediate-layer regional pooling, where the file's reference gap is 0.881 versus 0.930 AUROC from the layer-dissociation paper. The third swaps cross-replicate positives for cross-pipeline-same-reads positives. We expect the third to learn to reward shared artifacts. There is no reported result on Lacuna for retrieval-style variant scoring of any kind, so the ablations define the target.

Why not just…?

Why not just take the intersection of several pipelines? Intersection is unbiased only if errors are independent across pipelines, and the evidence says they are not. Shared indels validated at only 78.1%, and Complete Genomics found over 2,000 variants missed by all five Illumina pipelines (O'Rawe et al.). Intersection both keeps shared artifacts and drops true private calls. The vote-sweep baseline quantifies this directly on our data.

Why not just normalize indels and match haplotype strings exactly? This is the most serious threat, and the proposal is built to test it first. If most cross-pipeline indel discordance in repeats comes from representation alone, exact haplotype matching captures it and the embedding is unnecessary. The first experiment measures what fraction of truth-equivalent but discordant call pairs exact matching resolves. If that fraction is high and exact matching plus SICaRiO closes the gap, we will drop the learned retrieval and report the matching result as the contribution. The learned embedding earns its place only on near-equivalent calls exact matching cannot pair, such as off-by-one homopolymer lengths and split complex events, and on separating shared artifacts from real variants.

Why not just add support counts to SICaRiO? This is plausible, and it is why the augmented SICaRiO is a baseline rather than a straw man. Its features describe the reference context and are identical for a real indel and an artifact at the same repeat. They cannot tell which of two competing repeat lengths the reads support. If augmented SICaRiO matches us, the conclusion is that replicate structure, not representation learning, carries the gain.

Why not just fine-tune the DNA foundation model end to end? The backbone has never seen reads, so fine-tuning it on haplotype windows still lacks read evidence. Fine-tuning on one pipeline's labels risks the pipeline-shortcut failure documented in neuroimaging, where single-pipeline training swung accuracy by up to 9.2% (Pipeline-Invariant Representation Learning). We run a LoRA-style comparison at matched compute as a secondary check rather than assume it fails.

Proposed Experiments

Data. The main data are the GIAB samples HG001–HG005 with their high-confidence truth sets, as used by SICaRiO. We process them through a grid of aligner and caller combinations: BWA and Bowtie2 aligners crossed with GATK HaplotypeCaller and FreeBayes, among others, following the design of Pan et al.. Where that study's Quartet and HapMap triplicate reads are obtainable, they provide the cross-lab, cross-platform replicate regime. The family structure also gives an unlabeled consistency check: the score should be higher for child calls that also appear in a parent.

Evaluation protocol. Splits are by chromosome, so no locus appears in both training and test. Results are stratified by variant type, indel length (5 bp or less versus longer), and region type (tandem repeat, homopolymer, high-confidence). Metrics are AUROC and precision at fixed recall for true-versus-false classification of calls. We also report the number of truth variants rescued among calls made by only one pipeline, and retrieval mean average precision for pairing truth-equivalent calls across views.

Decisive checks. Four results settle the proposal. First, exact matching must leave a meaningful share of equivalent pairs unresolved; otherwise we pivot as described. Second, retrieval scoring must beat augmented SICaRiO on long indels in repeats on held-out chromosomes. Third, cross-replicate positives must beat cross-pipeline-only positives, which tests whether shared artifacts are actually being rejected. Fourth, the intermediate-layer, regionally pooled backbone features must beat both last-layer mean pooling and the read-only branch. If the backbone adds nothing, the honest conclusion is that frozen reference-trained DNA models are too rigid to help with read-level verification, which is itself worth reporting.

Stress test. The HG008 tumor-normal pair (GIAB HG008) is used only for evaluation, with no truth-based tuning. It tests whether the embedding degrades gracefully under aneuploidy and low allele fractions, with views drawn from its many sequencing technologies.