Why Initialization Matters
A principal curve is estimated by repeatedly projecting observations onto a current path and updating the path to fit those projections smoothly. This iterative process can be sensitive to its starting curve: different starts may produce different projection locations and, in turn, different updates. A stopping rule can show that an iteration has stabilized, but it cannot by itself show that the resulting fit is the best-fitting curve.
This sensitivity matters when the cell distribution bends, has uneven density, or contains outliers. A straight initial path may pass across a curved cloud instead of following it; a highly flexible start may follow noise or an unusual observation. The aim here is to assess those risks by comparing starting paths and smoothing choices, not to assume that every converged fit is equally informative.
A Fitting Criterion and Its Assumptions
Let \(z_i\in\mathbb{R}^d\) be the coordinate vector for observation \(i\), for \(i=1,\ldots,n\). For this discussion, represent a candidate curve as a twice differentiable, unit-speed path \(\gamma:[0,L]\to\mathbb{R}^d\) with \(\gamma''\in L^2([0,L];\mathbb{R}^d)\), so that \(\|\gamma'(s)\|=1\). The nearest projection coordinate for observation \(i\) is any value \(t_i\in[0,L]\) that minimizes its squared Euclidean distance to the path. If more than one coordinate achieves the minimum, the projection is tied and a rule is needed to select one.
This criterion is a way to make the fit-versus-smoothness trade-off explicit; it is not a claim that every principal-curve implementation optimizes exactly this objective. In particular, an iterative algorithm may use a particular smoother, parameterization, or approximation. To interpret its behavior, know what quantity that smoother penalizes and what is held fixed during each update.
The formula assumes meaningful distances in the chosen coordinate space, a specified curve domain and boundary treatment, and a defined set of weights. Observations are treated as points to be represented by one path; the criterion does not by itself establish that the biological process is truly one-dimensional. The scale of the penalty depends on coordinate scaling. With the stated unit-speed, arc-length parameterization, the integral of squared curvature with respect to arc length is invariant to reparameterization of the same geometric curve. If a method instead uses a different parameter \(u\), its penalty must be stated explicitly; for example, \(\int\|\gamma''(u)\|^2\,du\) is generally parameterization-dependent.
The units also clarify why scaling matters. If coordinates and arc length are measured in units of length, squared residuals have units of length squared, while \(\int\|\gamma''(s)\|^2ds\) has units of inverse length. Thus \(\lambda\) must have units of length cubed for the two terms to be added. Rescaling the coordinates changes the numerical balance unless \(\lambda\) is adjusted consistently.
Why Alternating Updates Can Get Trapped
An iterative fit alternates between assigning projections and updating the curve. For a fixed curve, choosing each nearest projection minimizes that observation’s squared distance. For fixed projection coordinates, a curve update that minimizes the corresponding conditional penalized criterion cannot increase that criterion. This simple fact explains why an idealized alternating procedure can make progress, but it does not imply that it reaches a global minimum.
The inequality holds when the curve is fixed and each new \(t_i\) is a nearest projection. A curve update that is an exact conditional minimizer likewise cannot increase the criterion for the fixed assignments. In practice, smoothers may only approximate that minimization, and the assignments can change abruptly when projections are tied or nearly tied. Even when the objective decreases at every step, it may settle at a solution whose fit depends on the initialization.
Geometrically, a path that starts on one side of a curved cloud can attract projections to a different portion of the cloud than a path that starts near its center. Those projection assignments then guide subsequent smoothing. The resulting iteration can stabilize around distinct candidate paths. More smoothing can suppress small bends, but can also flatten real curvature; less smoothing can follow local structure, but can amplify noise or outliers.
Comparing Starts on Curved Data
Worked Example: A Straight Start Versus a Curved Start
Suppose three hypothetical observations in a two-dimensional coordinate space are \((-1,1)\), \((0,0)\), and \((1,1)\). Compare two candidate paths: the horizontal line \(y=0\), which could be a straight-line start, and the parabola \(y=x^2\), which could be a curved start. First compare the residual term alone, setting \(\lambda=0\).
For the horizontal line, the nearest points are \((-1,0)\), \((0,0)\), and \((1,0)\). The squared distances are \(1\), \(0\), and \(1\), so the residual sum is \(1+0+1=2\).
Each observation lies on the parabola \(y=x^2\). Its squared distance to that path is therefore zero, and the residual sum is \(0+0+0=0\). On these data, the curved candidate has the smaller unpenalized residual sum.
That comparison alone does not settle which path to use: the parabola bends and may incur a positive roughness penalty, whereas the line has zero curvature. With \(\lambda>0\), the criterion compares residual improvement against roughness cost. The example shows why a straight initialization should not be judged only by whether it converges; it should be compared with plausible curved alternatives under the same coordinate scaling and smoothing convention.
A practical comparison begins with several defensible starts rather than an arbitrary collection of curves. Common options include a principal-component line, a smooth path initialized from ordered low-dimensional coordinates, and modest perturbations of a promising start. Use the same data, coordinate scaling, weights, curve domain, smoothing setting, and convergence rule for each start. Otherwise, differences in results cannot be attributed to initialization alone.
Use identical coordinates, scaling, weights, and curve-fitting settings across starts.
Include a simple baseline and alternatives able to follow the observed curvature.
Record the residual term, roughness or smoothing setting, total criterion if defined, and stability of projections.
Repeat with nearby starts and smoothing choices; investigate substantial changes in path or projection assignments.
Outliers and the Smoothing Trade-Off
Worked Example: How One Outlier Pulls a Flexible Fit
Consider hypothetical observations at horizontal coordinates \(-2,-1,0,0,1,2\). Their vertical coordinates are \(0,0,0,4,0,0\): five lie on the horizontal line \(y=0\), and one is a high outlier at \((0,4)\). To isolate the smoothing trade-off, suppose the projections are held at these horizontal coordinates and compare two fitted graph values on the five-point grid \(-2,-1,0,1,2\).
The flat fit has values \((0,0,0,0,0)\). Its squared residual sum is \(4^2=16\), contributed entirely by the outlier. Now consider the more flexible fit with values \((0,1,2,1,0)\). At the center, the two observations have residuals \(0-2=-2\) and \(4-2=2\), contributing \(4+4=8\). The two observations at \(-1\) and \(1\) each contribute \(1\), and those at \(-2\) and \(2\) contribute zero. The residual sum is therefore \(8+1+1=10\).
For an explicit discrete roughness measure, label the five grid values \(y_0,\ldots,y_4\) and define \(R=\sum_{j=1}^{3}(y_{j+1}-2y_j+y_{j-1})^2\). The flat fit has \(R=0\). For \((0,1,2,1,0)\), its three second differences are \(0,-2,0\), so \(R=0^2+(-2)^2+0^2=4\). With the illustrative criterion \(Q=\mathrm{SSE}+\lambda R\), the flexible fit has \(Q=10+4\lambda\), while the flat fit has \(Q=16\). The flexible fit is preferred by this criterion when \(10+4\lambda<16\), or \(\lambda<1.5\); the flat fit is preferred when \(\lambda>1.5\), with a tie at \(1.5\).
This calculation uses fixed horizontal coordinates and a stated discrete penalty; it is not a nearest-projection principal-curve fit. It demonstrates the trade-off: a lower residual can come at the cost of extra bending. In an actual fit, inspect whether a bend is supported by several observations or is mainly a response to an isolated cell. A robust loss or a separate outlier assessment may be useful, but changing the loss changes the fitting criterion and should be reported.
Local-Minimum Diagnostics and Limitations
A local minimum is a candidate solution that cannot be improved by sufficiently small permitted changes, even though a more distant candidate may have a lower objective. If the objective is differentiable, a local minimum at an interior point must have zero first derivative in every permitted direction. If it is twice differentiable there, its Hessian must also be positive semidefinite. Differentiability alone does not ensure that second derivatives exist, so the Hessian condition requires that additional smoothness assumption.
Worked Example: Comparing Converged Fits
Suppose three hypothetical starts yield the following residual and roughness values on the same scaled data. For illustration, use the same criterion \(Q=\mathrm{SSE}+0.1R\) for each candidate.
| Start | Residual sum | Roughness | Penalized criterion |
|---|---|---|---|
| Principal-component line | 8.0 | 2.0 | 8.0 + 0.1(2.0) = 8.2 |
| Curved start A | 5.0 | 20.0 | 5.0 + 0.1(20.0) = 7.0 |
| Curved start B | 4.7 | 30.0 | 4.7 + 0.1(30.0) = 7.7 |
Under this criterion, curved start A gives the smallest penalized value, \(7.0\), even though curved start B has the smallest residual sum, \(4.7\). These hypothetical output values illustrate the comparison, not a universal choice rule. If several starts converge to visibly different paths with similar values, report that sensitivity rather than implying that one fit is uniquely determined. If the implementation does not define a common objective, compare its documented diagnostics and the fitted paths rather than inventing a total criterion.
Useful warning signs include large differences in fitted paths across nearby initializations, abrupt changes in projection assignments, a fit that bends sharply around one observation, or a substantial change when smoothing is adjusted slightly. Check the coordinates and scaling, the convergence trace, and whether the smoother behaves as specified. A small change in an objective is not enough to establish a good fit: the result may be stable numerically but still depend on initialization or be unsuitable for the data.
Comparing starts is a practical alternative to trusting a single initialization; varying smoothing is a complementary sensitivity analysis, not a substitute for it. A single simple start is faster but can miss a better-fitting candidate. Many starts cost more and still cannot guarantee a global optimum. Likewise, choosing the lowest residual alone favors flexibility and can overfit; choosing the strongest smoothing alone can erase real curvature. These comparisons are conditional on the chosen coordinate representation and fitting criterion. They do not establish a biological trajectory, and a single smooth path may be an inadequate description when the data have more complex structure.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- Why does convergence from one start fail to establish that a principal-curve fit is globally optimal?
- In the outlier example, what value of \(\lambda\) makes the flat and flexible fits tie under the stated discrete criterion?
- Why must coordinate scaling be consistent when comparing penalized fits?
- What second-order condition applies at an interior local minimum when the objective is twice differentiable?
Solutions. (1) The iterative updates can stabilize at a candidate whose projections and curve depend on the initial path; other starts may reach a lower criterion. (2) Solve \(10+4\lambda=16\), giving \(\lambda=1.5\). (3) Scaling changes distances and roughness, so it changes their numerical balance unless the penalty weight is adjusted consistently. (4) The Hessian must be positive semidefinite; this condition requires twice differentiability, while differentiability alone supports only the first-order necessary condition.