Skip to contents

Single-sample within-cohort discriminator (family M, image/invariance) that maps each specimen's frozen-order per-sample robust-CLR (rCLR) profile to a TIME-AUGMENTED 2D path and scores its truncated path signature (Chen 1957; Lyons 1998; the iterated-integral feature map) through a FROZEN ridge-logistic head. A specimen of \(p\) universe features is lifted to the 2D path \(P_i = (t_i, v_i)\) with the FROZEN time grid \(t_i = (i-1)/(p-1)\) along the frozen feature axis and \(v_i\) the rCLR value; the increments \(\Delta_i = P_{i+1} - P_i\) drive the CLOSED-FORM truncated signature over the truncated tensor algebra \(T^{(L)}(\mathbb{R}^2)\), computed in PURE BASE R via Chen's identity, flattened to a fixed-length coefficient vector (the level-0 constant \(1\) is dropped), standardized by FROZEN training statistics, and fed to a FROZEN ridge-logistic linear head. Larger = more case-like.

Pure base-R contract (no python at fit OR score). The PRESPECIFIED dep_route was reticulate-iisignature, but iisignature has no wheels and FAILS to build on python 3.14 (build-isolation ModuleNotFoundError: numpy), and esig's only py3.14 path needs pyrecombine which also has no wheel. Rather than ship a fragile C++ python dependency for a clinic-deployable single-sample method, the PRODUCTION scorer computes the truncated signature in CLOSED FORM in PURE BASE R (Chen's identity for a piecewise-linear path). The fitted model holds ONLY plain R-side state: the frozen feature universe, the signature config (L, signature dimension D), the FROZEN per-coordinate coefficient standardization (coef_mean, coef_sd), the FROZEN linear head (weights, intercept), and the resolved hyperparameters. There is NO python dependency, NO GPU, NO external pointer at fit or at score. The signature is a deterministic pure-R function of the path alone, so the default model_digest is a stable deterministic snapshot suitable for singlesample_assert_row_equivariant, and a row's signature — hence its score — is bit-identical whether scored alone or in any batch (single-row score == batch score EXACTLY 0).

Why this is inherently single-sample. The path signature \(S(P)\) is a fixed deterministic function of a single specimen's own path with NO learned parameters and NO cross-sample statistics — each specimen's coefficients depend ONLY on that specimen's own rCLR profile and the frozen time grid. There is no batch coupling and no float32/accumulation artifact (the closed form is exact base-R double arithmetic). The coefficient standardization uses FROZEN training mean/sd (never the query's own), and the head is a frozen linear map, so the whole pipeline is single-sample-safe.

Signature vs log-signature. This scorer uses the FULL truncated SIGNATURE, not the log-signature. The log-signature is a non-redundant compression (a Lie-algebra element in a Lyndon/Hall basis); the full signature is a complete superset of the same information that the ridge head handles via L2 regularization, and the closed-form full signature avoids the subtle Lyndon/Hall log map. The manifest notes record "path/log-signature".

Signal construction (deterministic, frozen). For a specimen's universe-aligned per-sample rCLR vector \(v\) (length \(p =\) size of the FROZEN feature universe, in the FROZEN feature ORDER), the 2D path is the time-augmentation \(P_i = (t_i, v_i)\) with \(t_i = (i-1)/(p-1)\). The signature is ORDER-dependent along the feature axis: this is an intended, frozen design choice (the feature order is fixed at fit; there is NO claim of feature-permutation invariance). The row-equivariance harness permutes SAMPLES (rows), never features (columns).

Single-sample transform. Each specimen is mapped to the self-contained per-sample robust CLR over its OWN strictly-positive support (geometric-mean centring on v > 0) in the FROZEN feature universe; this is exactly invariant to per-specimen positive scaling and uses no cross-row statistic. Universe features absent from a specimen carry the neutral rCLR value 0. The SAME rCLR transform feeds the signature at fit and at score.

Degenerate-neutral. A query returns the neutral score 0 if fewer than hp$min_features universe features overlap the query columns (a column-overlap floor, batch-independent), or it has empty positive support over the frozen universe on the (pre-rCLR) aligned ORIGINAL abundances (!any(X_use[i, ] > 0)). A FLAT all-equal-positive composition maps to the rCLR origin (an all-zero \(v\)) but is a VALID specimen scored normally (NOT floored): its 2D path is non-trivial because the time coordinate \(t\) still moves, so its signature is non-degenerate. The empty-support test is on the ORIGINAL abundances, NOT on all(v == 0).

Reference oracle (test only). roughpy 0.3.0 (py3.14 wheel) is used ONLY as a skip-guarded \(\S\)7 reference engine to validate the pure-R signature math + index order to \(< 10^{-9}\); the PRODUCTION scorer has NO python dependency.

References

Chen K-T. (1957) Integration of paths, geometric invariants and a generalized Baker–Hausdorff formula. Annals of Mathematics 65(1):163-178.

Lyons T. (1998) Differential equations driven by rough signals. Revista Matematica Iberoamericana 14(2):215-310.

Chevyrev I, Kormilitzin A. (2016) A primer on the signature method in machine learning. arXiv:1603.03788.