一句话:提出 FastLBP,一个支持灵活更新策略与局部结构的 GPU 加速信念传播框架,用于大规模程序分析。
信念传播(BP)是概率图模型中广泛使用的近似推断算法,但用于大规模程序分析时计算开销极大。现有 GPU 方案难以支持程序分析所需的灵活更新策略,也未将逻辑约束与 GPU 加速结合,在通用性与效率上均受限。本文提出 FastLBP:给出统一表示以刻画程序分析所需的各类更新策略,并设计依赖分析算法以实现并行执行;同时在 GPU 上实现带局部结构的 BP,将每条消息的计算分配给单个线程,并采用内存高效的消息表示。在 SmartFL 与 Bingo 上的实验表明,FastLBP 相较 CPU 方法分别取得平均 17.42× 与 2.82× 加速,在 SmartFL 上相较已有 GPU 方法加速 6.14×,且保持精度不变;它还支持现有 GPU 方法无法支持的更新策略,展现出更强的通用性。
Belief Propagation (BP) is a widely used approximate inference algorithm in probabilistic graphical models (PGMs), but it is computationally expensive when applied to large-scale program analysis. Existing GPU-based approaches are unable to support flexible update strategies and have yet to integrate logical constraints with GPU acceleration, leading to challenges in both generality and efficiency. We present FastLBP, a GPU-accelerated BP framework for program analysis. We propose a unified representation for specifying flexible update strategies required in program analysis, along with a dependency analysis algorithm to enable parallel execution. Furthermore, we implement BP with local structures on GPUs by assigning individual threads to message computations and utilizing a memory-efficient representation. Experiments on SmartFL and Bingo show that FastLBP achieves average speedups of 17.42× and 2.82× over CPU-based approaches on SmartFL and Bingo, respectively, and 6.14× over the GPU-based approach on SmartFL, while preserving accuracy. Moreover, FastLBP supports update strategies that existing GPU-based approaches cannot support, demonstrating its improved generality for real-world program analysis.