Improving DeepVariant Accuracy by Providing Chemistry Priors
Authors:
Introduction
Deep learning models learn from the underlying distribution of their input data how to accurately perform the tasks for which they are trained. DeepVariant uses a Convolutional Neural Network to perform the task of identifying whether, and how, a sample’s genetic sequence differs from a reference genome. Doing this accurately requires understanding the error profile of the sequencing instrument: knowing what noise to expect is what lets the model distinguish a true variant from an artifact.
Training a single variant calling model across diverse datasets requires balancing broad generalization with adaptation to version-specific error patterns. PacBio HiFi sequencing has progressed through several generations, including Sequel II (2019), Revio v1 (2023), and the newer SPRQ (2024) and SPRQ-Nx (2026) chemistries. Although all of these platforms produce high-accuracy reads with similar characteristics, each generation changes aspects of the polymerase kinetics, sequencing kits, and DNA input requirements. These changes shift the empirical error distributions, particularly in homopolymers (consecutive runs of the same base), which are the most challenging context for PacBio sequencing and where errors typically appear as insertions and deletions (INDELs).
We simultaneously want DeepVariant to perform well across all chemistries without burdening the user with choosing among chemistry-specific models. Historically, handling multiple chemistries required either training separate models for each chemistry or combining all datasets into a single unconditioned model, which is the approach that has been taken for the DeepVariant PacBio models to date. Combining all datasets into an unconditioned model allows the network to learn shared features from a larger pool of examples, but forces a single set of weights to average across different error modes. In this work, we investigate whether conditioning a single DeepVariant model on sequencing chemistry metadata using Feature-wise Linear Modulation (FiLM) can capture chemistry-specific error profiles while sharing a unified model across all PacBio datasets.
Methods
Integrating Chemistry Metadata with FiLM
In the standard DeepVariant architecture, the InceptionV3 backbone outputs a 2048-dimensional feature vector (himg) after global average pooling, which passes through a dropout layer and a linear classification head. To modulate the extracted image features directly, we implemented Feature-wise Linear Modulation (FiLM) between the global average pooling layer and the classification head (Figure 1). The model takes two categorical metadata inputs: the sequencing chemistry and a binary PCR-amplification flag. Each is mapped through its own 32-dimensional embedding layer, and the two embeddings are concatenated and batch-normalized to produce a 64-dimensional metadata vector m. In our experiments the amplification flag produced no measurable improvement (evaluation results were unchanged with the flag on or off), so this work focuses on chemistry. Two linear layers project m into 2048-dimensional scale (γ(m)) and shift (β(m)) vectors, which modulate the pooled image representation element-wise before classification:
hFiLM = γ(m) ⊙ himg + β(m)

Figure 1. Comparison of the standard unconditioned DeepVariant architecture (left) and the chemistry-conditioned FiLM architecture (right).
Data
During candidate generation in make_examples, DeepVariant parses the BindingKit, SequencingKit, and CM fields from the @RG lines of the BAM header and maps each dataset to a chemistry category (Table 1).
| Group | Binding Kit | Sequencing Kit | CM Tag / String |
|---|---|---|---|
SEQUEL_II |
102-194-100 | 101-826-100 | S/P5-C2/… |
REVIO_V1 |
102-739-100 | 102-118-800 | R/P1-C1/… |
REVIO_SPRQ |
103-496-900 | 103-496-700 | R/P2-C2/… |
REVIO_SPRQ_Nx |
103-496-900 | 103-726-100 | R/P2-C3/… |
Table 1. Mapping of PacBio BAM header fields to the chemistry categories used in this work. Kit part numbers shown are examples; each chemistry has several.
To test whether chemistry conditioning improves accuracy, we trained two models on the same set of 24 Genome in a Bottle (GIAB) PacBio HiFi BAMs, with chromosomes 20–22 held out from training: an unconditioned Baseline model and a chemistry-conditioned FiLM model (Exp FiLM). The HG002 Sequel II, Revio v1, and SPRQ datasets used for evaluation below were part of this training set. For SPRQ-Nx, we used three public PacBio HG002 datasets (one SMRT Cell used three times, released in 2026) that were not used in training. We also evaluated on HG003 (Sequel II, Revio v1, and SPRQ), a sample completely held out from training.
Results
We evaluated both models on whole-genome HG002 data across four PacBio chemistries: Sequel II, Revio v1, SPRQ, and SPRQ-Nx. To compare chemistries without confounding differences in depth, each dataset was downsampled to ~30x coverage (Revio v1 was used at its full ~28x) and evaluated against the v5 GIAB Truth Set (Figure 2).

