├── .gitignore ├── README.md └── docs ├── img ├── double_pendulum │ ├── combination_logsumexp.png │ └── combination_mean.png ├── ibm_pendulum │ ├── bayes_sim │ │ ├── bayessim_ibm_pendulum_mdn_difference.png │ │ ├── bayessim_ibm_pendulum_mdn_difference_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdn_downsampled_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdn_signature_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdn_summary_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdrff_matern_difference_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdrff_matern_downsampled_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdrff_matern_signature_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdrff_matern_summary_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdrff_rbf_difference_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdrff_rbf_downsampled_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdrff_rbf_signature_trajectories.png │ │ ├── bayessim_ibm_pendulum_mdrff_rbf_summary_trajectories.png │ │ ├── ibm_groundtruth_difference.png │ │ ├── ibm_groundtruth_downsampled.png │ │ ├── ibm_groundtruth_raw.png │ │ ├── ibm_groundtruth_signature.png │ │ └── ibm_groundtruth_summary.png │ ├── cem_trajectories.png │ ├── ibm-pendulum-timelapse.png │ ├── mcmc_trajectories.png │ ├── nuts_trajectories.png │ ├── sgld_ms.png │ ├── sgld_trajectories.png │ ├── svgd_ms_test.png │ ├── svgd_multiple_shooting.png │ ├── svgd_multiple_shooting_q.png │ ├── svgd_single_shooting.png │ ├── svgd_single_shooting_q.png │ └── svgd_ss_test.png ├── panda │ ├── box_position_cem.png │ ├── box_position_emcee.png │ ├── box_position_nuts.png │ ├── box_position_sgld.png │ ├── box_position_svgd_ms.png │ ├── box_position_svgd_ss.png │ ├── panda_box_2.jpg │ ├── panda_box_4.jpg │ ├── panda_box_initial_trajectory.png │ ├── panda_box_trajectory.png │ ├── panda_box_weights_cem.png │ ├── panda_sim.png │ ├── panda_sim_array.png │ ├── panda_sim_array2.png │ ├── panda_sim_array3.png │ ├── panda_sim_array4.png │ ├── panda_sim_array5.png │ ├── panda_sim_array6.png │ ├── panda_sim_array7.png │ └── panda_sim_markers.png ├── pds_diagram.png ├── pds_diagram.svg └── synthetic_param_uncertainty │ ├── bayessim_two_param_mdn_downsampled_trajectories.png │ ├── bayessim_twoparam_mdn_difference.png │ ├── bayessim_twoparam_mdn_downsampled.png │ ├── bayessim_twoparam_mdrff_rbf_downsampled.png │ ├── knn_kl.png │ ├── knn_kl_real_sim.png │ ├── knn_kl_sim_real.png │ ├── mmd.png │ ├── synthetic_param_uncertainty_cem.png │ ├── synthetic_param_uncertainty_mcmc.png │ ├── synthetic_param_uncertainty_nuts.png │ ├── synthetic_param_uncertainty_sgld.png │ ├── synthetic_param_uncertainty_svgd.png │ └── synthetic_params_loglikelihood.png └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | 131 | .history -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # prob-diff-sim 2 | Probabilistic Inference of Simulation Parameters via Parallel Differentiable Simulation 3 | -------------------------------------------------------------------------------- /docs/img/double_pendulum/combination_logsumexp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/double_pendulum/combination_logsumexp.png -------------------------------------------------------------------------------- /docs/img/double_pendulum/combination_mean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/double_pendulum/combination_mean.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdn_difference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdn_difference.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdn_difference_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdn_difference_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdn_downsampled_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdn_downsampled_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdn_signature_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdn_signature_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdn_summary_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdn_summary_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_matern_difference_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_matern_difference_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_matern_downsampled_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_matern_downsampled_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_matern_signature_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_matern_signature_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_matern_summary_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_matern_summary_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_rbf_difference_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_rbf_difference_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_rbf_downsampled_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_rbf_downsampled_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_rbf_signature_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_rbf_signature_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_rbf_summary_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/bayessim_ibm_pendulum_mdrff_rbf_summary_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/ibm_groundtruth_difference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/ibm_groundtruth_difference.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/ibm_groundtruth_downsampled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/ibm_groundtruth_downsampled.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/ibm_groundtruth_raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/ibm_groundtruth_raw.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/ibm_groundtruth_signature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/ibm_groundtruth_signature.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/bayes_sim/ibm_groundtruth_summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/bayes_sim/ibm_groundtruth_summary.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/cem_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/cem_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/ibm-pendulum-timelapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/ibm-pendulum-timelapse.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/mcmc_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/mcmc_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/nuts_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/nuts_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/sgld_ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/sgld_ms.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/sgld_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/sgld_trajectories.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/svgd_ms_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/svgd_ms_test.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/svgd_multiple_shooting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/svgd_multiple_shooting.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/svgd_multiple_shooting_q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/svgd_multiple_shooting_q.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/svgd_single_shooting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/svgd_single_shooting.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/svgd_single_shooting_q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/svgd_single_shooting_q.png -------------------------------------------------------------------------------- /docs/img/ibm_pendulum/svgd_ss_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/ibm_pendulum/svgd_ss_test.png -------------------------------------------------------------------------------- /docs/img/panda/box_position_cem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/box_position_cem.png -------------------------------------------------------------------------------- /docs/img/panda/box_position_emcee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/box_position_emcee.png -------------------------------------------------------------------------------- /docs/img/panda/box_position_nuts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/box_position_nuts.png -------------------------------------------------------------------------------- /docs/img/panda/box_position_sgld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/box_position_sgld.png -------------------------------------------------------------------------------- /docs/img/panda/box_position_svgd_ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/box_position_svgd_ms.png -------------------------------------------------------------------------------- /docs/img/panda/box_position_svgd_ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/box_position_svgd_ss.png -------------------------------------------------------------------------------- /docs/img/panda/panda_box_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_box_2.jpg -------------------------------------------------------------------------------- /docs/img/panda/panda_box_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_box_4.jpg -------------------------------------------------------------------------------- /docs/img/panda/panda_box_initial_trajectory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_box_initial_trajectory.png -------------------------------------------------------------------------------- /docs/img/panda/panda_box_trajectory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_box_trajectory.png -------------------------------------------------------------------------------- /docs/img/panda/panda_box_weights_cem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_box_weights_cem.png -------------------------------------------------------------------------------- /docs/img/panda/panda_sim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_sim.png -------------------------------------------------------------------------------- /docs/img/panda/panda_sim_array.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_sim_array.png -------------------------------------------------------------------------------- /docs/img/panda/panda_sim_array2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_sim_array2.png -------------------------------------------------------------------------------- /docs/img/panda/panda_sim_array3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_sim_array3.png -------------------------------------------------------------------------------- /docs/img/panda/panda_sim_array4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_sim_array4.png -------------------------------------------------------------------------------- /docs/img/panda/panda_sim_array5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_sim_array5.png -------------------------------------------------------------------------------- /docs/img/panda/panda_sim_array6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_sim_array6.png -------------------------------------------------------------------------------- /docs/img/panda/panda_sim_array7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_sim_array7.png -------------------------------------------------------------------------------- /docs/img/panda/panda_sim_markers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/panda/panda_sim_markers.png -------------------------------------------------------------------------------- /docs/img/pds_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/pds_diagram.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/bayessim_two_param_mdn_downsampled_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/bayessim_two_param_mdn_downsampled_trajectories.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/bayessim_twoparam_mdn_difference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/bayessim_twoparam_mdn_difference.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/bayessim_twoparam_mdn_downsampled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/bayessim_twoparam_mdn_downsampled.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/bayessim_twoparam_mdrff_rbf_downsampled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/bayessim_twoparam_mdrff_rbf_downsampled.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/knn_kl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/knn_kl.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/knn_kl_real_sim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/knn_kl_real_sim.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/knn_kl_sim_real.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/knn_kl_sim_real.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/mmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/mmd.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/synthetic_param_uncertainty_cem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/synthetic_param_uncertainty_cem.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/synthetic_param_uncertainty_mcmc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/synthetic_param_uncertainty_mcmc.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/synthetic_param_uncertainty_nuts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/synthetic_param_uncertainty_nuts.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/synthetic_param_uncertainty_sgld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/synthetic_param_uncertainty_sgld.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/synthetic_param_uncertainty_svgd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/synthetic_param_uncertainty_svgd.png -------------------------------------------------------------------------------- /docs/img/synthetic_param_uncertainty/synthetic_params_loglikelihood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uscresl/prob-diff-sim/c7793e2cc2d326922c5dd8367224927ff46b1ef6/docs/img/synthetic_param_uncertainty/synthetic_params_loglikelihood.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | 30 | 31 | Probabilistic Differentiable Simulation 32 | 33 | 106 | 108 | 109 | 110 | 113 | 114 | 115 | 118 | 119 | 135 | 136 | 137 | 138 | 165 | 166 |
167 | 168 |

