## 3 Materials and Methods
### Model Architecture for Proposed Approach  
Multi-scale convolution is a powerful technique in CNNs that enhances feature extraction by capturing information across varying spatial resolutions. Unlike standard convolutional layers that operate with fixed filter sizes, multi-scale convolution utilizes filters of different dimensions to simultaneously extract fine-grained and coarse-grained features [33]. This capability is particularly beneficial for medical image analysis, such as pediatric pneumonia recognition, where diverse patterns and textures must be identified across varying spatial scales. By combining outputs from filters of varying sizes, our model effectively captures both local and global features, making it more robust to variations in image resolution and scale [34; 35]. This ability to capture multi-resolution features improves the model's generalizability, particularly in clinical datasets with heterogeneous imaging conditions [36; 37]. Additionally, multi-scale convolution reduces the risk of overfitting by diversifying the spatial patterns used during feature extraction. In this research, we utilized the pretrained DenseNet201 network as the foundational framework for feature extraction. DenseNet201, renowned for its intricately connected structure and effective feature reuse, was pretrained on ImageNet, thus providing a substantial basis for transfer learning. We chose to freeze the pretrained layers of DenseNet201  
Figure 2: Samples of the pneumonia and healthy chest X-ray images used in this study. to preserve the learned features; however, we incorporated multi-scale convolutional layers on top. Specifically, we implemented filters of sizes 3 \(\times\) 3, 5 \(\times\) 5, and 7 \(\times\) 7, which enabled the model to capture features across various spatial resolutions. These multi-scale outputs were then concatenated, forming a more comprehensive feature representation, which improved the model's capacity to detect pneumonia-related patterns in chest X-ray images. Additionally, we enhanced the architecture with pooling operations and a fully connected dense layer for classification because this allows for more accurate predictions. The convolutional operation in this architecture is expressed in Equation (1):  
\[y(i,j)=\sum\limits_{m=0}^{M-1N-1}\sum\limits_{n=0}^{N}x(i+m,j+n)*w(m,n), \tag{1}\]  
where \(x(i+m,j+n)\) represents the input feature map, \(w(m,n)\) denotes the convolution filter of size \(M\times N\), and \(y(i,j)\) is the resulting output feature [38]. The multi-scale convolutional framework incorporates filters of different dimensions to capture diverse spatial patterns, thereby enhancing the model's ability to recognize complex and heterogeneous radiographic presentations, as demonstrated in Algorithm 1. ```
1 functionMultiScaleConvolution(Input_Image, Kernels, Biases)
2 Input:
3 Input_Image: 2D matrix of pixel intensities
4 Kernels: List of 2D filter matrices [Kernel\({}_{1}\), Kernel\({}_{2}\),\(\ldots\), Kernel\({}_{N}\)]
5 Biases: List of corresponding bias terms [Bias\({}_{1}\), Bias\({}_{2}\),\(\ldots\), Bias\({}_{N}\)]
6 Output: Combined_Feature_Map
7 InitializeFeature_Maps as an empty list
8 for each scale \(k\) in range 1, \(N\)do
9 Kernel\(\leftarrow\)Kernels[\(k\)]
10 Bias\(\leftarrow\)Biases[\(k\)]
11 Feature_Map\({}_{k}\leftarrow\)Convolution(Input_Image, Kernel, Bias)
12 Append Feature_Map\({}_{k}\) to Feature_Maps
13 endfor
14 Combine all Feature_Map\({}_{k}\) into a single representation:
15 Combined_Feature_Map\(\leftarrow\)Concatenate(Feature_Maps)
16 returnCombined_Feature_Map
17 endfunction
```  
**Algorithm 1**Multi-Scale Convolution  
To further improve the model's efficacy, the Mish activation function was utilized in the multi-scale convolutional layers. Mish, as mathematically defined in Equation (2):  
\[\textit{Mish}(x)=x*\textit{tanh}(\textit{softplus}(x))=x*\textit{tanh}(\ln(1+ e^{x})) \tag{2}\]  
provides smoother gradient propagation and better convergence compared to traditional activation functions such as ReLU [39].