Skip to main content

Fast path signatures

Project description

chen-signatures

Fast rough path signatures for Python, powered by a high-performance Julia backend.

PyPI Python

chen-signatures brings the speed and numerical stability of Julia’s ChenSignatures.jl to Python via juliacall, offering a modern, actively maintained alternative to existing signature libraries.

It has been benchmarked against both iisignature and pysiglib, showing:

  • Comparable performance to pysiglib, a modern C++/Python implementation
  • Consistently faster performance than iisignature across typical configurations

Full benchmark notebooks and articles will be published separately.


Why chen-signatures?

Feature chen-signatures iisignature pysiglib
Speed 🚀 Optimized Julia backend ⚠️ Older implementation 🔄 Similar to chen-signatures
Python ≥ 3.10 ✅ Yes ❌ No (≤3.9 only) ✅ Yes
Python 3.13 ✅ Yes ❌ No ✅ Yes
Log-signature ✅ Yes ⚠️ Limited ❌ Not supported
Autodiff ✅ Yes (ForwardDiff) ❌ No ❌ No
Maintenance ✅ Active ⚠️ Unmaintained ✅ Active

Installation

pip install chen-signatures

On first import, juliacall will automatically install a lightweight Julia runtime. This happens once per environment.


Quick Start

import chen
import numpy as np

path = np.random.randn(1000, 10)

signature = chen.sig(path, m=5)
logsignature = chen.logsig(path, m=5)

API

sig(path, m)

Compute a truncated signature up to level m.

sig = chen.sig(path, m=3)

logsig(path, m)

Compute log-signatures using the Lyndon basis.

logsig = chen.logsig(path, m=5)

Supported Types

  • float32, float64
  • Any NumPy array-like input
  • Contiguous arrays recommended (handled automatically)

Use Cases

  • Financial time series
  • Sensor data and IoT
  • Neural CDEs / differential ML
  • Representation learning
  • Anomaly detection

Limitations

  • First import is slow (Julia installation)
  • CPU-only execution
  • Uses more memory than minimal C++ libraries

Requirements

  • Python ≥ 3.9
  • NumPy ≥ 1.20
  • ~500MB disk space for Julia runtime

Citation

@software{chen_signatures,
  author = {Combi, Alessandro},
  title = {chen-signatures: Fast rough path signatures for Python},
  year = {2025},
  url = {https://github.com/aleCombi/ChenSignatures.jl}
}

Contributing

https://github.com/aleCombi/ChenSignatures.jl

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chen_signatures-0.1.8.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chen_signatures-0.1.8-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file chen_signatures-0.1.8.tar.gz.

File metadata

  • Download URL: chen_signatures-0.1.8.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for chen_signatures-0.1.8.tar.gz
Algorithm Hash digest
SHA256 48ea5a5fb76dcefcedc30a7f1e55a20b48234eeb0b1e961dffe0ad68b71490a5
MD5 7ec15eefa003d84696d3de17275c8711
BLAKE2b-256 121c8f3676e74beccf96b3784759a17e0bf3ead94fa599be56d98c629f6dd264

See more details on using hashes here.

File details

Details for the file chen_signatures-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for chen_signatures-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5311e4457ce6d796cb3e7f5ed132eb330773377e7dbb4d715f5cd184dbd3d130
MD5 8cec5e45b5059de97428594e9a51b45d
BLAKE2b-256 56f421d20b15c84026869a2ac343409755de9e516b567fcc8d7ae7a62edf1963

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page