Probabilistic Inference of Simulation Parameters via
Parallel Differentiable Simulation

169 | 170 |

ICRA 2022

171 | 172 |
173 |
174 |

175 | Eric Heiden1 176 |

177 |
178 |
179 |

180 | Christopher E. Denniston1 181 |

182 |
183 |
184 |

185 | David Millard1 186 |

187 |
188 |
189 |

190 | Fabio Ramos2,3 191 |

192 |
193 |
194 |

195 | Gaurav S. Sukhatme1,4 196 |

197 |
198 |
199 |
200 |
201 |

1University of Southern California

202 |
203 |
204 |

2NVIDIA

205 |
206 |
207 |

3University of Sydney

208 |
209 |
210 |

4Amazon

211 |
212 |
213 |
214 | 215 |
216 |
217 |
218 | PDS 219 |
We reduce the reality gap in robotics simulators by introducing a 220 | Bayesian inference approach named Constrained Stein Variational Gradient Descent (CSVGD). 221 | Through a 222 | multiple-shooting likelihood model for trajectories, and by leveraging parallel differentiable 223 | simulators, CSVGD can infer complex, non-parametric posterior distributions over simulation 224 | parameters for highly nonlinear systems.
225 |
226 | 232 |
233 |
234 | 235 |
236 |
237 |

Abstract

238 | 239 |

240 | To accurately reproduce measurements from the real world, simulators need to have an adequate model of 241 | the physical system and require the parameters of the model be identified. 242 |

243 |

244 | We address the latter problem of estimating parameters through a Bayesian inference approach that 245 | approximates a posterior distribution over simulation parameters given real sensor measurements. 246 | By extending the commonly used Gaussian likelihood model for trajectories via the 247 | multiple-shooting formulation, our chosen particle-based inference algorithm Stein 248 | Variational Gradient 249 | Descent is able to identify highly nonlinear, underactuated systems. We leverage GPU code 250 | generation 251 | and differentiable simulation to evaluate the likelihood and its gradient for many particles in 252 | parallel. 253 |

254 |

255 | Our algorithm infers non-parametric distributions over simulation parameters more accurately than 256 | comparable baselines and handles constraints over parameters efficiently through gradient-based 257 | optimization. We evaluate estimation performance on several physical experiments. On an underactuated 258 | mechanism where a 7-DOF robot arm excites an object with an unknown mass configuration, we demonstrate 259 | how our inference technique can identify symmetries between the parameters and provide highly accurate 260 | predictions. 261 |

262 | 270 |
271 | 272 |
273 | 275 | 276 | 278 |
279 |
280 | 281 | 305 | 306 |
307 |

Video

308 |
309 |
310 | 314 |
315 |
316 |
317 | 318 |
319 |

Appendix

320 | 321 |

322 | The following sections provide additional technical details that supplement our paper. Please consult our 323 | paper for the definition of the symbols used in the following sections. 324 |

