English

On $O(n)$ Algorithms for Projection onto the Top-$k$-sum Sublevel Set

Optimization and Control 2026-03-26 v2 Numerical Analysis Numerical Analysis

Abstract

The \emph{top-kk-sum} operator computes the sum of the largest kk components of a given vector. The Euclidean projection onto the top-kk-sum sublevel set serves as a crucial subroutine in iterative methods to solve composite superquantile optimization problems. In this paper, we introduce a solver that implements two finite-termination algorithms to compute this projection. Both algorithms have O(n)O(n) complexity of floating point operations when applied to a sorted nn-dimensional input vector, where the absorbed constant is \emph{independent of kk}. This stands in contrast to an existing grid-search-inspired method that has O(k(nk))O(k(n-k)) complexity, a partition-based method with O(n+DlogD)O(n+D\log D) complexity, where DnD\leq n is the number of distinct elements in the input vector, and a semismooth Newon method with a finite termination property but unspecified floating point complexity. The improvement of our methods over the first method is significant when kk is linearly dependent on nn, which is frequently encountered in practical superquantile optimization applications. In instances where the input vector is unsorted, an additional cost is incurred to (partially) sort the vector, whereas a full sort of the input vector seems unavoidable for the other two methods. To reduce this cost, we further derive a rigorous procedure that leverages approximate sorting to compute the projection, which is particularly useful when solving a sequence of similar projection problems. Numerical results show that our methods solve problems of scale n=107n=10^7 and k=104k=10^4 within 0.050.05 seconds, whereas the most competitive alternative, the semismooth Newton-based method, takes about 11 second. The existing grid-search method and Gurobi's QP solver can take from minutes to hours.

Keywords

Cite

@article{arxiv.2310.07224,
  title  = {On $O(n)$ Algorithms for Projection onto the Top-$k$-sum Sublevel Set},
  author = {Jake Roth and Ying Cui},
  journal= {arXiv preprint arXiv:2310.07224},
  year   = {2026}
}

Comments

32 pages

R2 v1 2026-06-28T12:46:57.824Z