Giter Club home page Giter Club logo

neurallyapunov.jl's Introduction

NeuralLyapunov.jl

Stable Dev Build Status Coverage

A library for searching for neural Lyapunov functions in Julia.

This package provides an API for setting up the search for a neural Lyapunov function. Such a search can be formulated as a partial differential inequality, and this library generates a ModelingToolkit PDESystem to be solved using NeuralPDE.jl. Since the Lyapunov conditions can be formulated in several different ways and a neural Lyapunov function can be set up in many different forms, this library presents an extensible interface for users to choose how they wish to set up the search, with useful pre-built options for common setups.

neurallyapunov.jl's People

Contributors

nicholaskl97 avatar dependabot[bot] avatar chrisrackauckas avatar thazhemadam avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

mitmath

neurallyapunov.jl's Issues

Bring closures closer to best practices

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

Lots of functions are passed around in this package, some of which capture variables in a way advised against by the Julia performance tips. Those advise use of let blocks for better performance and type stability. That's probably among the many things that could be done to speed up performance of this library.

Describe the solution you’d like

Check wherever closures are made in this library, such as the NumericalNeuralLyapunovFunctions function, and bring them up to best practices, likely with let blocks.

Reduce dependence on NeuralPDE?

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.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.