提出并行化算法,让霍克斯过程推断速度提升数十倍。
Massively Parallel Exact Inference for Hawkes Processes

- 用稀疏矩阵乘法实现并行前缀扫描,加速强度计算。
- 计算复杂度降至约 $O(N/P)$,支持千万级事件高效处理。
- 开源实现,适合大规模时序建模与金融、神经科学领域研究者。
多变量霍克斯过程是一类广泛使用的自激发点过程,但最大似然估计的计算复杂度在事件数上为 $O(N^2)$。线性指数霍克斯过程虽有 $O(N)$ 的递推公式,但以往方法仍串行执行,未利用现代GPU的并行能力。本文表明,霍克斯过程的强度可表示为一系列稀疏转移矩阵的乘积,其乘法具有线性时间的结合性,从而可通过并行前缀扫描实现高效计算。该方法使线性指数霍克斯过程的估计完全并行化,将计算复杂度降至约 $O(N/P)$($P$ 为处理器数),且自然支持批处理,保持内存恒定,避免GPU内存瓶颈。重要的是,该方法精确计算似然,无需额外假设或近似,保持模型简洁与可解释性。我们在模拟和真实数据集上实现了数量级提速,可处理数千节点及数百万事件,远超先前工作规模。我们提供了基于PyTorch的开源实现。
原文摘要 · Abstract (English)
Multivariate Hawkes processes are a widely used class of self-exciting point processes, but maximum likelihood estimation naively scales as $O(N^2)$ in the number of events. The canonical linear exponential Hawkes process admits a faster $O(N)$ recurrence, but prior work evaluates this recurrence sequentially, without exploiting parallelization on modern GPUs. We show that the Hawkes process intensity can be expressed as a product of sparse transition matrices admitting a linear-time associative multiply, enabling computation via a parallel prefix scan. This yields a massively parallelizable algorithm for estimation of linear exponential Hawkes processes. Our method reduces the computational complexity to approximately $O(N/P)$ with $P$ parallel processors, and naturally yields a batching scheme to maintain constant memory usage, avoiding GPU memory constraints. Importantly, it computes the exact likelihood without any additional assumptions or approximations, preserving the simplicity and interpretability of the model. We demonstrate orders-of-magnitude speedups on simulated and real datasets, scaling to thousands of nodes and tens of millions of events, substantially beyond scales reported in prior work. We provide an open-source PyTorch library implementing our optimizations.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。