Single-loop Algorithms for Stochastic Non-Convex Optimization with Weakly-Convex Constraints

Ming Yang, Gang Li, Quanqi Hu, Qihang Lin, Tianbao Yang

TL;DR

Solving non-convex optimization problems with non-smooth, weakly-convex inequality constraints typically forces a difficult choice: accept complicated double-loop subproblem routines or suffer degraded convergence rates with existing single-loop methods. This paper proposes a single-loop stochastic algorithm using an exact, non-smooth hinge penalty and multi-block variance reduction (MSVR). The method achieves the state-of-the-art $O(\epsilon^{-6})$ iteration complexity for finding an approximate Karush-Kuhn-Tucker (KKT) point while requiring only a constant penalty parameter and sparse constraint sampling at each step.

What Problem Does This Paper Address?

Many machine learning applications require optimizing non-convex objectives under multiple non-linear functional inequality constraints: $$\min_x F(x) \quad \text{s.t.} \quad h_k(x) \le 0, \quad k = 1, \dots, m$$ Examples include fair classification (e.g., matching false positive rates across demographic groups) and continual learning (e.g., finetuning vision-language models on new tasks without degrading performance on previously learned tasks).

In practical stochastic settings, both the objective $F$ and the constraints $h_k$ can be non-smooth and weakly convex. Prior algorithms for this problem class present major drawbacks:

  1. Double-loop methods (e.g., proximal-point subproblem solvers) reach an optimal complexity of $O(1/\epsilon^6)$, but they require solving nested optimization subproblems and backpropagating through all $m$ constraints at every iteration.
  2. Existing single-loop penalty methods often rely on smooth squared-hinge penalties $[h_k(x)]_+^2$. To guarantee constraint satisfaction, the penalty parameter $\beta$ must scale as $O(1/\epsilon)$, which blows up problem conditioning and worsens complexity to $O(1/\epsilon^7)$ or higher.
  3. Single-loop subgradient switching methods scale poorly in stochastic regimes, degrading to $O(1/\epsilon^8)$.

The central question addressed is: Can we design a single-loop stochastic algorithm for non-smooth, weakly-convex inequality constraints that matches the optimal $O(1/\epsilon^6)$ complexity?

Methods

The authors adopt the classical exact penalty method with an unsquared hinge penalty: $$\min_x \Phi(x) := F(x) + \frac{\beta}{m} \sum_{k=1}^m [h_k(x)]_+$$

Key technical components include:

  • Constant Penalty Parameter ($\beta$): Under a mild constraint regularity condition—the sub-Jacobian of the violating constraints has bounded singular values away from zero—the authors prove that an $\epsilon$-stationary point of the Moreau envelope of $\Phi(x)$ is a nearly $\epsilon$-KKT solution of the original problem using a fixed, constant $\beta > (\epsilon + L_F)/\delta$, avoiding the $O(1/\epsilon)$ parameter blowup.
  • Connection to Coupled Compositional Optimization: The term $[h_k(x)]_+$ can be viewed as a finite-sum coupled compositional objective (FCCO) with an outer non-decreasing convex function ($[\cdot]_+$) and inner weakly convex functions ($h_k$).
  • Variance-Reduced Single-Loop Updates (MSVR): Instead of evaluating all $m$ constraints every iteration, the algorithm samples a small subset of constraints $B_c \subset \{1, \dots, m\}$ and updates constraint value trackers $u_{2,k}$ using Multi-block Single-probe Variance Reduction (MSVR). A single stochastic subgradient step updates the parameters $x_{t+1}$.
  • Compositional Objective Extension: The framework extends naturally to coupled compositional objectives $F(x) = \frac{1}{n} \sum_{i=1}^n f_i(g_i(x))$, maintaining the same $O(\epsilon^{-6})$ complexity rate.

Datasets

The authors evaluate their methods on two problem formulations using standard empirical benchmarks:

  • AUC Maximization with ROC Fairness Constraints:
  • Adult and COMPAS tabular benchmarks (evaluating demographic fairness across gender and race).
  • CheXpert: Large-scale chest radiograph dataset using DenseNet-121, enforcing 15 simultaneous fairness constraints across demographic groups.
  • Continual Learning with Non-Forgetting Constraints:
  • BDD100K: Diverse driving dataset containing 6 weather conditions and 6 scene classes, used to enforce safety/non-forgetting constraints while finetuning a pretrained CLIP model.
  • LAION-400M: Subset utilized to provide target-class training pairs for contrastive finetuning.

Key Insights and Ideas

  • Why the Unsquared Hinge Matters: While the squared hinge $[h(x)]_+^2$ is differentiable, its gradient vanishes as $h(x) \to 0^+$. Thus, pushing infeasible points into the feasible zone requires $\beta \to \infty$. The unsquared hinge $[h(x)]_+$ retains a non-zero subgradient slope regardless of how close the iterate is to the boundary, allowing a constant $\beta$.
  • Sub-sampling Constraints Efficiently: In problems with many constraints (e.g., CheXpert with 15 ROC thresholds or continual learning over dozens of tasks), tracking each constraint with full backpropagation is prohibitively expensive. Combining the hinge penalty with MSVR enables tracking all constraints while updating only $O(1)$ constraint functions per iteration.
  • Equivalence Without Slack Variables: Converting inequalities $h_k(x) \le 0$ to equalities via squared slack variables $h_k(x) + s_k^2 = 0$ requires strong second-order conditions (SOSC/SONC) to guarantee valid multipliers, which fail in non-smooth settings. Directly handling the hinge penalty completely sidesteps slack variable pitfalls.

Key Results

  • Theoretical Complexity: Achieves an iteration complexity of $O(\epsilon^{-6})$ to find a nearly $\epsilon$-KKT point in expectation/high probability, matching double-loop approaches while using a single-loop routine.
  • ROC Fairness Experiments:
  • On the Adult dataset, the hinge method enforced all constraints using $\beta = 20$, whereas the squared-hinge baseline required $\beta = 800$.
  • On COMPAS, constraints were satisfied at $\beta = 4$ (hinge) versus $\beta = 80$ (squared hinge).
  • On CheXpert, the proposed algorithm scaled smoothly to large-scale deep neural networks, whereas double-loop baseline ICPPAC was computationally intractable due to per-step gradient evaluations across all 15 constraints.
  • Continual Learning: Finetuning CLIP on BDD100K while preserving performance on other weather conditions achieved full constraint satisfaction at $\beta = 10$ (versus $\beta = 800$ for squared hinge) and converged significantly faster to higher target-class accuracy.

Limitations and Future Work

  • Rate Gap: The achieved $O(\epsilon^{-6})$ iteration complexity remains slower than smooth, equality-constrained non-convex settings (typically $O(\epsilon^{-4})$ or $O(\epsilon^{-5})$).
  • Regularity Assumptions: Convergence guarantees rely on a full-rank / non-zero subgradient condition on the Jacobian of the constraints at violating points (the FRVP condition). While verified empirically along the trajectory, pathological landscapes could violate this.
  • Primal-Dual Extensions: The paper does not explore dual updates. The authors highlight extending smoothed primal-dual or augmented Lagrangian methods with constant penalty parameters to fully stochastic, non-convex, non-smooth inequality constraints as a compelling direction for future research.

Summary updated

BibTeX
@article{yang2025single,
  author = {Ming Yang and Gang Li and Quanqi Hu and Qihang Lin and Tianbao Yang},
  title = {{Single-loop Algorithms for Stochastic Non-Convex Optimization with Weakly-Convex Constraints}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=aCgOR2KvAI},
}
Figure