pysiglib.log_sig_combine

pysiglib.log_sig_combine#

log_sig_combine(log_sig1, log_sig2, dimension, degree, *, time_aug=False, lead_lag=False, n_jobs=1)[source]#

Combines two truncated log-signatures (Lyndon basis) of the same degree and dimension using the Baker-Campbell-Hausdorff (BCH) formula. In particular, let \(x_1, x_2\) be two paths such that the first point of \(x_2\) is the last point of \(x_1\). Let \(L(x_1), L(x_2)\) be the truncated log-signatures of \(x_1, x_2\) respectively (computed with method=2 or method=3). Then calling this function on \(L(x_1), L(x_2)\) returns the truncated log-signature of the concatenated path,

\[L(x_1 * x_2) = \text{BCH}(L(x_1), L(x_2)).\]
Parameters:
  • log_sig1 (numpy.ndarray | torch.tensor) – The first truncated log-signature (Lyndon basis, method=2 or method=3)

  • log_sig2 (numpy.ndarray | torch.tensor) – The second truncated log-signature (Lyndon basis, method=2 or method=3). Must have the same degree and dimension as the first.

  • dimension (int) – Dimension of the underlying space, \(d\).

  • degree (int) – Truncation level of the log-signatures, \(N\)

  • time_aug (bool) – Whether time augmentation was applied before computing the log-signature.

  • lead_lag (bool) – Whether the lead lag transformation was applied before computing the log-signature.

  • n_jobs (int) – Number of threads to run in parallel. If n_jobs = 1, the computation is run serially. If set to -1, all available threads are used.

Returns:

Combined log-signature (Lyndon basis)

Return type:

numpy.ndarray | torch.tensor


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}
}