Skip to content

fix(events): correct covariance uncertainty propagation in groupoid compose() - #24

Merged
hongjin-he merged 1 commit into
hongjin-he:mainfrom
dkconnect:impl/fix-groupoid-covariance
Aug 25, 2026
Merged

fix(events): correct covariance uncertainty propagation in groupoid compose()#24
hongjin-he merged 1 commit into
hongjin-he:mainfrom
dkconnect:impl/fix-groupoid-covariance

Conversation

@dkconnect

Copy link
Copy Markdown
Contributor

The uncertainty propagation inside compose() computes Sigma_comp_sq by squaring Sigma_w directly (Sigma_w @ Sigma_w) rather than forming the covariance via Sigma_w @ Sigma_w.T.

Maths

Given affine operators with noise terms $\eta_i = \Sigma_i \epsilon_i$ where $\epsilon_i \sim \mathcal{N}(0, I)$, the covariance of the noise is: $$\operatorname{Cov}(\eta_i) = \Sigma_i \Sigma_i^\top$$

Under composition $T_1 \circ T_2$:
$$T_1(T_2(s)) = A_1 A_2 s + (A_1 b_2 + b_1) + (A_1 \Sigma_2 \epsilon_2 + \Sigma_1 \epsilon_1)$$

Because $\epsilon_1 \perp \epsilon_2$, the covariance of total noise $\eta_{\text{comp}}$ is: $$\operatorname{Cov}(\eta_{\text{comp}}) = \Sigma_1 \Sigma_1^\top + A_1 (\Sigma_2 \Sigma_2^\top) A_1^\top$$

…compose()`

The uncertainty propagation inside `compose()` computes `Sigma_comp_sq` by squaring `Sigma_w` directly (`Sigma_w @ Sigma_w`) rather than forming the covariance via `Sigma_w @ Sigma_w.T`.

#### Maths
Given affine operators with noise terms $\eta_i = \Sigma_i \epsilon_i$ where $\epsilon_i \sim \mathcal{N}(0, I)$, the covariance of the noise is:
$$\operatorname{Cov}(\eta_i) = \Sigma_i \Sigma_i^\top$$

Under composition $T_1 \circ T_2$:
$$T_1(T_2(s)) = A_1 A_2 s + (A_1 b_2 + b_1) + (A_1 \Sigma_2 \epsilon_2 + \Sigma_1 \epsilon_1)$$

Because $\epsilon_1 \perp \epsilon_2$, the covariance of total noise $\eta_{\text{comp}}$ is:
$$\operatorname{Cov}(\eta_{\text{comp}}) = \Sigma_1 \Sigma_1^\top + A_1 (\Sigma_2 \Sigma_2^\top) A_1^\top$$
@hongjin-he
hongjin-he merged commit afa3a9c into hongjin-he:main Aug 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants