Neural Networks as Ordinary Differential Equations
rkevingibson.github.io
rkevingibson.github.io
Thanks to Aubin, I did my PhD in AI a long time ago and am still working in the field now!
edit: looks to have been fixed now.
The thing is, with ordinary neural nets you have two arguments for how the thing works.
One view is you are taking inputs and projecting those into a high dimensional feature space and then drawing a separating hyperplanes between points in two or more categories. If you have a proper shaped hyperplanes, the results will tend to generalize.
Another view is you're doing something like logistic regression. You have a function and you're trying to reduce the distance between it and the "true classification function" that takes points to their proper category. You use gradient descent to minimize the distance between your function and this "real function" that you get through data.
So anyway, I am not sure how these intuitions apply to differential equation version. I'm not sure what other intuitions there are for why these equations should work.
This viewpoint doesn't change when you switch to ODEs. The evolution of the system T seconds into the future is a (piecewise) continuous function of the initial state.
tnecniv: This viewpoint doesn't change when you switch to ODEs. The evolution of the system T seconds into the future is a (piecewise) continuous function of the initial state.
Sure, it doesn't. But it moves to ground where it seems hard to tell what's happening. Approximations of one function by a sum of set functions with variable parameters is a standard arrow in the mathematical "quiver" - Taylor series, linear regression, etc. A neural net naturally is a complex ensemble of such approximations. You gain tremendous flexibility of representation but lose any idea of the shape of the curve that's involved.
With the ODE theory, you have a continuous function that is used instead of the parameters. It is hard for me to conceptualize exactly what's happening beyond that.
I mean, neural nets seem to able to approximate just about any complex classification function already.
So what I believe we need in recasting/representing/etc neural nets is:
1) Ways to speed training. Ways to update a trained system for small-ish changes in the system logic without needing a full retraining.
2) Ways to explain how a neural net reaches its decisions. Ways to tell a neural net to not use a given reasoning branch if it's using "garbage reasoning".
3) Ways to merge several neural nets that operate on related but not identical problems.
Etc.
I'm not sure if this model brings us closer to this.
https://arxiv.org/abs/1812.01892
The neural ODE falls into the case where the number of parameters is large, and so the traditional adjoint methods seem to do best there when optimized. So in some sense, we aren't "trying" to do it, but have had library implementations for these gradient calculations for a few years now. The documentation is here: http://docs.juliadiffeq.org/latest/analysis/sensitivity.html
But we are heading in new directions with this as well. The traditional adjoints seem to do best here because of inefficiencies with tracing-based reverse-mode autodiffs like the kind found in Flux.jl or Autograd. Basically, those kinds of tape-based autodiffs rely on each operation being expensive, which isn't true for the internals of an ODE solver (but tends to be true for applications like neural nets where large matrix multiplications dominate). This means that the overhead of building the tape is really noticable and thus it doesn't do well in this application. Additionally, the tape is dependent on the input because the trace of the operations is dependent on what branches are taken. This means that, even if the ODE solver is fully optimized and every piece is JIT compiled, the backprop tape itself cannot be compiled and saved. Again, this isn't an issue for large matmuls, but this is another factor that comes into play when the operations are not sufficiently costly.
However, the blog post you link to discusses source-to-source AD as an alternative. Source-to-source builds the backprop code directly from the full source, doing both branches at the same time. This means you can AD the source and then compile it. This methodology solves the issues we found with tracing-based autodifferentiation for this application, so I'll be happy when we get to testing it. Zygote.jl isn't quite ready for source-to-source AD on the full DifferentialEquations.jl code, but it's getting close.
Sorry if that question doesn't make sense; I'm not really clear on how ordinary differential equations are usually solved these days.
Its been a while, but I remember that despair and sadness are involved in some way.
In normal ODEs you can already compute each X_{i}(t)/dt in parallel, but you will still have to evaluate layer/time t completely before evaluating layer/time t+Dt as it feeds forward in both the NN and ODE case.
I’ll certainly agree that it doesn’t make sense to use a single neural net like function to model the full solution of an ODE. But the entire power of deep learning is that it doesn’t force you to use a single approach — you can compose neural nets with any function you like as long as it’s differentiable. So I think hybrid models that blend deep learning with traditional numerical methods are entirely fair game.
That's exactly how I'm defining using neural networks to solve a given ODE, and yes our studies show that it's not a practical method. It was just a good Google Summer of Code where we coded up a version in TensorFlow, the student did the same thing in KNet.jl, and then we played around with a bunch of modifications (to the error function, allowing adaptive training, etc.) to end up convincing ourselves this wasn't a viable method. However, the next steps we are doing are blending deep learning with traditional numerical methods. A post earlier up shows that our differential equation software now blends with the deep learning software, and we have a few projects investigating different strategies for actually using these combinations. We should have results going onto Arxiv late January showing some promising mixed strategies.
[1] https://en.wikipedia.org/wiki/Direct_multiple_shooting_metho...
Anyway, I heard AMD has 64 cores on a single chip so it may not be too long..
https://www.tomshardware.com/news/human-brain-neuromorphic-supercomputer-manchester,38027.htmlAnd arbitrary differential equations are a hell of a class.
In mathematics (and computer science) a language is just a set of strings, and a machine is just a language attached to a semantics. I.e. whatever symbols you need to represent PDEs, inductively generated by the axioms and inference rules of mathematics and theoretical physics (like for lambda-calculus: lambda, x0,x1,... '(', ')' and reduction and construction rules)
Note that this is a very handwavy definition. The "types" of input, output, and what it means to "compute" will depend on your language, semantics and encoding. (E.g. for lambda calcus "compute" means appying reduction rules until the machine halts, if ever)
Turing machines, neural networks, cellular automata, computer programs and (apparently) ODEs can execute each other's "programs" (among any others).
It’s a property of the functional form of stacked ResNet layers that allows the ODE layer to be used instead.
You are right that many networks will require at least some (and usually many) layers that change dimensionality. So ODE layers are not going to wholesale replace anything, apart from possibly submodules of a bigger network where the submodule is made up just of sequences of ResNet layers.
ODE layers will also have new applications, such as for irregularly spaced sequential inputs or outputs.
The other thing you can do is to "pad" the input up to be the size of the hidden layers.
You could use the ODE solver to integrate the system from t1 to t2a. Then you need one normal neural net layer (one forward Euler time step) that takes the system from t2a to t2b and changes dimensions. Then you can again use the ODE solver to integrate from t2b to t3.
Specifically, find a control function (so the weights of the activation function) which maps the system to your desired output?
Then there are also much better ways to solve two point boundary problems rather than just shooting forward. [0] Is a good place to start, (although its old).
[0] Numerical Methods for Two-Point Boundary-Value Problems. Herbert Keller.
1) In the motivation for the adjoint method, is u given along with A and C? I don't see how to compute u^T B without u.
2) How do a(t), da(t)/dt, and dG(..)/dh relate to A, B, C, u, and v from the motivation?
Perhaps related: Factor tables for AI: https://github.com/RowColz/AI
\( \mathbf{h}_{n+1} = F(\mathbf{h}_{n}) \
is displayed as the author obviously intended?
Edit: if you're asking why you don't see the author's page as intended, you might have JS disabled