# Automatic Approach for Brain Aneurysm Detection Using Convolutional Neural Networks
## 2 Materials and Methods
### ConvLSTM Architecture  
Convolutional Long Short-Term Memory (ConvLSTM) is a neural network type that merges the capabilities of both convolutional neural networks (CNNs) and Long Short-Term Memory (LSTM) models. The CNNs are conventionally applied to image processing, excelling at feature identification and extraction from images. Conversely, LSTM models find their utility in time-series analysis, employing memory cells to preserve information across time steps. ConvLSTM is specifically engineered to unify these two models, making it proficient at managing spatiotemporal data encompassing both spatial and temporal dependencies. The ConvLSTM model's structure (see Figure 3) comprises four primary components [21]:  
* Input Gate: The input gate plays a pivotal role in determining which new information should be incorporated into the memory cell. It takes input from the preceding time step and the current pixel value, generating an output ranging from 0 to 1. A value of 0 signifies that no new information should be incorporated, whereas a value of 1 signifies that all incoming information should be preserved.
* Forget Gate: The forget gate assumes the crucial role of determining which information should be discarded from the memory cell within the LSTM model. It receives input from both the previous time step and the current pixel value, generating an output within the range of 0 to 1. A value of 0 signifies that the model should erase the prior information, whereas a value of 1 denotes that the information should be preserved. Importantly, the forget gate factors in input data and the hidden state from the preceding time step in its decision-making process.
* Output Gate: The output gate assumes the role of producing the hidden state at the present time step. It considers input from both the previous time step and the current pixel value, along with the memory cell state, yielding an output within the range of 0 to 1. This output is subsequently multiplied by the hyperbolic tangent of the memory cell, resulting in the updated hidden state. Essentially, the output gate plays a crucial part in regulating the quantity of information to transmit to the subsequent time step.  
Figure 3 illustrates the architecture of a ConvLSTM network. The \(\sigma\) symbol represents the sigmoid function, \(tanh\) represents the hyperbolic tangent function, and \(t\) represents time step. The LSTM is equipped with three gates designed to capture long-term dependencies. These gates are the input gate, the output gate, and the forget gate. Each gate plays a crucial  
Figure 2: Example of the 3D convolution.  
role in determining whether the LSTM should store or discard newly acquired information in its memory cell [21].  
The ConvLSTM model represents a robust neural network framework that seamlessly integrates convolutional and LSTM models, allowing it to effectively manage spatiotemporal data. By preserving both spatial and temporal information, this model demonstrates remarkable prediction accuracy in various domains, including bioinformatics, traffic prediction, and video processing. Its versatility and effectiveness have been showcased through its successful application in numerous real-world scenarios [21].