jaxfg - Factor graph-based nonlinear optimization library for JAX.

Overview

jaxfg

Factor graph-based nonlinear optimization library for JAX.

Applications include sensor fusion, control, planning, SLAM. Borrows heavily from a wide set of existing libraries, including: Ceres Solver, g2o, GTSAM, minisam, SwiftFusion.

Features:

  • Autodiff-powered (sparse) Jacobians.
  • Automatic batching of factor computations.
  • Out-of-the-box support for optimization on SO(2), SO(3), SE(2), and SE(3).
  • 100% implemented in Python!

Current limitations:

  • JIT compilation adds significant startup overhead. This could likely be optimized (for example, by specifying more analytical Jacobians) but is mostly unavoidable with JAX/XLA. Limits applications for systems that are online or require dynamic graph alterations.
  • Python >=3.7 only, due to features needed for generic types.

Installation

scikit-sparse require SuiteSparse:

sudo apt update
sudo apt install -y libsuitesparse-dev

Then, from your environment of choice:

git clone https://github.com/brentyi/jaxfg.git
cd jaxfg
pip install -e .

Example scripts

Toy pose graph optimization:

python scripts/pose_graph_simple.py

Pose graph optimization from .g2o files:

python scripts/pose_graph_g2o.py --help

To-do

  • Preliminary graph, variable, factor interfaces
  • Real vector variable types
  • Refactor into package
  • Nonlinear optimization for MAP inference
    • Conjugate gradient linear solver
    • CHOLMOD linear solver
      • Basic implementation. JIT-able, but no vmap, pmap, or autodiff support.
    • Gauss-Newton implementation
    • Termination criteria
    • Damped least squares
    • Dogleg
    • Inexact Newton steps
    • Revisit termination criteria
    • Reduce redundant code
    • Robust losses
  • Marginalization
    • Working prototype using sksparse/CHOLMOD
    • JAX implementation?
  • Validate g2o example
  • Performance
    • More intentional JIT compilation
    • Re-implement parallel factor computation
    • Vectorized linearization
    • Basic (Jacobi) CGLS preconditioning
  • Manifold optimization (mostly offloaded to jaxlie)
    • Basic interface
    • Manifold optimization on SO2
    • Manifold optimization on SE2
    • Manifold optimization on SO3
    • Manifold optimization on SE3
  • Usability + code health (low priority)
    • Basic cleanup/refactor
      • Better parallel factor interface
      • Separate out utils, lie group helpers
      • Put things in folders
    • Resolve typing errors
    • Cleanup/refactor (more)
    • Package cleanup: dependencies, etc
    • Add CI:
      • mypy
      • lint
      • build
      • coverage
    • More comprehensive tests
    • Clean up docstrings
Owner
Brent Yi
Brent Yi
A python library for Bayesian time series modeling

PyDLM Welcome to pydlm, a flexible time series modeling library for python. This library is based on the Bayesian dynamic linear model (Harrison and W

Sam 438 Dec 17, 2022
High performance Python GLMs with all the features!

High performance Python GLMs with all the features!

QuantCo 200 Dec 14, 2022
Learning --> Numpy January 2022 - winter'22

Numerical-Python Numpy NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along

Shahzaneer Ahmed 0 Mar 12, 2022
CrayLabs and user contibuted examples of using SmartSim for various simulation and machine learning applications.

SmartSim Example Zoo This repository contains CrayLabs and user contibuted examples of using SmartSim for various simulation and machine learning appl

Cray Labs 14 Mar 30, 2022
MLflow App Using React, Hooks, RabbitMQ, FastAPI Server, Celery, Microservices

Katana ML Skipper This is a simple and flexible ML workflow engine. It helps to orchestrate events across a set of microservices and create executable

Tom Xu 8 Nov 17, 2022
Distributed training framework for TensorFlow, Keras, PyTorch, and Apache MXNet.

Horovod Horovod is a distributed deep learning training framework for TensorFlow, Keras, PyTorch, and Apache MXNet. The goal of Horovod is to make dis

Horovod 12.9k Jan 07, 2023
A library to generate synthetic time series data by easy-to-use factors and generator

timeseries-generator This repository consists of a python packages that generates synthetic time series dataset in a generic way (under /timeseries_ge

Nike Inc. 87 Dec 20, 2022
Winning solution for the Galaxy Challenge on Kaggle

Winning solution for the Galaxy Challenge on Kaggle

Sander Dieleman 483 Jan 02, 2023
ETNA is an easy-to-use time series forecasting framework.

ETNA is an easy-to-use time series forecasting framework. It includes built in toolkits for time series preprocessing, feature generation, a variety of predictive models with unified interface - from

Tinkoff.AI 674 Jan 07, 2023
Probabilistic time series modeling in Python

GluonTS - Probabilistic Time Series Modeling in Python GluonTS is a Python toolkit for probabilistic time series modeling, built around Apache MXNet (

Amazon Web Services - Labs 3.3k Jan 03, 2023
A scikit-learn based module for multi-label et. al. classification

scikit-multilearn scikit-multilearn is a Python module capable of performing multi-label learning tasks. It is built on-top of various scientific Pyth

802 Jan 01, 2023
A logistic regression model for health insurance purchasing prediction

Logistic_Regression_Model A logistic regression model for health insurance purchasing prediction This code is using these packages, so please make sur

ShawnWang 1 Nov 29, 2021
Practical Time-Series Analysis, published by Packt

Practical Time-Series Analysis This is the code repository for Practical Time-Series Analysis, published by Packt. It contains all the supporting proj

Packt 325 Dec 23, 2022
Pandas-method-chaining is a plugin for flake8 that provides method chaining linting for pandas code

pandas-method-chaining pandas-method-chaining is a plugin for flake8 that provides method chaining linting for pandas code. It is a fork from pandas-v

Francis 5 May 14, 2022
PyPOTS - A Python Toolbox for Data Mining on Partially-Observed Time Series

A python toolbox/library for data mining on partially-observed time series, supporting tasks of forecasting/imputation/classification/clustering on incomplete multivariate time series with missing va

Wenjie Du 179 Dec 31, 2022
Lingtrain Alignment Studio is an ML based app for texts alignment on different languages.

Lingtrain Alignment Studio Intro Lingtrain Alignment Studio is the ML based app for accurate texts alignment on different languages. Extracts parallel

Sergei Averkiev 186 Jan 03, 2023
Simple and flexible ML workflow engine.

This is a simple and flexible ML workflow engine. It helps to orchestrate events across a set of microservices and create executable flow to handle requests. Engine is designed to be configurable wit

Katana ML 295 Jan 06, 2023
Python Research Framework

Python Research Framework

EleutherAI 106 Dec 13, 2022
Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.

Prophet: Automatic Forecasting Procedure Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends ar

Facebook 15.4k Jan 07, 2023
Distributed deep learning on Hadoop and Spark clusters.

Note: we're lovingly marking this project as Archived since we're no longer supporting it. You are welcome to read the code and fork your own version

Yahoo 1.3k Dec 28, 2022