## 2 Materials and Methods
### 1D Consolidation by PINN with Layer-Wise Locally Adaptive Activation
#### 2.1.3 PINN for 1D Terzaghi Consolidation Equation with Continuous Drainage Boundaries  
The input vector of FNN is \(\mathbf{x}(Z,T_{\text{v}})\), where \(Z\) is dimensionless depth and \(T_{\text{v}}\) is time factors, the output vector is dimensionless excess pore pressure, \(\hat{\overline{u}}(\mathbf{x};\lambda)\), which can be computed as the partial differential terms in the governing equations, using the automatic derivation (AD) mechanism in the pytorch [12]. These partial differential terms can be used to compute the residuals of the governing equation \(\hat{f}(\mathbf{x};\lambda)\):  
\[\hat{f}(\mathbf{x};\lambda):=\frac{\partial\hat{\overline{u}}}{\partial T_{ \text{v}}}-\frac{\partial^{2}\hat{\overline{u}}}{\partial Z^{2}} \tag{15}\]  
The input vector \(\mathbf{x}\) comes from the dataset \(D\), which includes the upper boundary condition points \(\mathcal{D}_{ub}\), lower boundary condition points \(\mathcal{D}_{lb}\), initial condition points \(\mathcal{D}_{ic}\), measured points obtained from experiments or high-precision numerical simulations \(\mathcal{D}_{m}\), and the residual points \(\mathcal{D}_{f}\). Among them, the residuals are mostly sampled randomly, and in this paper, we use the Latin hypercube sampling proposed by [PERSON] et al. [35]. The next step is to define the loss function. For a PINN without a measured dataset, the loss function should consist of two main components: (1) the \(\overline{u}(\mathbf{x})\) and \(\hat{\overline{u}}(\mathbf{x};\lambda)\) for \(\mathbf{x}\in\mathcal{D}_{ub},\mathcal{D}_{lb},\mathcal{D}_{ic}\); (2) zero and \(\hat{f}(\mathbf{x};\lambda)\) for \(\mathbf{x}\in\mathcal{D}_{f}\). According to the definition of [PERSON] et al. [11], the loss function of PINN is the sum of mean square error (MSE) of FNN on \(\mathcal{D}_{ub},\mathcal{D}_{lb},\mathcal{D}_{ic}\) and \(\mathcal{D}_{f}\):  
\[\mathcal{L}(\mathcal{D};\lambda)=\mathcal{L}(\mathcal{D}_{ub};\lambda)+ \mathcal{L}(\mathcal{D}_{lb};\lambda)+\mathcal{L}(\mathcal{D}_{ic};\lambda)+ \mathcal{L}\Big{(}\mathcal{D}_{f};\lambda\Big{)} \tag{16}\]  
\[\mathcal{L}(\mathcal{D}_{ub};\lambda)=\frac{1}{\left|\mathcal{D}_{ub}\right|} \underset{x\in\mathcal{D}_{ub}}{\sum}\left|u(\mathbf{x})-\hat{u}(\mathbf{x}; \lambda)\right|^{2} \tag{17}\]  
\[\mathcal{L}(\mathcal{D}_{lb};\lambda)=\frac{1}{\left|\mathcal{D}_{lb}\right|} \underset{x\in\mathcal{D}_{lb}}{\sum}\left|u(\mathbf{x})-\hat{u}(\mathbf{x}; \lambda)\right|^{2} \tag{18}\]  
\[\mathcal{L}(\mathcal{D}_{ic};\lambda)=\frac{1}{\left|\mathcal{D}_{ic}\right|} \underset{x\in\mathcal{D}_{ic}}{\sum}\left|u(\mathbf{x})-\hat{u}(\mathbf{x}; \lambda)\right|^{2} \tag{19}\]  
\[\mathcal{L}\Big{(}\mathcal{D}_{f};\lambda\Big{)}=\frac{1}{\left|\mathcal{D}_{ f}\right|}\underset{x\in\mathcal{D}_{f}}{\sum}\left|\hat{f}(\mathbf{x}; \lambda)\right|^{2} \tag{20}\]  
Finally, the network is trained by setting the number of network iterations, and the optimizer is used to minimize the loss function to iteratively update the network's learnable parameters \(\lambda\). In this paper, the Adam optimizer [36], which is based on the stochastic gradient descent (SGD) algorithm, is used to update the parameters, and the learning rate is set to 0.001. Figure 2 illustrates the framework of PINN solving the 1D Terzaghi consolidation equation. The loss function of the above PINN contains several loss terms, and in order to minimize the loss function, each loss term needs to be weighed; such a process is known as multi-task learning [37]. Simply adding up all the loss terms may lead to an imbalance in the training rate across tasks, which seriously affects the PINN performance, a phenomenon known as gradient pathology [38]. Gradient pathology is usually addressed by specifying the weights of each loss term and weighting the summation [39]:  
\[\mathcal{L}(D;\lambda)=\sum_{i}w_{i}\mathcal{L}(D_{i};\lambda),i\in\{ub,lb, ic,f\} \tag{21}\]where \(w_{i}\) is the weight for the loss term \(L(D_{i};\lambda)\).