2022-02-23 10:56:53 +01:00
|
|
|
Discussion of Physical Losses
|
2021-01-12 04:50:42 +01:00
|
|
|
=======================
|
|
|
|
|
|
|
|
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
|
2022-02-23 10:56:53 +01:00
|
|
|
requires backpropagation through the full network. This can be very expensive, especially
|
2021-01-12 04:50:42 +01:00
|
|
|
for higher-order derivatives.
|
|
|
|
|
2021-03-10 05:15:50 +01:00
|
|
|
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
|
2021-05-17 14:15:38 +02:00
|
|
|
when it doesn't focus on the right regions of the solution.
|
2021-01-12 04:50:42 +01:00
|
|
|
|
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_?
|
2021-04-14 13:08:51 +02:00
|
|
|
Of course, such denomination questions are superficial - if an algorithm is useful, it doesn't matter
|
2021-01-18 07:42:36 +01:00
|
|
|
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
|
|
|
|
2022-02-23 10:56:53 +01:00
|
|
|
One main reason _not_ to call the optimization of the previous notebook machine learning (ML), is that the
|
2021-01-18 07:42:36 +01:00
|
|
|
positions where we test and constrain the solution are the final positions we are interested in.
|
2022-02-23 10:56:53 +01:00
|
|
|
As such, there is no real distinction between training, validation and test sets.
|
2021-01-18 07:42:36 +01:00
|
|
|
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_
|
2022-02-23 10:56:53 +01:00
|
|
|
should usually capture such _out of distribution_ (OOD) behavior, so that we can make estimates
|
2021-01-18 07:42:36 +01:00
|
|
|
about how well our model will generalize to "real-world" cases that we will encounter when
|
2022-02-23 10:56:53 +01:00
|
|
|
we deploy it in an application.
|
2021-01-18 07:42:36 +01:00
|
|
|
|
|
|
|
In contrast, for the PINN training as described here, we reconstruct a single solution in a known
|
2021-05-17 14:15:38 +02:00
|
|
|
and given space-time region. As such, any samples from this domain follow the same distribution
|
2022-02-23 10:56:53 +01:00
|
|
|
and hence don't really represent test or OOD samples. 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
|
2022-02-23 10:56:53 +01:00
|
|
|
of the training range. If we're interested in a different solution, we
|
2021-03-10 05:15:50 +01:00
|
|
|
have to start training the NN from scratch.
|
2021-01-15 09:13:41 +01:00
|
|
|
|
2021-04-11 14:17:03 +02:00
|
|
|

|
|
|
|
|
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-05-17 14:15:38 +02:00
|
|
|
PDEs with the tools of NNs.
|
2022-02-23 10:56:53 +01:00
|
|
|
An inherent drawback of this variant 2 is that it yields single solutions,
|
2021-01-18 07:42:36 +01:00
|
|
|
and that it does not combine with traditional numerical techniques well.
|
2021-07-12 17:19:02 +02:00
|
|
|
E.g., the learned representation is not suitable to be refined with
|
2021-01-18 07:42:36 +01:00
|
|
|
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:
|
2021-03-26 03:28:05 +01:00
|
|
|
- Uses physical model.
|
2021-05-17 14:15:38 +02:00
|
|
|
- Derivatives can be conveniently computed via backpropagation.
|
2021-01-12 04:50:42 +01:00
|
|
|
|
|
|
|
❌ Con:
|
2021-03-26 03:28:05 +01:00
|
|
|
- Quite slow ...
|
|
|
|
- Physical constraints are enforced only as soft constraints.
|
2021-05-17 14:15:38 +02:00
|
|
|
- Largely incompatible with _classical_ numerical methods.
|
2021-03-26 03:28:05 +01:00
|
|
|
- Accuracy of derivatives relies on learned representation.
|
2021-01-12 04:50:42 +01:00
|
|
|
|
2022-05-20 20:10:16 +02:00
|
|
|
To address these issues,
|
|
|
|
we'll next look at how we can leverage existing numerical methods to improve the DL process
|
2021-01-12 04:50:42 +01:00
|
|
|
by making use of differentiable solvers.
|
2022-05-20 20:10:16 +02:00
|
|
|
|