deepxde
deepxde copied to clipboard
Encode the prior knowldge on the symmetry in NN
Dear Lu and comunity
PINN try to encode the knowledeg from PDE into NN, so as to enhance the NN learning.
However, for lots of problem, we have no explict knowledge on PDE, but just some prior about the symmetry of the solution (for instance, f(-x)=f(x), or f(-x)=-f(x)).
How can we encode these symmetry knowledge into NN through DeepXDE?
I think the apply_feature_transform
and apply_ouput_transform
may be a possible approach to realize that.
Do you have any advice? Or could you share some example for that?
Thanks very much
Do you mean you don't know the PDE? PINN is primarily used to solve PDE. So why would you use DeepXDE or even PINN to solve such a problem?
Can you please talk specifically? Like the exact problem. Are you talking about function approximation?
Do you mean you don't know the PDE? PINN is primarily used to solve PDE. So why would you use DeepXDE or even PINN to solve such a problem?
Can you please talk specifically? Like the exact problem. Are you talking about function approximation?
Yes. I'm talking about function approximation. For more detail, I mean if I prior know the ground-truth function f(x) possess the property of f(-x)=f(x) or f(-x)=-f(x), and how can I encode these knowledge into function training.
And the reason I used deepxde becuase it is a general framework, which is flixbile for user to encode the prior knowledge. And I sometimes want to encode PDE and symmetry in deepxde. And I wonder if anyone have similar experiences, and can share it.
It is easy to do.
- f(-x)=f(x): use a
apply_feature_transform
which returns the absolution value ofx
, i.e., f(x) = NN(|x|). - f(-x)=-f(x): It should be f(x) = sign(x) NN(|x|).
- |x| is implemented by
apply_feature_transform
- sign(x) is implemented by
apply_ouput_transform
- |x| is implemented by
It is easy to do.
f(-x)=f(x): use a
apply_feature_transform
which returns the absolution value ofx
, i.e., f(x) = NN(|x|).f(-x)=-f(x): It should be f(x) = sign(x) NN(|x|).
- |x| is implemented by
apply_feature_transform
- sign(x) is implemented by
apply_ouput_transform
Thanks for response. That's good idea!