Comprehensive benchmarks comparing POGS against other CVXPY solvers (ECOS, SCS, OSQP, CVXOPT) on standard optimization problems.
# Install dependencies
pip install cvxpy numpy scipy pandas matplotlib
# Run all benchmarks
cd python/benchmarks
python run_benchmarks.py
# Run specific problem class
python run_benchmarks.py --problem lasso
python run_benchmarks.py --problem portfolio
# Quick test (fewer trials, smaller problems)
python run_benchmarks.py --quick| Problem | Solvers Tested | Sizes |
|---|---|---|
| Lasso Regression | POGS, ECOS, SCS, OSQP | Small, Medium, Large, Sparse |
| Logistic Regression | POGS, ECOS, SCS | Small, Medium, Large |
| Portfolio Optimization | POGS, ECOS, SCS, OSQP | Small, Medium, Large |
| Linear Programs (LP) | POGS, ECOS, SCS, OSQP | Small, Medium, Large |
| Quadratic Programs (QP) | POGS, ECOS, SCS, OSQP | Small, Medium, Large |
| SOCP | POGS, ECOS, SCS | Small, Medium |
| SDP | POGS, SCS, CVXOPT | Small, Medium |
For each problem/solver combination:
- Solve time (seconds)
- Setup time (problem transformation)
- Total time (setup + solve)
- Iterations (solver iterations)
- Optimal value (objective)
- Status (optimal, infeasible, etc.)
- Success rate (over multiple trials)
Results are saved to:
results/latest.json- Detailed JSON resultsresults/summary.txt- Human-readable summaryresults/latest.html- HTML report with charts (if matplotlib available)
Based on the POGS paper:
POGS Strengths:
- Large-scale problems (billions of coefficients)
- Dense problems (efficient BLAS usage)
- GPU acceleration (for very large problems)
- Modest accuracy requirements (3-4 digits)
POGS Limitations:
- High accuracy (8+ digits) - Interior-point methods may be faster
- Very sparse problems - SCS may be more efficient
- Warm starts - Not currently supported (OSQP supports this)
python/benchmarks/
├── README.md # This file
├── run_benchmarks.py # Main benchmark runner
├── benchmark_utils.py # Utilities (timing, reporting)
├── problems/ # Problem generators
│ ├── __init__.py
│ ├── lasso.py # Lasso regression
│ ├── logistic.py # Logistic regression
│ ├── portfolio.py # Portfolio optimization
│ ├── lp.py # Linear programs
│ ├── qp.py # Quadratic programs
│ ├── socp.py # Second-order cone programs
│ └── sdp.py # Semidefinite programs
└── results/ # Benchmark results (gitignored)
├── latest.json
├── summary.txt
└── archive/
- Create problem generator in
problems/<name>.py - Add to
run_benchmarks.pyproblem list - Run benchmarks
Example problem generator:
import cvxpy as cp
import numpy as np
def generate(m=100, n=50, seed=None):
"""Generate a Lasso regression problem."""
if seed is not None:
np.random.seed(seed)
A = np.random.randn(m, n)
x_true = np.random.randn(n)
x_true[np.random.rand(n) < 0.9] = 0 # Sparse
b = A @ x_true + 0.1 * np.random.randn(m)
x = cp.Variable(n)
lambda_val = 0.1 * np.linalg.norm(A.T @ b, np.inf)
objective = cp.Minimize(
0.5 * cp.sum_squares(A @ x - b) + lambda_val * cp.norm(x, 1)
)
problem = cp.Problem(objective)
problem.name = f"Lasso (m={m}, n={n})"
problem.size_metrics = {"m": m, "n": n}
return problem- Lower is better
- POGS typically excels on large dense problems
- Interior-point methods (ECOS) may be faster for small problems
- First-order methods (POGS, SCS) typically need more iterations
- Interior-point methods (ECOS) converge in fewer iterations
- Iterations × time per iteration = solve time
- Should be 100% for well-formed problems
- Lower rates indicate numerical issues or solver limitations
If you use these benchmarks in research, please cite:
@article{fougner2015pogs,
title={Parameter selection and preconditioning for a graph form solver},
author={Fougner, Chris and Boyd, Stephen},
journal={Optimization and Engineering},
year={2015}
}Contributions welcome! Please:
- Add new problem classes with realistic problem sizes
- Ensure problems are well-formed (bounded, feasible)
- Document expected solver performance
- Update this README
Last Updated: v0.4.0 (January 2, 2026)