325 | 326 | $ 327 | \gdef\paramdim{M} 328 | \gdef\params{\theta} 329 | \gdef\particles{\Theta} 330 | \gdef\numparticles{N} 331 | \gdef\statedim{D} 332 | \gdef\statevec{\mathbf{s}} 333 | \gdef\controlvec{\mathbf{u}} 334 | \gdef\observationdim{N} 335 | \gdef\observationvec{\mathbf{x}} 336 | \gdef\timedim{T} 337 | \gdef\trajectory{\mathcal{X}} 338 | \gdef\trajectoryset{D_\trajectory} 339 | \gdef\trajectorysetsub[1]{D_{\trajectory,#1}} 340 | \gdef\particleset{\xi} 341 | \gdef\simu{^{\text{sim}}} 342 | \gdef\real{^{\text{real}}} 343 | \gdef\fsim{f_{\text{sim}}} 344 | \gdef\fobs{f_{\text{obs}}} 345 | \gdef\fstep{f_{\text{step}}} 346 | \gdef\pobs{p_{\text{obs}}} 347 | 348 | \gdef\xp{\params^\prime} 349 | \gdef\kxx{k(\params, \xp)} 350 | \gdef\logprob{\log \mathcal{L}(\params)} 351 | \gdef\logprobp{\log \mathcal{L}(\xp)} 352 | 353 | \gdef\gradx{\nabla_{\params}} 354 | \gdef\gradxp{\nabla_{\xp}} 355 | \gdef\gradxxp{\nabla_{\params\xp}} 356 | 357 | \gdef\exparams{\bar{\params}} 358 | 359 | \gdef\jointpos{\mathbf{q}} 360 | \gdef\jointvel{\mathbf{\dot{q}}} 361 | \gdef\jointacc{\mathbf{\ddot{q}}} 362 | \gdef\jointtorque{\tau} 363 | \gdef\externalforce{\mathbf{f}^{\text{ext}}} 364 | \gdef\timestep{\Delta t} 365 | 366 | \gdef\pdef{p_{\text{def}}} 367 | \gdef\plim{p_{\text{lim}}} 368 | 369 | \gdef\second{\text{s}} 370 | \gdef\kg{\text{kg}} 371 | \gdef\meter{\text{m}} 372 | \gdef\Hz{\text{Hz}} 373 | $ 374 | 375 |

1 Technical Details

376 |

1.1 Initializing the Estimators

377 |

378 | For each experiment, we initialize the particles for the estimators via the deterministic Sobol sequence on 379 | the intervals specified through the parameter limits. Our code uses the Sobol sequence implementation 380 | from Burkardt [1] which is based on a Fortran77 implementation by Fox [2]. 382 | For the MCMC methods that sample a single Markov chain, we used the center point between the parameter 383 | limits as initial guess. 384 |

385 | 386 |

1.2 Likelihood Model for Sets of Trajectories

387 | 388 |

389 | In this work we assume that trajectories may have been generated by a distribution over parameters. 390 | In the case of a replicable experimental setup, this could be a point distribution at the only true 391 | parameters. 392 | However, when trajectories are collected from multiple robots, or with slightly different experimental 393 | setups between experiments}, there may be a multimodal distribution over parameters which generated the set 394 | of trajectories. 395 |

396 |

397 | Note, that irrespective of the choice of likelihood function we do not make any assumption about the shape 398 | of the posterior distribution by leveraging SVGD which is a non-parametric inference algorithm. In 399 | trajectory space, the Gaussian likelihood function is a common choice as it corresponds to the typical 400 | least-squares estimation methodology. Other likelihood distributions may be integrated with our method, 401 | which we leave up to future work. 402 |

403 |

404 | The likelihood which we use is a mixture of equally-weighted Gaussians centered at each reference 405 | trajectory $\trajectory\real$: 406 | $$ 407 | \begin{equation} 408 | p_{sum} (\trajectoryset\real | \params) = \sum_{\trajectory\real \in \trajectoryset\real} 409 | p_{ss}(\trajectory\real | \params). 410 | \end{equation} 411 | $$ 412 | 413 | If we were to consider each trajectory as an independent sample from the same trajectory distribution (the 414 | product), the likelihood function would be 415 | $$\begin{equation} 416 | p_{product} (\trajectoryset\real | \params) = \prod_{\trajectory\real \in \trajectoryset\real} 417 | p_{ss}(\trajectory\real | \params). 418 | \end{equation}$$ 419 | 420 | While both equations define the likelihood for 421 | a combination of single-shooting likelihood functions $p_{ss}$ for a set of real trajectories 422 | $\trajectoryset\real$, the same combination operators (sum or product) apply to the combination of 423 | multiple-shooting likelihood functions $p_{ms}$ analogously. 424 |

425 |

426 | The consequence of using these likelihoods can be seen in the following figure where 427 | $p_{product}$ shows the resulting posterior distribution (in parameter space) when 428 | treating a set of trajectories as independent and taking the product of their likelihoods 429 | (Equation 2), while Figure 1 (b) shows the result of treating 430 | them as a sum of Gaussian likelihoods (Equation 1). 431 | In Figure 1 (a) the posterior becomes the average of the two 432 | distributions since that 433 | is the most likely position that generated both of the distinct trajectories. In contrast, the posterior 434 | approximated by the same algorithm (CSVGD) but using the sum of Gaussian likelihoods, successfully captures 435 | the multimodality in the trajectory space since most particles have aligned near the two modes of the true 436 | distribution in parameter space. 437 | 438 |

439 | 440 |
441 |
442 |
443 | 444 |

(a) Product

445 |
446 |
447 | 448 |

(b) Sum

449 |
450 |
451 |
452 | 453 |
454 |
455 |
456 |

457 | Figure 1. Comparison of posterior parameter distributions obtained from fitting the 458 | parameters to two 459 | ground-truth trajectories generated from different link lengths of a simulated double pendulum 460 | (units of the axes in meters). The trajectories were 300 steps long (which corresponds to a length 461 | of 3s) and contain the 2 joint positions and 2 joint velocities of the uncontrolled 462 | double pendulum which starts from a zero-velocity initial configuration where the first angle is at 463 | $90^\circ$ (sideways) and the other at $0^\circ$. In (a), the product of the individual 464 | per-trajectory likelihoods is maximized (Equation 2). In (b), the sum 465 | of the likelihoods is maximized (Equation 1). 466 |

467 |
468 |
469 |
470 | 471 |

1.3 State and Parameter Normalization

472 | 473 |

474 | The parameters we are estimating are valid over only particular ranges of values. These ranges are often 475 | widely different - in the case of our real-world pendulum experiment, the center of mass of a link in a 476 | pendulum may be in the order of centimeters, while the angular velocity at the beginning of the recorded 477 | motion can reach values on the orders of meters per second. It is therefore important to scale the 478 | parameters to a common range to avoid any dimension to dominate smaller parameter ranges during the 479 | estimation. 480 |

481 |

482 | Similarly, the state dimensions are of different units - for example, we typically include velocities and 483 | positions in the recorded data over which we compute the likelihood. Therefore, we also normalize the range 484 | over the state dimensions. Given the state vector, respective parameter vector, $w$, we normalize each 485 | dimension $i$ by its statistical variance $\sigma^2$, i.e. $\frac{w_i}{\sigma_i^2}$. 486 |

487 | 488 |

1.4 KNN-based Approximation for KL Divergence

489 |

490 | In this work, we compare a set of parameter guesses (particles) to the ground-truth parameters, or a set of 491 | trajectories generated by simulating trajectories from each parameter in the particle distribution to a set 492 | of trajectories created on a physical system. 493 | To compare these distributions, we use the KL divergence to determine how the two distributions differ from 494 | each other. 495 | Formally, the KL divergence is the expected value of the log likelihood ratio between two distributions, and 496 | is an asymmetric divergence that does not satisfy the triangle inequality. 497 |

498 |

499 | The KL divergence is easily computable in the case of discrete distributions or simple parametric 500 | distributions, but is not easily calculable for samples from non-parametric distributions such as those over 501 | trajectories. 502 | Instead, we use an approximation to the KL divergence which uses the relative distances between samples in a 503 | set to estimate the KL divergence between particle distributions. 504 | This method has been used to compare particle distributions over robot poses to asses the performance of 505 | particle filter distributions [3]. 506 | To estimate the KL divergence between particle distributions over trajectories $\trajectoryset^{p}$ and 507 | $\trajectoryset^{q}$ we adopt the formulation from [4,3]: 509 | $$ 510 | \begin{equation} 511 | \tilde{d}_{KL} (\trajectoryset^{p} \parallel \trajectoryset^{q}) = 512 | \frac{\observationdim}{|\trajectoryset^p|} \sum_{i=1}^{|\trajectoryset^p|} 513 | \log\frac{\operatorname{KNN}^p_{k_i}(i)}{\operatorname{KNN}^q_{l_i}(i)}+ \frac{1}{|\trajectoryset^p|} 514 | \sum_{i=1}^{|\trajectoryset^p|} [\psi(l_i) - \psi(k_i)] + 515 | \log\frac{|\trajectoryset^q|}{|\trajectoryset^p|-1}, 516 | \end{equation} 517 | $$ 518 | where $\observationdim$ is the dimensionality of the trajectories, $|\trajectoryset^p|$ is the number of 519 | trajectories in the $\trajectoryset^{p}$ dataset, $|\trajectoryset^q|$ is the number of particles in the 520 | $\trajectoryset^{q}$ dataset, $\operatorname{KNN}^p_{k_i}(i)$ is the distance from trajectory $\trajectory_i 521 | \in \trajectoryset^{p}$ to its $k_i$-th nearest neighbor in $\trajectoryset^{q}$, 522 | $\operatorname{KNN}^q_{l_i}(i)$ is the distance from trajectory $\trajectory_i \in \trajectoryset^{p}$ to 523 | its $l_i$-th nearest neighbor in $\trajectoryset^{p} \backslash \trajectory_i$, and $\psi$ is the digamma 524 | function. Note that this approximation of KL divergence can also be applied to compare parameter 525 | distributions, as we show in the synthetic data experiment from subsection 5.1 of our main paper (cf. Figure 526 | 4 (a) and (b) from the main paper) where the ground-truth parameter distribution is known. 527 |

528 |

529 | Throughout this work, we set $k_i$ and $l_i$ to 3 as this reduces the bias in the approximation, but does 530 | not require a large amount of samples from the ground-truth distribution. 531 |

532 | 533 |

2 Experiments

534 |

We provide further technical details and results from the experiments we present in the main paper.

535 | 536 |

2.1 Differentiable Simulator

537 | 538 |

539 | Other than requiring a differentiable forward dynamics model which allows to simulate the system in its 540 | entirety following the Markov assumption, our proposed algorithm does not rely on a particular choice of 541 | dynamical system or simulator for which its parameters need to be estimated. 542 | For our experiments, we use the Tiny 544 | Differentiable Simulator [5] that implements end-to-end 545 | differentiable contact models and the Articulated Body Algorithm (ABA) [6] to 546 | compute the forward dynamics (FD) for articulated rigid-body mechanisms. Given joint positions $\jointpos$, 547 | velocities $\jointvel$, torques $\jointtorque$ in generalized coordinates, and external forces 548 | $\externalforce$, ABA calculates the joint accelerations $\jointacc$. 549 | We use semi-implicit Euler integration to advance the system dynamics in time for a time step $\Delta t$: 550 | $$ 551 | \begin{align} 552 | \jointacc_{t+1} = \operatorname{ABA}(\jointpos_t, \jointvel_t, \jointtorque_t, \externalforce_t; \params), 553 | \qquad 554 | \jointvel_{t+1} = \jointvel_t + \jointacc_{t+1} \timestep, \qquad 555 | \jointpos_{t+1} = \jointpos_t + \jointvel_{t+1} \timestep. 556 | \end{align} 557 | $$ 558 |

559 |

560 | The second-order ODE described by Equation 4 is lowered to a first-order system, with state 561 | $\statevec_t = \begin{bmatrix}\jointpos_t & \jointvel_t\end{bmatrix}$. Furthermore, we deal primarily with 562 | the discrete 563 | time-stepped dynamics function 564 | $\statevec_{t+1} = \fstep(\statevec_t, t, \params)$, 565 | assuming that $\timestep$ is constant. The function $\fsim(\params, \statevec_0)$ uses $\fstep$ iteratively 566 | to produce a trajectory of states $[\statevec]_{t=1}^T$ given an initial state $\statevec_0$ and the 567 | parameters $\params$. Many systems of practical interest for robotics are controlled by an external input. 568 | In our formulation for parameter estimation, we include controls as explicit dependencies on the time 569 | parameter $t$. 570 |

571 |

572 | For an articulated rigid body system, the parameters $\params$ may include (but are not limited to) the 573 | masses, inertial properties and geometrical properties of the bodies in the mechanism, as well as joint and 574 | contact friction coefficients. Given $\frac{\partial \fstep}{\partial\params}$ and 575 | $\frac{\partial\fstep}{\partial\statevec}$, gradients of simulation parameters with respect to the state 576 | trajectories can be computed directly through the chain rule, or via the adjoint sensitivity 577 | method [7]. 578 |

579 | 580 | 581 |

2.2 Identify Real-world Double Pendulum

582 |

583 | We set up the double pendulum estimation experiment with the 11 parameters shown in 584 | Table 1 to be estimated. The state space consists of the two 585 | positions and 586 | velocities of both joints: $\statevec = \begin{bmatrix}\mathbf{q}_{0:1} & 587 | \mathbf{\dot{q}}_{0:1}\end{bmatrix}$. The dataset of 588 | trajectories contains image sequences (see time lapse of an excerpt from a trajectory in 589 | Figure 2) and annotated pixel coordinates of the three vertices in 590 | the double 591 | pendulum, from which we extracted joint positions and velocities (via finite differencing given the known 592 | recording frequency of 400Hz). 593 | 594 |

595 | 596 |
597 |
598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 |
LinkParameterMinimumMaximum
Link 1Mass0.05 $\kg$ 0.5 $\kg$
$I_{xx}$ 0.002 $\kg\cdot\meter^2$ 1.0 $\kg\cdot\meter^2$
COM $x$ -0.2 $\meter$ 0.2 $\meter$
COM $y$ -0.2 $\meter$ 0.2 $\meter$
Joint friction 0.0 0.5
Link 2 646 | Length 0.08 $\meter$ 0.3 $\meter$
Mass 0.05 $\kg$ 0.5 $\kg$
$I_{xx}$ 0.002 $\kg\cdot\meter^2$ 1.0 $\kg\cdot\meter^2$
COM $x$ -0.2 $\meter$ 0.2 $\meter$
COM $y$ -0.2 $\meter$ 0.2 $\meter$
Joint friction 0.0 0.5
689 |
690 |
691 | IBM Pendulum 692 |
693 |
694 |
695 |
696 |

697 | Table 1. Parameters to be estimated. $I$ refers to the $3\times3$ inertia matrix, COM stands 698 | for center of mass. 699 |

700 |
701 |
702 |

Figure 2. Time lapse of a double pendulum trajectory from the IBM 703 | dataset [8].

704 |
705 |
706 |

707 | Since we know that all trajectories in this dataset stem from the same double 708 | pendulum [8], we only used a single reference trajectory as target trajectory 709 | $\trajectory\real$ during the estimation. We let each estimator run for 2000 iterations. For evaluation, we 710 | calculate the consistency metrics from Tab. 1 of the main paper over 10 held-out trajectories from a test 711 | dataset. For comparison, we visualize the trajectory density over simulations rolled out from the last 100 712 | Markov samples (or 100 particles in the case of particle-based approaches) in 713 | Figure 3. The ground-truth shown in these plots again stems from 714 | the unseen test 715 | dataset. This experiment further demonstrates the generalizability of simulation-based inference, which, 716 | when an adequate model has been implemented and its parameters identified, can predict outcomes under 717 | various novel conditions even though the training dataset consisted of only a single trajectory in this 718 | example. 719 |

720 | 721 | 722 |
723 |
724 |
725 | 726 | 727 | 729 | 732 | 733 | 734 | 736 | 739 | 740 | 741 | 743 | 746 | 747 | 748 | 750 | 753 | 754 | 755 | 757 | 760 | 761 | 762 | 764 | 767 | 768 |
728 | Emcee 730 | Emcee 731 |
735 | CEM 737 | CEM 738 |
742 | NUTS 744 | NUTS 745 |
749 | SGLD 751 | SGLD 752 |
756 | SVGD 758 | SVGD 759 |
763 | CSVGD 765 | CSVGD 766 |
769 |

770 | Figure 3. Kernel density estimation over trajectory roll-outs from the last estimated 100 771 | parameter guesses of each method, applied to the physical double pendulum dataset from 772 | Section 2.2. The ground-truth trajectory here stems from the test 773 | dataset of 10 774 | trajectories that were held out during training. The particle-based approaches (CEM, SVGD, CSVGD) 775 | use 100 particles. 776 |

777 |
778 |
779 |
780 | 781 |

2.3 Ablation Study on Multiple Shooting

782 | 783 |

784 | We evaluate the baseline estimation algorithms with our proposed multiple-shooting likelihood 785 | function 786 | (using 787 | 10 shooting windows) on the physical double pendulum dataset from before. To make the constrained 788 | optimization problem amenable to the MCMC samplers, we formulate the defect constraint through the 789 | following 790 | likelihood: 791 | $$ 792 | \begin{align} 793 | \pdef(\statevec_t^s, \statevec_t) = \mathcal{N}(\statevec_t^s | \statevec_t,\sigma^2_{\text{def}}) 794 | \qquad 795 | t\in [h, 2h, \dots], 796 | \end{align} 797 | $$ 798 | where we tune $\sigma^2_{\text{def}}$ to a small value (on the order of $10^{-2}$) such that the 799 | defects are 800 | minimized during the estimation. As we describe in Sec. 4.4 from our main paper, the parameter space 801 | is 802 | augmented by the shooting variables $\statevec_t^s$. 803 |

804 |

805 | As shown in Table 2, the MCMC approaches Emcee and NUTS do not benefit 806 | meaningfully from 807 | the multiple-shooting approach. Emcee often yields unstable simulations from which we are not able 808 | to 809 | compute some of the metrics. The increased dimensionality of the parameter space appears to add a 810 | significant challenge to these methods, which are known to scale poorly to higher dimensions. 811 | Despite being configured to use a Gaussian mixture model of 3 kernels, the CEM posterior immediately 812 | collapses to a single point such that the KL divergence of simulated against real trajectories 813 | cannot be computed. 814 |

815 | 816 | 817 | 818 | 819 | 820 | 823 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 |
$d_{\text{KL}} (\trajectoryset\real 821 | \parallel 822 | \trajectoryset\simu)$$d_{\text{KL}} (\trajectoryset\simu 824 | \parallel 825 | \trajectoryset\real)$MMD
AlgorithmSSMSSSMSSSMS
Emcee 8542.2466 8950.4574 4060.6312 N/A 1.1365 N/A
CEM 8911.1798 8860.5115 8549.5927 N/A 0.9687 0.5682
SGLD 8788.0962 5863.2728 7876.0310 2187.2825 2.1220 0.0759
NUTS 9196.7461 8785.5326 6432.2131 4935.8983 0.5371 1.1642
(C)SVGD 8803.5683 5204.5336 10283.6659 2773.1751 0.7177 0.0366
886 |

887 | Table 2. Consistency metrics of the posterior distributions approximated from the physical 888 | double pendulum dataset (Section 2.2) by the different estimation algorithms 889 | using the 890 | single-shooting likelihood $p_{ss}(\trajectory\real | \params)$ (column "SS") and the 891 | multiple-shooting 892 | likelihood $p_{ms}(\trajectory\real | \params)$ (column "MS") with 10 shooting windows. Note that 893 | SVGD with multiple-shooting corresponds to CSVGD. 894 |

895 | 896 |

897 | We observe a significant improvement in estimation accuracy on SGLD, where the multiple-shooting 898 | approach 899 | allowed it to converge to closely matching trajectories, as shown in Figure 4. As 900 | with 901 | SVGD, 902 | the availability of gradients allows this method to scale better to the higher dimensional parameter 903 | space, 904 | while the smoothed likelihood landscape further helps the approach to find better fitting 905 | parameters. 906 |

907 | 908 |
909 |
910 |
911 | SGLD with Multiple Shooting 912 |

913 | Figure 4. Kernel density estimation over trajectory roll-outs from the last estimated 100 914 | parameter guesses of SGLD with the multiple-shooting likelihood model (see 915 | Section 2.3), applied to the physical double pendulum 916 | dataset from 917 | Section 2.2. Similarly to SVGD, SGLD benefits significantly from the 918 | smoother 919 | likelihood function while being able to cope with the augmented parameter space thanks to its 920 | gradient-based approach. 921 |

922 |
923 |
924 |
925 | 926 |

2.4 Comparison to Likelihood-free Inference

927 |

928 | Our Bayesian inference approach leverages the simulator as part of the likelihood model to 929 | approximate posterior distributions over simulation parameters, which means the simulator is indispensable 930 | in our estimation process}. In the following, we compare our approach against the likelihood-free inference 931 | approach BayesSim [9] that leverages approximate Bayesian computation (ABC) 932 | which is 933 | the most popular family of algorithms within likelihood-free methods. 934 |

