Fact-checked by Grok 2 weeks ago

Non-linear least squares

Non-linear least squares is a form of analysis applied to fit a set of observations to a model that is nonlinear in its unknown parameters, achieved by minimizing the sum of the squared residuals between the observed data and the model's predictions. This method extends the approach, which assumes linearity in parameters and allows for closed-form solutions, to handle more complex functional relationships where no such analytical solution exists. Unlike linear models, non-linear least squares requires iterative numerical optimization, often starting from initial parameter estimates, to converge to the optimal values. The technique is particularly useful for modeling processes exhibiting nonlinear behaviors, such as , asymptotic approaches, or , where the model function cannot be expressed as a of parameters. Mathematically, it solves the \min_x \frac{1}{2} \| f(x) \|^2_2, where f: \mathbb{R}^n \to \mathbb{R}^m (with m \geq n) represents the of residuals, and x are the parameters to estimate. Key advantages include efficient use of data and the ability to incorporate nearly any closed-form nonlinear function, though it is sensitive to outliers and demands reliable starting values to avoid local minima. Prominent algorithms for solving non-linear least squares problems include the Gauss-Newton method, which approximates the using the for iterative updates, and the Levenberg-Marquardt algorithm, a damped variant that blends Gauss-Newton steps with for improved robustness near singular points. The Gauss-Newton approach, derived as a modification of for objectives, dates back to foundational work by in the early but was adapted for nonlinear cases in later developments. Levenberg-Marquardt, introduced by Kenneth Levenberg in 1944 and refined by Donald Marquardt in 1963, remains widely used due to its balance of efficiency and global convergence properties. Applications span fields like , and , including for experimental data, parameter estimation in pharmacokinetic models, and optimization in for tasks. For instance, it is employed to model curing times or microbial growth rates, where linear approximations fail to capture saturation effects. Despite its computational demands, non-linear least squares provides approximate confidence intervals and supports weighted variants for heteroscedastic data, making it a cornerstone of statistical modeling.

Fundamentals

Definition and Motivation

Non-linear least squares is a form of least squares analysis employed to estimate parameters in a model that is non-linear in those parameters by minimizing the sum of the squares of the residuals between observed data and model predictions. Given a dataset consisting of m observations (x_i, y_i) for i = 1, \dots, m, the objective is to determine the parameter vector \beta \in \mathbb{R}^p that minimizes the objective function S(\beta) = \sum_{i=1}^m \left[ y_i - f(x_i; \beta) \right]^2, where f(x; \beta) denotes the non-linear model function relating the predictors x to the responses y. This method is motivated by the need to fit models that capture inherently non-linear relationships in real-world data, where —its special case with closed-form solutions via normal equations—proves inadequate. In fields such as physics, , and , non-linear least squares enables the estimation of parameters in models like for or processes in physics, the Michaelis-Menten equation describing in , and dose-response curves for material stress testing in . These applications arise because empirical relationships in nature and engineered systems often exhibit curvature or saturation effects that linear models cannot represent without distortion. The technique originated in the 19th century through Carl Friedrich Gauss's application of to the non-linear of the in 1801, where he iteratively solved Kepler's elliptical equations using sparse astronomical observations to predict the planet's path. Gauss's pioneering work demonstrated the power of for non-linear parameter estimation amid measurement errors, influencing astronomy and . Extensions to general non-linear least squares, including robust iterative algorithms, emerged in the with advances in computational capabilities, solidifying its role in scientific modeling.

Comparison to Linear Least Squares

Linear least squares applies when the model function f(\mathbf{x}; \boldsymbol{\beta}) is linear in the parameters \boldsymbol{\beta}, typically expressed as f(\mathbf{x}; \boldsymbol{\beta}) = X \boldsymbol{\beta}, where X is the . In this case, the least squares estimates are obtained analytically by solving the normal equations \hat{\boldsymbol{\beta}} = (X^T X)^{-1} X^T \mathbf{y}, assuming X^T X is invertible. In contrast, non-linear least squares arises when f(\mathbf{x}; \boldsymbol{\beta}) is non-linear in \boldsymbol{\beta}, precluding a closed-form for the estimates. The objective function S(\boldsymbol{\beta}) = \sum_i r_i(\boldsymbol{\beta})^2, where r_i(\boldsymbol{\beta}) = y_i - f(x_i; \boldsymbol{\beta}) are the residuals, may exhibit multiple local minima, and its is generally non-convex, complicating the search for the global minimum. Poor initial guesses can lead to at a local rather than the global minimum. Computationally, relies on direct methods like matrix inversion or for exact solutions in finite steps. Non-linear cases, however, require iterative optimization algorithms, such as Gauss-Newton or Levenberg-Marquardt, which approximate the using the matrix of the residuals and update parameters until convergence. These methods demand derivatives (analytical or numerical) and are sensitive to starting values, potentially requiring multiple runs to assess solution robustness. A representative example contrasts simple linear regression, y = a + b x + \epsilon, solvable directly via normal equations, with the non-linear exponential model y = a e^{b x} + \epsilon. The exponential can sometimes be linearized by reparameterizing as \ln y = \ln a + b x + \epsilon', allowing linear least squares on transformed data. However, this approach often fails because the log transformation alters the error structure, assuming multiplicative errors and introducing bias in parameter estimates under additive noise assumptions common in original data. Direct non-linear fitting avoids such distortions while properly accounting for the original residual variance.

Mathematical Formulation

Model and Residuals