Figure 2. Whole-genome INDEL (left) and SNP (right) F1 scores on HG002 at ~30x coverage across four PacBio chemistries (three SPRQ-Nx datasets, Revio v1 at its full ~28x) for the unconditioned Baseline model and the Exp FiLM model. Higher is better.
Conditioning on chemistry metadata improves INDEL F1 scores over the Baseline model across all four chemistries, with the largest INDEL gains on SPRQ, followed by Sequel II and SPRQ-Nx, while SNP F1 scores are essentially unchanged (+0.01 percentage points). To understand whether these F1 improvements come from fewer false positives or fewer false negatives, we examined precision and recall for each chemistry at ~30x coverage (Figure 3).

Figure 3. Precision and recall comparison between the Baseline model (open circles) and the Exp FiLM model (filled circles) at ~30x coverage (Revio v1 at its full ~28x). SPRQ-Nx is shown for one of the three datasets (Use1).
Across all four chemistries, the Exp FiLM model shifts performance toward higher precision, with recall higher or essentially unchanged. Rather than trading one metric for the other, conditioning on chemistry reduces false positives without meaningfully increasing false negatives.
Looking at the total number of variant calling errors (false positives plus false negatives) across the whole genome shows the scale of these reductions (Figure 4). At ~30x coverage, the Exp FiLM model reduces total errors across all four chemistries compared to the Baseline model. Since homopolymer errors are the main source of difference between generations, providing the chemistry label yields the largest error reductions on INDELs (3.1% to 31.2% fewer errors), with smaller reductions in SNP errors on HG002 (2.7% to 6.0% fewer).

