Skip to content

Commit

Permalink
Many changes
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-marques committed Sep 7, 2024
1 parent 0a77050 commit 7cc8ab5
Show file tree
Hide file tree
Showing 21 changed files with 2,787 additions and 28 deletions.
Binary file added content/Corridor_LUCCa_13.mp4
Binary file not shown.
Binary file added content/Corridor_Uncalibrated Baseline_11.mp4
Binary file not shown.
88 changes: 60 additions & 28 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,80 @@ authors = [
]
venue = {name = "16th International Workshop on the Algorithmic Foundations of Robotics (WAFR) 2024", url = "https://www.algorithmic-robotics.org/"}
buttons = [
{name = "Paper", url = "https://aterenin.github.io/academic-paper"},
{name = "PDF", url = "https://aterenin.github.io/academic-paper"},
{name = "Poster", url = "https://aterenin.github.io/academic-paper"},
{name = "Paper", url = ""},
{name = "PDF", url = ""},
{name = "Poster", url = ""},
]
katex = true
large_card = false
large_card = true
favicon = false
+++

Whether learned, simulated, or analytical, approximations of a robot's dynamics can be inaccurate when encountering novel environments. Many approaches have been proposed to quantify the aleatoric uncertainty of such methods, i.e. uncertainty resulting from stochasticity, however these estimates alone are not enough to properly estimate the uncertainty of a model in a novel environment, where the actual dynamics can change. Such changes can induce epistemic uncertainty, i.e. uncertainty due to a lack of information/data. Accounting for \textit{both} epistemic and aleatoric dynamics uncertainty in a theoretically-grounded way remains an open problem. We introduce \textbf{L}ocal \textbf{U}ncertainty \textbf{C}onformal \textbf{Ca}libration (LUCCa), a conformal prediction-based approach that calibrates the aleatoric uncertainty estimates provided by dynamics models to generate probabilistically-valid prediction regions of the system's state. We account for both epistemic and aleatoric uncertainty non-asymptotically, without strong assumptions about the form of the true dynamics or how it changes. The calibration is performed locally in the state-action space, leading to uncertainty estimates that are useful for planning. We validate our method by constructing probabilistically-safe plans for a double-integrator under significant changes in dynamics.
Whether learned, simulated, or analytical, approximations of a robot's dynamics can be inaccurate when encountering novel environments. Many approaches have been proposed to quantify the aleatoric uncertainty of such methods, i.e. uncertainty resulting from stochasticity, however these estimates alone are not enough to properly estimate the uncertainty of a model in a novel environment, where the actual dynamics can change. Such changes can induce epistemic uncertainty, i.e. uncertainty due to a lack of information/data. Accounting for *both* epistemic and aleatoric dynamics uncertainty in a theoretically-grounded way remains an open problem. We introduce **L**ocal **U**ncertainty **C**onformal **Ca**libration (LUCCa), a conformal prediction-based approach that calibrates the aleatoric uncertainty estimates provided by dynamics models to generate probabilistically-valid prediction regions of the system's state. We account for both epistemic and aleatoric uncertainty non-asymptotically, without strong assumptions about the form of the true dynamics or how it changes. The calibration is performed locally in the state-action space, leading to uncertainty estimates that are useful for planning. We validate our method by constructing probabilistically-safe plans for a double-integrator under significant changes in dynamics.

# Features
{% figure(alt=["Sparse Gaussian process"] src=["model_final.png"] dark_invert=[true]) %}
**Figure.** Schematic of Local Uncertainty Conformal Calibration (LUCCa). Starting from a calibrated prediction region `$\hat{\mathcal N}_{\tau, cal}$`, we propagate the state uncertainty by composing an approximate dynamics model `$\tilde f$` outputting predictive MVNs of the future state with local conformal calibration. We consider approximate dynamics where the input and output distributions are MVNs of the state, but otherwise do not restrict the structure of `$\tilde f$`.
{% end %}