In non-linear least squares, the goal is to fit a parametric model to a set of observed data points, where the model is non-linear in the parameters. The model is specified as y_i = f(\mathbf{x}_i; \boldsymbol{\beta}) + \epsilon_i for i = 1, \dots, m, with m observations and m > p typically, where \mathbf{x}_i denotes the vector of input variables for the i-th observation, f(\cdot; \boldsymbol{\beta}) is the non-linear prediction function, and \boldsymbol{\beta} = (\beta_1, \dots, \beta_p)^T is the p-dimensional vector of unknown parameters. This formulation arises in contexts such as curve fitting for exponential growth or pharmacokinetic modeling, where the relationship between inputs and outputs cannot be expressed linearly in the parameters. The residuals quantify the discrepancies between the observed responses y_i and the model predictions. They are defined as e_i(\boldsymbol{\beta}) = y_i - f(\mathbf{x}_i; \boldsymbol{\beta}), representing the deviations for each data point. In vector notation, the response vector is \mathbf{y} = (y_1, \dots, y_m)^T \in \mathbb{R}^{m \times 1}, the predicted vector is \mathbf{f}(\boldsymbol{\beta}) = (f(\mathbf{x}_1; \boldsymbol{\beta}), \dots, f(\mathbf{x}_m; \boldsymbol{\beta}))^T \in \mathbb{R}^{m \times 1}, and the residual vector is \mathbf{e}(\boldsymbol{\beta}) = \mathbf{y} - \mathbf{f}(\boldsymbol{\beta}) \in \mathbb{R}^{m \times 1}. These residuals serve as the fundamental building blocks for assessing model fit and parameter estimation in non-linear settings. The method relies on several key assumptions about the error terms \epsilon_i. These errors are assumed to be independent across observations, with constant variance (homoscedasticity) and zero mean, implying an unbiased model where E[\epsilon_i] = 0 and \text{Var}(\epsilon_i) = \sigma^2 for all i. Often, normality of the errors is further assumed for inference purposes, though the least squares criterion itself does not require it. Violations of independence, homoscedasticity, or unbiasedness can lead to inefficient estimates or biased inference, prompting the use of robust variants in such cases.

Objective Function

In nonlinear least squares, the objective is to minimize the sum of squared residuals, defined as S(\beta) = \sum_{i=1}^m e_i(\beta)^2 = \| y - f(\beta) \|_2^2, where y \in \mathbb{R}^m is the of observations, f(\beta) \in \mathbb{R}^m represents the model predictions dependent on the \beta \in \mathbb{R}^p, and e(\beta) = y - f(\beta) denotes the . This function aggregates the individual squared errors from the model fits, providing a measure of overall discrepancy between and predictions. The objective function S(\beta) is nonnegative, satisfying S(\beta) \geq 0 for all \beta, with equality to zero achievable only if a perfect fit exists such that f(\beta) = y. Its gradient is given by \nabla S(\beta) = -2 J(\beta)^T e(\beta), where J(\beta) is the Jacobian matrix of f with respect to \beta, containing partial derivatives J_{ij} = \partial f_i / \partial \beta_j. Near a local minimum, the Hessian H(\beta) = \nabla^2 S(\beta) can be approximated by H(\beta) \approx 2 J(\beta)^T J(\beta), which is positive semi-definite if J(\beta) has full column rank, though this ignores second-order terms involving the residuals. These problems typically involve overdetermined systems where the number of observations m greatly exceeds the number of parameters p (i.e., m \gg p), which can lead to ill-conditioned fits without additional regularization to stabilize the solution. Due to the nonlinearity of f in \beta, S(\beta) is generally nonconvex, and while local minima exist, a unique global minimum is not guaranteed, potentially resulting in multiple solutions depending on initial parameter estimates.

Weighted Variants

In weighted nonlinear least squares, the standard objective function is extended to incorporate a weight matrix that accounts for differences in observation precision, leading to the weighted sum of squared residuals: S_w(\beta) = \sum_{i=1}^m w_i \, e_i(\beta)^2 = e(\beta)^T W e(\beta), where e(\beta) is the vector of residuals e_i(\beta) = y_i - f(x_i; \beta), m is the number of observations, W is a positive definite diagonal weight matrix with entries w_i > 0, and \beta denotes the parameter vector. This formulation minimizes the same nonlinear model as in the unweighted case but adjusts the influence of each residual based on the specified weights. The primary rationale for is to address heteroscedasticity, where the variance of errors varies across observations, ensuring that more reliable points exert greater influence on the estimates. A typical choice for weights is w_i = 1 / \sigma_i^2, with \sigma_i^2 representing the variance of the i-th error term, which normalizes the contributions to reflect relative precisions. When the error is fully known and not necessarily diagonal, the weighted approach generalizes to a form akin to nonlinear , optimizing the e(\beta)^T \Sigma^{-1} e(\beta) where \Sigma is the . Assuming Gaussian errors with constant known variance \sigma^2, the minimized weighted objective S_w(\hat{\beta}) / \sigma^2 follows a central chi-squared distribution with m - p degrees of freedom, where p is the number of parameters; this statistic provides a basis for goodness-of-fit testing by comparing the achieved value to the expected distribution under the model. In implementation, weights are often estimated iteratively from the data—such as via replicate measurements, preliminary unweighted fits, or assumed error models—and must remain non-negative to preserve the convexity and interpretability of the quadratic objective.

Geometric Interpretation

Non-linear least squares problems admit an elegant geometric interpretation. The model parameters \theta \in \mathbb{R}^n map to predicted values in the observation space \mathbb{R}^m (with m \geq n), defining an n-dimensional manifold embedded in \mathbb{R}^m. The observed point y lies in this space, and the residuals are the r(\theta) = y - f(\theta), where f(\theta) is the model prediction. The objective is to find the parameter values \theta^* such that f(\theta^*) is the point on the manifold closest to y in the norm, i.e., minimizing \|r(\theta)\|_2^2. This views the optimization as a onto the (possibly curved) model manifold.

Computational Challenges

Initial Parameter Estimates

