Skip to main content

pySigLib logo

The high-performance toolkit for rough path computation

Documentation | Installation | API reference | Paper

PyPI - Version PyPI - Downloads Python Versions CI - Test Read the Docs License

pySigLib brings path signatures, log-signatures, branched signatures, and signature kernels into one accelerated toolkit. It provides NumPy, PyTorch, and JAX support, with automatic differentiation for PyTorch and JAX and multithreaded C++ or native CUDA execution.

Installation

pip install pysiglib

# Add CUDA support
pip install "pysiglib[cuda]"

The JAX integration is included in the wheel. Install JAX separately with pip install jax if you want to use it. For source builds and platform-specific guidance, see the installation guide.

For Julia wrappers, the native release artifacts provide CPU and CUDA libraries callable through ccall, without requiring Python or a compiler.

Quick start

import numpy as np
import pysiglib

path = np.random.default_rng().normal(size=(32, 1000, 10))
signature = pysiglib.sig(path, degree=5)

Paths have shape (path length, dimension) or (batch size, path length, dimension). Computation runs on the device where the input already lives.

Why pySigLib?

  • A unified toolkit for rough path computations - signatures, log-signatures, branched signatures, and signature kernels.
  • Accelerated CPU and CUDA implementations for large workloads.
  • Native NumPy, PyTorch, and JAX support without moving data between frameworks.
  • Automatic differentiation with PyTorch and JAX, including jit and vmap support in JAX.
  • Cross-platform - Windows, Linux and Mac systems supported.

Capabilities

Signatures
Truncated signatures and individual coefficients.
Log-signatures
Truncated log signatures in full or compact Lyndon coordinates.
Signature kernels
Kernels and metrics for sequential data.
Branched signatures
Branched signatures, branched log signatures and branched signature kernels.
Signature streams
Online updates and constant-time interval queries.
Backpropagation
Manual and automatic backpropagation with PyTorch and JAX support.

Framework integrations

PyTorch autograd

Signatures compose directly with the rest of a PyTorch model:

import torch
from pysiglib.torch_api import sig

path = torch.randn(32, 1000, 10, device="cuda", requires_grad=True)
sig(path, degree=5).sum().backward()

JAX transforms

The JAX API supports jit, vmap, and grad:

import jax
import jax.numpy as jnp
from pysiglib.jax_api import sig

@jax.jit
def signature_norm(path):
    return jnp.sum(sig(path, degree=5) ** 2)

path = jax.random.normal(jax.random.key(0), (1000, 10))
gradient = jax.grad(signature_norm)(path)

See the documentation for complete examples and the full API reference.

Citation

If the library supports your research, please consider citing the paper:

@article{shmelev2025pysiglib,
  title={pySigLib -- Fast Signature-Based Computations on CPU and GPU},
  author={Shmelev, Daniil and Salvi, Cristopher},
  journal={arXiv preprint arXiv:2509.10613},
  year={2025}
}

Contributing

Contributions are welcome. Please open an issue first to discuss a change, then submit a pull request.

Sponsors

If you'd like to support development, please consider sponsoring the project.

Metadata

Release files for pysiglib 4.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pysiglib 4.1.0
File Interpreter ABI Platform Actions
pysiglib-4.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pysiglib-4.1.0-py3-none-win_amd64.whl
pysiglib-4.1.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for pysiglib-4.1.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
pysiglib-4.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pysiglib-4.1.0-py3-none-macosx_11_0_arm64.whl

Total release size: 8.5 MB

Release files / pysiglib-4.1.0-py3-none-win_amd64.whl

Download URL pysiglib-4.1.0-py3-none-win_amd64.whl
Size 2.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
6adb11627fb5e6a10e58662f8ef89ede74c45526d5263fbfefe7b66603fd24ca
BLAKE2b-256 checksum
How to use checksums
35cb66717c0fa9b06a52db15f67a28d5857e76e29a3be771b4279f2cb69dd353
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / pysiglib-4.1.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL pysiglib-4.1.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 3.9 MB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
7bb1dcf004d2bfe1b2aaa7e3ed7821b4994f10a0c9c94ccfe2e998ca2d5f43b8
BLAKE2b-256 checksum
How to use checksums
6f40b94805a236caf2f09ac3c1b9edbd46ed30adac42bfe35a605a9a438663c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / pysiglib-4.1.0-py3-none-macosx_11_0_arm64.whl

Download URL pysiglib-4.1.0-py3-none-macosx_11_0_arm64.whl
Size 2.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3935e90c2482f1cda7639ca1ca690e3068234faba0b4efebee13d733da060a3a
BLAKE2b-256 checksum
How to use checksums
6308d21faa6e35b730a1900f1508a28e05e0bb8ab8b470bd413df3051448bada
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for pysiglib 4.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for pysiglib-4.1.0-py3-none-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page