[Academic Paper](https://github.com/aterenin/academic-paper) is designed to be reasonably feature-complete. In particular, it supports:

* A header with title, author, publication venue, year, and optional buttons for the paper, PDF download link, code, poster, and video.
* Syntax highlighting via Zola, with a minimal CSS-based color theme.
* Math rendering via KaTeX, compatible with both client-side and server-side rendering when configured appropriately.
* Figures via a `figure(alt='Image alt text',src='path/to/image.png')` Zola shortcode, with support for optional captions, subfigures with optional subcaptions, implemented in responsive manner via flexbox.
* Markdown footnotes via Zola.
* Twitter Summary Card, OpenGraph, and JSON-LD metadata, to ensure the web pages produced are search-engine-friendly, and provide social media websites with a banner image link they can display when the website is shared on social media, with an implementation very similar to [Jekyll SEO Tag](https://github.com/jekyll/jekyll-seo-tag).
# Problem Statement

Let's demonstrate some of these: writing
```tex
$$
\int_{\mathbb{R}} \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(\frac{(x-\mu)^2}{-2\sigma^2}\right) \mathrm{d} x = 1.
$$
```
in the Markdown file produces the output
**Problem.** Given an approximation `$\tilde f$` of the system's *unknown* stochastic dynamics `$f$`, a goal region `$\mathcal G \subseteq \mathcal S$`, a safe set `$\mathscr C \subseteq \mathcal S$`, a calibration dataset `$D_{cal}$` and an acceptable failure-rate `$\alpha \in (0,1)$`, we aim to recursively solve the following stochastic optimization problem with planning horizon `$H \in \mathbb N$`:
```
$$
\int_{\mathbb{R}} \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(\frac{(x-\mu)^2}{-2\sigma^2}\right) \mathrm{d} x = 1.
\begin{alignat}{3}
&\!\min_{(u_{t},\ldots,u_{t+H-1})} &\qquad& J(s, u, \mathcal G)\\
&\text{subject to} & & Y_{\tau} \sim f(\bar{X}_\tau),\quad & \forall\tau\in\{t, \ldots, t+H-1\}\\
& & & \mathbb P(Y_{\tau} \in \mathscr C) \ge (1-\alpha),\quad & \forall\tau \in \{t,\ldots, t+H-1\} \\
& & & u_{\tau} \in \mathcal U, s_{\tau+1} \in \mathcal S, \quad &\forall\tau\in\{t, \ldots, t+H-1\}
\end{alignat}
$$
```
This theme also supports footnotes, and will style the heading that immediately precedes them.[^author]
&emsp; *Dynamics, (2)*: The real system evolves following the unknown stochastic dynamics `$f$`. We only have access to an approximation `$\tilde f$` and the inference transitions in `$D_{cal}$`.<br>
&emsp; *Safety, (3)*: Our trajectory should remain probabilistically safe, which we define as requiring it to lie within a safe set `$\mathscr C$` with at least a user-specified probability. This is difficult to guarantee in general for any `$f$` and `$\tilde f$`, since our approximation can be arbitrarily wrong in deployment conditions. <br>
&emsp;*State and Control Admissibility, (4)*: Both the control inputs and the states must belong to pre-defined sets. <br>
&emsp;*Objective Function, (1)*: Additionally, we aim to achieve optimality relative to an objective that incorporates `$\mathcal G$` along with the state and control sequences, `$s := (s_{t+1},\ldots, s_{t+H})$` and `$u := (u_{t},\ldots,u_{t+H-1})$`. For example, $J$ might minimize the expectation of a distance metric to `$\mathcal G$`, control effort, or epistemic-uncertainty along the state-control sequences.

# LUCCA



{% figure(alt=["Sparse Gaussian process"] src=["loewner_order_diagram.png"] dark_invert=[true]) %}
**Figure.** Schematic of Local Uncertainty Conformal Calibration (LUCCa). Starting from a calibrated prediction region `$\hat{\mathcal N}_{\tau, cal}$`, we propagate the state uncertainty by composing an approximate dynamics model `$\tilde f$` outputting predictive MVNs of the future state with local conformal calibration. We consider approximate dynamics where the input and output distributions are MVNs of the state, but otherwise do not restrict the structure of `$\tilde f$`.
{% end %}

# Experiments

We conducted experiments on an MPC controller that uses LUCCa to plan short-horizon trajectories to reach a goal. We compared LUCCa with a baseline on a double-integrator system over four environments shown below. In the white regions the dynamics predictor corresponds to the ground truth dynamics, but in the yellow regions there is a significant mismatch (actually dynamics become lower-friction). In both areas there is aleatoric uncertainty.

# Design and maintainability
{{ figure(src = ["Corridor_Uncalibrated Baseline_11.mp4","Corridor_LUCCa_13.mp4"], subcaption = ["**Uncalibrated Baseline** (Corridor Map)","**LUCCa** (Corridor Map)"], dark_invert=[false,false]) }}

[Academic Paper](https://github.com/aterenin/academic-paper) is [designed to last](https://jeffhuang.com/designed_to_last/), meaning that it follows a number of best practices to ensure the websites it produces continue to work correctly in the indefinite future with minimal to no maintenance.
In particular, this theme uses no JavaScript or CSS dependencies, except optionally KaTeX for math.
Zola, with its Rust-based code, focus on simplicity, and one-binary design, is the clear static site generator of choice for such a theme.

# BibTeX (Cite This)
{{ figure(src = ["Corridor_Uncalibrated Baseline_11.mp4","Corridor_LUCCa_13.mp4"], subcaption = ["**Uncalibrated Baseline** (Passage Map)","**LUCCa** (Passage Map)"], dark_invert=[false,false]) }}

[^author]: This theme is designed and built by Alexander Terenin.
{{ figure(src = ["Corridor_Uncalibrated Baseline_11.mp4","Corridor_LUCCa_13.mp4"], subcaption = ["**Uncalibrated Baseline** (U-Turn Map)","**LUCCa** (U-Turn Map)"], dark_invert=[false,false]) }}

{{ figure(src = ["Corridor_Uncalibrated Baseline_11.mp4","Corridor_LUCCa_13.mp4"], subcaption = ["**Uncalibrated Baseline** (L-Turn Map)","**LUCCa** (L-Turn Map)"], dark_invert=[false,false]) }}

The results suggest that using LUCCa's uncertainty estimate improves the success rate in these scenarios by avoiding collision. However, LUCCa only guarantees that `$(1-\alpha)$` percent of true states will be collision-free, so it does not provide a hard guarantee that the planned actions will result in collision-free states. We also note that the baseline did reach the goal faster when it didn't collide.

{% figure(alt=["vGPMP comparison table"] src=["perf_table.svg"] dark_invert=[true] style="width:100%") %}
**Table.** Comparison of LUCCa vs baseline in four environment over 30 runs (each).
{% end %}


Details about LUCCa's computational overhead (negligible) and its empirical coverage (in agreement with the theoretical bounds) can be found in the full paper (Section `$6$`). We also include visualizations of the local conformal scaling factor in Appendix `$B$`.

# BibTeX <small><small>(cite this!)</small></small>

```
@misc{marques2024----,
title={Quantifying Aleatoric and Epistemic Dynamics Uncertainty via Local Conformal Calibration},
author={Luís Marques and Dmitry Berenson},
year={2024},
eprint={-----},
archivePrefix={arXiv},
primaryClass={cs.Ro},
url={-----},
}
```
Binary file added content/card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/loewner_order_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/model_final.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7cc8ab5

Please sign in to comment.