In nonlinear least squares estimation, selecting appropriate initial estimates for the vector \beta is essential, as the objective function often exhibits multiple local minima, making the optimization highly sensitive to starting values; poor choices can result in divergence, slow , or entrapment in suboptimal solutions, unlike the global uniqueness typically found in . This sensitivity arises because iterative methods rely on local approximations, and initial estimates far from the true optimum can lead to unreliable fits, particularly in models with complex interactions. Several strategies exist for obtaining robust initial estimates. Grid search involves evaluating the sum of squared residuals over a lattice in the parameter space to identify a promising starting point, which is computationally feasible for low-dimensional problems and helps explore the landscape broadly. Moment matching provides another approach by equating statistical moments (such as and variance) of the observed to those implied by the model, yielding initial \beta values that align the model's aggregate properties with the ; this method is particularly effective for parametric models with interpretable moments, like or Gaussian processes. Linearization techniques approximate the nonlinear model locally as linear in \beta—for instance, by taking a Taylor expansion around a nominal point—and solve the resulting ordinary problem to obtain an initial guess, which can then seed the nonlinear solver. Incorporating domain-specific knowledge further refines initial estimates by imposing physical or experimental constraints, such as bounding parameters within biologically or physically plausible ranges derived from prior studies, thereby reducing the search space and enhancing reliability. To assess robustness against multiple local minima, is recommended: multiple initial sets are generated (e.g., via random sampling within bounds or combinations of the above methods), each run through the optimizer, and the solution minimizing the objective function is selected as the final estimate. This multi-start procedure, while increasing computational cost, mitigates the risk of poor and is standard practice in applications like and modeling.

Jacobian Calculation

The Jacobian matrix J(\beta) in non-linear least squares is an m \times p matrix whose elements are defined as J_{i,j}(\beta) = \frac{\partial f_i}{\partial \beta_j} (x_i; \beta), capturing the sensitivity of each predicted value f_i to changes in the parameters \beta_j. This matrix plays a crucial role in gradient-based optimization methods, where the gradient of the sum-of-squares objective is given by \nabla S(\beta) = -2 J(\beta)^T r(\beta), with r(\beta) the vector of residuals. Analytical computation of the is feasible when the model admits explicit . For simple models, partial derivatives can be derived directly; for instance, in exponential regression where f(x; a, b) = a e^{b x}, the entry corresponding to a is \frac{\partial f}{\partial a} = e^{b x}, while for b it is \frac{\partial f}{\partial b} = a x e^{b x}. Such formulas enable exact evaluation without approximation errors, provided the derivatives are implementable in code. When analytical derivatives are unavailable or complex, numerical approximation via finite differences is commonly employed. The forward difference formula estimates each column j of the Jacobian as J_{i,j}(\beta) \approx \frac{f_i(x_i; \beta + \delta e_j) - f_i(x_i; \beta)}{\delta}, where e_j is the j-th and \delta is typically on the order of \sqrt{\epsilon}, with \epsilon the machine (around $10^{-8} for double precision). For improved accuracy, central differences may be used: J_{i,j}(\beta) \approx \frac{f_i(x_i; \beta + \delta e_j) - f_i(x_i; \beta - \delta e_j)}{2\delta}. These methods require evaluating the full model at perturbed parameters, incurring a computational cost of roughly p additional function evaluations for forward differences or $2p for central differences per iteration. Automatic differentiation (AD) provides an alternative for computing the exactly and efficiently without manual derivation or approximations. AD tools, such as those in Solver or Julia's ForwardDiff package, differentiate code programmatically by propagating derivatives through the computation graph, making it ideal for complex nonlinear models in scientific and applications as of 2025. Key challenges in Jacobian calculation include the high computational expense, especially for large p or costly model evaluations, and potential ill-conditioning when the matrix is rank-deficient, which arises if parameters are poorly identifiable or the model is overparameterized. In such cases, the 's can become large, amplifying numerical instability in downstream optimizations.

Convergence Criteria

Convergence criteria in nonlinear least squares optimization determine when an iterative has sufficiently minimized the objective function S(\beta) = \sum_{i=1}^m r_i(\beta)^2, where r_i(\beta) are the residuals, ensuring a balance between solution accuracy and computational efficiency. These criteria typically involve thresholds on the of S(\beta), changes in parameters \beta, or variations in S(\beta) itself, preventing excessive iterations while avoiding premature termination. The choice of criteria depends on the problem's scale and noise levels, with tolerances often set empirically or based on precision. A common absolute or relative tolerance criterion stops the iteration when the norm of the gradient \|\nabla S(\beta)\| < \epsilon, where \nabla S(\beta) = -2 J^T(\beta) r(\beta) and J(\beta) is the Jacobian matrix; this indicates that the current \beta is near a stationary point of S(\beta). Relative variants compare the change in S(\beta) to its current value, such as |S(\beta_{k+1}) - S(\beta_k)| < \delta S(\beta_k), ensuring negligible improvement relative to the objective's magnitude. These and function-based tests are standard in algorithms like Gauss-Newton and Levenberg-Marquardt, as they directly assess first-order optimality conditions. Parameter change criteria halt optimization when the update \|\beta_{k+1} - \beta_k\| < \tau or its relative version \|\beta_{k+1} - \beta_k\| / \|\beta_k\| < \tau, signaling that further adjustments would not significantly alter the fit. This is particularly useful in ill-conditioned problems where gradient norms may remain large due to scaling issues. In practice, \tau is often set to machine epsilon times the parameter scale for numerical stability. Residual-based criteria focus on the individual or aggregate residuals, stopping if the maximum absolute residual \max_i |r_i(\beta)| < \theta for unweighted cases, ensuring each data point is fitted within a desired error bound. For weighted variants, where S(\beta) = \sum_{i=1}^m w_i r_i(\beta)^2 approximates a \chi^2 distribution under Gaussian errors, convergence may be assessed via the reduced \chi^2 = S(\beta)/(m - p) < \gamma, with p the number of parameters and \gamma near 1 indicating a good fit; deviations suggest model inadequacy but can serve as a stopping threshold in statistical contexts. These approaches prioritize data fidelity over pure minimization. To prevent infinite loops in non-convergent cases, an iteration limit acts as a fallback, typically set to a multiple of the parameter dimension, such as 10p evaluations. Adaptive tolerances enhance robustness by tightening thresholds progressively or scaling them to problem size, reducing sensitivity to initial choices while maintaining efficiency across diverse applications.

