# A Hybrid Learning-Architecture for Improved Brain Tumor Recognition
## 2 Methodology
### Features Extraction  
To enhance brain tumor classification accuracy and precision, the proposed pipeline integrates MRI-derived information-rich features: CNN-derived, ViT-derived, texture, and radiomic features. These feature-deriving algorithms are well-known for their proficiency in medical image classification tasks. The extracted features are then integrated using a fusion strategy where the layers of these models are combined using the stacking method to create an ensemble classifier, resulting in a more robust brain tumor classification framework. At first, a set of texture features from the MR images to enhance brain tumor type differentiation by helping the proposed architecture harness the spatial interactions between image intensities. The features are computed using two descriptors: higher-order texture and structural features. The first hand-crafted features are derived from GLCM-based Haralick features and the gray-level run length matrix (GLRLM) features. The GLCM model is a statistical approach that leverages pixel connectivity with its neighbors (usually eight neighbors) to quantify homogeneity, yielding features such as contrast, correlation, energy, and homogeneity [32]. GLCM generates a square matrix according to the number of gray levels present in the image, where each cell within the matrix signifies the frequency of co-occurring pairs of related gray levels in the image. For a preprocessed image, \(I\), with dimension \(N\times M\); the GLCM matrix, \(G\), parameterized by an offset (\(\Delta x\), \(\Delta y\)) can be constructed as in [33] using:  
\[G_{\Delta x,\Delta y}(i,j)=\sum_{x=1}^{N}\sum_{y=1}^{M} \begin{cases}1,&I(x,y)=i \text{ and }\ I(x+\Delta x,y+\Delta y)=j\\ 0,&\text{otherwise}\end{cases} . \tag{2}\]  
Here, \(i\) and \(j\) are the pixel (gray level) values; \(I(x,y)\) is the gray-level value at the pixel defined by the spatial positions \(x\) and \(y\). Co-occurrence matrices are commonly large and sparse. Therefore, different metrics are often derived from the matrix to obtain a more meaningful set of features. These metrics, such as energy, contrast, correlation, homogeneity, and dissimilarity, can be calculated from the GLCM matrix [34]. GLRLM texture features are also used in our approach as an additional set of higher-order statistical texture features. Like GLCM, the GLRLM analysis typically extracts the pixel's spatial plane features based on high-order statistics of immediate neighboring pixels [35]. The process yields a normalized 2D feature matrix in which each component represents the overall number of occurrences of the gray level in the given direction [36]. Typically, the GLRLM extractor captured information on pixel pairs at angles 0, 45, 90, and 135\({}^{\circ}\). Mathematically, each element \(L(i,j|\theta)\) of the run length matrix \(L\), represents the number of runs with pixels of gray-level intensity equal to \(i\) and length of run equal to \(j\) along a specific orientation, \(i,j\in[0,255],\theta\in\{0,45,90,135\}\). From \(L\) for an input image of size \(N\times M\), many features, including short/long run emphasis (SRE/LRE), gray level/run length non-uniformity (GLN/RLN), run percentage (RP), low/high gray level run emphasis (LGRE/HGRE) for a  
hierarchies. Although transfer learning can be employed using pre-trained CNNs, we opted to build our architecture so that it is trained from scratch on the problem at hand to learn directly from the available data and thus extract meaningful features. Some experiments were performed to optimize the architecture hyperparameters. In particular, we employed the GridSearchCV [38] method to determine the optimal layers and parameters. As a result, the network comprises five convolutional and pooling layers with final flattening to allow the model to learn complex relationships between the high-level features. Some of the disadvantages of using CNNs are that they require strong spatial organization, struggle with non-local relationships and scale variation, and have a limited ability to generalize data.