PINNs的理論簡介
概述
過去深度學習在影像辨識、語音分析等領域已經獲得重大的進展。但對於科學計算的領域,深度學習並沒有被廣泛使用。PINNs(Physical-Informed Neural Networks)即是以深度學習為基礎,結合偏微分方程式與所對應的邊界條件與初始條件所發展出來的一個理論。相較於過去以網格(mesh-based)為基礎的方法(如FDM、FEM),由於PINNs不需使用網格,因此所求得答案的精確度不會因為使用的網格精細度而受到影響。
PINNs背景知識
DNN(Deep Neural Networks):從數學的角度來看,每一個deep neural network都是一個特定的方程式。最簡單的neural network是FNN(feed-forward neural networks)。FNN包含一個input layer、一個output layer和若干個hidden layer。每一個neural與上下層的neural之間都完全線性相連並給予適當的bias。並使用非線性的activation function串聯整個neural networks。FNN示意圖如下所示:
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
AD(Automatic Differentiation或algorithmic differentiation)包含兩個步驟:以forward方式計算每一個變數的值和以backward方式計算所有的微分的值。舉例來說,如果我們考慮只有一個Hidden Layer的FNN,輸入值為x1,x2;輸出值為y。從Neural network學習的結果,我們可以知道各Layer之間的關係如下:
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
y=2h-1
h=tanh(ν)
ν=-2x1+3x2-0.5
如果我們要計算(x1,x2)=(2,1)時所對應的偏微分值,所需要的計算過程如下表所示:
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
PINNs與PDE
PINNs(Physical Informed Neural Networks)
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
使用PINNs求解PDE的步驟如下:
- 建立一個neural networks
- 使用Boundary condition與Initial condition建立訓練資料(Training sets)
- 計算loss function,loss function的來源包含neural networks、PDE與BC/IC。
- 持續訓練neural networks,取得最佳參數讓loss function為最小。