Parameter Uncertainty and Residuals

After obtaining the parameter estimates \hat{\beta} that minimize the sum of squared residuals in non-linear least squares, assessing the uncertainty in these estimates is essential for statistical inference. The approximate covariance matrix of the parameters is given by \operatorname{Var}(\hat{\beta}) \approx (J^T J)^{-1} \sigma^2, where J is the Jacobian matrix evaluated at \hat{\beta}, and \sigma^2 is the estimated residual variance, computed as \sigma^2 = S(\hat{\beta}) / (m - p), with S(\hat{\beta}) denoting the minimized sum of squares, m the number of observations, and p the number of parameters. This approximation arises from linearizing the model locally around \hat{\beta} and assuming the residuals are independent and normally distributed with constant variance. From this covariance matrix, approximate confidence intervals for individual parameters can be constructed using Wald intervals: \hat{\beta}_j \pm t_{m-p, 1-\alpha/2} \sqrt{\operatorname{Var}(\hat{\beta}_j)}, where t_{m-p, 1-\alpha/2} is the critical value from the Student's t-distribution with m - p degrees of freedom. These intervals provide a linear approximation to the uncertainty and are asymptotically valid under mild regularity conditions, though they may underestimate coverage in highly non-linear cases. Residual analysis plays a key role in validating the fitted model and detecting violations of assumptions. Plots of residuals r_i = y_i - f(x_i, \hat{\beta}) against fitted values f_i = f(x_i, \hat{\beta}) or predictors x_i help identify patterns such as heteroscedasticity (non-constant variance) or autocorrelation in the residuals. Standardized residuals, defined as r_i = e_i / \sqrt{\hat{\sigma}^2 (1 - h_{ii})}, where h_{ii} are the diagonal elements of the hat matrix analog (detailed below), facilitate outlier detection by highlighting points with |r_i| > 2 or |r_i| > 3 as potential anomalies. For joint parameter uncertainty, confidence regions account for the correlations captured in the and the non-linearity of the model. These regions are typically ellipsoidal contours defined by \Delta S(\beta) = S(\beta) - S(\hat{\beta}) \leq \chi^2_p(1 - \alpha), where \chi^2_p(1 - \alpha) is the critical value from the with p . This likelihood ratio-based approach provides better coverage than marginal intervals in non-linear settings, as it incorporates the curvature of the objective function surface. To identify influential data points, and measures extend diagnostics to the non-linear context. The hat matrix analog is H = J (J^T J)^{-1} J^T, where the diagonal elements h_{ii} quantify the of the i-th , indicating how far x_i is from the "center" of the design in the parameter space; high- points (h_{ii} > 2p/m) can disproportionately affect \hat{\beta}. can then be assessed via metrics like , D_i = \frac{r_i^2 h_{ii}}{p (1 - h_{ii})^2}, which combines and size to flag points whose removal significantly alters the fit.

Solution Methods

Linearization Approaches

Linearization approaches in non-linear least squares seek to approximate the non-linear model with a linear one, facilitating the use of established linear least squares solvers. One primary method involves the first-order Taylor series expansion of the model function around an initial parameter estimate. For a non-linear model f(\mathbf{x}, \boldsymbol{\beta}), where \boldsymbol{\beta} are the parameters, the expansion at a point \boldsymbol{\beta}^{(k)} yields f(\mathbf{x}, \boldsymbol{\beta}^{(k)} + \Delta \boldsymbol{\beta}) \approx f(\mathbf{x}, \boldsymbol{\beta}^{(k)}) + J(\mathbf{x}, \boldsymbol{\beta}^{(k)}) \Delta \boldsymbol{\beta}, with J denoting the Jacobian matrix of partial derivatives. This transforms the problem into minimizing \| \mathbf{y} - f(\mathbf{x}, \boldsymbol{\beta}^{(k)}) - J(\mathbf{x}, \boldsymbol{\beta}^{(k)}) \Delta \boldsymbol{\beta} \|^2 over \Delta \boldsymbol{\beta}, solvable via linear least squares. Reparameterization offers another strategy by re-expressing the model in a form that is linear in the new parameters, often through functional transformations. For instance, an model y = a e^{b x} can be reparameterized as \log y = \log a + b x, converting it to a in the parameters \log a and b. However, such transformations introduce in the estimates and residuals because the criterion on the transformed scale does not preserve the original error structure, potentially leading to inefficient or biased inferences unless corrections like smearing estimates are applied. Successive linearization extends the Taylor approach by iteratively updating the expansion point after each linear solve, refining the parameter estimates through repeated approximations. Starting from an initial guess \boldsymbol{\beta}^{(0)}, one solves the linearized problem to obtain \boldsymbol{\beta}^{(1)}, then expands around \boldsymbol{\beta}^{(1)} for the next iteration, continuing until convergence. This process forms the foundational principle for iterative solutions in non-linear least squares, leveraging the efficiency of linear solvers at each step. Despite their utility, linearization approaches have inherent limitations, providing only local approximations valid near the expansion point, which can fail for highly non-linear models or when initial estimates are poor. Strong non-linearity may cause the to diverge significantly from the true function, leading to inaccurate solutions or non-convergence in successive iterations. Additionally, reparameterizations can distort variance assumptions and introduce heteroscedasticity if the transformation does not align with the model.

Iterative Optimization Algorithms