935 | 936 |

937 | Likelihood-free methods assume the simulator is a black box that can generate a trajectory given a parameter 938 | setting. Instead of querying the simulator to evaluate the likelihood (as in our approach), a conditional 939 | density $q(\params | \trajectoryset)$ is learned directly from a dataset of simulation parameters and their 940 | corresponding rolled-out trajectories via supervised learning to approximate the posterior. A common choice 941 | of model for such density is a mixture density network [10], which 942 | parameterizes a 943 | Gaussian mixture model. This is in contrast to our (C)SVGD algorithm which can approximate 944 | any shape of posterior by being a nonparametric inference algorithm. 945 |

946 |

947 | 948 |

949 | For our experiments we collect a dataset of 10,000 simulated trajectories of parameters randomly sampled 950 | from the prior distribution. We train the density network via the Adam optimizer with a learning rate of 951 | $10^{-3}$ for 3000 epochs, after which we observed no meaningful improvement to the calculated 952 | log-likelihood loss during training. In the following, we provide further details on the likelihood-free 953 | inference pipeline we consider, by describing the input data processing and the model used for approximating 954 | the posterior. 955 |

956 |
2.4.1 Input Data Processing
957 |

958 | The input to the learned density model has to be a sufficient statistic of the underlying data, while being 959 | low-dimensional in order to keep the learning problem computationally tractable. We consider the following 960 | four methods of processing the trajectories that are the input to the likelihood-free methods, as 961 | visualized for an example trajectory in Figure 5. Note that we configured 962 | the following 963 | input processing methods to generate a one-dimensional input vector that has a reasonable length to be 964 | computationally feasible to train on (given the 10,000 trajectories from the training dataset), while 965 | achieving acceptable performance which we validated through testing various settings. 966 |

