优化克利福德神经层计算,推理速度提升21.35倍
Single-Core Superscalar Optimization of Clifford Neural Layers
- 基于代数理论消除冗余矩阵分配,重构计算流程
- 11个函数平均提速21.35倍,6个场景快于原PyTorch实现
- 适合研究对称性神经网络的高性能计算开发者
在物理科学领域日益关注具有等变性质的网络设计背景下,克利福德神经层可实现特定群作用下的$E(n)$和$O(n)$等变性。本文分析克利福德卷积层内部计算结构,提出并实现多项优化以加速推理过程,同时保证正确性。首先基于克利福德代数的理论基础,消除冗余矩阵分配与计算;随后系统应用经典优化技术进一步提升性能。实验结果表明,11个函数的平均加速比达21.35倍,在6个案例中运行时间优于或接近原始PyTorch实现,其余案例性能处于同一量级。
原文摘要 · Abstract (English)
Within the growing interest in the physical sciences in developing networks with equivariance properties, Clifford neural layers shine as one approach that delivers $E(n)$ and $O(n)$ equivariances given specific group actions. In this paper, we analyze the inner structure of the computation within Clifford convolutional layers and propose and implement several optimizations to speed up the inference process while maintaining correctness. In particular, we begin by analyzing the theoretical foundations of Clifford algebras to eliminate redundant matrix allocations and computations, then systematically apply established optimization techniques to enhance performance further. We report a final average speedup of 21.35x over the baseline implementation of eleven functions and runtimes comparable to and faster than the original PyTorch implementation in six cases. In the remaining cases, we achieve performance in the same order of magnitude as the original library.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。