Iterative optimization algorithms for nonlinear least squares problems aim to minimize the objective function S(\beta) = \frac{1}{2} \|r(\beta)\|^2, where r(\beta) is the vector of residuals, by generating a of updates through solving approximate subproblems. These methods typically rely on local approximations of the nonlinear model, often using the J(\beta) to linearize the residuals around the current \beta_k. The core takes the form \beta_{k+1} = \beta_k + \Delta_k, where \Delta_k solves the subproblem \min_{\Delta} \|J_k \Delta + r_k\|^2_2, with J_k = J(\beta_k) and r_k = r(\beta_k). This approach bridges the gap between the full nonlinear problem and tractable linear approximations, enabling progress toward a local minimum. To promote reliable convergence, especially in the presence of ill-conditioning or near-singular Jacobians, many iterative frameworks incorporate globalization strategies such as trust-region constraints or procedures. In trust-region methods, the step \Delta_k is computed subject to \|\Delta_k\| \leq r_k, where r_k > 0 defines the radius of the region in which the is trusted to mimic the nonlinear objective. After computing the trial step, the trust region radius is adapted: if the actual reduction in S(\beta) exceeds a predicted reduction based on the model, r_k is increased to allow larger steps in future iterations; otherwise, it is decreased, and the step may be rejected. This mechanism balances exploration and exploitation, ensuring monotonic decrease in S(\beta) under mild conditions. Line search techniques further enhance stability by scaling the candidate step \Delta_k with a factor \alpha_k \in (0,1] to guarantee descent. , a common variant, starts with \alpha_k = 1 and iteratively reduces \alpha_k (e.g., by a fixed factor like 0.5) until the Armijo condition S(\beta_k + \alpha_k \Delta_k) \leq S(\beta_k) + \eta \alpha_k \nabla S(\beta_k)^T \Delta_k holds for a small \eta > 0, ensuring sufficient progress. This adaptive step length adjustment mitigates the risk of overshooting minima and is particularly useful when the linear model overestimates the of S(\beta). For added robustness against indefiniteness in the approximate Hessian J_k^T J_k, is introduced into the subproblem by modifying it to \min_{\Delta} \|J_k \Delta + r_k\|^2_2 + \lambda_k \|\Delta\|^2_2, where \lambda_k \geq 0 acts as a . A small \lambda_k yields steps akin to undamped , while larger values shift toward gradient descent-like behavior, stabilizing iterations near stationary points or when starting from a poor initial estimate \beta_0. The is typically adjusted dynamically based on the ratio of actual to predicted reductions in S(\beta).

Decomposition Techniques

In non-linear least squares optimization, techniques are applied to solve the linearized subproblems arising from a expansion of the around the current parameter estimate. One primary method is the of the J, which factors J into an Q and an upper R, such that J = Q R. The linearized problem then minimizes \| Q R \Delta + e \|^2, where e is the , which simplifies to solving R \Delta = -Q^T e via stable back-substitution. This approach ensures by avoiding the explicit formation of the normal equations J^T J, which can amplify conditioning errors. Another key technique is the (SVD) of J, expressed as J = U \Sigma V^T, where U and V are orthogonal, and \Sigma is diagonal with non-negative singular values \sigma_i. The solution to the linearized problem is \Delta = -V \Sigma^+ U^T e, with \Sigma^+ denoting the pseudo-inverse that inverts only non-zero singular values. This method naturally handles rank-deficient Jacobians by ignoring small \sigma_i, providing a minimum-norm solution among those minimizing the . These decompositions offer significant advantages in numerical stability compared to solving the normal equations directly, as orthogonal transformations in QR and unitary transformations in SVD preserve the Euclidean norm and avoid squaring the . Additionally, SVD enables built-in regularization by truncating small singular values, which is useful for ill-conditioned problems in non-linear least squares. The computational cost for both methods is O(m p^2) per iteration, where m is the number of residuals and p the number of parameters, making them suitable for problems with dense Jacobians of moderate size.

Algorithms

Gauss-Newton Method

The Gauss-Newton method is a classical iterative for solving nonlinear problems, where the objective is to minimize the sum of squared residuals by approximating the nonlinear model with a sequence of subproblems. At each iteration k, the residual vector e_k and its matrix J_k are evaluated at the current parameter estimate \beta_k. The method linearizes the residuals around \beta_k, leading to a approximation that ignores second-order terms in the expansion. This approach, originally inspired by Gauss's early work on estimation and formalized in modern iterative form in the mid-20th century, is particularly efficient when the residuals are small near the solution. The core update rule of the Gauss-Newton method involves solving the normal equations J_k^T J_k \Delta_k = -J_k^T e_k for the step \Delta_k, which can be expressed explicitly as \Delta_k = -(J_k^T J_k)^{-1} J_k^T e_k. The parameters are then updated via \beta_{k+1} = \beta_k + \Delta_k. This step minimizes the linearized , providing a of under suitable conditions. Under ideal conditions, the method achieves quadratic near a local minimum where the J_k has full column rank, as the approximation to the J_k^T J_k closely matches the true , and the residuals diminish rapidly. However, far from the minimum, is generally linear or sublinear, depending on the nonlinearity of the problem and the of J_k^T J_k. To implement the update efficiently without forming the explicit inverse, which can be numerically unstable, the normal equations are typically solved using Cholesky factorization of the symmetric matrix J_k^T J_k, assuming it is positive definite. This decomposition allows for stable back-substitution to obtain \Delta_k. Despite its strengths, the basic Gauss-Newton method has notable limitations: it can diverge if the computed step \Delta_k overshoots the minimum, particularly in ill-conditioned problems or when starting far from the solution, since the pure may not guarantee a reduction in the objective function. The standard version lacks built-in mechanisms like or damping to mitigate this, potentially requiring modifications for global reliability.

Levenberg-Marquardt Method

