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

Reduce dependence on NeuralPDE? #20

Open
nicholaskl97 opened this issue Mar 1, 2024 · 0 comments
Open

Reduce dependence on NeuralPDE? #20

nicholaskl97 opened this issue Mar 1, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nicholaskl97
Copy link
Collaborator

nicholaskl97 commented Mar 1, 2024

Is your feature request related to a problem? Please describe.

Currently, NeuralLyapunov outputs a PDESystem for use in NeuralPDE. As described in SciML/NeuralPDE.jl#703, NeuralPDE generates its loss function in two steps: first parsing the PDE into a data-free loss function, then merging that with a training strategy for how data points are selected within the training domain (e.g., GridTraining or QuadratureTraining). Since NeuralLyapunov has a very constrained set of potential data-free loss functions, the parser isn't very helpful, and (as in the issue already referenced) is often inconvenient. We're mostly using NeuralPDE for the training strategies.

If NeuralPDE isn't going to add functionality for merging a training strategy with a user-defined data-free loss function, should NeuralLyapunov handle the training strategies as well?

Describe the solution you’d like

Potentially, NeuralLyapunov could take in training strategy as those in NeuralPDE, and output an OptimizationProblem, skipping over NeuralPDE entirely. This would allow more flexibility and optimization in creating the data-free loss function, but would also involve writing code similar to NeuralPDE for merging the strategy and data-free loss function into a full loss function.

Describe alternatives you’ve considered

The ideal would be if SciML/NeuralPDE.jl#703 is completed, in which case NeuralLyapunov could generate an OptimizationProblem using that part of NeuralPDE, skipping over the parser, and still benefit from any advancements in training strategies implemented by the NeuralPDE library.
Failing that, the current state of NeuralLyapunov, which uses NeuralPDE in its current state, parser and all, does work.

Additional context

Specific issues/difficulties that have come up with parser include directional derivatives being calculated inefficiently (SciML/NeuralPDE.jl#702), if ... else ... blocks not parsing well, and the dynamics needing to be traceable. (I'm not actually sure how limiting the last one is, but it doesn't seem ideal in general. It may be possible to deal with the traceability of dynamics with some fancy Symbolics work instead.)

@nicholaskl97 nicholaskl97 added the enhancement New feature or request label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant