Learning Genomic Sequence Representations using Graph Neural Networks over De Bruijn Graphs

Kacper Kapusniak, Manuel Burger, Gunnar Ratsch, Amir Joudaki · DOI

TL;DR

This paper introduces a novel method for learning genomic sequence representations by combining contextual and structural information using Graph Neural Networks (GNNs) on enhanced De Bruijn graphs. Their self-supervised contrastive learning approach significantly outperforms existing methods on key bioinformatics tasks like edit distance approximation and closest string retrieval, offering more robust and scalable genomic sequence analysis.

What Problem Does This Paper Address?

The ever-increasing volume of genomic data demands sophisticated methods for representing these sequences. Traditional approaches often focus on contextual information (how sequences relate to each other in a larger context) but overlook crucial structural details within the sequences themselves. These structural nuances, like single-nucleotide polymorphisms (SNPs), are vital for understanding disease susceptibility, phenotypic traits, and drug responses. Existing methods struggle to capture both context and structure efficiently, especially for new or unseen sequences, leading to limitations in tasks requiring precise sequence comparison and retrieval.

Methods

The core of this work lies in constructing a "heterogeneous metagenomic graph" that goes beyond the standard De Bruijn graph. Here's a breakdown of their approach:

  • Enhanced De Bruijn Graphs: They start with the De Bruijn graph, where nodes represent k-mers (short DNA sequences of length k) and edges signify their sequential transitions. This captures contextual information.
  • Structural Similarity Edges: To incorporate structural details, they introduce "Sub-k-mer Frequency edges." These edges connect k-mers based on the similarity of their internal sub-k-mer patterns, quantified using cosine similarity. This captures structural nuances within individual k-mers.
  • Heterogeneous Graph Neural Networks (GNNs): They employ GNNs designed to handle these heterogeneous graphs, allowing for different types of edges (contextual and structural) to be processed differently. The GNN encoder learns representations by passing messages through these graph structures.
  • Self-Supervised Contrastive Learning: To train the GNN without labeled data, they use a contrastive learning framework. This involves:
  • Positive Pair Sampling: Pairs of k-mers that are likely to be similar are identified through "Biased Random Walks" (capturing context) and "Structural Similarity Sampling" (capturing structure).
  • Negative Pair Sampling: Pairs of k-mers that are unlikely to be similar are randomly selected.
  • Contrastive Loss: The GNN is trained to pull positive pairs closer together in the embedding space and push negative pairs further apart.

Datasets

The paper evaluates their method on two datasets:

  • RT988: A dataset used in prior work for edit distance approximation.
  • Qiita: A dataset used in prior work for edit distance approximation and closest string retrieval.

The authors do not introduce new benchmark datasets.

Key Insights and Ideas

  • Structure Matters: The most significant insight is that explicitly incorporating structural similarity between k-mers, in addition to contextual transitions, leads to more robust and informative genomic representations. This is crucial for capturing subtle genetic variations.
  • Heterogeneous Graphs are Key: Standard graph structures are insufficient. By creating a graph that explicitly models different types of relationships (contextual and structural), they unlock richer representations.
  • Self-Supervised Learning for Genomics: The success of contrastive learning in NLP and computer vision is effectively translated to the genomic domain, enabling powerful representations without the need for extensive labeled data.
  • Scalability for New Sequences: Their method demonstrates a remarkable ability to generalize to unseen k-mers, a significant advantage over methods that are limited by the diversity of their training data.

Key Results

  • Edit Distance Approximation: Their method consistently outperformed One-Hot encoding, Word2Vec, and Node2Vec on both RT988 and Qiita datasets, achieving lower Root Mean Squared Error (RMSE). For instance, on the Qiita dataset, their method achieved an RMSE of 1.96 ± 0.01 for k=8, while others were higher.
  • Closest String Retrieval: In zero-shot retrieval tasks (without fine-tuning), their aggregated k-mer embeddings achieved superior performance, particularly for larger k-mer sizes. For example, in the Top 10% retrieval on the Qiita dataset, their method achieved 79.4 ± 0.2 for k=8, outperforming other methods.
  • Scalability: The approach showed good performance even for larger k-mer values (up to k=15 in the appendix), a feat that limited other methods.

Limitations and Future Work

  • Performance Decline for Very Large k: The paper notes that performance degrades for very large k-mers (k=20 and k=30) in the appendix. This is attributed to the high uniqueness of such k-mers, reducing the informativeness of transition probabilities and structural similarities.
  • Computational Cost: While they introduce a scalable approach for graph construction using approximate nearest neighbor search for larger k, the initial graph construction and GNN training can still be computationally intensive.
  • Future Work: The authors suggest that their method has potential for broader applications in computational biology, implying further exploration of its utility in other genomic analysis tasks. The appendix also explores an alternative Graph Autoencoder (GAE) approach, suggesting ongoing research into different self-supervised learning strategies.

Summary updated

BibTeX
@misc{kapusniak2023learning,
  author = {Kacper Kapusniak and Manuel Burger and Gunnar Ratsch and Amir Joudaki},
  title = {{Learning Genomic Sequence Representations using Graph Neural Networks over De Bruijn Graphs}},
  year = {2023},
  eprint = {2312.03865},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.03865},
}
Figure