This paper, presented at NeurIPS 2019, introduces GENO (GENeric Optimization), a framework designed to bridge the gap between the flexibility of general-purpose modeling languages and the high performance of hand-written, specialized optimization solvers for classical machine learning.
TL;DR
GENO is an optimization framework that automatically generates highly efficient solvers from high-level, MATLAB-like problem descriptions. It challenges the long-held belief that classical machine learning requires hand-tuned, model-specific solvers, matching or exceeding the performance of state-of-the-art specialized code while remaining as flexible as general modeling languages.
What Problem Does This Paper Address?
In the world of deep learning, researchers rely on a few standard frameworks (like PyTorch or TensorFlow) and a handful of solvers (like SGD or Adam). However, in classical machine learning (e.g., SVMs, logistic regression, matrix factorization), the status quo is different: every new model usually requires a custom, hand-written optimization solver to be efficient.
While general modeling languages like CVXPY exist, they are often too slow for large-scale machine learning. This is because they typically transform a specific problem instance into a rigid "standard form" (like a Linear or Quadratic Program), a process that causes the problem representation to explode in size as the data grows. Consequently, practitioners are often forced to choose between flexibility (slow, general tools) and efficiency (fast, but tedious and error-prone hand-written code).
Methods
GENO resolves this trade-off through a "modeling language plus solver" approach that is more tightly coupled than previous systems.
- Modeling Language: Users specify problems using a declarative, MATLAB-like syntax that supports vectorized linear algebra expressions.
- Symbolic Differentiation: Instead of using traditional automatic differentiation (which can be slow for complex matrix operations), GENO uses a specialized matrix and tensor calculus algorithm to compute gradients symbolically.
- The Solver Engine:
- Core: At its heart, GENO uses a quasi-Newton solver (L-BFGS-B). This is a first-order method that approximates second-order information, making it efficient for problems with millions of variables.
- Constraints: To handle equality and inequality constraints, it employs an Augmented Lagrangian approach.
- Non-smoothness: Non-smooth problems (like those using $\ell_1$ regularization) are automatically transformed into constrained, smooth problems that the core engine can handle.
- Code Generation: Unlike other tools, GENO transforms entire problem classes into a general standard form. This means the generated solver code is independent of the specific data size, making it extremely fast and "deployable" as a standalone component.
Datasets
The authors evaluated GENO across a wide range of standard benchmarks:
- LIBSVM Repository: Used for large-scale classification and regression tasks (datasets include
a9a,covtype,mushrooms,rcv1,real-sim, andwebspam). - UCI Machine Learning Repository: Smaller datasets (like
heart,ionosphere,diabetes) were used to compare GENO against general-purpose solvers like ECOS and SCS. - Synthetic Data: Specifically generated for testing Symmetric Non-negative Matrix Factorization (NMF) to ensure a controlled environment for non-convex optimization.
- Iris Dataset: Used for visualizing regularization paths.
Key Insights and Ideas
- Challenging the "Specialization" Myth: The most significant insight is that a well-engineered generic solver can be just as fast as a specialized one. You don't always need to exploit model-specific structure to achieve peak performance.
- Parameter-Free Efficiency: Unlike Stochastic Gradient Descent (SGD), which requires tedious tuning of learning rates and momentum, GENO’s L-BFGS-B approach with line search is largely parameter-free and more robust.
- Representational Efficiency: By transforming problem classes rather than instances, GENO avoids the "memory bloat" that plagues tools like CVXPY, allowing it to scale to much larger datasets.
- Handling Non-Convexity: Unlike many popular modeling frameworks that are restricted to convex optimization, GENO can handle non-convex problems (like Symmetric NMF), finding local optima where others cannot even run.
Key Results
- Speed vs. Specialized Solvers: GENO performs nearly as fast as LIBLINEAR, the industry standard for linear SVMs and logistic regression, which is highly optimized C++ code.
- Speed vs. General Frameworks: On smaller datasets, GENO was orders of magnitude faster than CVXPY (e.g., 0.005 seconds vs. ~2 seconds for ECOS/SCS).
- Accuracy: In tracking "regularization paths" (how model coefficients change as you vary penalty terms), GENO was more precise than SAGA, a popular state-of-the-art stochastic solver, and avoided the instabilities seen in other frameworks.
- Non-Convex Performance: In Symmetric NMF experiments, GENO outperformed specialized algorithms (SymANLS and SymHALS) by a significant margin in terms of convergence speed.
Limitations and Future Work
- Deep Learning: GENO is not intended for deep learning. It computes full gradients rather than sampled (stochastic) gradients, which is impractical for massive neural networks.
- Very Small Problems: For extremely small problems (fewer than a few dozen variables), traditional Newton methods with direct solvers might still be faster than GENO’s first-order approach.
- Numerical Stability: Like all optimization frameworks, GENO can struggle with numerical overflows in functions like
exp(). While the authors suggest using operators likelogsumexp, the responsibility for mathematical validity lies with the user. - Sanity Checks: The current version does not perform extensive mathematical sanity checks (e.g., it won't warn you if you try to take the log of a zero determinant).
Summary updated