967 | 968 |

969 | Downsampled: we down-sample the trajectory so that for the double pendulum experiment 970 | (Section 2.2) we use only every 20th state, for the Panda arm experiment 971 | (Section 2.5) only every 200-th state of the trajectory. Finally, the state 972 | dimensions per 973 | trajectory are concatenated to a one-dimensional vector. 974 |

975 |

976 | Difference: we adapt the input statistic from the original BayesSim approach in [9, Eq. (22)] where the differences of two consecutive states along the 978 | trajectory are used in 979 | concatenation with their mean and variance: 980 | $$ 981 | \psi(\trajectory) = (\operatorname{downsample}(\tau), \mathbb{E}[\tau], \operatorname{Var}[\tau]) 982 | \qquad\text{where}\qquad 983 | \tau = \{\statevec_t - \statevec_{t-1}\}_{t=1}^T 984 | $$ 985 | As before, we down-sample these state differences and concatenate them to a vector. 986 |

987 |

988 | Summary: for each state dimension of the trajectory, we compute the following statistics typical for 989 | time series: mean, variance, cross correlation between state dimensions of the trajectory, as well as 990 | auto-correlations for each dimension at 5 different time delays: [5, 10, 20, 50, 100] time steps. 991 | These numbers are concatenated for all state dimensions to a one-dimensional vector per input 992 | trajectory. 993 |

