---
title: 'S-HLSP: Hierarchical Least-Squares Optimization'
url: https://www.emergentmind.com/topics/sequential-hierarchical-least-squares-programming-s-hlsp
type: topic
---

# S-HLSP: Hierarchical Least-Squares Optimization

Sequential Hierarchical Least-Squares Programming (S-HLSP) is a structured optimization framework for solving lexicographic (prioritized) multi-level least-squares programs, especially tailored for applications requiring strict prioritization of objectives and constraints, such as robot control, trajectory optimization, and prioritized non-linear optimal control. S-HLSP operates by stacking multiple least-squares subproblems in a strict hierarchy, ensuring that lower-priority objectives are optimized over the consensual set of (in)feasible solutions of all higher priorities. Advanced algorithmic components—including hierarchical Newton/Gauss–Newton linearizations, adaptive step filters, and efficient nullspace-based interior-point or ADMM solvers—enable S-HLSP to achieve both global convergence and high computational efficiency in large-scale and structured instances [2403.09160, 2302.11891].

## 1. Formal Problem Statement and Lexicographic Structure

S-HLSP addresses hierarchical least-squares programs where $p$ levels of quadratic objectives are stacked lexicographically:
\[
\begin{aligned}
  &\lexmin_{x,\,v_1,\ldots, v_p} \bigg(
    \tfrac{1}{2}\|v_{\mathbb{E}_1}\|^2,\; \tfrac{1}{2}\|v_{\mathbb{I}_1}\|^2,\,\ldots,\,
    \tfrac{1}{2}\|v_{\mathbb{E}_p}\|^2,\; \tfrac{1}{2}\|v_{\mathbb{I}_p}\|^2
  \bigg) \\
  &\text{subject to: } \begin{cases}
      f_{\mathbb{E}_l}(x) = v_{\mathbb{E}_l},\\
      f_{\mathbb{I}_l}(x) \leq v_{\mathbb{I}_l},\\
      f_{\cup\,l-1}(x) = v_{\cup\,l-1}^*,\\
      f_{\cup\,l-1}(x) \leq 0,
    \end{cases} \quad l=1 \ldots p.
\end{aligned}
\]
At each hierarchy level $l$, the solution preserves (within strict feasibility or optimal infeasibility) the best possible value of the upper priorities, and seeks a least-squares minimization on the new slack variables $v_l$. This structure is critical for tasks such as task-prioritized motion generation in robotics or sequential convexification in non-linear optimal control [2403.09160, 2302.11891].

Linearizations are performed at each sequential outer iteration using hierarchical Newton or Gauss–Newton steps, reducing the original non-linear problem to a series of hierarchical linear least-squares subproblems (HLSP) on the step $\Delta x_k$.

## 2. Algorithmic Framework: Sequential HLSP and Step-Filters

Each S-HLSP iteration proceeds as follows:
- **Outer iteration:** Linearize the non-linear HLSP (NL-HLSP) about the current $x_k$.
- **Subproblem formation:** Formulate a linear, lexicographic HLSP on variables $\Delta x$, with blockwise structure reflecting the task prioritization.
- **Hierarchical step-filter (HSF):** For each priority $l$, maintain a filter $\mathcal{F}_l$ consisting of pairs $(h_{\cup l-1}(x), \|f_l^+(x)\|)$. A new candidate step is accepted if it improves feasibility or optimality according to specific filter criteria:
  \[
    h \leq \beta h^j \quad \text{or} \quad \phi + \gamma \leq \phi^j,\ \forall (h^j, \phi^j) \in \mathcal{F}_l,
  \]
  with $0 < \gamma < \beta < 1$. 
- **Trust region adaptation:** The trust region radius $\rho$ at each level is dynamically adjusted according to step acceptance, balancing global convergence guarantees and efficient progress [2302.11891].

### High-Level Algorithm (paraphrased from [2302.11891])
1. Initialize $x_0$, large initial $\rho$.
2. For each level $l=1 \ldots p$:
   - Solve HLSPs (with trust region) using subsolvers, applying HSF.
   - Accept/reject steps, adapt $\rho$, update filter.
   - Upon convergence at level $l$, propagate feasible/optimal slacks to level $l+1$.

## 3. Hierarchical Newton/Gauss–Newton and Threshold Adaptation

The core of S-HLSP is the choice of local model for each HLSP subproblem:
- **Hierarchical Newton**: Utilize full second-order (Lagrangian) information, regularized for stability.
- **Hierarchical Gauss–Newton**: Drop second-order terms, using only $J_l^\top J_l$.

An adaptive per-level threshold $\epsilon_{adaptive, l}$ governs the choice: if the current slack norm $\|\hat v_l\|$ exceeds the threshold, Newton regularization is activated; otherwise, the Gauss–Newton approximation is used. This approach ensures both numerical stability when infeasibilities remain and avoids unnecessary variable locking at lower levels when constraints are already nearly satisfied. The threshold is automatically adapted based on filter progress and rejection counts [2403.09160].

