In this paper we introduce Keras Sig a high-performance pythonic library designed to compute path signature for deep learning applications. Entirely built in Keras 3, \textit{Keras Sig} leverages the seamless integration with the mostly used deep learning backends such as PyTorch, JAX and TensorFlow. Inspired by Kidger and Lyons (2021),we proposed a novel approach reshaping signature calculations to leverage GPU parallelism. This adjustment allows us to reduce the training time by 55\% and 5 to 10-fold improvements in direct signature computation compared to existing methods, while maintaining similar CPU performance. Relying on high-level tensor operations instead of low-level C++ code, Keras Sig significantly reduces the versioning and compatibility issues commonly encountered in deep learning libraries, while delivering superior or comparable performance across various hardware configurations. We demonstrate through extensive benchmarking that our approach scales efficiently with the length of input sequences and maintains competitive performance across various signature parameters, though bounded by memory constraints for very large signature dimensions.
翻译:本文介绍Keras Sig——一个专为深度学习应用设计的高性能Python库,用于计算路径签名。该库完全基于Keras 3构建,充分利用其与主流深度学习后端(如PyTorch、JAX和TensorFlow)的无缝集成能力。受Kidger和Lyons(2021)的启发,我们提出了一种新方法,通过重构签名计算流程以充分利用GPU并行计算能力。这一改进使得训练时间减少55%,直接签名计算效率较现有方法提升5至10倍,同时保持相近的CPU性能。Keras Sig依赖高层张量运算而非底层C++代码,显著减少了深度学习库中常见的版本兼容性问题,并在不同硬件配置下实现更优或相当的计算性能。通过大量基准测试,我们证明该方法能随输入序列长度高效扩展,并在不同签名参数下保持竞争优势,但在处理超大签名维度时会受内存限制影响。