994 |

995 | Signature: we compute the signature transform from the signatory package [11] 997 | over the input trajectory. Such so-called path signatures have been recently introduced to extract 998 | information about order and area, thereby preserving features inherent to nonlinear trajectories. We select 999 | a depth for the signature transform of 3 for the double pendulum experiment, and 2 for the Panda arm 1000 | experiment, to obtain feature vectors of comparable size to the aforementioned input techniques. 1001 |

1002 | 1003 |
1004 |
1005 | Ground Truth 1006 |

(a) Raw Input

1007 |
1008 |
1009 | Downsampled 1011 |

(b) Downsampled

1012 |
1013 |
1014 | Difference 1016 |

(c) Difference

1017 |
1018 |
1019 | Summary 1020 |

(d) Summary

1021 |
1022 |
1023 | Signature 1024 |

(e) Signature

1025 |
1026 |
1027 |

1028 | Figure 5. Exemplary visualization of the input processing methods for the likelihood-free baselines 1029 | from Section 2.4 applied to a trajectory from the double pendulum 1030 | experiment in 1031 | Section 2.2. 1032 |

1033 | 1034 |
2.4.2 Density Model
1035 |

1036 | As the density model for the learned posterior $q(\params | \trajectoryset)$, we select the following 1037 | commonly used representations. 1038 |

1039 |

1040 | Mixture density network (MDN): uses neural network features from a feed-forward neural network 1041 | using two hidden layers with 24 units each. 1042 |

1043 |

1044 | Mixture density random Fourier features (MDRFF): this density model uses Fourier features and 1045 | a kernel. We evaluate the MDRFF with the following common choices for the kernel: 1046 |

1050 | 1051 |
2.4.3 Evaluation
1052 |

1053 | Note that instead of action generation, which is part of the proposed BayesSim 1054 | pipeline [9], we only focus on the inference of the posterior density over 1055 | simulation 1056 | parameters in order to compare such likelihood-free inference approach against our method. 1057 |

1058 |

1059 | To evaluate the metrics shown in Table 2 for each BayesSim 1060 | instantiation (input method and density model), we sample 100 parameter vectors from the learned 1061 | posterior $q(\params | \trajectoryset)$ and simulate them to obtain 100 trajectories which are compared 1062 | against the reference trajectory sets, as we did in the comparison for the other Bayesian inference methods 1063 | in Tab. 1 of the main paper. 1064 |

1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1080 | 1082 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | 1115 | 1116 | 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1129 | 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 |
Double Pendulum Experiment 1071 | Panda Arm Experiment
Input Model $d_{\text{KL}} (\trajectoryset\real \parallel 1078 | \trajectoryset\simu)$ 1079 | $d_{\text{KL}} (\trajectoryset\simu \parallel \trajectoryset\real)$ 1081 | MMD 1083 | $\log\pobs(\trajectoryset\real \parallel \trajectoryset\simu)$
Downsampled MDN 8817.9222 4050.4666 0.6748 -17.4039
Difference MDN 8919.2463 4633.2637 0.6285 -17.1646
Summary MDN 9092.5575 5093.8851 0.5664 -18.3481
Signature MDN 8985.8056 4610.5438 0.5807 -19.3432
Downsampled MDRFF (RBF) 9027.9474 5091.5283 0.5593 -17.2335
Difference MDRFF (RBF) 8936.3823 4282.8599 0.5988 -18.4892
Summary MDRFF (RBF) 9063.1753 4884.1398 0.5672 -19.5430
Signature MDRFF (RBF) 8980.9080 4081.1160 0.6016 -18.3458
Downsampled MDRFF (Matérn) 8818.1830 3794.9873 0.6110 -17.6395
Difference MDRFF (Matérn) 8859.2156 4349.9971 0.6176 -17.2752
Summary MDRFF (Matérn) 8962.0501 4241.4551 0.5999 -19.6672
Signature MDRFF (Matérn) 9036.9626 4620.9517 0.5715 -18.1652
CSVGD 5204.5336 2773.1751 0.0366 -15.1671
1193 |

1194 | Table 2. 1195 | Consistency metrics of the posterior distributions approximated by the different BayesSim instantiations, 1196 | where the input method and model name (including the kernel type for the MDRFF model) are given. Each metric 1197 | is calculated across simulated and real trajectories. Lower is better on all metrics except the 1198 | log-likelihood $\log\pobs(\trajectoryset\real \parallel \trajectoryset\simu)$ from the Panda arm experiment. 1199 | For comparison, in the last row, we reproduce the numbers from CSVGD shown in Tab. 1 of the main paper. 1200 |

1201 | 1202 | 1203 | 1204 | 1205 | 1211 | 1216 | 1217 | 1218 | 1223 | 1228 | 1229 | 1230 | 1235 | 1240 | 1241 | 1242 | 1247 | 1252 | 1253 | 1254 | 1259 | 1264 | 1265 | 1266 | 1271 | 1276 | 1277 |
1206 | 1208 |

MDN - Downsampled

1209 | 1210 |
1212 | 1214 |

MDN - Difference

1215 |
1219 | 1221 |

MDN - Summary

1222 |
1224 | 1226 |

MDN - Signature

1227 |
1231 | 1233 |

MDRFF (RBF) - Downsampled

1234 |
1236 | 1238 |

MDRFF (RBF) - Difference

1239 |
1243 | 1245 |

MDRFF (RBF) - Summary

1246 |
1248 | 1250 |

MDRFF (RBF) - Signature

1251 |
1255 | 1257 |

MDRFF (Matérn) - Downsampled

1258 |
1260 | 1262 |

MDRFF (Matérn) - Difference

1263 |
1267 | 1269 |

MDRFF (Matérn) - Summary

1270 |
1272 | 1274 |

MDRFF (Matérn) - Signature

1275 |
1278 |

1279 | Figure 6. Kernel density estimation over trajectory roll-outs from 100 parameter samples drawn from 1280 | the posterior of each BayesSim method (model name with kernel choice in bold font + input method, see 1281 | Section 2.4), applied to the physical double pendulum dataset from 1282 | Section 2.2. The ground-truth trajectory here stems from the test dataset of 1283 | 10 trajectories 1284 | that were held out during training. 1285 |

1286 | 1287 |
2.4.4 Discussion
1288 | 1289 |

1290 | The results from our experiments with the various likelihood-free approaches in 1291 | Table 2 indicate that, among the tested pipelines, the MDRFF model 1292 | with Matérn 1293 | kernel and downsampled trajectory input overall performed the strongest, followed by the MDN with 1294 | downsampled input. In comparison to the likelihood-based algorithms from Tab. 1 of the main paper, these 1295 | results are comparable on the double pendulum experiment. However, in comparison to CSVGD, the estimated 1296 | likelihood-free posteriors are significantly less accurate, which can also be clearly seen in the density 1297 | plots over the rolled out trajectories from such learned densities in 1298 | Figure 6. On the Panda arm experiment, the likelihood-free 1299 | methods are 1300 | outperformed by the likelihood-based algorithms (such as the Emcee sampler) more often on the likelihood of 1301 | the learned parameter densities. CSVGD again achieves a much more accurate posterior in this experiment than 1302 | any likelihood-free approach. 1303 |