The Levenberg-Marquardt algorithm is an iterative optimization technique for solving nonlinear least squares problems, introduced by Kenneth Levenberg in 1944 and refined by Donald Marquardt in 1963. It addresses limitations of the Gauss-Newton method by incorporating a damping parameter to ensure reliable convergence, particularly for ill-conditioned problems or poor initial parameter estimates. The method blends the rapid local convergence of Gauss-Newton steps with the global stability of , making it widely used in applications such as and parameter estimation in scientific modeling. At each iteration k, the algorithm computes an update \Delta_k to the parameter vector by solving the damped normal equations: (J_k^T J_k + \lambda_k I) \Delta_k = -J_k^T e_k, where J_k is the Jacobian matrix of the residual vector e_k evaluated at the current parameters, \lambda_k > 0 is the damping parameter, and I is the . This formulation modifies the Gauss-Newton step (recovered as \lambda_k \to 0) by adding a term \lambda_k I that regularizes the approximate J_k^T J_k, preventing large steps in directions of low curvature. When \lambda_k is large, the update approximates a scaled step, - (1/\lambda_k) J_k^T e_k, ensuring descent even far from the minimum. The damping parameter \lambda_k is adaptively adjusted to balance reliability and efficiency. It typically starts with a relatively large value to favor conservative steps, then decreases if the sum of squared residuals S(\beta_k + \Delta_k) < S(\beta_k) (indicating improvement), or increases otherwise. Marquardt proposed a gain sequence where \lambda_{k+1} = \lambda_k / 10 for successful steps and \lambda_{k+1} = 10 \lambda_k for unsuccessful ones, though variations use factors like 2 or scale \lambda_k by the diagonal of J_k^T J_k for better conditioning. This strategy implicitly enforces a trust-region constraint on the step size, equivalent to minimizing a quadratic model within a region of radius controlled by \lambda_k, enhancing robustness without explicit trust-region subproblems. The method's advantages include improved handling of ill-conditioned Jacobians, where the damping term stabilizes the linear system and avoids divergence common in pure Gauss-Newton iterations. It also prevents oscillatory behavior or failure on poor initial guesses by transitioning smoothly from gradient-like steps to quadratic convergence near the solution, achieving second-order convergence rates locally when the residuals are small and the model is well-approximated. These properties have made it a standard in numerical software libraries for nonlinear optimization.

Gradient Descent Methods

Gradient descent methods for non-linear least squares problems rely on first-order information, specifically the gradient of the objective function, to iteratively update parameter estimates when second-order derivatives are unavailable or computationally prohibitive. These methods are particularly useful in high-dimensional settings or when the Jacobian matrix is sparse, as they avoid forming or inverting approximate Hessians. The objective is to minimize the sum of squared residuals S(\beta) = \frac{1}{2} \| r(\beta) \|^2, where r(\beta) is the residual vector and \beta are the parameters, with the gradient given by \nabla S(\beta) = J(\beta)^T r(\beta), where J(\beta) is the Jacobian matrix. The basic steepest descent method updates the parameters as \beta_{k+1} = \beta_k - \alpha_k \nabla S(\beta_k), where \alpha_k > 0 is a step size determined by to ensure sufficient decrease in S. This direction aligns with the negative , providing the locally steepest descent, and is computationally inexpensive, requiring only O(m p) operations per , with m the number of residuals and p the number of parameters. However, it exhibits linear , often zigzagging toward the minimum and performing poorly near stationary points due to poor conditioning of the problem. A conjugate gradient variant improves upon steepest by constructing a sequence of mutually conjugate search directions that are orthogonal with respect to the , accelerating without additional storage beyond a few vectors. The update is \beta_{k+1} = \beta_k + \alpha_k d_k, where d_k = -\nabla S(\beta_k) + \beta_k d_{k-1} and \beta_k is a scalar (e.g., Fletcher-Reeves \beta_k = \frac{\| \nabla S(\beta_k) \|^2}{\| \nabla S(\beta_{k-1}) \|^2 }) ensuring conjugacy; periodic restarts every few iterations prevent accumulation of errors from non-quadratic assumptions. This method achieves superlinear in practice for moderately ill-conditioned problems and is widely used in large-scale non-linear least squares due to its efficiency over plain . Momentum or Nesterov acceleration enhances these first-order methods by incorporating inertia from previous updates, helping to escape local minima and dampen oscillations in ravines of the objective surface. In the heavy-ball variant, the update becomes \beta_{k+1} = \beta_k - \alpha_k \nabla S(\beta_k) + \gamma (\beta_k - \beta_{k-1}), with \gamma \in (0,1) as the parameter; refines this by evaluating the gradient at an extrapolated point \beta_k + \gamma (\beta_k - \beta_{k-1}), yielding faster asymptotic rates, such as O(1/k^2) for cases. These accelerations are effective in non-convex non-linear least squares landscapes, reducing the number of iterations needed compared to unaccelerated , though careful tuning of parameters is required for . Overall, methods offer a of low per-iteration cost against slower linear or sublinear rates, making them suitable for initial phases of optimization or when evaluations dominate computation, but less efficient than second-order methods near the . In non-linear least squares, their facilitates in software libraries, though they may require many iterations for high precision due to to step size and problem .

Derivative-Free Methods

