TL;DR
This paper presents the first FPGA-based accelerators for large-scale molecular similarity search, significantly outperforming CPU and GPU implementations. By optimizing both exhaustive (BitBound & Folding) and approximate (HNSW) search algorithms, the authors achieve remarkable speedups and throughputs, paving the way for faster drug discovery.
What Problem Does This Paper Address?
In drug discovery, identifying molecules with similar structures to known compounds is crucial for finding new drugs. This process, known as molecular similarity search, involves comparing a query molecule against massive databases of chemical compounds. The challenge lies in the sheer scale of these databases, which can contain millions or even billions of molecules. Traditional methods using CPUs and GPUs, while effective, struggle to keep pace with the growing demand for speed and efficiency. Existing research has primarily focused on accelerating the core similarity calculation (Tanimoto coefficient) but has not extensively explored hardware acceleration for the entire search process on FPGAs, leaving a gap in high-performance, low-power solutions.
Methods
The authors propose and optimize FPGA designs for two main types of molecular similarity search algorithms:
- Exhaustive Search (BitBound & Folding): They introduce a "scalable on-the-fly query engine" that integrates computation and communication in a pipelined fashion. This design aims to reduce resource utilization and pipeline latency. Key components include a Bit Count module, a Tanimoto Factor Calculation (TFC) module, and a Top-K merge sort module. They also explore the trade-offs between similarity cutoff, folding level, search speed, and accuracy.
- Approximate Search (Hierarchical Navigable Small World - HNSW): For HNSW, they develop an FPGA-based graph traversal engine. This engine leverages a high-throughput register array-based priority queue and a fine-grained distance calculation engine to boost processing capabilities. The design focuses on optimizing the search layer traversal and the base layer search, utilizing hardware priority queues instead of traditional merge sort for efficiency.
Datasets
The primary dataset used for evaluation is the Chembl 27.1 database, which contains approximately 1.9 million molecules. The RDKit toolbox was used for generating the 1024-bit Morgan binary fingerprints from these molecules.
Key Insights and Ideas
- FPGA as a Viable Platform: The paper demonstrates that FPGAs can be highly effective for accelerating molecular similarity search, offering significant advantages in throughput and energy efficiency over CPUs and GPUs for this specific task.
- On-the-Fly Processing: Integrating computation and communication into a pipelined "on-the-fly" design is crucial for maximizing throughput and minimizing latency in FPGA accelerators.
- Hardware-Algorithm Co-design: The success hinges on tailoring the FPGA architecture to the specific needs of the algorithms, such as using register arrays for priority queues in HNSW and optimizing data movement for BitBound & Folding.
- Trade-offs in Approximate Search: For HNSW, there's a clear trade-off between search parameters (like
efandm) and performance (QPS vs. Recall). Design space exploration is vital to find optimal configurations. - Memory Bandwidth is Key: High Bandwidth Memory (HBM) plays a critical role in overcoming communication bottlenecks, especially for large datasets, enabling high query rates.
Key Results
- Exhaustive Search (BitBound & Folding):
- Achieved a throughput of 450 million compounds/second for a single query engine.
- On the Chembl database, achieved 1638 QPS for brute-force search and 25403 QPS for BitBound & Folding with 0.97 recall.
- Approximate Search (HNSW):
- Achieved 103385 QPS with 0.92 recall on the Chembl database.
- Demonstrated an average 35x speedup compared to existing CPU implementations.
- Overall: The FPGA implementation achieved over 25x speedup on brute-force search and an average 30x speedup for BitBound & Folding compared to CPU.
Limitations and Future Work
- Design Space Exploration: While the paper explores design spaces for both algorithms, further exploration could potentially yield even better performance or resource utilization. The authors mention that different design parameters (like
efandmfor HNSW) impact performance and that more kernels can improve overall throughput. - Extensibility: The proposed FPGA architecture is designed to be extensible, suggesting that other algorithms within the exhaustive and approximate search categories could be accelerated using similar principles.
- First of its Kind: The paper highlights that this is the first attempt to accelerate molecular similarity search algorithms on FPGAs, implying that this is an emerging area with significant room for future research and development.
Summary updated