作者
- Ameya D. Jagtap1,∗ and George Em Karniadakis1,2
期刊
- Communications in Computational Physics
日期
- 2020
代码
1 摘要
提出了更灵活分解域的XPINN方法,比cPINN区域分解更灵活,而且使用与所有方程。
2 背景
cPINN是通过区域分解,每个区域使用小的网络进行训练,使得求解时不同区域能够并行计算。论文提出的XPINN具有cPINN的区域分解的优势,同时还有以下优势
- Generalized space-time domain decomposition,XPINN公式提供了高度不规则的、凸/非凸的时空域分解,由于这样的分解XPINN公式提供了高度不规则的、凸/非凸的时空域分解
- XPINN公式提供了高度不规则的、凸/非凸的时空域分解
- 简单中间条件,在XPINN中,对于任意形状的界面来说,界面条件非常简单,不需要法线方向,因此,所提出的方法可以很容易地扩展到任何复杂的几何形状,甚至是更高维度的几何形状。
精确求解复杂的方程组,特别是高维方程组已经成为科学计算的最大挑战之一。XPINN的优点使其成为适合进行此类高维复杂模拟的候选对象,而这个高维模拟通常需要大量的训练成本的。
3 XPINN方法
描述:
- Subdomains :子域 Ω q , q = 1 , 2 , ⋯ N s d \Omega_{q}, q=1,2, \cdots N_{s d} Ωq,q=1,2,⋯Nsd是整个计算域 Ω \Omega Ω的非重叠子域,满足 Ω = ⋃ q = 1 N s d Ω q \Omega=\bigcup_{q=1}^{N_{s d}} \Omega_{q} Ω=⋃q=1NsdΩq和 Ω i ∩ Ω j = ∂ Ω i j , i ≠ j \Omega_{i} \cap \Omega_{j}=\partial \Omega_{i j}, i \neq j Ωi∩Ωj=∂Ωij,i=j表示分解域的个数,子域的相交仅仅是在边界 ∂ Ω i j \partial \Omega_{i j} ∂Ωij
- Interface :表示两个或者多个子域的共同边界对应的子网(sub-Nets)之间互通
- sub-Net:子PINN是指每个子域中使用的具有自己的一组优化超参数的个体PINN
- Interface Conditions: 这些条件用于将分解的子域连接在一起,从而得到完全域上的控制偏微分方程的解,根据控制方程的性质,一个或多个界面条件可以应用在共同界面上,如解连续性、通量连续性等

