AGNES: Adaptive Graph Neural Network and Dynamic Programming Hybrid Framework for Real-Time Nanopore Seed Chaining
Jahidul Arafat, Sanjaya Poudel
TL;DR
This work introduces AGNES, a real-time adaptive seed chaining framework for nanopore sequencing that unites a graph neural network with dynamic programming to overcome fixed-gap penalties in context-rich genomic regions. Seeds are modeled as nodes with 12-dimensional features and edges as 8-dimensional spatial relations, forming a graph on which a three-layer EdgeConv GNN classifies seeds and guides chaining, with a confidence-based selector (threshold $ au=0.7$) deciding when to rely on learned guidance versus pure DP. Empirically, AGNES achieves state-of-the-art per-seed classification ($>99.9\%$ F1 for XGBoost, $99.90\%$ for GNN) and substantial chain-level gains ($57.21\%$ F1 for Hybrid) while maintaining a median latency of $1.59$ ms, thereby satisfying real-time requirements. The framework demonstrates robust performance under simulated noise (100% success at 20% corruption) and provides detailed ablation and domain analyses, supporting deployment in production genomics pipelines and offering a blueprint for integrating graph learning with classical algorithms in latency-critical bioinformatics tasks.
Abstract
Nanopore sequencing enables real-time long-read DNA sequencing with reads exceeding 10 kilobases, but inherent error rates of 12-15 percent present significant computational challenges for read alignment. The critical seed chaining step must connect exact k-mer matches between reads and reference genomes while filtering spurious matches, yet state-of-the-art methods rely on fixed gap penalty functions unable to adapt to varying genomic contexts including tandem repeats and structural variants. This paper presents RawHash3, a hybrid framework combining graph neural networks with classical dynamic programming for adaptive seed chaining that maintains real-time performance while providing statistical guarantees. We formalize seed chaining as graph learning where seeds constitute nodes with 12-dimensional feature vectors and edges encode 8-dimensional spatial relationships including gap consistency. Our architecture employs three-layer EdgeConv GNN with confidence-based method selection that dynamically switches between learned guidance and algorithmic fallback. Comprehensive evaluation on 1,000 synthetic nanopore reads with 5,200 test seeds demonstrates RawHash3 achieves 99.94 percent precision and 40.07 percent recall, representing statistically significant 25.0 percent relative improvement over baseline with p less than 0.001. The system maintains median inference latency of 1.59ms meeting real-time constraints, while demonstrating superior robustness with 100 percent success rate under 20 percent label corruption versus baseline degradation to 30.3 percent. Cross-validation confirms stability establishing graph neural networks as viable approach for production genomics pipelines.
