pysiglib.branched_sig_backprop

pysiglib.branched_sig_backprop#

branched_sig_backprop(path, bsig, bsig_derivs, degree, *, time_aug=False, lead_lag=False, end_time=1.0, tree_order='recursive', planar=False, n_jobs=1)[source]#

Backpropagates through the branched signature computation.

Given the forward branched signature bsig = branched_sig(path, degree) and upstream derivatives bsig_derivs = dF/d(bsig), computes dF/d(path).

Parameters:
  • path – Input path, shape (length, dimension) or (batch, length, dimension).

  • bsig – Forward branched signature output.

  • bsig_derivs – Upstream derivatives w.r.t. the branched signature.

  • degree – Maximum tree order (must match forward call).

  • time_aug – Whether time augmentation was used in the forward pass.

  • lead_lag – Whether lead-lag was used in the forward pass.

  • end_time – End time for time augmentation.

  • tree_order – Tree ordering convention of bsig and bsig_derivs. "recursive" (default) uses the recursive construction order. "canonical" uses the shape-first order matching tree_to_idx().

  • planar – If True, backpropagate through planar branched signature.

  • n_jobs – Number of parallel threads for batch processing.

Returns:

Path derivatives, same shape as path.


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