1304 | 1305 |

Why do these likelihood-free methods perform so poorly on a seemingly simple double pendulum? 1306 |

1307 |

1308 | One would expect that this kind of dynamical system poses no greater challenge to BayesSim when it was shown 1309 | to identify a cartpole's link length and cart mass successfully [9]. To 1310 | investigate 1311 | this problem, we revisit the simplified double pendulum estimation experiment from Sec. 5.1 of our main 1312 | paper, where only the two link lengths need to be estimated from simulated trajectories. As before, we 1313 | create a dataset with 10,000 trajectories of 400 time steps based on the two simulation parameters sampled 1314 | from a uniform distribution ranging between 0.5m and 5m. While keeping all 1315 | parameters the same as in our previous double-pendulum experiment where eleven parameters had to be 1316 | inferred, all of the density models in combination with both the "difference" and "downsampled" input 1317 | statistic infer a highly accurate parameter distribution, as shown in 1318 | Figure 7 (a). The trajectories produced by sampling from the 1319 | BayesSim posterior 1320 | (Figure 7 (b)) also match the reference observations much 1321 | more closely than 1322 | any of the BayesSim models on the previous 11-parameter double 1323 | pendulum (Figure 6). These results suggest that BayesSim and 1324 | potentially 1325 | other likelihood-free method have problems in inferring higher dimensional parameter distributions. The 1326 | experiments in [9] demonstrated as many as four parameters being estimated 1327 | (for the 1328 | acrobot), while showing inference results for simulated systems only. While our double pendulum system from 1329 | Section 2.2 is basic in principle, the higher dimensional parameter space 1330 | (see parameters in 1331 | Table 1) and the fact that we need to fit against real-world data 1332 | makes it a 1333 | significantly harder problem for most state-of-the-art inference algorithms. CSVGD is able to achieve a 1334 | close fit thanks to the multiple-shooting segmentation of the trajectory which improves the convergence (see 1335 | more ablation results for multiple-shooting on this experiment in Section 2.3). 1337 |

1338 | 1339 |
1340 |
1341 |
1342 | 1343 |

(a) Posterior

1344 |
1345 |
1346 | 1348 |

(b) Trajectory density

1349 |
1350 |
1351 |
1352 |
1353 |
1354 |
1355 |

1356 | Figure 7. Results from BayesSim on the simplified double pendulum experiment where only the 1357 | two link lengths need to be inferred. (a) shows the approximated posterior distribution by the MDN 1358 | model and "downsampled" input statistics. The diagonal plots show the marginal parameter 1359 | distributions, the bottom-left heatmap and the top-right contour plot show the 2D posterior where 1360 | the ground-truth parameters at (1.5m, 2m) are indicated by a red star. The 1361 | black dots in the top-right plot are 100 parameters sampled from the posterior which are rolled out 1362 | to generate trajectories for the trajectory density plot in (b). (b) shows a kernel density 1363 | estimation over these 100 trajectories for the four state dimensions 1364 | $(\jointpos_{[0:1]},\jointvel_{[0:1]})$ of the double pendulum. 1365 |

1366 |
1367 |
1368 |
1369 | 1370 |

2.5 Identify Inertia of an Articulated Rigid Object

1371 |

1372 | The state space consists of the positions and velocities of the seven degrees of freedom of the robot arm 1373 | and the two degrees of freedom in the universal joint, resulting in a 20-dimensional state vector 1374 | $\statevec=\begin{bmatrix}\mathbf{q}_{0:8} & \mathbf{\dot{q}}_{0:8} & \mathbf{q}^d_{0:6} & 1375 | \mathbf{\dot{q}}^d_{0:6}\end{bmatrix}$ 1376 | consisting of nine joint positions and velocities, plus the PD control position and velocity targets, 1377 | $\mathbf{q}^d$ and $\mathbf{\dot{q}}^d$, for the actuated joints of the robot arm. We control the arm using 1378 | the MoveIt! motion planning framework [13] by moving joints 6 and 7 1379 | to 1380 | predefined joint-space offsets of $0.1$ and $-0.1$ radians, in sequence. We use the default Iterative 1381 | Parabolic Time Parameterization algorithm with a velocity scaling factor of $0.1$. We track the motion of 1382 | the acrylic box via a Vicon motion capture system and derive four Cartesian coordinates as observation 1383 | $\observationvec=\begin{bmatrix}\mathbf{p}_{o} & \mathbf{p}_{x} & \mathbf{p}_{y} & 1384 | \mathbf{p}_{z}\end{bmatrix}$ to represent the 1385 | frame of the box (shown in Figure 8): a point of origin located at the 1386 | center of the 1387 | upper lid of the box, and three points located 1m away from the origin into the x, y, and z 1388 | direction (transformed by the reference frame of the box). We chose this state representation to ease the 1389 | computation of the likelihood, since we only need to compute differences between 3D points instead of 1390 | computing the distances over 3D rotations which requires special treatment [14]. 1392 |

1393 |
1394 |
1395 |
1396 | 1397 |

1398 | Figure 8. Rendering of the simulation for the underactuated mechanism from 1399 | Section 2.5, where the four reference points for the origin, unit x, y, 1400 | and z vectors 1401 | are shown. The trace of the simulated trajectory is visualized by the solid lines, the ground-truth 1402 | trajectories of the markers are shown as dotted lines. 1403 |

1404 |
1405 |
1406 |
1407 |

1408 | We first identify the simulation parameters pertaining to the inertial properties of the box and the 1409 | friction parameters of the universal joint. As shown in Table 3 1410 | (a), the symmetric 1411 | inertia matrix of the box is fully determined by the first six parameters, followed by the 3D center of 1412 | mass. We have measured the mass to be 920g, so we do not need to estimate it. We simulate the 1413 | universal joint with velocity-dependent damping, with possibly different friction coefficients for both 1414 | degrees of freedom. The simulation parameters yielding the most accurate fit to a ground-truth trajectory 1415 | from the physical robot shaking an empty box is shown in Figure 9. 1416 | We were able to 1417 | find such parameters via SVGD, CSVGD and Emcee (shown is a parameter configuration from the particle 1418 | distribution estimated by CSVGD with the highest likelihood). 1419 |

1420 | 1421 |

1422 | While the simulated trajectory matches the real data significantly better after the inertial parameters of 1423 | the empty box have been identified (Figure 9 (b)) than before 1424 | (Figure (a)), a reality gap remains. We believe this to be a 1425 | result from a 1426 | slight modeling error that the rigid body simulator cannot capture, e.g. the top of the box where the 1427 | universal joint is attached bends slightly while the box is moving, and there may be slight geometric 1428 | offsets between the real system and the model of it we use in the simulator. The latter parameters could 1429 | have been further identified with our approach, nonetheless the simulation given the identified parameters 1430 | is sufficient to be used in the next phase of the inference experiment. 1431 |

1432 | 1433 |
1434 |
1435 | 1436 |

(a) Before identification of empty box

1437 |
1438 |
1439 | 1440 |

(b) After identification of empty box

1441 |
1442 |
1443 |

