SciML / DiffEqFlux.jl

Pre-built implicit layer architectures with O(1) backprop, GPUs, and stiff+non-stiff DE solvers, demonstrating scientific machine learning (SciML) and physics-informed machine learning methods
https://docs.sciml.ai/DiffEqFlux/stable
MIT License
864 stars 153 forks source link

Augmented neural ODEs #288

Closed ChrisRackauckas closed 4 years ago

ChrisRackauckas commented 4 years ago

https://arxiv.org/abs/1904.01681

avik-pal commented 4 years ago

Regarding adding a layer for this work, I was wondering if we need to have a new layer AugmentedNeuralODE. Or should we simply modify the NeuralODE type to store a parameter augment_dim, and dispatch based on that to use the current version if it is 0.

ChrisRackauckas commented 4 years ago

Yeah, that's a good question. A keyword argument for the number of augmentation dimensions is probably all that's needed, and is easy to generalize to all of the other NDE layers

avik-pal commented 4 years ago

Another simpler alternative might be to define a layer like

struct AugmentedNDELayer{DE<:NeuralDELayer} <: NeuralDELayer
    nde::DE
    adim::Int
end

This should allow the augmentation to work with all the existing layers, without modifying them at all.

ChrisRackauckas commented 4 years ago

But I think you still might need to modify the equations per-DE? Give it a try and see if it can work.

avik-pal commented 4 years ago

I see. I tried the Concentric Circles experiment from the paper (using NeuralODE) and it seems to work as expected.

Neural ODE Neural ODE

Augmented Neural ODE Augmented Neural ODE

I will try out the other DE layers, and open a PR soon.