Expand description
Path signatures for trajectory characterization.
Implements truncated path signatures from rough path theory — a universal and order-aware feature of sequential data. Any continuous function of a path can be approximated by a linear function of its signature.
§Key Properties
- Universality: sufficient statistics for trajectory classification
- Reparametrization invariance: captures shape, not sampling rate
- Chen’s Identity:
S(α * β) = S(α) ⊗ S(β)— incremental updates in O(K²) - Hierarchical: depth 1 = displacement, depth 2 = signed area (correlation/volatility)
§Usage with CVX
Path signatures operate on region trajectories (K~80 dims at L3), NOT on raw embeddings (D=768). The HNSW graph hierarchy provides the dimensionality reduction that makes signatures tractable:
- Region trajectory at L3: K=80 → depth 2 signature = 80 + 6400 = 6,480 features
- Raw embeddings: D=768 → depth 2 = 768 + 589,824 → intractable
§References
- Lyons, T.J. (1998). Differential equations driven by rough signals.
- Chevyrev & Kormilitzin (2016). A primer on the signature method in ML.
- Kidger & Lyons (2021). Signatory: differentiable computations of the signature.
Structs§
- Path
Signature Result - Computed path signature result.
- Signature
Config - Configuration for signature computation.
Enums§
- Signature
Error - Error types for signature computation.
Functions§
- compute_
log_ signature - Compute the log-signature (compact alternative via antisymmetric part).
- compute_
signature - Compute the truncated path signature of a trajectory.
- signature_
distance - Compute L2 distance between two signatures.
- update_
signature_ incremental - Incrementally update a signature when a new point is appended.