1444 | Figure 9. Trajectories from the Panda robot arm shaking an empty box. Visualized are the 1445 | simulated (red) and real (black) observations before (a) and after (b) the inertial parameters of 1446 | the empty box and the friction from the universal joint (Table 3 1447 | (a)) have been 1448 | identified. The columns correspond to the four reference points in the frame of the box (see a rendering of 1449 | them in Figure 8), the rows show the $x$, $y$, and $z$ axes of these 1450 | reference points in 1451 | meters. The horizontal axes show the time step. 1452 |

1453 | 1454 |

1455 | Given the parameters found in the first phase, we now investigate how well the various approaches can cope 1456 | with dependent variables. By fixing two 500g to the bottom of the acrylic box, the 2D locations 1457 | of such weights need to be inferred. Naturally, such assignment is symmetric, i.e. weight 1 and 2 can swap 1458 | locations without affecting the dynamics. What would significantly alter the dynamics, however, is an 1459 | unbalanced configuration of the weights which would cause the box to tilt. 1460 |

1461 | 1462 |
1463 |
1464 |
1465 | 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 | 1485 | 1486 | 1487 | 1488 | 1489 | 1490 | 1491 | 1492 | 1493 | 1494 | 1495 | 1496 | 1497 | 1498 | 1499 | 1500 | 1501 | 1502 | 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 | 1511 | 1512 | 1513 | 1514 | 1515 | 1516 | 1517 | 1518 | 1519 | 1520 | 1521 | 1522 | 1523 | 1524 | 1525 | 1526 | 1527 | 1528 | 1529 | 1530 | 1531 | 1532 | 1533 | 1534 | 1535 | 1536 | 1537 | 1538 | 1539 | 1540 | 1541 | 1542 | 1543 | 1544 | 1545 | 1546 | 1547 | 1548 | 1549 | 1550 | 1551 | 1552 | 1553 | 1554 | 1555 | 1556 |
ParameterMinimumMaximum
Box $I_{xx}$ 0.05 $\kg\cdot\meter^2$ 0.1 $\kg\cdot\meter^2$
$I_{yy}$ 0.05 $\kg\cdot\meter^2$ 0.1 $\kg\cdot\meter^2$
$I_{zz}$ 0.05 $\kg\cdot\meter^2$ 0.1 $\kg\cdot\meter^2$
$I_{xy}$ -0.01 $\kg\cdot\meter^2$ 0.01 $\kg\cdot\meter^2$
$I_{xz}$ -0.01 $\kg\cdot\meter^2$ 0.01 $\kg\cdot\meter^2$
$I_{yz}$ -0.01 $\kg\cdot\meter^2$ 0.01 $\kg\cdot\meter^2$
COM $x$ -0.005 $\meter$ 0.005 $\meter$
COM $y$ -0.005 $\meter$ 0.005 $\meter$
COM $z$ 0.1 $\meter$ 0.4 $\meter$
U-Joint Friction DOF 1 0.0 0.15
Friction DOF 2 0.0 0.15
1557 |

(a) Phase I

1558 | 1559 |
1560 |
1561 |
1562 | 1563 | 1564 | 1565 | 1566 | 1567 | 1568 | 1569 | 1570 | 1571 | 1572 | 1573 | 1574 | 1575 | 1576 | 1577 | 1578 | 1579 | 1580 | 1581 | 1582 | 1583 | 1584 | 1585 | 1586 | 1587 | 1588 | 1589 | 1590 | 1591 | 1592 | 1593 | 1594 | 1595 | 1596 | 1597 | 1598 | 1599 | 1600 | 1601 | 1602 | 1603 |
ParameterMinimumMaximum
Weight 1 Position $x$ -0.14 $\meter$ 0.14 $\meter$
Position $y$ -0.08 $\meter$ 0.08 $\meter$
Weight 2 Position $x$ -0.14 $\meter$ 0.14 $\meter$
Position $y$ -0.08 $\meter$ 0.08 $\meter$
1604 |

(b) Phase II

1605 | 1606 |
1607 |
1608 |
1609 |

1610 | Table 3. Parameters to be estimated and their ranges for the two estimation phases of the 1611 | underactuated mechanism experiment from Section 2.5. 1612 |

1613 | 1614 |

1615 | We use 50 particles and run each estimation algorithm for 500 iterations. For each baseline method, we 1616 | carefully tuned the hyper parameters to facilitate a fair comparison. Such tuning included selecting an 1617 | appropriate measurement noise variance, which, as we observed on Emcee and SGLD in particular, had a 1618 | significant influence on the exploration behavior of these algorithms. With a larger observation noise 1619 | variance the resulting posterior distribution became wider, however we were unable to attain such behavior 1620 | with the NUTS estimator whose iterates quickly collapsed to a single point at the center of the box (see 1621 | Figure 10 (d)). Similarly, CEM immediately became stuck in the 1622 | suboptimal 1623 | configuration shown in Figure 10 (b). Nonetheless, after 500 1624 | iterations, all methods 1625 | predicted weight positions that were aligned opposite to one another to balance the box. 1626 |

1627 | 1628 |

1629 | As can be seen in Figure 10 (e), SVGD achieves a fairly 1630 | predictive posterior 1631 | approximation, with many particles aligned close to the true vertical position at $y=0$. With the 1632 | introduction of the multiple-shooting constraints, Constrained SVGD (CSVGD) converges significantly faster 1633 | to a posterior distribution that accurately captures the true locations of the box, while retaining the 1634 | exploration performance of SVGD that spreads out the particles over multiple modes, as shown in 1635 | Figure 10 (f). 1636 |

1637 | 1638 |
1639 |
1640 | Emcee 1641 |

(a) Emcee

1642 |
1643 |
1644 | CEM 1645 |

(b) CEM

1646 |
1647 |
1648 | SGLD 1649 |

(c) SGLD

1650 |
1651 |
1652 | NUTS 1653 |

(d) NUTS

1654 |
1655 |
1656 | SVGD 1657 |

(e) SVGD

1658 |
1659 |
1660 | CSVGD 1661 |

(f) CSVGD

1662 |
1663 |
1664 |

1665 | Figure 10. Posterior plots over the 2D weight locations approximated by the estimation algorithms 1666 | applied to the underactuated mechanism experiment from Section 2.5. Blue shades 1667 | indicate a 1668 | Gaussian kernel density estimation computed over the inferred parameter samples. Since it is an 1669 | unbounded kernel density estimate, the blue shades cross the parameter boundaries in certain areas (e.g. for 1670 | CSVGD), while in reality none of the estimated particles violate the parameter limits. 1671 |

1672 | 1673 |

References

1674 | 1675 | 1695 | 1696 | 1771 |
1772 | 1773 |
1774 |

Acknowledgements

1775 | 1776 |

This work was supported by a Google PhD Fellowship and a NASA Space Technology 1777 | Research 1778 | Fellowship, grant number 80NSSC19K1182.

1779 |

G.S. Sukhatme holds concurrent appointments as a Professor at USC and as an Amazon 1780 | Scholar. This 1781 | paper describes work performed at USC and is not associated with Amazon.

1782 |
1783 | 1784 |
1785 |
1786 | Last updated on January 31, 2022 1787 |
1788 |
1789 | 1790 | 1793 | 1794 | 1795 | 1796 | --------------------------------------------------------------------------------