## 4. HLSP Solvers: Nullspace-Projected ADMM and Interior-Point Methods

Two major classes of algorithms efficiently solve the HLSP and subproblems:
- **$\mathcal{N}$ADM$_2$ (Nullspace ADMM):** Projects the HLSP onto the nullspace of active high-priority constraints using a computationally efficient turnback algorithm. The projected system is then solved via an alternating direction method of multipliers (ADMM) in $(\Delta z, v, w)$ coordinates, exploiting closed-form slack projections and dual updates.
- **s-$\mathcal{N}$IPM-HLSP (Sparse Reduced-Hessian IPM):** Employs a reduced Hessian interior-point method in nullspace coordinates for each subproblem, using the turnback algorithm to exploit the banded structure of Jacobians in large-scale optimal control.

Nullspace basis computation is critical and relies on either efficient block-banded LU factorization or the turnback algorithm, avoiding expensive rank-revealing factorizations. For systems with discretized dynamics (Euler or multiple-shooting), upper bounds on nullspace basis bandwidth ensure scalability [2403.09160, 2302.11891].

### Solver Summary

| Solver                 | HLSP Method              | Nullspace Basis     |
|------------------------|--------------------------|---------------------|
| $\mathcal{N}$ADM$_2$   | ADMM + nullspace proj.   | Turnback algorithm  |
| s-$\mathcal{N}$IPM     | Reduced-Hessian IPM      | LU/Turnback         |

$\mathcal{N}$ADM$_2$ is especially effective for sparse, structured banded systems, and provides moderate-accuracy solutions rapidly. These can then warm-start higher-accuracy interior-point solvers.

## 5. Convergence Properties and Global Optimality

The S-HLSP methodology satisfies global convergence to a KKT point of the NL-HLSP under two key conditions:
- **Filter radius condition**: If, at each priority, the trust region is not expanded past the maximum filter-accepted radius, convergence is guaranteed.
- **Filter initialization**: If the filter at each level is initialized with strictly feasible front points, S-HLSP converges regardless of $\rho$ size.

No restoration or feasibility repair is required because the slack-based formulation ensures feasibility of every HLSP subproblem, even in the presence of infeasible higher-level objectives [2302.11891].

The adaptation of nullspace trust regions at each priority level ensures that while moving through the hierarchy, progress at each level does not violate the KKT set of higher priorities.

## 6. Computational Performance and Scalability

Extensive benchmarks on non-linear test functions, whole-body inverse kinematics, and multi-contact optimal control demonstrate the numerical efficacy and scalability of S-HLSP methods:
- For moderate to large-scale tasks (e.g., robot inverse kinematics $n=38,\,p=5$; whole-body optimal control $n\sim 900$), $\mathcal{N}$ADM$_2$ and s-$\mathcal{N}$IPM provide competitive or superior solve times compared to state-of-the-art commercial (H-MOSEK, Gurobi) and open-source (H-OSQP, H-PIQP) solvers, while achieving lower KKT residuals in hierarchical settings.
- Nullspace-projected ADMM yields fast moderate-accuracy solutions ($10^{-4}$ to $10^{-6}$ residuals in ms for $n<1000$), while interior-point methods can reach high-accuracy KKT points ($<10^{-8}$) in larger but still tractable runtimes.
- The turnback algorithm preserves sparsity and banded structure, enabling scalability to high-dimensional, multiple-shooting discretizations with low computational overhead per stage.

## 7. Warm-Starting and Combined Solver Strategies

An effective computational strategy is to use a first-order HLSP solver like $\mathcal{N}$ADM$_2$ to obtain a moderate-accuracy warm start, followed by a high-accuracy interior-point method (e.g., H-MOSEK) to rapidly reach tight KKT residuals. This two-stage approach reduces both the total number of outer sequential iterations and the number of expensive inner iterations in the high-precision solver. The benefit is especially pronounced in large-scale under-actuated systems and structured optimal control problems [2403.09160].

## 8. Applications and Extensions

S-HLSP is particularly suited for:
- Prioritized robot control, generating kinematically and dynamically feasible trajectories respecting task hierarchies (position, force, redundancy resolution).
- Discrete-time non-linear optimal control with complex multi-level constraints (multi-contact locomotion, time-optimal control).
- Sparse and structured system identification, where hierarchical recursive least squares formulations also emerge [1808.03895].

The methodology is extensible to stochastic and adaptive settings, where variants such as S-FM-HSDM and hierarchical RLS address noisy, online, or composite convex versions of S-HLSP.

## References

- "Efficient Lexicographic Optimization for Prioritized Robot Control and Planning" [2403.09160]
- "Sequential Hierarchical Least-Squares Programming for Prioritized Non-Linear Optimal Control" [2302.11891]
- "The Stochastic Fejér-Monotone Hybrid Steepest Descent Method and the Hierarchical RLS" [1808.03895]

Source: https://www.emergentmind.com/topics/sequential-hierarchical-least-squares-programming-s-hlsp