pbdl-book/physicalloss-discuss.md

71 lines
3.7 KiB
Markdown
Raw Normal View History

2021-01-12 04:50:42 +01:00
Discussion of Physical Soft-Constraints
=======================
The good news so far is - we have a DL method that can include
physical laws in the form of soft constraints by minimizing residuals.
However, as the very simple previous example illustrates, this is just a conceptual
starting point.
On the positive side, we can leverage DL frameworks with backpropagation to compute
the derivatives of the model. At the same time, this puts us at the mercy of the learned
representation regarding the reliability of these derivatives. Also, each derivative
requires backpropagation through the full network, which can be very slow. Especially so
for higher-order derivatives.
And while the setup is relatively simple, it is generally difficult to control. The NN
2021-01-12 04:50:42 +01:00
has flexibility to refine the solution by itself, but at the same time, tricks are necessary
when it doesn't pick the right regions of the solution.
2021-01-16 06:30:26 +01:00
## Is it "Machine Learning"?
2021-01-15 09:13:41 +01:00
2021-01-18 07:42:36 +01:00
One question that might also come to mind at this point is: _can we really call it machine learning_?
Of course, such denomination questions are mostly superficial - if an algorithm is useful, it doesn't matter
what name it has. However, here the question helps to highlight some important properties
that are typically associated with algorithms from fields like machine learning or optimization.
2021-01-15 09:13:41 +01:00
2021-01-18 07:42:36 +01:00
One main reason _not_ to call these physical constraints machine learning (ML), is that the
positions where we test and constrain the solution are the final positions we are interested in.
As such, there is no real distinction between training, validation and (out of distribution) test sets.
Computing the solution for a known and given set of samples is much more akin to classical optimization,
where inverse problems like the previous Burgers example stem from.
For machine learning, we typically work under the assumption that the final performance of our
model will be evaluated on a different, potentially unknown set of inputs. The _test data_
should usually capture such out of distribution (OOD) behavior, so that we can make estimates
about how well our model will generalize to "real-world" cases that we will encounter when
we deploy it into an application.
In contrast, for the PINN training as described here, we reconstruct a single solution in a known
and given space-time time. As such, any samples from this domain follow the same distribution
and hence don't really represent test or OOD sampes. As the NN directly encodes the solution,
2021-01-18 07:42:36 +01:00
there is also little hope that it will yield different solutions, or perform well outside
of the training distribution. If we're interested in a different solution, we most likely
have to start training the NN from scratch.
2021-01-15 09:13:41 +01:00
## Summary
2021-01-18 07:42:36 +01:00
Thus, the physical soft constraints allow us to encode solutions to
2021-03-09 09:39:54 +01:00
PDEs with the tools of ANNs.
2021-01-18 07:42:36 +01:00
An inherent drawback of this approach is that it yields single solutions,
and that it does not combine with traditional numerical techniques well.
E.g., learned representation is not suitable to be refined with
a classical iterative solver such as the conjugate gradient method.
This means many
2021-01-12 04:50:42 +01:00
powerful techniques that were developed in the past decades cannot be used in this context.
Bringing these numerical methods back into the picture will be one of the central
goals of the next sections.
✅ Pro:
- uses physical model
2021-03-09 09:39:54 +01:00
- derivatives can be conveniently compute via backpropagation
2021-01-12 04:50:42 +01:00
❌ Con:
2021-02-27 07:07:42 +01:00
- quite slow ...
- physical constraints are enforced only as soft constraints
2021-01-12 04:50:42 +01:00
- largely incompatible _classical_ numerical methods
2021-02-27 07:07:42 +01:00
- accuracy of derivatives relies on learned representation
2021-01-12 04:50:42 +01:00
Next, let's look at how we can leverage numerical methods to improve the DL accuracy and efficiency
by making use of differentiable solvers.