This codebase allows for creating tight semidefinite relaxations of non-convex polynomial optimization problems in a semi-automatic way. The technique has been successfully applied to many state estimation problems in robotics and computer vision and is described in more detail in this paper.
In a nutshell, the codebase provides the AUTOTIGHT and AUTOTEMPLATE algorithms. We start with an optimization problem written in (QCQP) form:
with cost matrix
AUTOTIGHT finds all possible additional constraints matrices
Cost-tight means that strong duality holds (
AUTOTEMPLATE follows the same principle as AUTOTIGHT, but its output are templates rather than constraints. These templates can be seen as "parametrized" versions of the constraints matrices, and can be applied to new problem instances of any size without having to learn the constraints again from scratch.
If you use this codebase, please cite our paper:
@article{dumbgen_toward_2024,
title = {Toward Globally Optimal State Estimation Using Automatically Tightened Semidefinite Relaxations},
author = {Dümbgen, Frederike and Holmes, Connor and Agro, Ben and Barfoot, Timothy D.},
year = {2024},
journal = {IEEE Transactions on Robotics (to appear)},
publisher = {IEEE},
}
Clone this codebase by running:
git clone --recurse-submodules [email protected]:utiasASRL/constraint_learning
The below command creates an environment with all dependencies and installs this package (and all required submodules) locally.
conda env create -f environment.yml
To test that the installation was successful, you can generate a representative set of example results by running
conda activate constraint_learning
make results_test
The command should run in less than 4 minutes on a modern laptop, and the output can be found in the _results_test
folder. The expected terminal output can be found in _results/test/terminal_output.log
.
Besides the automatically installed dependencies when using the above instructions, you need to also have a valid MOSEK license in order to use this repository. If you are an academic, you can get a license for free here.
For plotting, we assume that LaTeX is installed.
If you want to automatically tighten your own SDP, all you need to do is to create your own lifter class implementing the specific lifting functions you want to use (i.e. define lifters/
folder. To analyze your lifter, you can refer to the scripts _scripts/run_<lifter>_study.py
for inspiration, and also _scripts/run_autotemplate.py
.
To reproduce the results from our paper on automatic tightening of SDPs, run:
conda activate constraint_learning
make results_generate
Alternatively, to inspect and plot existing results, run
make results_plot
- Frederike Dümbgen
- Connor Holmes
- Ben Agro