Pairwise heuristic sequence alignment algorithm based on deep\n reinforcement learning

Yong Song, Dong Jin Ji, Hye In Seo, Gyu Bum Han, Dong Ho Cho · DOI

TL;DR

This paper introduces DQNalign, a novel pairwise sequence alignment algorithm that leverages deep reinforcement learning to overcome the computational complexity of traditional methods, especially for long genomic sequences. By framing alignment as a sequential decision-making problem, DQNalign achieves competitive accuracy with significantly reduced computational cost.

What Problem Does This Paper Address?

Comparing genomic sequences is fundamental to understanding biological relationships and functions. The most common method for this is sequence alignment. However, traditional algorithms like Needleman-Wunsch become computationally prohibitive for long sequences (e.g., entire genomes) due to their quadratic time complexity. While multiple sequence alignment methods have been developed to handle many sequences, improving the efficiency of pairwise alignment, especially for challenging cases like long or dissimilar sequences, remains a significant challenge. Existing heuristic methods often struggle with accuracy when extending short local alignments to complex sequences.

Methods

The core innovation is the application of deep reinforcement learning (DRL) to pairwise sequence alignment, termed DQNalign. Instead of processing entire sequences at once, DQNalign employs a heuristic approach by breaking down the alignment into smaller, manageable steps within a sliding "window."

Here's a breakdown of the key methodological components:

  • Local Best Path Selection: This heuristic method involves moving a window across pairs of subsequences. The agent decides on the next alignment step (forward, insertion, or deletion) based on the current window's content.
  • Deep Reinforcement Learning Agent: A Deep Q-Network (DQN) is used as the agent. The subsequences within the current window serve as the "environment." The agent learns to make optimal alignment decisions by receiving rewards based on a conventional sequence alignment scoring system.
  • Network Architectures:
    • Dueling Double Deep Q-Network (DDDQN): This architecture combines Dueling DQN (separating state value and action advantage) and Double DQN (using a target network to mitigate overestimation) for improved learning stability and convergence.
  • Faster Dueling Double Deep Q-Network (faster DDDQN): This is an optimized version of DDDQN that replaces standard convolutional layers with separable convolutional layers. This significantly reduces computational cost while maintaining performance.
  • Preprocessing: To address the sequential decision-making nature of DQNalign and potential instability from starting points, the authors incorporate preprocessing steps using conventional methods like:
  • Longest Common Substring (LCS): Used to identify a strong starting point for the alignment.
  • Clustal Omega and MUMmer: These are used to align initial segments or handle unaligned gaps, effectively combining heuristic DRL with established algorithms.

Datasets

The paper utilizes several datasets for training and evaluation:

  • Generated Sequences: The authors create synthetic sequence pairs by mutating a random sequence. This process uses the JC69 model for SNP mutations and a Zipfian distribution for indel lengths, allowing for controlled simulation environments.
  • HEV Genome Sequences: A dataset of 47 Hepatitis E Virus (HEV) genomes is used for evaluating performance on real biological sequences. This dataset consists of 1081 sequence pairs.
  • E. coli Genome Sequences: Two specific E. coli genome sequences (Escherichia coli O157:H7 vs. Escherichia coli K-12) are used to test the algorithm's capability on very long sequences.

Key Insights and Ideas

  • DRL for Sequence Alignment is Viable: The paper demonstrates that deep reinforcement learning can be effectively applied to the complex problem of pairwise sequence alignment, offering a new paradigm beyond traditional dynamic programming or heuristic methods.
  • Window-Based Approach Reduces Complexity: By breaking down alignment into smaller, sequential decisions within a sliding window, DQNalign significantly reduces the computational burden compared to global alignment algorithms.
  • Trade-off Between Speed and Accuracy: The "faster DDDQN" architecture highlights that architectural choices can dramatically impact speed with only a minor compromise in accuracy, a crucial consideration for practical applications.
  • Hybrid Approaches are Powerful: Combining DQNalign with established methods like MUMmer or Clustal Omega proves effective for aligning very long or highly dissimilar sequences, leveraging the strengths of both DRL and traditional algorithms.
  • Window Size is a Critical Parameter: The study shows that increasing the window size generally improves alignment performance, with an optimal point (around 100 for the HEV dataset) where performance converges.

Key Results

  • Performance on Dissimilar Sequences: DQNalign, particularly DDDQN, shows superior performance compared to conventional methods (Clustal Omega, MUMmer) on sequences with lower identity values (below 0.8), where traditional methods struggle due to anchor-based limitations.
  • Speed Advantage: The "faster DDDQN" architecture is approximately two times faster than DDDQN, demonstrating the effectiveness of separable convolutional layers for computational efficiency.
  • Long Sequence Alignment: By combining DQNalign with Clustal Omega or MUMmer, the authors successfully aligned long E. coli genomes, achieving complete alignment in a few hours, which is significantly faster than traditional methods for such large datasets.
  • Accuracy vs. Speed: While MUMmer is generally faster, DQNalign offers a better balance of accuracy and speed, especially for dissimilar sequences. The paper suggests choosing between DQNalign and conventional methods based on the specific requirements for real-time processing versus accuracy.
  • Error Probability Convergence: Numerical analysis and simulations confirm that the step error probability of the local best path selection method converges to near zero as the window size increases, validating the theoretical underpinnings of the approach.

Limitations and Future Work

  • Stability with Dissimilar Sequences: The paper acknowledges that the alignment results can be unstable for some sequence pairs due to the DRL agent's learning process, especially when relying solely on human-based features.
  • Gap Between Modeled and Real Sequences: Challenges exist in bridging the gap between the simplified, modeled sequences used for training and the complexity of actual biological sequences.
  • Future Directions:
    • Applying DQNalign to local alignment and multiple sequence alignment using improved learning methods and tailored training strategies.
  • Enhancing stability by using alignment results from multiple, differently converged agents.
  • Developing learning methods that more directly reflect actual biological sequences to improve performance on real-world data.

Summary updated

BibTeX
@article{song2021pairwise,
  author = {Yong Song and Dong Jin Ji and Hye In Seo and Gyu Bum Han and Dong Ho Cho},
  title = {{Pairwise heuristic sequence alignment algorithm based on deep\textbackslash\{\}n reinforcement learning}},
  journal = {IEEE Open Journal of Engineering in Medicine and Biology},
  year = {2021},
  url = {https://openreview.net/forum?id=DGs7Rn2rWp},
}
Figure