Derivative-free methods address non-linear least squares problems by optimizing the sum of squared residuals without requiring derivatives or Jacobian computations, making them suitable for scenarios where analytical gradients are unavailable or computationally prohibitive. These approaches typically involve direct searches, sampling strategies, or population-based techniques that evaluate the at selected points in the parameter space to iteratively improve estimates. Unlike gradient-based methods, they efficiency for robustness, often requiring more evaluations but handling noisy, non-smooth, or black-box functions effectively. The Nelder-Mead simplex method exemplifies a direct search technique, operating in the parameter space (β-space) by maintaining an n+1 vertex for an n-dimensional problem and updating it through a sequence of reflections, expansions, contractions, or complete shrinks based solely on evaluations of the S(β). Developed by Nelder and Mead, this starts with an initial simplex and sorts vertices by function values to decide transformations that move toward lower S values, converging to a local minimum without derivative information. It has been applied to non-linear least squares fitting in fields like and engineering design, where model complexity precludes gradient calculations, though it may struggle with high-dimensional problems due to the exponential growth in simplex size. Pattern search methods, including variants like Hooke-Jeeves, extend direct search principles by systematically sampling points along predefined directions from a current base point, polling the objective function at these offsets to identify promising moves before progressing to a pattern step that extrapolates in successful directions. These algorithms require no gradients and are particularly effective for bound-constrained , as they adapt search patterns to ensure positive spanning sets that guarantee descent under mild conditions. , a related , optimizes one at a time by minimizing S with respect to each β_i while fixing others, often using univariate searches; it is computationally simple and parallelizable, finding use in sparse or high-dimensional problems like approximations. Both approaches excel in low-to-moderate dimensions but can suffer from slow convergence in highly nonlinear landscapes. Evolutionary algorithms provide a global search capability for non-linear least squares, treating parameters as a population of candidate solutions evolved through operations like , crossover, and selection to minimize S. , a seminal population-based method, generates trial vectors by differencing randomly selected population members and scaling the difference to perturb a base vector, accepting improvements based on S evaluations to drive convergence. Introduced by Storn and Price, it handles multimodal objectives robustly, making it ideal for ill-conditioned or multi-minima least squares problems in areas like and . Genetic algorithms follow a similar Darwinian , encoding parameters as chromosomes and applying genetic operators to breed fitter populations over generations. These methods incur higher evaluation costs but offer better exploration of the parameter space compared to local direct searches. Such derivative-free methods find broad applicability in black-box models, including neural networks for tasks or simulation-based calibrations where internal model details are inaccessible, allowing optimization via repeated forward evaluations despite elevated computational demands; their non-smoothness tolerance also suits real-world data with measurement errors. In problems with multiple minima, they can incorporate restarts or hybridization for enhanced global search, though careful initial or population design remains essential for efficiency.

