# Optimization of Offshore Saline Aquifer CO2 Storage in Smeaheia Using Surrogate Reservoir Models
## 2 Theory  
### Artificial Neural Network  
An ANN is a type of machine learning algorithm that utilizes previous data and examples to learn and predict the future performance of a given phenomenon [54]. It includes three layers: the input layer, hidden layer, and output layer, each with respective units.  
The hidden layer employs an activation function (\(\sigma(z)\)) to activate weighted input data using the kernel (\(W\)) and bias (\(b\)) matrices (Figure 1). The output layer will apply weights and activation functions to the outcomes of the hidden layer, using units that correspond to the required features for prediction. The model forecast will then be reflected in the output of the last layer.  
The process of Forward Propagation is crucial for generating the expected outcome, while the loss function calculates the discrepancy between the predicted values and the true values. The Back Propagation method improves the matrices and decreases the prediction loss and error in proportion to the learning rate. The method is iterated until reaching the global minimum of the loss; each iteration is referred to as an Epoch [55].  
There exist multiple activation functions that can be utilized in the construction of an ANN. The foremost activation functions include the sigmoid, tangent hyperbolic, and rectified linear unit (ReLU). The sigmoid activation function (Equation (1)) maps the input range to the interval [0, 1]. The inherent nature of the phenomenon under consideration is characterized by non-linearity, as visually depicted in Figure 2, where it is evident that the derivative exhibits a continuous and gradual change. The Hyperbolic Tangent function exhibits a structure that closely resembles the Sigmoid function. The function compresses  
Figure 1: ANN forward propagation algorithm for computing the next layer units from input data.  
the input value into the interval of [\(-1\), \(+1\)] and operates according to Equation (2). Both practitioners and researchers widely employ the ReLU activation function in deep learning. The efficacy of the ReLU stems from its higher performance in training as compared to alternative activation functions, such as the logistic sigmoid and the hyperbolic tangent. The ReLU function can be described as a linear function, namely the identity function, for all positive input values. Conversely, the ReLU function outputs zero for all negative input values, as denoted by Equation (3). Nevertheless, the output numbers span from zero to infinity [56].  
\[\sigma(x)=\frac{1}{1+e^{-x}} \tag{1}\]  
\[\tanh(x)=\frac{2}{1+e^{-2x}}-1 \tag{2}\]  
\[ReLU(x)=max(0,\ x) \tag{3}\]  
A Deep Neural Network (DNN) operates in a similar manner by utilizing multiple hidden layers. Hyperparameters, such as the learning rate, number of hidden layers, and optimizer, need to be tuned to suit different scenarios. Underfitting and overfitting are the two primary challenges encountered during model training. Underfitting arises when the ANN is inadequately taught to comprehend the intricacy of the occurrence. Overfitting is the phenomenon where a model achieves high performance during training but fails to generalize effectively. Possible remedies for overfitting encompass augmenting the model's network, elevating the learning rate, enhancing features, streamlining the model, implementing regularization techniques, and incorporating additional data [57].