Sig combine functions#

sig_combine_cuda#

int sig_combine_cuda_f(const float *sig1, const float *sig2, float *out, uint64_t batch_size, uint64_t dimension, uint64_t degree, bool scalar_term = true) noexcept#

Combines batches of truncated signatures on the GPU using Chen’s identity.

Parameters:
  • sig1 – Pointer to batch of first signatures (row-major, on device), size = batch_size * sig_length(dimension, degree).

  • sig2 – Pointer to batch of second signatures (row-major, on device), same size as sig1.

  • out – Pointer to output buffer (row-major, preallocated, on device), same size as sig1.

  • batch_size – Batch size.

  • dimension – Dimension of the underlying path space.

  • degree – Truncation degree of the signatures.

Returns:

Status code (0 = success).

int sig_combine_cuda_d(const double *sig1, const double *sig2, double *out, uint64_t batch_size, uint64_t dimension, uint64_t degree, bool scalar_term = true) noexcept#

sig_combine_backprop_cuda#

int sig_combine_backprop_cuda_f(const float *sig_combined_deriv, float *sig1_deriv, float *sig2_deriv, const float *sig1, const float *sig2, uint64_t batch_size, uint64_t dimension, uint64_t degree, bool scalar_term = true) noexcept#

Batch backpropagation through sig_combine on the GPU.

Parameters:
  • sig_combined_deriv – Pointer to input derivatives (on device), size = batch_size * sig_length(dimension, degree).

  • sig1_deriv – Pointer to output sig1 derivatives (on device, preallocated).

  • sig2_deriv – Pointer to output sig2 derivatives (on device, preallocated).

  • sig1 – Pointer to first signatures (on device).

  • sig2 – Pointer to second signatures (on device).

  • batch_size – Batch size.

  • dimension – Dimension of the underlying path space.

  • degree – Truncation degree of the signatures.

Returns:

Status code (0 = success).

int sig_combine_backprop_cuda_d(const double *sig_combined_deriv, double *sig1_deriv, double *sig2_deriv, const double *sig1, const double *sig2, uint64_t batch_size, uint64_t dimension, uint64_t degree, bool scalar_term = true) noexcept#

Citation#

If you found this library useful in 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}
}