Convex optimization with an interpolation-based projection and its application to deep learning

Riad Akrour, Asma Atamna, Jan Peters

Integrating convex optimization constraints directly into neural network architectures has emerged as a powerful technique for enforcing physical laws, safety bounds, and domain-specific priors. However, the computational cost of standard differentiable optimization layers—which typically rely on expensive orthogonal projections—often limits their scalability. This paper, published in Machine Learning (2021), introduces a "frugal" interpolation-based projection that achieves significant speedups by replacing exact solvers with a differentiable, closed-form approximation.

The Bottleneck of Orthogonal Projections

Standard methods for constrained optimization, such as Projected Gradient Descent (PGD), require finding the point in a convex set $C$ that is closest to a given input $x$. This operation, known as an orthogonal projection, often requires solving a nested optimization problem at every iteration. When these layers are embedded within deep learning models, the model must also backpropagate through these solvers, a process that can be hundreds of times slower than the forward pass of the neural network itself.

The authors address a fundamental question: Can a computationally cheaper, "inexact" projection still drive a gradient-based algorithm to the global optimum?

Methodology: Interpolation Gradient Descent (IGD)

The core innovation is the interpolation-based projection ($g$). Instead of searching for the mathematically closest point, the algorithm performs a simple linear interpolation between a violating point $x$ and a known "safe" point $x_0$ located within the feasible set.

The Algorithm

Unlike standard PGD, which applies a projection after a gradient step, the proposed Interpolation Gradient Descent (IGD) differentiates through the composition of the objective function $f$ and the projection $g$:

$$x_{k+1} = x_k - \alpha \nabla (f \circ g)(x_k)$$

By taking the derivative of the projection into account, the gradient of the objective is effectively "mixed" with the gradient of the constraint. This pushes the iterates back toward the feasible region in a direction that still minimizes the objective.

Comparison of standard PGD (a) vs. the proposed IGD (b). While PGD with this cheap projection stalls, IGD successfully navigates to the optimum by differentiating through the projection.

Theoretical Convergence

The authors provide a formal proof demonstrating that for linear objectives and arbitrary convex, Lipschitz constraints, IGD converges to the true global optimum. This is a significant result, as it shows that the "sub-optimality" of the projection does not prevent the algorithm from reaching the correct solution, provided the projection is differentiable.

Experimental Evaluation

The method was tested across three distinct domains to evaluate speed, robustness, and physical consistency:

  1. Synthetic Convex Problems: The authors tested 100 instances of various problem types, including Linear Programs (LP), Semi-Definite Programs (SDP), and Second-Order Cone Programs (SOCP). IGD outperformed standard subgradient descent in 17 out of 20 tested configurations.
  2. Reinforcement Learning: In the OpenAI Gym BipedalWalker-v2 environment, the layer was used to enforce KL-divergence constraints during policy optimization.
  3. Dynamics Modeling: A supervised learning task involved predicting the movement of complex rigid-body systems (e.g., chains and star configurations). The projection was used to enforce hard constraints on string lengths.

Key Results and Insights

  • Massive Speedups: In reinforcement learning tasks, the interpolation layer was over 300 times faster than state-of-the-art differentiable convex solvers like cvxpylayers.
  • Inductive Bias and Consistency: In dynamics modeling, the projection-augmented Recurrent Neural Network (RNN) maintained perfect physical consistency (respecting string lengths), whereas a vanilla RNN failed. This was achieved with only a modest 20% increase in training time compared to the unconstrained model.
  • Superior RL Performance: Surprisingly, the interpolation projection often outperformed "optimal" orthogonal projections in RL tasks. The authors attribute this to a more favorable interaction between the IGD gradient and the line-search routines used in policy optimization.

Conclusion and Future Work

The interpolation-based projection offers a computationally frugal alternative to traditional differentiable optimization layers. By prioritizing differentiability over geometric optimality, IGD enables the inclusion of hard constraints in large-scale deep learning models that were previously too expensive to train.

While the current theoretical guarantees are limited to linear objectives, empirical evidence suggests the method is robust for non-linear and non-convex objectives. Future research may extend these proofs and explore the use of interpolation layers as intermediary nodes within deeper, more complex neural architectures.

Summary updated

BibTeX
@article{akrour2021convex,
  author = {Riad Akrour and Asma Atamna and Jan Peters},
  title = {{Convex optimization with an interpolation-based projection and its application to deep learning}},
  journal = {Machine Learning},
  year = {2021},
  doi = {10.1007/s10994-021-06037-z},
}
Figure