Coordinate Encoding on Linear Grids for Physics-Informed Neural Networks
Authors: Tetsuro Tsuchino, Motoki Shiga
Organizations: Graduate School of Engineering, Gifu University, Japan · International Center for Synchrotron Radiation Innovation Smart, Tohoku University, Japan · Unprecedented-scale Data Analytics Center, Tohoku University, Japan · Graduate School of Information Sciences, Tohoku University, Japan · Center for Basic Research on Materials, National Institute for Materials Science, Japan · Center for Advanced Intelligence Project, RIKEN, Japan
In solving partial differential equations (PDEs), machine learning utilizing physical laws has received considerable attention owing to advantages such as mesh-free solutions, unsupervised learning, and feasibility for solving high-dimensional problems. An effective approach is based on physics-informed neural networks (PINNs), which are based on deep neural networks known for their excellent performance in various academic and industrial applications. However, PINNs struggled with model training owing to significantly slow convergence because of a spectral bias problem. In this study, we propose a PINN-based method equipped with a coordinate-encoding layer on linear grid cells. The proposed method improves the training convergence speed by separating the local domains using grid cells. Moreover, it reduces the overall computational cost by using axis-independent linear grid cells. The method also achieves efficient and stable model training by adequately interpolating the encoded coordinates between grid points using natural cubic splines, which guarantees continuous derivative functions of the model computed for the loss functions. The results of numerical experiments demonstrate the effective performance and efficient training convergence speed of the proposed method.
Figures & tables
Figure 1: Schematic of the proposed method, coordinate encoding on linear grid (CELG).
H-Spline
PIXEL
CELG
Space
O(SD⋅RD)
O(M⋅RD)
O(M⋅D⋅R)
Time
O(SD⋅2D)
O(M⋅2D)
O(M⋅D⋅R)
Table 1: Computational complexities
Figure 2: Training results utilizing linear, cosine with/without multigrid (MG), Hermite and natural interpolations for 1D Poisson PDE. (a) Predictions of u(x) , (b) first and (c) second derivatives. (d) Learning curves. In (a)–(c), the analytical solution is shown as a solid gray line.
Figure 3: Analytical solutions of (a) 1D and (b) 2D multi-band Poisson PDEs.
Figure 4: Prediction results for the 1D multi-band Poisson PDE during training at (a) 100, (b) 1,000, (c) 5,000, and (d) 10,000 training epochs. The grid parameter was set to R=16 in PIXEL, H-Spline, and CELG.
Figure 5: Learning curves for the 1D multi-band Poisson PDE. The grid parameters were set to (a) R=4 , (b) 8, (c) 16, and (d) 32.
Figure 6: Predictions for the 2D multi-band Poisson PDE by non-grid-based models (Vanilla and CP-PINN) and CELG, CELG-CP ( R=16 ) after (a) 1,000, (b) 5,000, and (c) 50,000 training epochs.
Figure 8: Learning curves for the 2D multi-band Poisson PDE. (a) Curves of CELG and CELG-CP with R=16 and non-grid methods (Vanilla and CP-PINN), and those of grid-based methods with (b) R=8 , (c) R=16 , and (d) R=32 .
Allen–Cahn
Burgers
Flow-Mixing
Helmholtz
Domain
[0,1]×[−1,1]
[0,1]×[−1,1]
[0,8]×[−4,4]2
[0,1]3
#Colloc.
50 × 128
50 × 128
643
643
#IC
128
128
642
-
#BC
50×2
50×2
4×642
6×642
λ
(0.1, 1, 1)
(1, 1, 0.001)
(100, 1, 1)
(1, -, 1)
#Test
100×256
100×256
1283
1283
Table 2: Training settings for benchmark PDEs.
Method
R
Allen-Cahn/Burgers
Flow-Mixing
Helmholtz
Vanilla
–
12,737
12,801
1,985
CP-PINN
–
25,216
37,824
5,808
PIXEL
8
18,753
101,697
24,433
16
45,377
637,249
158,321
32
147,777
4,608,321
1,151,089
H-Spline
8
576
13,824
13,824
Table 3: Number of parameters for benchmark PDEs.
Method
R
Allen-Cahn
Burgers
Flow-Mixing
Helmholtz
Vanilla
–
1.73 ± 0.03
1.46 ± 0.01
1.85 ± 0.01
24.73 ± 0.02
CP-PINN
–
2.04 ± 0.05
1.71 ± 0.04
1.90 ± 0.02
4.31 ± 0.23
PIXEL
8
1.68 ± 0.07
2.26 ± 0.01
34.83 ± 0.01
24.86 ± 0.01
16
1.60 ± 0.07
2.07 ± 0.01
27.57 ± 0.01
18.77 ± 0.02
32
1.63 ± 0.11
2.01 ± 0.01
30.69 ± 0.01
17.53 ± 0.02
H-Spline
8
0.88 ± 0.13
0.67 ± 0.04
19.54 ± 0.29
21.44 ± 0.20
Table 4: Training time (ms./iter.) for benchmark PDEs.
Figure 9: Learning curves for benchmark PDEs: (a) Allen-Cahn, (b) Burgers, (c) Flow-Mixing, and (d) Helmholtz equations.
Figure 10: Prediction results for (a) Allen-Cahn, (b) Burgers, (c) Flow-Mixing, and (d) Helmholtz equations. The third rows in (a) and (b) show the prediction results and the analytical solutions (gray) at time t=1 . Predictions and residuals at (c) t=8 and (d) x3=0.75 .
Method
R
Allen-Cahn
Burgers
Flow-Mixing
Helmholtz
Vanilla
–
0.46 ± 0.23
0.08 ± 0.05
0.02 ± 0.00
1.08 ± 0.13
CP-PINN
–
0.88 ± 0.11
0.09 ± 0.00
0.05 ± 0.00
0.07 ± 0.01
PIXEL
8
0.04 ± 0.01
0.09 ± 0.05
0.01 ± 0.00
0.27 ± 0.03
16
0.62 ± 0.02
0.47 ± 0.06
0.01 ± 0.00
0.14 ± 0.00
32
0.99 ± 0.04
0.94 ± 0.04
0.05 ± 0.01
0.68 ± 0.00
H-Spline
8
0.62 ± 0.00
0.47 ± 0.02
0.18 ± 0.00
0.54 ± 0.00
Table 5: Relative errors for benchmark PDEs.
Hyperparameter
2D
3D
4D
5D
Domain
[0,1]2
[0,1]3
[0,1]4
[0,1]5
#Colloc.
642
643
164
165
#IC
-
-
-
-
#BC
4×64
6×642
8×163
10×164
#Test
642
643
164
165
Epochs
50,000
80,000
100,000
200,000
Table 6: Training Settings for High-Dimensional Helmholtz equations.
Method
R
2D
3D
4D
5D
Vanilla
–
13.344
43.467
56.801
180.465
CP-PINN
–
14.421
28.907
42.602
63.602
PIXEL
8
14.276
41.424
59.750
OOM
16
14.610
38.370
63.222
OOM
32
14.153
38.310
65.291
OOM
H-Spline
8
11.364
36.530
OOM
OOM
Table 8: Training Time (ms./iter.) for High-Dimensional Helmholtz equations.
Method
R
2D
3D
4D
5D
Vanilla
–
2.03E+00
1.80E+00
4.29E+00
7.36E+00
CP-PINN
–
7.78E-02
1.64E-01
1.33E+00
2.72E+01
PIXEL
8
8.94E-01
4.22E-01
3.99E+00
OOM
16
9.08E-01
9.01E-01
1.16E+00
OOM
32
1.02E+00
1.07E+00
1.01E+00
OOM
H-Spline
8
1.33E+00
2.56E+00
OOM
OOM
Table 9: Relative Errors for High-Dimensional Helmholtz equations.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Figure 11: Interpolation kernels and their first and second derivative functions: (a) cosine and (b)–(d) Hermite interpolation kernels.
Institute of High Performance Computing, A*STAR, Singapore. · Centre for Frontier AI Research, A*STAR, Singapore. · School of Mechanical Engineering, Tianjin University, China. +1
Division of Decision and Control Systems, School of Electrical Engineering and Computer Science, KTH Royal Institute of Technology, Stockholm, 100 44, Sweden
Civil and Environmental Engineering Department University of Illinois Urbana-Champaign Urbana, IL 61801, USA · Pacific Northwest National Laboratory Richland, WA 99352, USA