Skip to content

A high-performance Julia library for computing path signatures, log-signatures (Lyndon basis), and free tensor algebra operations.

License

Notifications You must be signed in to change notification settings

aleCombi/ChenSignatures.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChenSignatures.jl

ChenSignatures.jl is a high-performance Julia library for computing path signatures and log-signatures—core tools in Rough Path Theory, stochastic analysis, and modern deep-learning architectures such as Neural CDEs.

It provides state-of-the-art speed, sparse algebra support, and a clean API for both research and production use.

Build Status Documentation PyPI


📐 Overview

Path signatures are sequences of iterated integrals that encode the geometric structure of a path. They form a powerful, coordinate-free representation used in:

  • financial time series and derivatives pricing
  • machine learning (Neural CDEs, feature engineering)
  • stochastic analysis and rough path theory

ChenSignatures.jl computes both signatures and log-signatures efficiently and accurately, with full support for dense and sparse tensor algebras.


✅ Key Features

Core Functionality

  • Signatures: Compute truncated path signatures up to any depth.
  • Log-Signatures: Lyndon-projected log-signatures for minimal bases.
  • Tensor Algebra: Dense and sparse tensor algebra (SparseTensor).
  • Algebraic Operations: Shuffle product, tensor exp/log, resolvent operators.

Performance

  • Highly optimized kernels using:
  • Designed to scale across:
    • long paths (large N)
    • high dimensions (d)
    • large truncation levels (m)

Validation

Benchmarked and numerically cross-validated against:

  • iisignature
  • pysiglib

Full benchmarking and correctness tooling is included (see below).


🐍 Python API: chen-signatures

ChenSignatures.jl powers the Python package:

📦 PyPI: https://pypi.org/project/chen-signatures/
📁 Source: python/

pip install chen-signatures

Features:

  • Same API as Julia (sig, logsig)
  • Works on Python 3.9–3.13
  • Automatically installs a lightweight Julia runtime via juliacall
  • Faster than iisignature and comparable to pysiglib

📊 Benchmarks

Cross-Language Benchmarks

For comprehensive performance comparisons against iisignature and pysiglib, see the dedicated benchmark repository:

👉 aleCombi/sig-benchmarks

This external suite provides:

  • Isolated environment testing (Python vs Julia)
  • Multiple library comparisons
  • Detailed performance profiles and visualizations
  • Methodologically fair benchmarking

Internal Julia Benchmarks

For quick development regression testing, see:

📁 benchmark/

Run Julia-only benchmarks:

julia --project=benchmark benchmark/benchmark.jl

📦 Dependencies

ChenSignatures.jl uses a minimal, high-performance stack:


🚀 Example

using ChenSignatures

path = randn(1000, 5)
sig_result = sig(path, 4)

# For logsig, need to prepare basis first
basis = prepare(5, 4)  # dimension=5, level=4
logsig_result = logsig(path, basis)

📖 Documentation

For detailed API documentation, mathematical background, and usage examples, see:

👉 ChenSignatures.jl Documentation


🧪 Testing

The repository includes:


📚 Citation

@software{chen_signatures,
  author = {Combi, Alessandro},
  title = {ChenSignatures.jl: High-performance signatures and log-signatures},
  year = {2025},
  url = {https://github.com/aleCombi/ChenSignatures.jl}
}

🤝 Contributing

Issues and feedback are welcome! However, pull requests are not being accepted at this time.

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

Version Management

For Maintainers:

Version is managed in Project.toml only. Python package reads it automatically.

To release a new version:

  1. Edit Project.toml: version = "0.3.0"
  2. Commit: git commit -am "Bump version to 0.3.0"
  3. Register with Julia General (comment @JuliaRegistrator register on PR/commit)
  4. TagBot creates v0.3.0 tag automatically
  5. Tag triggers PyPI publish automatically

Never edit version in python/pyproject.toml - it's computed dynamically.

About

A high-performance Julia library for computing path signatures, log-signatures (Lyndon basis), and free tensor algebra operations.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •