Logarithmic transformation of input activations in convolutional network neurons: An approach and analysis of effectiveness using MNIST classification as an example
Artem Tarnovskyi*Convolutional neural networks attract considerable attention because they can learn directly from input data, automatically forming the features required for classification. The purpose of the study was to improve the architecture of a convolutional neural network by applying a logarithmic transformation of input activations in the neurons of convolutional layers and examining its influence on classification accuracy and the robustness of the neural network to changes in image brightness. The mathematical model of a modified neuron was considered; it evaluates the input signal through a logarithmic transformation of the form γ ·ln(x+1), where γ is an additional trainable parameter that determines the degree of nonlinear signal compression. This approach increased the sensitivity of the neuron to relative changes in input signals, reduces the influence of large activation values, and can improve the stability of the training process. An analysis of gradients for the trainable parameters of the neural network was conducted within the backpropagation method. The analysis indicated that logarithmic transformation changes the pattern of weight updates, strengthening the gradient at small signal values and weakening it at large values. Particular attention was paid to the γ parameter, which acts as a global scale coefficient for the neural layer and enables the network to adjust the level of nonlinearity independently. Experimental verification of the effect of logarithmic transformation of input activations in convolutional layers was conducted using the MNIST handwritten digit classification task with a LeNet-like architecture. The experimental results demonstrated that, for standard images, the logarithmic model provides only a slight increase in accuracy compared with the model with classical linear neurons, averaging 99.17% versus 99.11%. However, for the same images with reduced brightness, the logarithmic model demonstrated high robustness and much higher accuracy. In particular, when brightness was reduced sevenfold, classification accuracy for the model with classical neurons decreased on average to 27.11%, whereas the logarithmic model maintained a level of approximately 90.98%. The results confirmed the appropriateness of using logarithmic transformation as a mechanism for improving the stability of neural networks in computer vision tasks under insufficient or variable illumination
References
- Aboukhair, M., Alsheref, F., Assiri, A., Koura, A., & Kayed, M. (2025). CNN filter sizes, effects, limitations, and challenges: An exploratory study. Network Computation in Neural Systems, 1-29. doi: 10.1080/0954898X.2025.2533865.
- Alzubaidi, L., Zhang, J., Humaidi, A.J., Al-Dujaili, A., Duan, Y., Al-Shamma, O., Santamaría, J., Fadhel, M.A., Al-Amidie, M., & Farhan, L. (2021). Review of deep learning: Concepts, CNN architectures, challenges, applications, future directions. Journal of Big Data, 8(1), article number 53. doi: 10.1186/s40537-021-00444-8.
- Cotogni, М., & Cusano, C. (2022). Offset equivariant networks and their applications. Neurocomputing, 502, 110-119. doi: 10.1016/j.neucom.2022.06.118.
- Hu, C., Shi, W., Li, C., Sun, J., Wang, D., Wu, J., & Tang, G. (2023). Impact of light and shadow on robustness of deep neural networks. arXiv. doi: 10.48550/arXiv.2305.14165.
- Kadam, S., Adamuthe, A., & Patil, A. (2020). CNN model for image classification on MNIST and fashion-MNIST dataset. Journal of Scientific Research, 64 (2), 374-384. doi: 10.37398/JSR.2020.640251.
- Khan, S., & Iqbal, R. (2025). A comprehensive survey on architectural advances in deep CNNs: Challenges, applications, and emerging research directions. arXiv. doi: 10.48550/arXiv.2503.16546.
- Khanday, O.M., Dadvandipour, S., & Lone, M.А. (2021). An effect of filter sizes on image classification in CNN: A case study on CIFAR10 and Fashion-MNIST datasets. IAES International Journal of Artificial Intelligence, 10(4), 872-878. doi: 10.11591/ijai.v10.i4.pp872-878.
- Madadum, H., & Becerikli, Y. (2022). A resource-efficient convolutional neural network accelerator using fine-grained logarithmic quantization. Intelligent Automation & Soft Computing, 33(2), 681-695. doi: 10.32604/iasc.2022.023831.
- Maes, C. (2021). Statistical mechanical foundation of Weber-Fechner laws. Journal of Statistical Physics, 182, article number 49. doi: 10.1007/s10955-021-02726-0.
- Maxwell, B.A., Singhania, S., Patel, А. Kumar, R., Fryling, H., Li, S., Sun, H., He, P., & Li, Z. (2024). Logarithmic lenses: Exploring log RGB data for image classification. In 2024 IEEE/CVF conference on computer vision and pattern recognition (CVPR) (pp. 17470-17479). Seattle: Institute of Electrical and Electronics Engineers. doi: 10.1109/CVPR52733.2024.01654.
- Nocentini, O., Kim, J., Bashir, M.Z., & Cavallo, F. (2022). Image classification using multiple convolutional neural networks on the fashion-MNIST dataset. Sensors, 22(23), article number 9544. doi: 10.3390/s22239544.
- Petkovic, J., & Fioresi, R. (2024). Spontaneous emergence of robustness to light variation in CNNs with a precortically inspired module. Neural Computers, 36(9), 1832-1853. doi: 10.1162/neco_a_01691.
- Raj, R., & Kos, A. (2025). An extensive study of convolutional neural networks: Applications in computer vision for improved robotics perceptions. Sensors, 25(4), article number 1033. doi: 10.3390/s25041033.
- Rodríguez-Rodríguez, J.A., López-Rubio, Е., Jiménez-Segura, S., & Molina-Cabello, M.A. (2026). Adaptive image enhancement for robust CNN classification under low illumination. Expert Systems with Applications, 315, article number 131696. doi: j.eswa.2026.131696.
- Stenin, A., Pasko, V., Soldatova, M., & Drozdovych, I. (2022). Recognition of handwritten numbers based on convolutional neural networks. Adaptive Automatic Control Systems, 2(41), 39-44. doi: 10.20535/1560-8956.41.2022.271337.
- Tsirtsakis, P., Zacharis, G., Maraslidis, G.S., & Fragulis, G.F. (2025). Deep learning for object recognition: A comprehensive review of models and algorithms. International Journal of Cognitive Computing in Engineering, 6, 298-312. doi: 10.1016/j.ijcce.2025.01.004.
- Wang, Y., Li, F., Sun, H., Li, W., Zhong, C., Wu, X., Wang, H., & Wang, P. (2020). Improvement of MNIST image recognition based on CNN. In IOP conference series: Earth and environmental science of 7th annual international conference on geo-spatial knowledge and intelligence 20-21 December 2019, Guangzhou, China. 428, article number 012097. Guangzhou: Guangzhou Institute of Geography. doi: 10.1088/1755-1315/428/1/012097.
- Weidler, T., Lehnen, J., Denman, Q., Sebők, D., Weiss, G., Driessens, K., & Senden, M. (2021). Biologically inspired semantic lateral connectivity for convolutional neural networks. arXiv. doi: 10.48550/arXiv.2105.09830.
- Younesi, A., Ansari, M., Fazli, M., Ejlali, A., Shafique, M., & Henkel, J. (2024). A comprehensive survey of convolutions in deep learning: Applications, challenges, and future trends. IEEE Access, 12, 41180-41218. doi: 10.1109/ACCESS.2024.3376441.
- Zhe, W. (2024). Research on the application of CNN in MNIST image classification and recognition. In 2024 IEEE 7th international conference on information systems and computer aided education (ICISCAE) (pp. 698-706). Dalian: Shenyang Normal University. doi: 10.1109/ICISCAE62304.2024.10761186.