18.22 Line search and step scaling
After BFGS proposes a direction, nlmx uses Armijo backtracking to seek sufficient OFV decrease. The transformed-scale step is capped at two units. If the full proposal fails, the step shrinks repeatedly.
This prevents one unstable curvature estimate from producing an enormous invalid move. It cannot create a descent direction when gradients are noisy or the local approximation is poor. A line-search failure near a small gradient may represent practical convergence; far from zero it is a failure requiring diagnosis.
Parameter transforms make a two-unit internal move mean different natural changes. A log coordinate changes multiplicatively; a logit near a bound may move little naturally. Good initialization and scale therefore remain important.
Practical interpretation
When line search fails, preserve the last accepted point and inspect proposed direction, gradient magnitude and which model evaluation became invalid. A zero residual variance, ODE failure or non-positive OMEGA requires a different remedy than a genuine flat optimum. Changing one numerical control at a time keeps the recovery evidence interpretable.
Armijo decrease is a numerical acceptance rule, not evidence that the proposed parameter change is scientifically reasonable. Bounds and model review still determine plausibility. Conversely, a rejected large step can point toward a useful direction even though its magnitude was unsafe.
Benchmarking should count rejected evaluations because they consume time. A method with fewer printed iterations may still perform more expensive backtracking evaluations.
Common mistakes
Do not increase the step cap reflexively, call every line-search failure convergence, or ignore nested-mode discontinuities. Avoid judging movement only from printed natural parameters.
Checklist
- Read final gradient with line-search message.
- Inspect accepted OFV sequence.
- Check parameter changes on both scales.
- Diagnose numerical noise and mode switching.
- Retry with better starts before weakening safeguards.
Further reading
Continue to termination evidence and [troubleshooting in Chapter 20].