Abstract
GENO (Generic Optimization) is a domain-specific language and software stack designed to generate high-performance solvers from high-level mathematical specifications. By integrating a symbolic tensor calculus engine with a specialized compiler that maps mathematical expressions directly to optimized BLAS calls, GENO produces solvers that combine the simplicity of high-level modeling with the speed of hand-optimized C++ or CUDA code. This paper explores the architecture of GENO and its ability to outperform traditional modeling tools while remaining competitive with specialized, hand-written solvers.
The Challenge of Mathematical Optimization
In mathematical optimization, researchers often face a trade-off between ease-of-use and performance. Modeling languages like CVXPY or JuMP allow for intuitive mathematical syntax but often struggle with large-scale problems. These tools typically transform specific problem instances into a standard form, a process that is computationally expensive and memory-intensive. Conversely, hand-written solvers offer peak performance but require deep expertise in numerical methods and hardware-specific optimization, such as manual BLAS or CUDA implementation.
GENO aims to bridge this gap by allowing users to specify a class of problems once and automatically generating a solver that rivals hand-optimized code.
The GENO Architecture
The GENO stack is composed of four primary layers that transform high-level math into machine-efficient code:
1. Modeling Language
GENO utilizes a MATLAB-like syntax where users declare parameters, variables, objective functions, and constraints. It supports both smooth and non-smooth functions (such as the $\ell_1$-norm) by automatically transforming non-smooth problems into constrained, smooth ones.
2. Matrix and Tensor Calculus Engine
A core innovation of GENO is its symbolic differentiation engine. To solve problems efficiently, the system requires gradients. GENO uses a generalized version of Einstein notation to compute symbolic derivatives of complex matrix and tensor expressions. This approach avoids the limitations of standard matrix notation, which often requires cumbersome "vectorization" tricks to represent higher-order derivatives like Hessians.
3. Generic Optimizer
GENO employs a modified L-BFGS-B algorithm for bound-constrained problems and an Augmented Lagrangian approach for general constraints. This setup is designed to be "parameter-free," meaning users do not need to tune hyperparameters to achieve convergence.
4. autoBLAS Compiler
This component acts as a source-to-source compiler, translating mathematical expressions into optimized library calls (such as Intel MKL for CPUs or NVIDIA cuBLAS for GPUs). This ensures that the mathematical models run at the hardware's peak performance.
Key Innovations and Insights
- Class-Level Transformation: Unlike traditional tools that transform every data instance, GENO transforms the problem class into a general normal form. Consequently, the overhead of problem setup does not scale with data size.
- Tensor-Based Automatic Differentiation: By moving to a tensor-based notation (Ricci/Einstein notation), GENO can represent and compute derivatives that are mathematically difficult to express in standard matrix form, leading to significantly more efficient code.
- Hardware Agnosticism: By decoupling the model from the backend via the autoBLAS compiler, GENO can target various hardware architectures (Intel, AMD, NVIDIA, ARM) without requiring changes to the user's optimization model.
Performance Results
GENO's generated solvers demonstrate significant performance gains over existing frameworks:
- Speed: Solvers are often orders of magnitude faster than state-of-the-art modeling languages like CVXPY.
- Differentiation Efficiency: The symbolic differentiation approach is reported to be two orders of magnitude faster on CPUs and three orders of magnitude faster on GPUs compared to previous tensor derivative methods.
- Competitiveness: The automatically generated code is competitive with hand-written, problem-specific solvers, effectively eliminating the performance penalty typically associated with high-level modeling.
Conclusion and Future Work
GENO represents a significant step forward in making high-performance optimization accessible. While currently focused on continuous optimization, future work may address discrete or combinatorial problems. Additionally, while the system handles dense machine learning problems effectively, further optimizations for extremely sparse data structures could expand its utility in large-scale data science ecosystems.
Summary updated