References

  1. [1]
    4.1.4.2. Nonlinear Least Squares Regression
    Nonlinear least squares regression extends linear least squares regression for use with a much larger and more general class of functions. Almost any function ...
  2. [2]
    [PDF] METHODS FOR NON-LINEAR LEAST SQUARES PROBLEMS
    A least squares problem is a special variant of the more general problem: Given a function F: IRn7→IR, find an argument of F that gives the minimum value of ...
  3. [3]
    A tutorial history of least squares with applications to astronomy and ...
    This article surveys the history, development, and applications of least squares, including ordinary, constrained, weighted, and total least squares.
  4. [4]
    Nonlinear Least Squares (Curve Fitting) - MATLAB & Simulink
    Nonlinear least-squares is solving the problem min(∑||F(xi) - yi||2), where F(xi) is a nonlinear function and yi is data. The problem can have bounds, linear ...
  5. [5]
    Nonlinear Regression Modelling: A Primer with Applications and ...
    Mar 15, 2024 · Least-squares estimates (denoted LSEs) are those parameter values that minimize S θ for each of the p model function parameters. In other words, ...
  6. [6]
    [PDF] Unit IV: Nonlinear Equations and Optimization Chapter IV.1: Motivation
    ▷ Linear least-squares leads to the normal equations. AT Ab = AT y. ▷ We saw examples of linear physical models (Ohm's Law,. Hooke's Law, Leontief equations) ...
  7. [7]
    T.3.5 - Exponential Regression Example | STAT 501
    An example where an exponential regression is often utilized is when relating the concentration of a substance (the response) to elapsed time (the predictor).
  8. [8]
    Gauss, Least Squares, and the Missing Planet - Actuaries Institute
    Mar 30, 2021 · The early history of statistics can be traced back to 1795 when Carl Fredrich Gauss, at 18 years of age, invented the method of least squares ...
  9. [9]
    [PDF] Least squares and the normal equations
    Mar 1, 2015 · We can solve ∇f(x) = 0 or, equivalently. AT Ax = AT b to find the least squares solution. Magic. Is this the global minimum? Could it be a ...
  10. [10]
    [PDF] Nonlinear Least Squares - CIS UPenn
    The properties of nonlinear least squares: • Has multiple local solutions. • Has no closed form solution (iterative solve). ... Nonlinear least squares:.
  11. [11]
    [PDF] Chapter 06.04 Nonlinear Models for Regression
    This is a linear function between y and ( ) xln and the usual least squares method applies in which y is the response variable and ( ) xln is the regressor.
  12. [12]
    Nonlinear Regression Analysis and Its Applications - Wiley
    Nonlinear Regression Analysis and Its Applications. Douglas M. Bates, Donald G. Watts. ISBN: 978-0-470-13900-4. April 2007. 392 pages.Missing: formulation | Show results with:formulation
  13. [13]
    Nonlinear Regression | Wiley Series in Probability and Statistics
    Nonlinear Regression ; Author(s):. G. A. F. Seber, C. J. Wild, ; First published:15 February 1989 ; Print ISBN:9780471617600 | ; Online ISBN: ...Missing: formulation | Show results with:formulation
  14. [14]
    None
    ### Summary of Nonlinear Least Squares Model from Appendix D
  15. [15]
    Numerical Optimization | SpringerLink
    Numerical Optimization presents a comprehensive and up-to-date description of the most effective methods in continuous optimization.Least-Squares Problems · Nonlinear Equations · Derivative-Free Optimization
  16. [16]
    [PDF] Least Squares Adjustment: Linear and Nonlinear Weighted ...
    Sep 19, 2013 · This note primarily describes the mathematics of least squares regression analysis as it is often used in geodesy including land surveying ...
  17. [17]
    Nonlinear Regression Analysis and Its Applications
    This book covers nonlinear regression analysis, including iterative estimation, linear approximations, and practical considerations.
  18. [18]
    [PDF] The Levenberg-Marquardt algorithm for nonlinear least squares ...
    May 5, 2024 · The Levenberg-Marquardt algorithm was developed in the early 1960's to solve nonlinear least squares problems. Least squares problems arise ...
  19. [19]
    [PDF] Nonlinear Regression Analysis - arXiv
    Feb 9, 2024 · The main advantages of nonlinear regression models include interpretability, parsimony, and prediction (Bates and Watts, 1988). In general, ...
  20. [20]
    [PDF] Nonlinear Regression, Nonlinear Least Squares, and ... - John Fox
    Jun 2, 2018 · Many familiar generic functions, such as residuals(), have methods for the nonlinear-model objects produced by nls(). For example, the ...Missing: formulation | Show results with:formulation
  21. [21]
    Least-Squares Regression Models - Parameter Estimates ... - Certara
    If multiple dose data is fit to a PK model and Phoenix generates initial parameter estimates, a grid search is performed to obtain initial estimates. In this ...Missing: matching | Show results with:matching
  22. [22]
    On the relationship of transient storage and aggregated dead zone ...
    First-order aggregated dead zone (ADZ) model. be used to define the initial parameter estimates in the TS optimization procedure. The proposed moment matching ...
  23. [23]
    Chapter 6 Non-Linear Regression | A Guide on Data Analysis
    6.2.1.1 Gauss-Newton Algorithm. The Gauss-Newton Algorithm is an iterative optimization method used to estimate parameters in nonlinear least squares problems.
  24. [24]
    [PDF] Faithful Estimation of Dynamics Parameters from CPMG Relaxation ...
    May 1, 2006 · ... Nonlinear least-squares fits were executed using Prism 4.0 (GraphPad ... This grid- based approach avoids the bias in initial parameter estimates ...
  25. [25]
    [PDF] Improved Initialization for Nonlinear State-Space Modeling - arXiv
    Apr 23, 2018 · Good initial values for the model parameters are obtained by identifying separately the linear dynamics and the nonlinear terms in the model. In ...
  26. [26]
    Nonlinear Least-Squares Fitting — GSL 2.8 documentation - GNU.org
    There are generally two classes of algorithms for solving nonlinear least squares problems, which fall under line search methods and trust region methods.
  27. [27]
    Efficient evaluation of the Jacobian in the damped least-squares ...
    Estimation of the computational cost for evaluating the Jacobian using different methods. To compute a column of the Jacobian using finite differences, the ...
  28. [28]
    [PDF] Nonlinear Least Squares Theory
    First, deciding an appropriate nonlinear function is typically difficult. Second, it is usually cumbersome to estimate nonlinear specifications and analyze the ...
  29. [29]
    Linear/nonlinear least squares - C++, C#, Java library - ALGLIB
    ALGLIB package offers three types of stopping criteria: stop after sufficiently small step; stop after sufficiently small function change; stop after specified ...
  30. [30]
    Nonlinear Regression - George A. F. Seber, C. J. Wild - Google Books
    Feb 25, 2005 · Nonlinear Regression provides by far the broadest discussion of nonlinear regression models currently available and will be a valuable addition to the library.Missing: formulation | Show results with:formulation
  31. [31]
    Computational Experience With Confidence Regions and ...
    We present the results of a Monte Carlo study of the leading methods for constructing approximate confidence regions and confidence intervals for parameters ...<|separator|>
  32. [32]
    Confidence Regions in Non-Linear Estimation - Oxford Academic
    Summary. The statistical properties of the approximate confidence regions for nonlinear estimation based on the likelihood ratio criterion are considered,
  33. [33]
    Leverage and Superleverage in Nonlinear Regression - jstor
    least squares (OLS), leverage is measured by the magnitude of the elements hij of the hat matrix H, the projection matrix onto the column space of X. The ...
  34. [34]
    [PDF] Some Useful Reparameterizations: Linear to Nonlinear Models
    Using nonlinear least squares to fit the reparameterized model yields approximate standard errors and confidence intervals more easily than using the delta ...Missing: linearization | Show results with:linearization
  35. [35]
    Log-transformation of independent variables: must we? - PMC
    This transformation can be motivated by concerns for non-linear dose–response relationship or outliers, however, such transformation may not always reduce bias.
  36. [36]
    Nonlinear Least-Squares Problems - SpringerLink
    Nonlinear Least-Squares Problems. In: Nocedal, J., Wright, SJ (eds) Numerical Optimization. Springer Series in Operations Research and Financial Engineering.
  37. [37]
    [PDF] Numerical Optimization - UCI Mathematics
    ... Nocedal. Stephen J. Wright. EECS Department. Computer Sciences Department ... Least-Squares Problems. 245. 10.1 Background ...
  38. [38]
    An Algorithm for Least-Squares Estimation of Nonlinear Parameters
    The modified Gauss-Newton method for the fitting of non-linear regression functions by least squares, Technometrics, 3 (1961), 269–280
  39. [39]
    [PDF] The Levenberg-Marquardt Algorithm
    Jun 8, 2004 · The Levenberg-Marquardt (LM) algorithm is the most widely used optimization algorithm. It outperforms simple gradient descent and other ...
  40. [40]
    [PDF] A survey of the nonlinear conjugate gradient methods - People
    This paper reviews the development of different versions of nonlinear conjugate gradient methods, with special attention given to global convergence properties.
  41. [41]
    [PDF] Numerical Methods for Unconstrained Optimization and Nonlinear ...
    [See Dennis and Schnabel (1979).] 14. Show that the sparse symmetric secant update (11.3.12) reduces to the symmetric secant update (9.1.3) when SP(Z) ...
  42. [42]
    [PDF] Derivative-free optimization methods - UC Davis Math
    We categorize methods based on assumed properties of the black-box functions, as well as features of the methods. We first overview the primary setting of ...<|control11|><|separator|>
  43. [43]
    [PDF] Solving Derivative-Free Nonlinear Least Squares Problems with ...
    Other derivative-free approaches to least-squares problems include Implicit Filtering [10,. 11] and DFLS [20, 21], both of which are described later, and LMDIF ...
  44. [44]
    [PDF] Scalable Derivative-Free Optimization for Nonlinear Least-Squares ...
    Aug 1, 2020 · In this work, we develop a novel model-based DFO method for solving nonlinear least-squares problems. We im- prove on state-of-the-art DFO by ...