Binary Node Clustering via Contrastive Learning for Haplotype Phasing in de novo Genome Assembly

Martin Schmitz, Leon Rauschning, Kenji Kawaguchi, Mile SikicOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

The paper introduces grapHiC, a graph-transformer framework that performs haplotype phasing—separating maternal and paternal DNA—directly on raw assembly graphs without needing parental data. By combining Hi-C proximity data with a novel "Supervised Binary Pair Loss," the authors achieve state-of-the-art phasing accuracy, enabling high-quality de novo assembly of complex diploid genomes like the human genome.

What Problem Does This Paper Address?

Most animals, including humans, are diploid, meaning they carry two versions of every chromosome (one from each parent). These versions, called haplotypes, can differ significantly. "Phasing" is the process of untangling these two sequences during genome assembly.

The current gold standard for phasing is "trio binning," which uses DNA from the parents to sort the offspring's genetic data. However, parental data is often unavailable for wild animals or anonymous human samples. Existing "reference-free" methods often rely on aligning sequences to a pre-existing reference genome, which introduces "reference bias" and fails for genetically diverse species.

The authors tackle the challenge of phasing directly on unitig graphs—large, messy representations of raw DNA fragments—using only the sample's own data and Hi-C sequencing (which captures how DNA folds in 3D space).

Methods

The authors formulate phasing as a binary, overlapping node clustering problem.

  1. Graph Construction: They build a "heterograph" where nodes are unitigs (contiguous DNA fragments). Edges represent two things: sequence overlaps and Hi-C contacts (spatial proximity).
  2. Architecture: They use grapHiC, based on the Simplified Graph Transformer (SG-Former). It uses a GNN module to capture local graph topology and a linear attention module to capture global interactions across the entire chromosome.
  3. The Secret Sauce: SBP-Loss: Standard contrastive losses (like InfoNCE) struggle with the "label-switching" symmetry of phasing—it doesn't matter if you call a cluster "maternal" or "paternal," only that you separate them. The authors propose the Supervised Binary Pair (SBP) Loss. It maps nodes to a 1D space $[-1, 1]$, pushing maternal/paternal nodes to opposite extremes while centering "homozygous" nodes (sequences identical in both parents) at zero.

Datasets

The model was trained and evaluated on synthetic datasets derived from high-quality human genomes:

  • Dataset (I): 45 chromosome-level graphs from the I002C human genome, processed with an "accurate" alignment pipeline.
  • Dataset (II): 35 full-genome graphs from the I002C genome, processed with a "fast" mapping pipeline.
  • Generalization Test: The model was also tested on the HG002 human genome to ensure it works on different individuals not seen during training.

Key Insights and Ideas

  • Relative vs. Absolute Labels: The model learns that the relationship between nodes (same vs. different haplotype) is more important than the absolute label. This elegantly handles the fact that without parents, we can't know which chromosome is which.
  • Handling Homozygosity: Unlike many tools that assume every piece of DNA is unique to one parent, grapHiC explicitly accounts for homozygous regions by allowing nodes to cluster at the "zero" point of the embedding.
  • Hi-C as a Global Anchor: While sequence overlaps provide local connectivity, Hi-C data provides the "long-range" links needed to keep a chromosome's phasing consistent from one end to the other.

Key Results

  • Superior Clustering: grapHiC significantly outperformed traditional algorithms like Spectral Clustering and Louvain, as well as modern deep learning baselines like SupCon. On chromosome 10, it achieved an accuracy of 0.876 compared to ~0.51 for traditional methods.
  • Assembly Performance: When integrated with the DipGNNome assembler, the pipeline (called D-grapHiC) produced assemblies comparable to hifiasm (the current industry standard).
  • Low Error Rates: The system achieved switch error rates (a measure of phasing consistency) between 0% and 3% across various human datasets.
  • Reduced Duplication: D-grapHiC showed lower duplication rates than hifiasm, suggesting it is better at identifying when a sequence belongs to both haplotypes rather than erroneously duplicating it.

Limitations and Future Work

  • Computational Bottlenecks: The authors note that the data preparation pipeline (specifically the Python scripts for graph conversion) is currently a performance bottleneck that needs parallelization.
  • Synthetic Bias: While the Hi-C data is real, the DNA reads were simulated. Testing on entirely "wild" real-world datasets is a necessary next step.
  • Polyploidy: The current model is designed for diploid organisms (2 copies). Extending this to polyploid organisms (like many plants, which can have 4, 6, or 8 copies) remains a massive open challenge in the field.

Summary updated

Abstract

Accurate haplotype phasing is essential for high-quality genome assembly, yet de novo phasing without parental data for complex genomes remains a challenge. We formulate phasing as a binary, overlapping node clustering problem on unitig graphs where nodes represent contiguous, non-branching DNA sequence fragments and different edge types capture sequence overlaps as well as Hi-C proximity information. To solve this problem, we design a contrastive learning framework with custom objective functions and train a graph-transformer-based model termed grapHiC to distinguish nodes with paternal, maternal, or homozygous haplotypes. We show that grapHiC significantly outperforms other node clustering methods on genome-sized datasets and that grapHiC’s predictions can successfully guide de novo genome assembly, producing well-phased assemblies across diverse human genome assembly graphs using the DipGNNome assembler. Our code, trained model, and dataset are available at https://anonymous.4open.science/r/graphic_iclr-688D/ (repository anonymized for peer review).
BibTeX
@misc{schmitz2026binary,
  author = {Martin Schmitz and Leon Rauschning and Kenji Kawaguchi and Mile Sikic},
  title = {{Binary Node Clustering via Contrastive Learning for Haplotype Phasing in de novo Genome Assembly}},
  year = {2026},
  url = {https://openreview.net/forum?id=uEEQCzsSlS},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure