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

Kronecker EK0 #243

Merged
merged 137 commits into from
Oct 30, 2023
Merged

Kronecker EK0 #243

merged 137 commits into from
Oct 30, 2023

Conversation

nathanaelbosch
Copy link
Owner

@nathanaelbosch nathanaelbosch commented Jun 12, 2023

Make the EK0 go brr by implementing covariances in Kronecker form! The paper "Probabilistic ODE Solutions in Millions of Dimensions" explains how.

Things that still need to get fixed as right now parts of the package are still broken

  • Fix the ClassicSolverInit
  • Figure out why the solutions got less accurate and many tests now fail; in particular in test/correctness.jl I had to change many relative tolerance levels (EDIT: Turns out it all came from one single missing transpose somewhere)

Afterwards:

  • Refactor and clean up
  • Figure out a good API: In some sense "the EK0" should just use Kronecker form whenever it can, but this also depends on choices of diffusion model, the mass matrix, etc. So ideally a mix of "fast by default" but also making sure that the expectations of the user match the actual speed?

Big issue I found while benchmarking: There are huge performance regressions right now, in particular for the EK1. This needs to be thoroughly investigated.
EDIT: The issue seems to be that for some reason, quite often generic_matmatmul! is called which, for some reason, allocates arrays.

EDIT: Resolved! Runtimes are good, bugs are gone, tests pass. All that's left is some refactoring and clean up and then this is good to go!

EDIT: Left to do:

  • Think about the naming some more: IsoKroneckerProduct? CovarianceFactorization? Etc
  • Mention the Kronecker stuff somewhere in the documentation. Maybe in the solver page? Some text on the logic behind kronecker yes/no would be great to have.
  • maybe maybe investigate the small runtime regression of the EK1. It's really not a big deal, but this is just somewhat unexpected and shouldn't be there.

EDIT: Almost good to go! But this needs more tests. For example:

  • Some verification that the KroneckerEK0 now actually scales linearly with problem size
  • Unit-tests for the IsometricKroneckerProduct functionality
  • Check codecov and improve the coverage

src/ProbNumDiffEq.jl Outdated Show resolved Hide resolved
src/algorithms.jl Outdated Show resolved Hide resolved
src/caches.jl Outdated Show resolved Hide resolved
src/caches.jl Outdated Show resolved Hide resolved
src/diffusions.jl Outdated Show resolved Hide resolved
src/diffusions.jl Outdated Show resolved Hide resolved
src/fast_linalg.jl Outdated Show resolved Hide resolved
src/kronecker.jl Outdated Show resolved Hide resolved
src/priors/common.jl Outdated Show resolved Hide resolved
src/projection.jl Outdated Show resolved Hide resolved
src/projection.jl Outdated Show resolved Hide resolved
src/solution.jl Outdated Show resolved Hide resolved
src/caches.jl Outdated Show resolved Hide resolved
src/caches.jl Show resolved Hide resolved
src/caches.jl Outdated Show resolved Hide resolved
src/filtering/markov_kernel.jl Show resolved Hide resolved
src/filtering/predict.jl Outdated Show resolved Hide resolved
src/priors/common.jl Show resolved Hide resolved
src/priors/iwp.jl Outdated Show resolved Hide resolved
src/priors/iwp.jl Outdated Show resolved Hide resolved
src/projection.jl Outdated Show resolved Hide resolved
src/solution.jl Outdated Show resolved Hide resolved
@nathanaelbosch nathanaelbosch changed the title [WIP] Kronecker EK0 Kronecker EK0 Oct 28, 2023
@nathanaelbosch nathanaelbosch merged commit e627234 into main Oct 30, 2023
7 checks passed
@nathanaelbosch nathanaelbosch deleted the kronecker branch October 30, 2023 10:21
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.

1 participant