上图中X就是求解域,黑色实线表示区域的边界,黑色虚线表示interface。XPINN的基本interface条件包括强形式的连续性条件和在共同interface上强制不同子网给出的平均解。cPINN文中提到,为了稳定性,没有必要加平均解的条件,但实验也表明了会加快收敛速度。XPINN具有cPINN的所有优点,如并行化能力、大的表示能力、优化方法、激活函数、网络深度或宽度等超参数的高效选择。与cPINN不同,XPINN可以用于求解任何类型的偏微分方程,而不一定是守恒定律。在XPINN情况下,采用法向通量连续性条件不需要找到法向。这大大降低了算法的复杂性,特别是在具有复杂领域的大规模问题以及移动界面问题。
第
q
t
h
q^{t h}
qth个子域的神经网络输出定义为
u
Θ
~
q
(
z
)
=
N
L
(
z
;
Θ
~
q
)
∈
Ω
q
,
q
=
1
,
2
,
⋯
,
N
s
d
u_{\tilde{\mathbf{\Theta}}_{q}}(\mathbf{z})=\mathcal{N}^{L}\left(\mathbf{z} ; \tilde{\mathbf{\Theta}}_{q}\right) \in \Omega_{q}, \quad q=1,2, \cdots, N_{s d}
uΘ~q(z)=NL(z;Θ~q)∈Ωq,q=1,2,⋯,Nsd
最终解定义为
u
Θ
~
(
z
)
=
∑
q
=
1
N
s
d
u
Θ
~
q
(
z
)
⋅
1
Ω
q
(
z
)
u_{\tilde{\mathbf{\Theta}}}(\mathbf{z})=\sum_{q=1}^{N_{s d}} u_{\tilde{\mathbf{\Theta}}_{q}}(\mathbf{z}) \cdot \mathbb{1}_{\Omega_{q}}(\mathbf{z})
uΘ~(z)=∑q=1NsduΘ~q(z)⋅1Ωq(z)
其中
1
Ω
q
(
z
)
:
=
{
0
if
z
∉
Ω
q
1
if
z
∈
Ω
q
\
Common interface in the
q
t
h
subdomain
1
S
if
z
∈
Common interface in the
q
t
h
subdomain
\mathbb{1}_{\Omega_{q}}(\mathbf{z}):=\left\{\begin{array}{ll} 0 & \text { if } \mathbf{z} \notin \Omega_{q} \\ 1 & \text { if } \mathbf{z} \in \Omega_{q} \backslash \text { Common interface in the } q^{t h} \text { subdomain } \\ \frac{1}{\mathcal{S}} & \text { if } \mathbf{z} \in \text { Common interface in the } q^{t h} \text { subdomain } \end{array}\right.
1Ωq(z):=⎩
⎨
⎧01S1 if z∈/Ωq if z∈Ωq\ Common interface in the qth subdomain if z∈ Common interface in the qth subdomain
S
S
S表示S表示沿公共界面相交的子域数量
3.1 正、逆问题子域的损失函数
(1)正问题
在
q
t
h
q^{t h}
qth子域的
{
x
u
q
(
i
)
}
i
=
1
N
u
q
,
{
x
F
q
(
i
)
}
i
=
1
N
F
q
and
{
x
I
q
(
i
)
}
i
=
1
N
I
q
\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u q}},\left\{\mathbf{x}_{F_{q}}^{(i)}\right\}_{i=1}^{N_{F q}} \text { and }\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}
{xuq(i)}i=1Nuq,{xFq(i)}i=1NFq and {xIq(i)}i=1NIq表示training, residual, and the common interface points。
N
u
q
,
N
F
q
a
n
d
N
I
q
N_{u_{q}}, N_{F_{q}} and N_{I q}
Nuq,NFqandNIq分别代表对应的点的个数,每个子域使用一个PINN,
u
q
=
u
Θ
~
t
u_{q}=u_{\tilde{\Theta}_{t}}
uq=uΘ~t,第
q
t
h
q^{t h}
qth个子域损失函数定义为
J
(
Θ
~
q
)
=
W
u
q
MSE
u
q
(
Θ
~
q
;
{
x
u
q
(
i
)
}
i
=
1
N
u
q
)
+
W
F
q
MSE
F
q
(
Θ
~
q
;
{
x
F
q
(
i
)
}
i
=
1
N
F
q
)
+
W
I
q
MSE
u
a
v
g
(
Θ
~
q
;
{
x
I
q
(
i
)
}
i
=
1
N
I
q
)
⏟
Interface condition
+
W
I
F
q
MSE
R
(
Θ
~
q
;
{
x
I
q
(
i
)
}
i
=
1
N
I
q
)
⏟
Interface condition
+
Additional Interface Condition’s
⏟
Optional
\begin{aligned} \mathcal{J}\left(\tilde{\mathbf{\Theta}}_{q}\right)=& W_{u_{q}} \operatorname{MSE}_{u_{q}}\left(\tilde{\mathbf{\Theta}}_{q} ;\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u q}}\right)+W_{\mathcal{F}_{q}} \operatorname{MSE}_{\mathcal{F}_{q}}\left(\tilde{\boldsymbol{\Theta}}_{q} ;\left\{\mathbf{x}_{F_{q}}^{(i)}\right\}_{i=1}^{N_{F q}}\right) \\ &+W_{I_{q}} \underbrace{\operatorname{MSE}_{u_{a v g}}\left(\tilde{\boldsymbol{\Theta}}_{q} ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)}_{\text {Interface condition }}+W_{I_{\mathcal{F}_{q}}} \underbrace{\operatorname{MSE}_{\mathcal{R}}\left(\tilde{\boldsymbol{\Theta}}_{q} ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)}_{\text {Interface condition }} \\ &+\underbrace{\text { Additional Interface Condition's }}_{\text {Optional }} \end{aligned}
J(Θ~q)=WuqMSEuq(Θ~q;{xuq(i)}i=1Nuq)+WFqMSEFq(Θ~q;{xFq(i)}i=1NFq)+WIqInterface condition
MSEuavg(Θ~q;{xIq(i)}i=1NIq)+WIFqInterface condition
MSER(Θ~q;{xIq(i)}i=1NIq)+Optional
Additional Interface Condition’s
W
u
q
,
W
F
q
,
W
I
F
q
and
W
I
q
W_{u_{q}}, W_{\mathcal{F}_{q}}, W_{I_{\mathcal{F}_{q}}} \text { and } W_{I_{q}}
Wuq,WFq,WIFq and WIq代表不同损失的参数,
MSE
u
q
(
Θ
~
q
;
{
x
u
q
(
i
)
}
i
=
1
N
u
q
)
=
1
N
u
q
∑
i
=
1
N
u
q
∣
u
(
i
)
−
u
Θ
~
q
(
x
u
q
(
i
)
)
∣
2
MSE
F
q
(
Θ
~
q
;
{
x
F
q
(
i
)
}
i
=
1
N
F
q
)
=
1
N
F
a
∑
i
=
1
N
F
q
∣
F
Θ
~
q
(
x
F
q
(
i
)
)
∣
2
\begin{array}{l} \operatorname{MSE}_{u_{q}}\left(\tilde{\mathbf{\Theta}}_{q} ;\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u q}}\right)=\frac{1}{N_{u_{q}}} \sum_{i=1}^{N_{u q}}\left|u^{(i)}-u_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{u_{q}}^{(i)}\right)\right|^{2} \\ \operatorname{MSE}_{\mathcal{F}_{q}}\left(\tilde{\mathbf{\Theta}}_{q} ;\left\{\mathbf{x}_{F_{q}}^{(i)}\right\}_{i=1}^{N_{F q}}\right)=\frac{1}{N_{F_{a}}} \sum_{i=1}^{N_{F q}}\left|\mathcal{F}_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{F_{q}}^{(i)}\right)\right|^{2} \end{array}
MSEuq(Θ~q;{xuq(i)}i=1Nuq)=Nuq1∑i=1Nuq∣
∣u(i)−uΘ~q(xuq(i))∣
∣2MSEFq(Θ~q;{xFq(i)}i=1NFq)=NFa1∑i=1NFq∣
∣FΘ~q(xFq(i))∣
∣2
MSE
u
a
v
g
(
Θ
~
q
;
{
x
I
q
(
i
)
}
i
=
1
N
I
q
)
=
∑
∀
q
+
(
1
N
I
q
∑
i
=
1
N
I
q
∣
u
Θ
~
q
(
x
I
q
(
i
)
)
−
{
{
u
Θ
~
q
(
x
I
q
(
i
)
)
}
}
∣
2
)
MSE
R
(
Θ
~
q
;
{
x
I
q
(
i
)
}
i
=
1
N
I
q
)
=
∑
∀
q
+
(
1
N
I
q
∑
i
=
1
N
I
q
∣
F
Θ
~
q
(
x
I
q
(
i
)
)
−
F
Θ
~
q
+
(
x
I
q
(
i
)
)
∣
2
)
\begin{array}{l} \operatorname{MSE}_{u_{a v g}}\left(\tilde{\mathbf{\Theta}}_{q} ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)=\sum_{\forall q^{+}}\left(\frac{1}{N_{I_{q}}} \sum_{i=1}^{N_{I_{q}}}\left|u_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{I_{q}}^{(i)}\right)-\left\{\left\{u_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{I_{q}}^{(i)}\right)\right\}\right\}\right|^{2}\right) \\ \operatorname{MSE}_{\mathcal{R}}\left(\tilde{\mathbf{\Theta}}_{q} ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)=\sum_{\forall q^{+}}\left(\frac{1}{N_{I_{q}}} \sum_{i=1}^{N_{I_{q}}}\left|\mathcal{F}_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{I_{q}}^{(i)}\right)-\mathcal{F}_{\tilde{\Theta}_{q^{+}}}\left(\mathbf{x}_{I_{q}}^{(i)}\right)\right|^{2}\right) \end{array}
MSEuavg(Θ~q;{xIq(i)}i=1NIq)=∑∀q+(NIq1∑i=1NIq∣
∣uΘ~q(xIq(i))−{{uΘ~q(xIq(i))}}∣
∣2)MSER(Θ~q;{xIq(i)}i=1NIq)=∑∀q+(NIq1∑i=1NIq∣
∣FΘ~q(xIq(i))−FΘ~q+(xIq(i))∣
∣2)
最后两项代表着interface 条件损失,第四项是在子域
q
q
q和
q
+
q^{+}
q+的两个不同网络的残差连续条件,
q
+
q^{+}
q+代表
q
q
q的领域MSER和
M
S
E
u
a
v
g
MSE_{uavg}
MSEuavg,都定义在所有相邻的子域,上式子中
{
{
u
Θ
~
q
}
}
=
u
avg
:
=
u
Θ
~
q
+
u
Θ
~
q
+
2
\left\{\left\{u_{\tilde{\mathbf{\Theta}}_{q}}\right\}\right\}=u_{\text {avg }}:=\frac{u_{\tilde{\mathbf{\Theta}}_{q}}+u_{\tilde{\mathbf{\Theta}}_{q^{+}}}}{2}
{{uΘ~q}}=uavg :=2uΘ~q+uΘ~q+(假设在公共界面上只有两个子域相交),additional interface conditions,例如flux continuity ,
c
k
c^{k}
ck也能根据PDE的类型以及interface 方向被加损失中。
remark:
- interface conditions 的类型决定了整个接口的解的正则性,从而影响收敛速度。在interface上的解是足够连续的,从而满足其控制PDE
- 足够多的interface point去连接子域,这对于算法的收敛很重要,特别是对于internal
对于逆问题:
J
(
Θ
~
q
,
λ
)
=
W
u
q
MSE
u
q
(
Θ
~
q
,
λ
;
{
x
u
q
(
i
)
}
i
=
1
N
u
q
)
+
W
F
q
MSE
F
q
(
Θ
~
q
,
λ
;
{
x
u
q
(
i
)
}
i
=
1
N
u
q
)
+
W
I
q
{
MSE
u
a
v
g
(
Θ
~
q
,
λ
;
{
x
I
q
(
i
)
}
i
=
1
N
I
q
)
+
MSE
λ
(
θ
~
q
,
λ
;
{
x
I
q
(
i
)
}
i
=
1
N
I
q
)
}
⏟
Interface condition’s
+
W
I
F
q
MSE
R
(
Θ
~
q
,
λ
;
{
x
I
q
(
i
)
}
i
=
1
N
I
q
)
⏟
Intarf
+
Additional Interface Condition’s
⏟
Optional
\begin{aligned} \mathcal{J}\left(\tilde{\mathbf{\Theta}}_{q}, \lambda\right)=& W_{u_{q}} \operatorname{MSE}_{u_{q}}\left(\tilde{\boldsymbol{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u_{q}}}\right)+W_{\mathcal{F}_{q}} \operatorname{MSE}_{\mathcal{F}_{q}}\left(\tilde{\boldsymbol{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u_{q}}}\right) \\ &+W_{I_{q}} \underbrace{\left\{\operatorname{MSE}_{u_{a v g}}\left(\tilde{\boldsymbol{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)+\operatorname{MSE}_{\lambda}\left(\tilde{\boldsymbol{\theta}}_{q}, \lambda ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)\right\}}_{\text {Interface condition's }} \\ &+W_{I_{\mathcal{F}_{q}}} \underbrace{\operatorname{MSE}_{\mathcal{R}}\left(\tilde{\boldsymbol{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)}_{\text {Intarf }}+\underbrace{\text { Additional Interface Condition's }}_{\text {Optional }} \end{aligned}
J(Θ~q,λ)=WuqMSEuq(Θ~q,λ;{xuq(i)}i=1Nuq)+WFqMSEFq(Θ~q,λ;{xuq(i)}i=1Nuq)+WIqInterface condition’s
{MSEuavg(Θ~q,λ;{xIq(i)}i=1NIq)+MSEλ(θ~q,λ;{xIq(i)}i=1NIq)}+WIFqIntarf
MSER(Θ~q,λ;{xIq(i)}i=1NIq)+Optional
Additional Interface Condition’s
其中
MSE
F
q
(
Θ
~
q
,
λ
;
{
x
u
q
(
i
)
}
i
=
1
N
u
q
)
=
1
N
u
q
∑
i
=
1
N
u
q
∣
F
Θ
~
q
(
x
u
q
(
i
)
)
∣
2
MSE
λ
(
Θ
~
q
,
λ
;
{
x
I
q
(
i
)
}
i
=
1
N
I
q
)
=
∑
∀
q
+
(
1
N
I
q
∑
i
=
1
N
l
q
∣
λ
q
(
x
I
q
(
i
)
)
−
λ
q
+
(
x
I
q
(
i
)
)
∣
2
)
\begin{array}{l} \operatorname{MSE}_{\mathcal{F}_{q}}\left(\tilde{\boldsymbol{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u_{q}}}\right)=\frac{1}{N_{u_{q}}} \sum_{i=1}^{N_{u_{q}}}\left|\mathcal{F}_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{u_{q}}^{(i)}\right)\right|^{2} \\ \operatorname{MSE}_{\lambda}\left(\tilde{\mathbf{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)=\sum_{\forall q^{+}}\left(\frac{1}{N_{I_{q}}} \sum_{i=1}^{N_{l q}}\left|\lambda_{q}\left(\mathbf{x}_{I_{q}}^{(i)}\right)-\lambda_{q^{+}}\left(\mathbf{x}_{I_{q}}^{(i)}\right)\right|^{2}\right) \end{array}
MSEFq(Θ~q,λ;{xuq(i)}i=1Nuq)=Nuq1∑i=1Nuq∣
∣FΘ~q(xuq(i))∣
∣2MSEλ(Θ~q,λ;{xIq(i)}i=1NIq)=∑∀q+(NIq1∑i=1Nlq∣
∣λq(xIq(i))−λq+(xIq(i))∣
∣2)
其他残差损失与正向损失一样。
**Remark:**需要注意的是,由于XPINN损失函数的高度非凸性,定位其全局最小值非常难。但是,对于几个局部极小值,损失函数的值是相似的,相应的预测解的精度是相似的。
3.2 优化方法
自动求导
3.3 误差
E
app
q
=
∥
u
a
q
−
u
q
e
x
∥
E
gen
q
=
∥
u
g
q
−
u
a
q
∥
E
opt
q
=
∥
u
τ
q
−
u
g
q
∥
\begin{aligned} \mathcal{E}_{\text {app }} q &=\left\|u_{a_{q}}-u_{q}^{e x}\right\| \\ \mathcal{E}_{\text {gen }} q &=\left\|u_{g_{q}}-u_{a_{q}}\right\| \\ \mathcal{E}_{\text {opt }} q &=\left\|u_{\tau_{q}}-u_{g_{q}}\right\| \end{aligned}
Eapp qEgen qEopt q=∥
∥uaq−uqex∥
∥=∥
∥ugq−uaq∥
∥=∥
∥uτq−ugq∥
∥
分别代表approximation error、 generalization error 以及optimization error.
- u a q = arg min f ∈ F q ∥ f − u q e x ∥ u_{a_{q}}=\arg \min _{f \in F_{q}}\left\|f-u_{q}^{e x}\right\| uaq=argminf∈Fq∥ ∥f−uqex∥ ∥是真解 u q e x u_{q}^{e x} uqex的近似
- u g q = arg min Θ ~ q J ( Θ ~ q ) u_{g_{q}}=\arg \min _{\tilde{\mathbf{\Theta}}_{q}} \mathcal{J}\left(\tilde{\mathbf{\Theta}}_{q}\right) ugq=argminΘ~qJ(Θ~q)是全局最优解
- u τ q = arg min Θ ~ q J ( Θ ~ q ) u_{\tau_{q}}=\arg \min _{\tilde{\mathbf{\Theta}}_{q}} \mathcal{J}\left(\tilde{\mathbf{\Theta}}_{q}\right) uτq=argminΘ~qJ(Θ~q)是子网络训练后得到的解,
最后XPINN的误差可以总结为
E
X
P
I
N
N
:
=
∥
u
τ
−
u
e
x
∥
≤
∥
u
τ
−
u
g
∥
+
∥
u
g
−
u
a
∥
+
∥
u
a
−
u
e
x
∥
\mathcal{E}_{X P I N N}:=\left\|u_{\tau}-u^{e x}\right\| \leq\left\|u_{\tau}-u_{g}\right\|+\left\|u_{g}-u_{a}\right\|+\left\|u_{a}-u^{e x}\right\|
EXPINN:=∥uτ−uex∥≤∥uτ−ug∥+∥ug−ua∥+∥ua−uex∥
其中,
(
u
e
x
,
u
τ
,
u
g
,
u
a
)
(
z
)
=
∑
q
=
1
N
s
d
(
u
q
e
x
,
u
τ
q
,
u
g
q
,
u
a
q
)
(
z
)
⋅
1
Ω
q
(
z
)
\left(u^{e x}, u_{\tau}, u_{g}, u_{a}\right)(\mathbf{z})=\sum_{q=1}^{N_{s d}}\left(u_{q}^{e x}, u_{\tau_{q}}, u_{g_{q}}, u_{a_{q}}\right)(\mathbf{z}) \cdot \mathbb{1}_{\Omega_{q}}(\mathbf{z})
(uex,uτ,ug,ua)(z)=∑q=1Nsd(uqex,uτq,ugq,uaq)(z)⋅1Ωq(z)
Remark:
- 当估计误差降低(数据拟合更好),泛化误差就会增加,这是一种bias variance trade-off,影响泛化误差的两个主要因素是the number and distribution of residual points
- 优化误差由损失函数的复杂性影响,网络结构深深影响优化误差
3.4 XPINN、cPINN,PINN对比
与PINN和cPINN框架相比,XPINN框架有很多优点,但是它也有一个与之前的框架相同的局限性。绝对误差
PDE解决方案,不会低于的水平,这是由于解决高维非凸优化问题所涉及的不准确性,可能会导致糟糕的极小值