In the world of massive web applications like LinkedIn or Amazon, optimization isn't just a math problem—it's a massive engineering challenge. When deciding which of a thousand items to show to each of a hundred million users, engineers face a Linear Program (LP) with trillions of decision variables. Traditional solvers simply choke at this scale.
A team from LinkedIn and MIT recently introduced ECLIPSE, an "Extreme-Scale" LP solver designed specifically to handle these gargantuan tasks.
TL;DR
ECLIPSE is a distributed solver capable of handling Linear Programs with up to $10^{12}$ (one trillion) variables by transforming them into a "smooth" dual problem. By leveraging a perturbation-based approach and the Apache Spark framework, it solves in hours what state-of-the-art solvers cannot finish in a day.
The Challenge of Extreme-Scale Optimization
Many core features of the internet industry—like matching job seekers to roles, optimizing the volume of emails sent to users, or balancing multiple business metrics in a recommendation feed—can be framed as Linear Programs.
The primary hurdle is the sheer scale. A typical matching problem might involve $10^8$ users and $10^4$ items, resulting in a constraint matrix so large it cannot fit in the memory of a single machine. Standard methods like the Simplex algorithm or Interior Point methods are either too difficult to parallelize or require prohibitively expensive matrix factorizations. Previously, engineers often relied on ad-hoc rules, like splitting the problem into smaller, sub-optimal chunks, which left significant performance on the table.
Methods: Smoothing and Distributed Computing
The "secret sauce" of ECLIPSE is a two-step mathematical transformation combined with a robust distributed architecture:
- Perturbation: The authors add a tiny "ridge" regularization term ($\ell_2$-squared) to the original LP objective. This turns the LP into a Quadratic Program (QP). Mathematically, this ensures the dual problem is "smooth" (i.e., it has a Lipschitz continuous gradient).
- Dual Optimization: Instead of solving the complex primal problem directly, ECLIPSE solves this smooth dual problem using Accelerated Gradient Descent (AGD).
The beauty of this approach is that the most computationally expensive part of the gradient calculation—matrix-vector multiplication—is perfectly suited for distributed computing. The authors implemented ECLIPSE on Apache Spark, using a driver-executor architecture to spread the workload across hundreds of machines.
Datasets and Evaluation
The researchers evaluated ECLIPSE using both simulated and real-world data:
- Simulated Data: Used to benchmark against existing open-source solvers like the Splitting Conic Solver (SCS) and to validate mathematical accuracy.
- Real-World LinkedIn Data: Applied to two massive use cases:
- Volume Optimization: Deciding how many notifications to send to users without overwhelming them.
- Matching Problems: Recommending connections or items to users, involving up to 1 trillion variables.
Key Insights
- Smoothness is Scalability: The core insight is that by slightly changing the problem via perturbation, you gain the ability to use first-order optimization methods. These methods only require gradients, avoiding the "memory wall" of second-order methods that need to invert massive matrices.
- Exploiting Web Structure: Most constraints in web apps are "simple"—they only affect a single user or a small cohort. ECLIPSE exploits this block-diagonal structure, allowing the "projection" step of the algorithm to happen in parallel across executors with minimal communication overhead.
- Duals as Production "Prices": Once the solver finds the optimal dual variables (which act as "shadow prices" for constraints), these can be reused in real-time. When a new user arrives, the system can instantly estimate the best action using the pre-calculated duals, rather than re-running the whole optimization.
Key Results
ECLIPSE demonstrates a massive leap in capability compared to previous state-of-the-art solvers:
- Unprecedented Scale: It successfully solved a matching problem with $10^{12}$ variables in roughly 12 hours.
- Superior Speed: On a problem with $10^9$ variables, ECLIPSE finished in 4 hours, while the competitive SCS solver failed to finish within 24 hours.
- Convergence Accuracy: The primal and dual solutions converge steadily toward the true optimal value, proving that the perturbation doesn't sacrifice meaningful accuracy for scale.
Limitations and Future Work
While powerful, ECLIPSE is not a universal solution for every LP. Its efficiency relies heavily on the specific structure of web-application constraints (separable and easy to project onto). If a problem has highly complex, intertwined constraints, the projection step would become a significant bottleneck.
Future research could explore adapting this framework for more general classes of LPs while maintaining the distributed efficiency that makes ECLIPSE so effective for the modern web.
Summary updated