# Dynamic Relevance-Weighting-Based Width-Adaptive Auto-Encoder
## 3 Width-Adaptive Autoencoder
### Adding and Pruning Nodes
The learned width of the encoder stabilizes at 1593 nodes for MNIST and 1896 for CIFAR-10, indicating that the model adapts to the complexity of each dataset by allocating more representational capacity for the more challenging CIFAR-10. In terms of classification performance, both classifiers achieve high accuracies on MNIST, with SVM slightly outperforming SoftMax (96.79% vs. 95.97%), suggesting that the extracted features are highly discriminative for this relatively simple digit recognition task. However, for CIFAR-10, the accuracies are considerably lower, 44.66% with SoftMax and 41.13% with SVM, reflecting the increased difficulty of the dataset. * Comparative evaluation with manual tuning

Table 4 highlights the contrast between the manual tuning and dynamic learning approaches in terms of learned parameters, training time, and testing time for both MNIST and CIFAR-10 datasets. The dynamic approach demonstrates a significant reduction in computational complexity and resource usage while maintaining effective model training. For the MNIST dataset, manual tuning results in over 201 million parameters, whereas the dynamic method learns only around 2.5 million parameters. It exhibits a reduction by nearly 99%. Similarly, for CIFAR-10, the parameter's count drops from over 1.1 billion to approximately 11.6 million, reflecting a similar magnitude of improvement. This reduction in model size translates directly into drastic savings in training and testing time. Training time is reduced from roughly 48,963 s to 701 s for MNIST and from 874,853 s to just 413 s for CIFAR-10. Testing time also benefits from this efficiency, decreasing from 186.11 s to 0.55 s on MNIST, and from 1025.81 s to 0.70 s on CIFAR-10. These improvements underscore the effectiveness of the dynamic approach in achieving high computational efficiency and scalability, particularly important when dealing with large-scale data or resource-constrained environments. Thus, the proposed dynamic learning approach not only significantly reduces model complexity and runtime but also maintains competitive accuracy, making it a highly attractive alternative to traditional manual tuning methods. In fact, the dynamic approach provides substantial advantages over manual tuning when determining a model's width. Specifically, manual addition necessitates an exhaustive search process to determine the optimal width, which requires significant time and \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset** & \multicolumn{2}{c}{**MNIST**} & \multicolumn{2}{c}{**CIFAR-10**} \\ \hline Learning Type & Manual & Dynamic & Manual & Dynamic \\ Learned & 201,499,534 & 2,500,201 & 1,112,801,032 & 11,653,992 \\ parameter & 48,963.16 & 701.06 & 874,853.23 & 413.14 \\ Train time (s) & 186.11 & 0.55 & 1025.81 & 0.70 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison between the manual tuning and dynamic learning approaches in terms of learned parameters, training time, and testing time for both MNIST and CIFAR-10 datasets. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset** & \multicolumn{2}{c}{**MNIST**} & \multicolumn{2}{c}{**CIFAR-10**} \\ \hline Learned Width & \multicolumn{2}{c}{1593} & \multicolumn{2}{c}{1896} \\ \hline Classifier & SoftMax & SVM & SoftMax & SVM \\ Accuracy & 95.97\% & 96.79\% & 44.66\% & 41.13\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Final learned widths and classification accuracies for both the MNIST and CIFAR-10 datasets. computational resources. This is because the model must be retrained with various widths. Furthermore, the features' efficacy frequently depends upon the dataset, rendering manual methods less efficient and adaptable. In contrast, dynamic strategies enable the model to derive the optimal width from the data by self-adjusting its architecture during training. This adaptive process guarantees the model captures significant patterns without saturation or underfitting.