Figure 4. Total whole-genome INDEL errors (left) and SNP errors (right) at ~30x coverage (Revio v1 at its full ~28x) comparing the Baseline model and the Exp FiLM model. Lower is better. SPRQ-Nx is shown for one of the three datasets (Use1).
To see how chemistry conditioning performs at lower sequencing depths, we evaluated both models across downsampled coverages ranging from 35x down to 9x (Revio v1: 28x to 7x) (Table 2). On SPRQ, Sequel II, and SPRQ-Nx, the Exp FiLM model maintains higher INDEL F1 scores and fewer total errors than the Baseline model across the entire coverage range, with gains for SPRQ and Sequel II generally growing as coverage decreases, while SPRQ-Nx gains stay small (+0.12 to +0.26 percentage points). On Revio v1, the Exp FiLM model reduces total errors down to 15x, while the unconditioned Baseline model has a slightly higher INDEL F1 at 15x and below.
| Chemistry | Coverage (depth) | Baseline INDEL F1 | Exp FiLM INDEL F1 | INDEL ΔF1 (pp) | SNP ΔF1 (pp) | Errors saved (INDEL + SNP) |
|---|---|---|---|---|---|---|
| Sequel II | 35x (1.00) | 0.969771 | 0.971699 | +0.19 | +0.007 | +4,054 |
| 29x (0.85) | 0.963292 | 0.966334 | +0.30 | +0.009 | +6,124 | |
| 24x (0.70) | 0.952642 | 0.957318 | +0.47 | +0.015 | +9,514 | |
| 19x (0.55) | 0.934013 | 0.941403 | +0.74 | +0.018 | +14,510 | |
| 14x (0.40) | 0.896660 | 0.908168 | +1.15 | +0.026 | +22,161 | |
| 9x (0.25) | 0.807032 | 0.821229 | +1.42 | +0.025 | +25,206 | |
| Revio v1 | 28x (1.00) | 0.965044 | 0.966111 | +0.11 | +0.009 | +2,619 |
| 24x (0.85) | 0.957007 | 0.957819 | +0.08 | +0.014 | +2,522 | |
| 20x (0.70) | 0.943746 | 0.944357 | +0.06 | +0.015 | +2,230 | |
| 15x (0.55) | 0.920894 | 0.920760 | -0.01 | +0.013 | +809 | |
| 11x (0.40) | 0.872803 | 0.872104 | -0.07 | +0.008 | -712 | |
| 7x (0.25) | 0.754643 | 0.753676 | -0.10 | +0.006 | -2,423 | |
| SPRQ | 37x (1.00) | 0.977056 | 0.984011 | +0.70 | +0.013 | +13,337 |
| 31x (0.85) | 0.970845 | 0.979920 | +0.91 | +0.014 | +17,102 | |
| 26x (0.70) | 0.961958 | 0.973182 | +1.12 | +0.016 | +21,038 | |
| 20x (0.55) | 0.946970 | 0.959864 | +1.29 | +0.018 | +24,002 | |
| 15x (0.40) | 0.916283 | 0.931006 | +1.47 | +0.017 | +26,699 | |
| 9x (0.25) | 0.838603 | 0.851979 | +1.34 | +0.011 | +21,904 | |
| SPRQ-Nx | 35x (0.76) | 0.981848 | 0.983660 | +0.18 | +0.012 | +4,094 |
| 30x (0.65) | 0.977522 | 0.979556 | +0.20 | +0.013 | +4,513 | |
| 25x (0.53) | 0.970048 | 0.972485 | +0.24 | +0.012 | +5,105 | |
| 19x (0.42) | 0.956163 | 0.958772 | +0.26 | +0.017 | +5,715 | |
| 14x (0.30) | 0.926550 | 0.928932 | +0.24 | +0.015 | +4,922 | |
| 9x (0.19) | 0.841332 | 0.842523 | +0.12 | +0.006 | +922 |
SPRQ-Nx: public PacBio 2026Q2 HG002 data (not used in training), downsampled so the top row is ~35x.
Table 2. Comparison of variant calling accuracy and total errors saved between the Baseline model and the Exp FiLM model across downsampled coverages from 35x to 9x on HG002 (Revio v1: 28x to 7x). SPRQ-Nx results are shown for one of the three datasets (Use1).
Because chromosomes 20–22 were held out of training, we also evaluated HG002 on those chromosomes alone at ~30x. Summed across Sequel II, Revio v1, and SPRQ, the Exp FiLM model made 9.7% fewer INDEL errors on this held-out region (11,087 to 10,012), with reductions on every chemistry (Sequel II -4.8%, Revio v1 -0.8%, SPRQ -26.0%). SNP errors were slightly higher (+3.5%; 7,017 to 7,263), with small increases on every chemistry (Sequel II +2.9%, Revio v1 +3.6%, SPRQ +4.3%). For comparison, across the whole genome the same three runs had 13.1% fewer INDEL errors and 3.6% fewer SNP errors.
As a stronger test, we also evaluated both models on HG003, a sample completely held out from training, at full coverage (Sequel II 34x, Revio v1 32x) on the GIAB v4.2.1 benchmark (Sequel II, Revio v1, and SPRQ; no HG003 SPRQ-Nx data was available). Summed across the three runs, the Exp FiLM model made 13.6% fewer INDEL errors (20,883 to 18,037), with reductions on every chemistry (Sequel II -1.2%, Revio v1 -22.1%, SPRQ -13.4%). SNP errors were essentially unchanged overall (+0.1%; 20,059 to 20,085), higher on Revio v1 (+7.9%) and lower on Sequel II (-2.9%) and SPRQ (-2.2%). Because the HG003 benchmark (GIAB v4.2.1) covers fewer difficult regions than the HG002 v5 benchmark, the two sets of results are not directly comparable.
Finally, to confirm that these improvements come from the chemistry label itself rather than the extra parameters in the FiLM layer, we ran a negative control experiment on the HG002 Revio v1 dataset (Figure 5). At inference time, we compared the Baseline model against the Exp FiLM model given the correct Revio v1 label and the same Exp FiLM model given an incorrect SPRQ label. While the true chemistry label reduces both INDEL and SNP errors compared to the Baseline, giving the model the wrong chemistry label causes INDEL errors to increase substantially while SNP errors return to slightly above Baseline levels (+3.5%). This indicates that the model uses the chemistry label to adjust its INDEL calls to match the error profile of the specified chemistry.

Figure 5. Whole-genome INDEL errors (left) and SNP errors (right) on HG002 Revio v1 data at ~30x coverage (same data as Figure 4) for the Baseline model (gray), the Exp FiLM model with the correct Revio v1 label (blue), and the Exp FiLM model with an incorrect SPRQ label (red). Lower is better.
Conclusion
Conditioning DeepVariant on PacBio sequencing chemistry with Feature-wise Linear Modulation (FiLM) improves INDEL accuracy across Sequel II, Revio v1, SPRQ, and SPRQ-Nx datasets within a single unified model, including SPRQ-Nx data not used in training. In early experiments, adding the chemistry label only just before the final classification layer (late fusion) gave little improvement over the Baseline, which suggests that the label needs to change how the image features themselves are used, as FiLM does. By reading kit identifiers directly from BAM @RG headers during candidate generation, the model adapts to the error profile of each chemistry without splitting the training data across separate chemistry-specific checkpoints. This approach simplifies model maintenance as new sequencing kits are released and provides a general way to incorporate additional run-level metadata into DeepVariant, such as the instrument software version, which can also change error modes. We plan to include this chemistry-aware model in a future DeepVariant release.
Acknowledgements
We thank Aaron Wenger from PacBio for information about PacBio run metadata, and for several helpful comments and suggestions in drafting this blog.




