# Cassidy derivative continuation for the conditional H map

This implements the implicit derivative in Cassidy (2023), section 2.2, equations 7–8, with the linear-system evaluation recommended in section 2.3: https://doi.org/10.1007/s11538-023-01200-0 . The paper explicitly permits twice continuously differentiable objectives other than likelihoods. We apply it to the elastic-curve objective, without calling the result a maximum-likelihood estimator.

For fixed nearest-node assignments, write the objective as `G(Y,X)=sum_i w_i ||x_i-y_a(i)||² + lambda ||BY||² + mu ||CY||²`. Let `A=diag(assigned masses)+lambda B.T B+mu C.T C`. The node-coordinate Hessian is `2 A` in each coordinate dimension. Moving H in one coordinate has mixed derivative `-2 w_H e_a(H)`. Equation 8 therefore gives `dY/dx_H = solve(A,w_H e_a(H))` in that coordinate. The first-order predictor is exactly affine within this assignment region; it is checked against finite differences and full correction.

The global nearest-node objective is only piecewise smooth. We explicitly locate the first competing-node equality along each predicted segment using the quadratic distance-difference equation. We stop at that boundary, take a small declared step across it, apply the alternating-assignment corrector, and recompute the derivative. Such transitions are logged as nonsmooth events, not applications of the smooth implicit-function theorem. Finite positive Hessian eigenvalues do not rule out assignment jumps or competing local minima.

The main study uses the ten existing enriched lambda=.01 baseline families, fixed 28-node chains, mu=.1, 50 equally weighted pooled profiles and all 49 positive-MDS dimensions. Only H:58–65's two displayed coordinates change. The other 47 H coordinates, other 49 profiles, weights, topology, penalties and basis stay fixed. The original two 25×25 grids are reused exactly.

Each family reaches every cell through three routes from actual H: a straight line, MDS1 then the other axis, and the reverse axis order. Straight-route endpoints are returned to actual H to check reversibility. Endpoints are corrected and compared with the original independent-refit map. Diagnostics include derivative finite-difference errors, predictor/corrector displacement, assignment events, Hessian minimum eigenvalues, endpoint path disagreement and return error. A separate half-size event-crossing check repeats selected paths. The map compares minimum recovered penalized training objectives by final group-median order among final-1a-first outcomes; no outcome is forcibly constrained to remain 1a-first.

The tests neither reconstruct missing text nor identify a universal two-dimensional boundary. They do not estimate chronological probabilities, temporal Lyapunov exponents, or graph branching. They are derivative-based data sensitivity and piecewise predictor-corrector continuation, with explicit nonsmooth limitations. No claim of exhaustive branches or global optima is made.

Estimated retained output is below 15 MB and peak working memory below 150 MB, excluding shared temporary dependencies. Only compact endpoint metrics and selected diagnostic traces are retained; no per-step full-model archive is written.
