Skip to content

POGS

Blazing fast convex optimization for machine learning

POGS is 4-14x faster than general-purpose solvers on ML problems like Lasso, Ridge, Logistic Regression, and SVM.

  • 4-14x Faster


    Optimized for ML problems with closed-form proximal operators

  • One Line Install


    pip install pogs — works on macOS, Linux, and Windows

  • Pure Python API


    NumPy arrays in, solution out. No configuration needed.

  • CVXPY Integration


    Auto-detects supported patterns in CVXPY problems


Performance

Problem POGS OSQP SCS Clarabel
Lasso (500×300) 51ms 399ms 206ms 186ms
Ridge (500×300) 8ms 89ms 64ms 51ms
Logistic (500×300) 34ms 312ms 198ms 167ms
Elastic Net (500×300) 45ms 380ms 195ms 175ms
SVM (500×300) 42ms 356ms 188ms 162ms

Apple M1, Python 3.12, default tolerances


Quick Start

pip install pogs
from pogs import solve_lasso
import numpy as np

A = np.random.randn(500, 300)
b = np.random.randn(500)

result = solve_lasso(A, b, lambd=0.1)
print(f"Solved in {result['iterations']} iterations")

Supported Problems

Problem Function Description
Lasso solve_lasso(A, b, lambd) L1-regularized least squares
Ridge solve_ridge(A, b, lambd) L2-regularized least squares
Elastic Net solve_elastic_net(A, b, l1, l2) L1 + L2 regularization
Logistic solve_logistic(A, y, lambd) L1-regularized logistic regression
SVM solve_svm(A, y, lambd) L2-regularized hinge loss
Huber solve_huber(A, b, lambd) Robust regression
NNLS solve_nonneg_ls(A, b) Non-negative least squares

CVXPY Integration

POGS can solve CVXPY problems directly:

import cvxpy as cp
from pogs import pogs_solve

x = cp.Variable(300)
prob = cp.Problem(cp.Minimize(cp.sum_squares(A @ x - b) + 0.1 * cp.norm(x, 1)))

pogs_solve(prob)  # Auto-detects Lasso, uses fast solver

Or register as a named method:

cp.Problem.register_solve("POGS", pogs_solve)
prob.solve(method="POGS")

How It Works

POGS uses ADMM with closed-form proximal operators. For ML problems, these operators have analytical solutions—no inner iterations needed:

Function Proximal Operator
½‖·‖² x/(1+ρ)
λ‖·‖₁ soft_threshold(x, λ/ρ)
λ‖·‖² x/(1+2λ/ρ)

General-purpose solvers reformulate everything as cone programs. POGS solves the original problem directly.


Next Steps

  • Get Started


    Install POGS and run your first optimization

    Installation

  • Examples


    Step-by-step examples for each problem type

    Examples

  • API Reference


    Full documentation of all functions

    API

  • Source Code


    Contribute or report issues

    GitHub


Citation

@article{fougner2018pogs,
  title={Parameter selection and preconditioning for a graph form solver},
  author={Fougner, Christopher and Boyd, Stephen},
  journal={Emerging Applications of Control and Systems Theory},
  pages={41--61},
  year={2018},
  publisher={Springer}
}