Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible error in ram_adapt during rank one update/downdate? #113

Closed
alicedb2 opened this issue Feb 24, 2025 · 1 comment · Fixed by #109
Closed

Possible error in ram_adapt during rank one update/downdate? #113

alicedb2 opened this issue Feb 24, 2025 · 1 comment · Fixed by #109

Comments

@alicedb2
Copy link

alicedb2 commented Feb 24, 2025

The cholesky decomposition $S_n S_n^T$ is updated using a rank one up/downdate using the following

https://github.com/TuringLang/AdvancedMH.jl/blob/56062a892416d20a0e67c8939c88e82e2ec9b539/src/RobustAdaptiveMetropolis.jl#L163C1-L163C55

The way it's written, we have

$$\Delta S = \eta \vert\Delta\alpha\vert \frac{S U}{\Vert U\Vert}$$

and the rank one update ($\text{sgn}(\Delta\alpha) = 1$) or downdate ($\text{sgn}(\Delta\alpha) = -1$)

$$S_n S_n^T = S_{n-1} S_{n-1}^T + \text{sgn}(\Delta\alpha) (\Delta S) (\Delta S)^T$$ $$ = S_{n-1} S_{n-1}^T \pm \eta^2 (\alpha - \alpha^*)^2 S_{n-1} \frac{U U^T}{\Vert U\Vert^2} S_{n-1}^T$$

$$ = S_{n-1}\left(I \pm \eta^2 \vert\alpha - \alpha^*\vert^2\frac{U U^T}{\Vert U\Vert^2}\right)S_{n-1}^T$$

This update in the original article Vihola 2012 appears in equation 1 as

$$S_n S_n^T = S_{n-1}\left(I + \eta (\alpha - \alpha^*) \frac{U U^T}{\Vert U\Vert^2}\right) S_{n-1}^T$$

So I'm wondering if there's an extra factor of $\eta\Delta\alpha$ and if $\Delta S$ should be instead set to

$$\Delta S = \sqrt{\eta \vert\Delta\alpha\vert} \frac{S U}{\Vert U\Vert}$$

@devmotion
Copy link
Member

devmotion commented Feb 24, 2025

Indeed, it should be changed: #109

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 a pull request may close this issue.

2 participants