facebookresearch/theseus
A Facebook Research library enabling backpropagation through nonlinear optimization solvers like Gauss-Newton and Levenberg-Marquardt, built on PyTorch.

Theseus provides differentiable nonlinear optimization primitives that can be incorporated into neural network computation graphs. It implements classic optimization algorithms including Gauss-Newton, Levenberg-Marquardt, and nonlinear least-squares solvers, enabling gradient-based learning through optimization layers. The library is used for applications in computer vision, robotics, and embodied AI where optimization problems need to be end-to-end differentiable.