## 4 Breakdown Pressure Prediction with a Multi-Layer Neural Network
### Dataset Preparation and Model Verification
In the hidden layers, each input is weighted, combined with a bias, and processed through an activation function to capture complex nonlinear relationships (illustrated by the diagram in the red frame in Figure 7). Finally, the output layer uses these transformed values to generate the predicted values for breakdown pressure. The model was implemented using the PyTorch deep learning framework ([[https://pytorch.org/](https://pytorch.org/)]([https://pytorch.org/](https://pytorch.org/))) and coded in Python. To capture the nonlinear interactions among the variables, the ReLU activation function was introduced for two primary reasons, as follows: (1) if each layer's output were a linear function of its input, adding more hidden layers would not effectively represent the coupling effects of multiple factors on breakdown pressure, and (2) compared to traditional neural network activation functions such as the sigmoid function, ReLU promotes sparsity in the network, reducing overfitting and significantly improving training efficiency. For preprocessing the raw data, two key aspects were considered:  
* Normalization of input parameters--Since the influencing factors have varying dimensions and value ranges, normalization was necessary to prevent large fluctuations in model loss during backpropagation. The data were standardized based on the mean (\(\mu\)) and standard deviation (\(\sigma\)) of the raw data (\(x\)) [51], as shown in the equation \(x^{\prime}=\left(x-\mu\right)/\sigma\), where \(x^{\prime}\) represents the normalized data. This standardization process improves the model's convergence speed and accuracy. Notably, the fracturing fluid type was assigned numeric codes in descending order of viscosity;
* Splitting the dataset into training and testing sets--The training set was employed for model construction, parameter optimization, and variable updates, while the testing set was reserved for evaluating the model's performance and generalization ability, allowing for the detection of overfitting or underfitting. Data from the testing set were solely used for evaluation and did not affect model parameters. For this study, the dataset was split in a 7:3 ratio, with 250 samples allocated for training and 112 samples for testing. To fully utilize the entire dataset of 362 samples and validate the model with experimental results, the data obtained from 11 experimental groups were fixed as part of the testing set. An additional 101 samples were randomly selected from the remaining data to complete the testing set, resulting in a total of 112 testing samples, while the remaining 250 samples constituted the training set. Cross-validation was performed by using different random seeds to generate varying train-test splits. This process ensured the consistent generalization ability of the model, and aimed to achieve high accuracy and repeatability for subsequent test set analyses. The loss function in deep learning [52] plays a critical role in assessing model convergence, training adequacy and the proper initialization of weights. In this study, the mean square error (\(MSE\)) function was adopted as the loss function, \(MSE=\frac{1}{h}\sum_{i=1}^{m}\left(y_{i}-y_{i}^{*}\right)^{2}\), where \(n\) is the number of data points, \(y_{i}^{*}\) is the actual value, and \(y_{i}\) is the predicted value. The accuracy curve assesses the linear correlation between predicted and actual values  
Figure 7: Schematic diagram of a multi-layer neural network model. using the Pearson correlation coefficient [53]. By analyzing the trends in loss and accuracy across both the training and testing sets, we were able to determine whether the model underfits or overfits. The maximum number of epochs for model training was set at 20,000, utilizing stochastic gradient descent as the optimizer with a learning rate of 0.0001. After conducting multiple tests with varying sample sizes and comparing the expected results, we selected a model consisting of three fully connected hidden layers, with 16, 16, and 12 neurons, respectively.