Optimization over the embedded submanifold defined by constraints $c(x) = 0$ has attracted much interest over the past few decades due to its wide applications in various areas. Plenty of related optimization packages have been developed based on Riemannian optimization approaches, which rely on some basic geometrical materials of Riemannian manifolds, including retractions, vector transports, etc. These geometrical materials can be challenging to determine in general. Existing packages only accommodate a few well-known manifolds whose geometrical materials are easily accessible. For other manifolds which are not contained in these packages, the users have to develop the geometric materials by themselves. In addition, it is not always tractable to adopt advanced features from various state-of-the-art unconstrained optimization solvers to Riemannian optimization approaches. We introduce CDOpt (available at https://cdopt.github.io/), a user-friendly Python package for a class Riemannian optimization. Based on constraint dissolving approaches, Riemannian optimization problems are transformed into their equivalent unconstrained counterparts in CDOpt. Therefore, solving Riemannian optimization problems through CDOpt directly benefits from various existing solvers and the rich expertise gained over decades for unconstrained optimization. Moreover, all the computations in CDOpt related to any manifold in question are conducted on its constraints expression, hence users can easily define new manifolds in CDOpt without any background on differential geometry. Furthermore, CDOpt extends the neural layers from PyTorch and Flax, thus allows users to train manifold constrained neural networks directly by the solvers for unconstrained optimization. Extensive numerical experiments demonstrate that CDOpt is highly efficient and robust in solving various classes of Riemannian optimization problems.
翻译:黎曼优化是指在约束$c(x)=0$定义的嵌入子流形上进行的优化,它在各个领域都有广泛应用。基于黎曼优化方法进行相关优化的包已经发展得比较多,它们依赖于黎曼流形的基本几何材料,包括回缩、向量传输等。这些基本的几何材料通常难以确定。现有的包只包含一些易于获取的黎曼流形的基本材料。对于那些没有包含在这些包中的流形,用户需要自己开发其几何材料。另外,不总能将各种最先进的无约束优化求解器的高级功能用于黎曼优化方法。本文介绍了CDOpt(https://cdopt.github.io/),它是一个用户友好型的用于黎曼优化的 Python 包。基于约束扰动方法,CDOpt将黎曼优化问题转化为等效的无约束问题。因此,通过CDOpt直接解决黎曼优化问题,从无约束优化程切过来,并且能够受益于各种现有的求解器和几十年来无约束优化领域的丰富经验。此外,CDOpt 中与相关流形有关的计算都是在其约束表达式上进行的,因此用户可以在不了解微分几何的背景下,轻松地在CDOpt中定义新的流形。此外,CDOpt扩展了PyTorch和Flax的神经网络层,因此允许用户通过无约束优化求解器直接训练黎曼约束神经网络。广泛的数值实验表明,CDOpt在解决各种类别的黎曼优化问题方面具有高效性和鲁棒性。